We are working on a new build system to replace both the build system inside ADT and Ant.
- Fixed ClassNotFoundException:MergingException introduced in 0.6.2
- Lint now picks up the SDK home from sdk.dir in local.properties
- Error message shown when using an unsupported version of Gradle now explains how to update the Gradle wrapper
- Merged resource files no longer place their source markers into the R file as comments
- Project path can contain '--' (two dashes)
- Internal changes to improve integration with Android Studio
- Fixed issue with "lint" task when executing task "check"
- Gradle 1.8 is now the minimum supported version
- Default encoding for compiling Java code is UTF-8
- Users can now specify the encoding to use to compile Java code
- Fixed Gradle 1.8-specific bugs
- Importing projects with missing dependencies was broken
- Compiling projects with AIDL files was broken
Setting the encoding to use for compiling Java code is as simple as:
compileOptions.encoding = "UTF-8"
- Proguard support for libraries. Note the current DSL property 'proguardFiles' for library now sets the proguard rule file used when proguarding the library code. The new property 'consumerProguardFiles' is used to package a rule file inside an aar.
- Improved IDE support, including loading project with broken dependencies and anchor task to generate Java code
- New hook tasks: preBuild and prebuild<VariantName>
- First lint integration. This is a work in progress and therefore the lint task is not added to the check task.
- Enable compatibility with 1.8 (though note that we later released 0.6.0 to handle additional 1.8 issues discovered after 0.5.7 was released.)
- Enable support for Gradle 1.7
- Fix issue preventing to use Build Tools 18.0.1
- access to the variants container don't force creating the task.
This means android.[application|Library|Test]Variants will be empty during the evaluation phase. To use it, use .all instead of .each
- Only package a library's own resources in its aar.
- Fix incremental issues in the resource merger.
- Misc bug fixes.
- Fixed incremental compilation issue with declare-styleable
- Fix a crashing bug in PrepareDependenciesTask
- Better error reporting for cmd line tools, especially if run in parallel in spawned threads
- Fix an issue due to windows path in merged resource files.
- Fix issue in the dependency checker.
What's new in 0.5.0
- IDE Model is changed and is not compatible with earlier version! Version 0.2.0+ of Studio is required.
- Fixed IDE model to contain the output file even if it's customized through the DSL. Also fixed the DSL to get/set the output file on the variant object so that it's not necessary to use variant.packageApplication or variant.zipAlign
- Fixed dependency resolution so that we resolved the combination of (default config, build types, flavor(s)) together instead of separately.
- Fixed dependency for tests of library project to properly include all the dependencies of the library itself.
- Fixed case where two dependencies have the same leaf name.
- Fixed issue where Proguard rules file cannot be applied on flavors.
- enable crunching for all png files, not just .9.png
- fix dealing with non resource files in res/ and assets/
- fix crash when doing incremental aidl compilation due to broken method name (ah the joy of Groovy...)
- clean older R classes when the app package name has changed.
- Fixed incremental support for resource merging.
- Fixed issue where all pngs would be processed in parallel with no limit on the number of thread used, leading to failure to run aapt.
- Fixed ignoreAsset support in aaptOptions
- Added more logging on failure to merge manifests.
- Added flavor names to the TestServer API.
- Renamed 'package' scope to 'apk'
- variants are 'debugApk', 'releaseApk', 'flavor1Apk', etc...
- Now properly supported at build to allow package-only dependencies.
- Only Jar dependencies can be package-only. Library projects must be added to the compile scope.
- Fixed [application|library|test]Variants API (always returned empty on 0.4)
- Fixed issue in Proguard where it would complain about duplicate Manifests.
- System requirements
- Gradle 1.6
- Android SDK with the Build Tools component version 17.0.0 or above
- New Features
- API for 3rd party Device Providers and Test Servers to run and deploy tests. API is @Beta
- Support for ProGuard 4.9
- enable with BuildType.runProguard
- add proguard config files with BuiltType.proguardFile or ProductFlavor.proguardFile
- default proguard files accessible through android.getDefaultProguardFile(name) with name being 'proguard-android.txt' or 'proguard-android-optimize.txt'
- Implemented Gradle 1.6 custom model for IDE Tooling support
- Fixes and other changes
- Renamed deviceCheck into connectedCheck
- Fixed support for subfolders in assets/
- Fixed cases where Android Libraries have local Jars dependencies
- Fixed renaming of package through DSL to ensure resources are compiled in the new namespace
- Fixed DSL to add getSourceSets on the "android" extension.
- System requirements:
- Gradle 1.3+ (tested on 1.3/1.4). Will not be compatible with 1.5. An update will be required.
- Android Platform Tools 16.0.2+
- New Features:
- Renderscript support.
- Support for multi resource folders. See 'multires' sample.
- PNG crunch is now done incrementally and in parallel.
- Support for multi asset folders.
- Support for asset folders in Library Projects.
- Support for versionName suffix provided by the BuildType.
- Default sourceset for tests now src/instrumentTest (instrumentTest<Name> for flavors)
- Instrumentation tests now:
- started from "deviceCheck" instead of "check"
- run on all connected devices in parallel.
- break the build if any test fails.
- generate an HTML report for each flavor/project, but also aggregated.
- New plugin 'android-reporting' to aggregate android test results across projects. See 'flavorlib' sample.
- Improved DSL:
- replaced android.target with android.compileSdkVersion to make it less confusing with targetSdkVersion
- signing information now a SigningConfig object reusable across BuildType and ProductFlavor
- ability to relocate a full sourceSet. See 'migrated' sample.
- API to manipulate Build Variants.
- Default Java compile target set to 1.6.
- Fix generation of R classes in case libraries share same package name as the app project.
- Fixed support for windows.
- Added support for customized sourceset. (http://tools.android.com/tech-docs/new-build-system/using-the-new-build-system#TOC-Working-with-and-Customizing-SourceSets)
- Added support for dependency per configuration.
- Fixed support for dependency on local jar files.
- New samples "migrated" and "flavorlib"
Current limitations of version 0.5.x
- No support of NDK
- No Lint integration
- No emma support
You can download a small bundle containing a few different (mostly empty) projects that show some of the build features: here
Older docs, needs updating.
What can you do?
Send feedback, lots of it. And bug reports. Thanks!
This is developed entirely in AOSP. Go to source.android.com
to see how to get the source code.
Contribute patches through the standard AOSP workflow, and talk to use on adt-dev.