We are working on a new build system to replace both the build system inside ADT and Ant.
What's new in 0.3
- 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.
What's new in 0.2
Current limitations of milestone 3 (version 0.3)
- 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"
- No IDE integration
- No support of NDK
- No support for Proguard
- No Lint integration
- No emma support
- Binary packaging of library is still going through changes. Do not upload libraries to maven central (or other similar repos) just yet.
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.
The git project is tools/build.git
To download only this project, you can do
repo init -u https://android.googlesource.com/platform/manifest -g tools
It is self contained so you really don't need the other AOSP projects. However, to include this project as part of a full AOSP download, do
repo init -u https://android.googlesource.com/platform/manifest -g all,-notdefault,tools
It is currently built with Gradle 1.4. To ensure you all use the right version, please use the gradle wrapper scripts (gradlew
) at the root of the project to build (more Gradle wrapper info here
To prepare the build environment:
$ cd tools/base
$ ./gradlew publishLocal
$ cd ../build
$ ./gradlew prepareRepo
This will build some required libraries and prepare a local repositories with all the dependencies.
Finally you can build with
$ ./gradlew assemble
To test the plugin you should export ANDROID_HOME and point it to an SDK, and run
$ ./gradlew check buildTest
Additionally, you should connect a device to your workstation and run:
$ ./gradlew deviceTest
Contribute patches through the standard AOSP workflow, and talk to use on adt-dev