Xavier Ducrohet [Tue, 19 Feb 2013 00:55:29 +0000 (16:55 -0800)]
Change tests to be instrumentationTests everywhere.
This is to not collide with jUnit 'tests'. The idea is
to allow regular jUnit tests in the same project, alongside
instrumentation (and ui automator) tests.
Xavier Ducrohet [Thu, 14 Feb 2013 18:59:17 +0000 (10:59 -0800)]
Unlink instrumentation tests from the check task.
A clear separation between checks that requires and those that do
not require a device is better. This will allow to run lint and
other non-device checks separately more easily.
Xavier Ducrohet [Wed, 30 Jan 2013 21:24:03 +0000 (13:24 -0800)]
SDK support improvements.
Move figuring out the path to aidl/aapt/dx/llvm-rs-cc from IAndroidTarget
to SdkParser (in preparation of the build-tools).
Also change android.target to android.compileSdkVersion to make it
less confusing with regards to min/targetSdkVersion and also change it
to take either an int or a string.
Xavier Ducrohet [Thu, 7 Feb 2013 00:27:06 +0000 (16:27 -0800)]
am c3d26c65: Merge "Minor fix + more verbose assert in test to debug issue."
# Via Gerrit Code Review (1) and Xavier Ducrohet (1)
* commit 'c3d26c652e7004324569c9384510214981f759b3':
Minor fix + more verbose assert in test to debug issue.
Xavier Ducrohet [Wed, 6 Feb 2013 23:34:45 +0000 (15:34 -0800)]
am 159ad4c0: Merge "Add multi assets folder support + assets in libraries."
# Via Gerrit Code Review (1) and Xavier Ducrohet (1)
* commit '159ad4c01dc1a36e9eac39b2c39b8a642a99517b':
Add multi assets folder support + assets in libraries.
Xavier Ducrohet [Tue, 29 Jan 2013 22:46:16 +0000 (14:46 -0800)]
Add multi assets folder support + assets in libraries.
Because managing those is very similar to resources,
this changeset refactors Resource(Item*), ResourceFile,
ResoureSet and ResourceMerger into base classes DataItem,
DataFile, DataSet and DataMerger providing most of the
mechanism to incrementally merge any type of data.
(* for consistency, Resource is renamed ResourceItem)
New classes to support the assets: AssetItem, AssetFile,
AssetSet, AssetMerger.
Also refactors the test data and add new test and test data
specifically for the asset.
Xavier Ducrohet [Fri, 25 Jan 2013 21:49:05 +0000 (13:49 -0800)]
Refactor tasks.
I previously split the tasks into an internal class
and a non-internal class to separate the public
and private api of the tasks, but all this did
was introduce complication for a split that
was not enforced at the DSL level anyway.
So this merges back the internal and non-internal
task classes.
Xavier Ducrohet [Tue, 22 Jan 2013 21:12:06 +0000 (13:12 -0800)]
Update the AIDL task to the new incremental framework.
Before, the aidl task would rely on the .d files created during
compilation to figure out what files needed recompilation.
The main drawback was that all .d files were created next to
the output files, making searching them before running the
compilation cumbersome.
This changes the mechanism to process the .d files right
after the compilation (when we know where to find them),
process them into a DependencyData object and later store
all those objects into a single file through DependencyDataStore.
Before the task run, it is much simpler to reload all the
DependencyData objects from the single file.
This now also relies on the IncrementalTask which provides
the exact list of changed files so this can be compared
to the DependencyData to know what files to recompile
and which output to update/remove.
Compilation of multiple aidl files now also use a
WaitableExecutor to run them in parallel.
Misc fix to dex task to ensure incremental command
receives all the parameters that are needed.
Xavier Ducrohet [Thu, 17 Jan 2013 00:24:59 +0000 (16:24 -0800)]
Ensures debug keystores are created.
For Each SigningConfig object, create a ValidateSigningTask
that creates the keystore if:
- the path match the default debug keystore
- the keystore is missing
Packaging tasks are made to depend on the validate task
matching the SigningConfig they are configured with.
The main reason to do that versus doing the creation
inside the packaging app is that the way gradle
handles input file, the file has to exist.
The optional annotation let the input be null,
but not be a value that doesn't match an existing
file.
Also adds the store type in the SigningConfig as it's necessary for
both creating and loaded a keystore.
Finally, this fixes the API of the packaging a bit:
- pass the SigningConfig directly everywhere.
- have the Builder throw the actual exceptions instead of
RuntimeException (so that the caller can decide what to do)
- Make SigningConfigDsl extend the getters to be able to
annotate them with @Input
- Clean up the DebugKeyHelper vs. KeystoreHelper.
Scott Barta [Wed, 16 Jan 2013 23:15:37 +0000 (15:15 -0800)]
Incremental support for dex
Enables existing incremental dex support in the dx tool in Gradle
build files. Uses existing incremental task infrastructure to
determine the set of changed .class files to pass to dx. Makes
incremental dexing a configurable option that developers can
disable via their build files if need be, though it's enabled by
default.
Testing against the Google Play client build, incremental dexing
for single .java file changes improves dexing performance by
about 14x and reduces overall build times by 70% (when comparing
incremental-Gradle to non-incremental Gradle; non-incremental
Gradle is very roughly equivalent to Eclipse build times).
Xavier Ducrohet [Wed, 16 Jan 2013 03:12:28 +0000 (19:12 -0800)]
Improvements to SigningConfig/BuildType initialization.
Moved the init code out of the main classes in Builder and into
the Dsl children classes.
This fixes some issues around sharing the SigningConfig.debug
object instead of creating a new disconnected one, so that
customizing it does update the BuildType.debug object.
This also improve error handling so that Builder doesn't
throw a RuntimeException but the Gradle plugin can (actually
a BuildException) if the debug keystore path cannot be found.
It's better that the client of the Builder library decides
what to do instead of the library throwing.
Also added debug signing config customization support in the
library plugin.
Finally added a initWith() method to both SigningConfig and
BuildType to allow easy duplication from the DSL.
Will probably need to do the same for ProductFlavor.