6 years agoSplit android-builder out of android-gradle.
Xavier Ducrohet [Wed, 29 Aug 2012 02:09:17 +0000]
Split android-builder out of android-gradle.

Both should be separate artifacts in Maven.

Change-Id: I96a0d1fffb195a7542cffeab99fabad5ad243d08

6 years agoAdd support to build and bundle library projects.
Xavier Ducrohet [Wed, 29 Aug 2012 00:31:49 +0000]
Add support to build and bundle library projects.

The unarchived bundle is saved under build/bundle.

The generated manifest is directly saved under there
to avoid copying it.
The resources are copied there but the built-type
res folder is not properly merged in there. Need
to fix this.
The crunched resources are copied on top of it.

Also add a library test app.

Change-Id: Iab2d437b6f98ca5f842ca9720aafa206691fc1f0

6 years agoMerge "Refactoring to prepare for building libraries."
Xavier Ducrohet [Tue, 28 Aug 2012 23:47:34 +0000]
Merge "Refactoring to prepare for building libraries."

6 years agoRefactoring to prepare for building libraries.
Xavier Ducrohet [Tue, 28 Aug 2012 22:07:56 +0000]
Refactoring to prepare for building libraries.

Change-Id: Ic8f0055a5433871da26859abfda85908b09b182f

6 years agoMerge "Fix noCompress support in aapt."
Xavier Ducrohet [Tue, 28 Aug 2012 21:46:59 +0000]
Merge "Fix noCompress support in aapt."

6 years agoFix noCompress support in aapt.
Xavier Ducrohet [Tue, 28 Aug 2012 18:38:43 +0000]
Fix noCompress support in aapt.

Move the aapt/dex options to interface in the builder, with implementation
in the gradle front-end.

Change-Id: Id524b57fdad5ade22db3b2abb3defa0dd2421c94

6 years agoMerge "Add support for building test apps."
Xavier Ducrohet [Tue, 28 Aug 2012 16:51:09 +0000]
Merge "Add support for building test apps."

6 years agoAdd support for building test apps.
Xavier Ducrohet [Mon, 27 Aug 2012 21:02:11 +0000]
Add support for building test apps.

Support for test apps testing apps only. Not support
for library projects yet. Lots of bug fixes to get here.

Renamed 'basic' to 'dependencies'. This will still need
to be refactored.

'basic' and 'flavored' are two new projects with that are
very simple and meant to test the build variant mechanism
which is tested by the test apks.

This also adds uninstall tasks as well as runTests tasks,
and creates top level install tasks.

Change-Id: I11bf62b236a4df6752b4195fd1989da3f93e29bd

6 years agoMerge "Change the way AndroidBuilder is configured."
Xavier Ducrohet [Mon, 27 Aug 2012 23:13:20 +0000]
Merge "Change the way AndroidBuilder is configured."

6 years agoChange the way AndroidBuilder is configured.
Xavier Ducrohet [Fri, 24 Aug 2012 22:50:38 +0000]
Change the way AndroidBuilder is configured.

In order to build test apps and library apps we need
to seriously change the configuration of the builder.

It now receives a VariantConfiguration that contains
all that is needed. If the builder builds a test app
it also receives a VariantConfiguration for the tested
app.
This is critical for building apps that test libraries
as they will embed the library.

Also, the plugin now creates all tasks in afterEvaluate
as it is a lot simpler to loop on all build types and
product flavors. It also allow conditionally creating
some tasks based on the configuration of the project
flavors and build types.

Made a copy of the basic testapps where the build
is configured for multi-flavors.

Change-Id: Ib9a70b6fa79dec6cf939e1d4bd2e75559529e820

6 years agoMerge "Refactoring to prepare libary work"
Xavier Ducrohet [Thu, 23 Aug 2012 23:54:11 +0000]
Merge "Refactoring to prepare libary work"

6 years agoRefactoring to prepare libary work
Xavier Ducrohet [Thu, 23 Aug 2012 21:41:05 +0000]
Refactoring to prepare libary work

Change-Id: Ic319eaef33be775c707ea4983d6691addc2eee61

6 years agoMerge "Change the way the AndroidBuilder is created and used."
Xavier Ducrohet [Thu, 23 Aug 2012 23:21:09 +0000]
Merge "Change the way the AndroidBuilder is created and used."

6 years agoMerge "Use AndroidBuilder to build basic APK."
Xavier Ducrohet [Thu, 23 Aug 2012 23:20:53 +0000]
Merge "Use AndroidBuilder to build basic APK."

6 years agoChange the way the AndroidBuilder is created and used.
Xavier Ducrohet [Thu, 23 Aug 2012 00:34:00 +0000]
Change the way the AndroidBuilder is created and used.

The previous way relied on all tasks of a given
assemble<variant> to happen with no other task
(from another assemble<variant>) to happen in the
middle due to the single AndroidBuilder stored in the
plugin.

This changes this in the following way:
- There is now a map of (variant, builder).
- The configureVariant task is gone and the builder is done
  on demand
- The ApplcationVariant classes are reponsible for creating
  the builder since they own the data needed to initialize it.
- Each task receives both the AndroidBasePlugin and the variant
  in order to ask the variant to create the builder if the base
  plugin doesn't already have one.

Additionally this does the following:
- Removes the default value of the compilation target
- Fixes the runtimeJar given to the compiler. This
  queries the AndroidBuilder which replies with a list of jars
  which is then joined in a colon separated string. This
  is done in the doFirst of the compile task so that this is
  only done when the compile task runs.
- Fixes an issue exporting non signed apks.

Finally this refactors the plugin a bit moving stuff into
the AndroidBasePlugin (now a class) so that the library plugin
can use it later when I get to it.

Change-Id: I5ad05395b8cc7ad9a2aa7242ae635dca5579f8d4

6 years agoUse AndroidBuilder to build basic APK.
Xavier Ducrohet [Wed, 22 Aug 2012 02:00:28 +0000]
Use AndroidBuilder to build basic APK.

Notable changes:
- AndroidBuilder now receives ProjectFlavorHolder and
  BuildTypeHolder. This both contains the flavor/type
  themselves but also implements PathProvider to
  provide the needed path.
- The [ProductFlavor/BuildType]Dimension implements
  the Holder classes to provide those paths
- Moved to using the AndroidBuilder. It is created
  by the ConfigureVariant task and set in the plugin
  through the AndroidBasePlugin (will be used by
  both plugins) and queried by the tasks with a simple
  AndroidBuilderProvider
- Updated the mergeManifest, crunchRes, processRes,
  dex and packageApp tasks to use the AndroidBuilder.

The tasks to create test apps haven't been touched yet.

Known issues:
- AndroidBuilderProvider will not work for builds that
  create more than one APK.
- Because some inputs are not explicit in some tasks
  (they are figured out automatically on the
  AndroidBuilder side, touching some files will not
  trigger new builds. The task's TaskInputs object
  needs to be manipulated to help with this. This
  will be needed for the inputs coming from library
  dependencies as well anyway.

Change-Id: I7f9ca428ce2048ce92ed780367db0aaf01f6350b

6 years agoMerge "Create a Configure<Variant> task."
Xavier Ducrohet [Wed, 22 Aug 2012 21:12:37 +0000]
Merge "Create a Configure<Variant> task."

6 years agoMerge "Create a fat jar that contains the classes of the plugin and all dependencies."
Xavier Ducrohet [Wed, 22 Aug 2012 02:48:04 +0000]
Merge "Create a fat jar that contains the classes of the plugin and all dependencies."

6 years agoCreate a fat jar that contains the classes of the plugin and all dependencies.
Adam Murdoch [Wed, 22 Aug 2012 02:37:56 +0000]
Create a fat jar that contains the classes of the plugin and all dependencies.

Change-Id: I72c2c6a8942135cf1da809f56373e58bb3864062

6 years agoCreate a Configure<Variant> task.
Xavier Ducrohet [Wed, 22 Aug 2012 01:05:22 +0000]
Create a Configure<Variant> task.

This task creates and configure the AndroidBuilder that will be
used in the other tasks.

Change-Id: Iedbfcd709287256394c736eacbd7a9597ce2fee0

6 years agoMerge "Start integration of the builder lib in the gradle plug-in"
Xavier Ducrohet [Wed, 22 Aug 2012 00:47:21 +0000]
Merge "Start integration of the builder lib in the gradle plug-in"

6 years agoStart integration of the builder lib in the gradle plug-in
Xavier Ducrohet [Tue, 21 Aug 2012 19:18:01 +0000]
Start integration of the builder lib in the gradle plug-in

First step: move to the BuildType and ProductFlavor classes
from the builder library.

Change-Id: Ib83c590ff7dbf38774022d7539634835de9f31c0

6 years agoMerge "Changed plugin group and package names."
Xavier Ducrohet [Tue, 21 Aug 2012 18:49:22 +0000]
Merge "Changed plugin group and package names."

6 years agoMerge "Separated the prototype into plugin and test apps."
Xavier Ducrohet [Tue, 21 Aug 2012 18:46:11 +0000]
Merge "Separated the prototype into plugin and test apps."

6 years agoMerge "Android build library."
Xavier Ducrohet [Tue, 21 Aug 2012 18:41:11 +0000]
Merge "Android build library."

6 years agoMerge "Initial prototype of Gradle plugin to build Android applications"
Xavier Ducrohet [Tue, 21 Aug 2012 18:32:21 +0000]
Merge "Initial prototype of Gradle plugin to build Android applications"

6 years agoChanged plugin group and package names.
Adam Murdoch [Tue, 21 Aug 2012 06:17:18 +0000]
Changed plugin group and package names.

Now uses package 'com.android.build.gradle' for source,
and group 'com.android.build'.

The packages for the test applications have not been changed, yet.

Change-Id: Id55eb9ea91295c72d989844b1f1cdee1ca9b58c3

6 years agoSeparated the prototype into plugin and test apps.
Adam Murdoch [Tue, 21 Aug 2012 05:36:01 +0000]
Separated the prototype into plugin and test apps.

The plugin implementation has moved to the gradle/ directory,
and the test applications have moved under the testapps/
directory. This change means that you now have to run
./gradlew uploadArchives in the root directory to make the
plugin available to the test application builds via a
local repository (in repo/).

See the readme.md for more details about building and using
the test applications.

Change-Id: Id9b268aa1d6d1a5621513fb788b2dc90ca2793e8

6 years agoInitial prototype of Gradle plugin to build Android applications
Adam Murdoch [Sun, 19 Aug 2012 23:44:51 +0000]
Initial prototype of Gradle plugin to build Android applications

This is an initial prototype Gradle plugin that can build Android applications.
This is intended to demonstrate how such a plugin would be wired together. Most
of the tasks are placeholders for a real implementation. See the readme for
details.

Change-Id: I8f25493b9656c3919c0635c0e5363cdd9c8c171d

6 years agoAndroid build library.
Xavier Ducrohet [Tue, 21 Aug 2012 01:07:58 +0000]
Android build library.

This library allows building Android libraries and
applications in the context of the Android SDK.

It is meant to be usable by various build systems and only
deals with the logic of building Android applications.
While it exposes some configurations and expect from
specific inputs, they are meant to be provided by the
build system itself.

It purposely doesn't include Eclipse or IDEA project
files due to dependencies that are downloaded from Maven
(and due to IDEA's tendency to put local path in its
project paths).
Instead those can be created using
    gradle eclipse
and
    gradle idea

The prebuilts are temporary till we move those libraries
to gradle or figure something else.

Change-Id: Ia95fa9ae3a619c2d9fe68b4cfa3ce72acfb4df3c

6 years agoInitial empty repository
Chad Jones [Tue, 31 Jul 2012 23:07:02 +0000]
Initial empty repository