Added support for annotation processors. By default, annotation processors on your classpath, such as any compile dependency, will be automatically applied. You can also specify an annotation processor in your build and pass arguments by using the following DSL in your module-level build.gradle file:android {

defaultConfig {

javaCompileOptions {

annotationProcessorOptions {

className 'com.example.MyProcessor'

// Arguments are optional.

arguments = [ foo : 'bar' ]

}

}

}

}

2.1.0 (2016/4/26)

Fixed instant-run issue related to added dependencies and having other changes dropped.

2.1.0-rc1 (2016/4/22)

Turned on incremental Java compilation by default.

Turned on in process dexing by default if gradle daemon has enough memory allocated.

2.0.0-rc2/rc3 (2016/4/4)

Fix for https://code.google.com/p/android/issues/detail?id=203824

Instant Run

Changed default slave count for dexing to 4

2.0.0-rc1 (2016/3/30)

Instant Run

Dex each dependency independently rather than combining them in a single dependencies.jar

2.0.0-beta7/2.1.0-alpha3 (2016/3/19)

N Preview (2.1.0-alpha3 only)

Support for JDK8 using Jack on Windows.

Instant Run

Changed slices allocation to be more deterministic (based on package name).

Fix for bug 202502 : Only top level activities can be restarted.

Automatically turnon pre-dexing

Turn on Jumbo mode automatically in instant-run mode.

Changed slices allocation to be more deterministic (based on package name).

Switched Lollipop and Marshmallow to use native multidex as split apk had installation errors with dex2oat.

Disable dexInProcess by default unless
android {

dexOptions {

dexInProcess = true}

}

2.0.0-alpha8 (2016/1/28)

Instant Run

Switch Lollipop and Marshmallow to use Split apks

Disable Coldswap on Dalvik

Fix for deleted classes that could generate a FileNotFoundException

2.0.0-alpha7 (2016/1/23)

Instant Run

Handle compilation issues : if the build failed during the Java Compilation phase, InstantRun was forgetting some artifacts already built like resources.

Added more logging to JarMerger to track some duplicate file exception.

Disable hotswap when new class is added.

Enabled dexInProcess by default

2.0.0-alpha6 (2016/1/15)

Instant Run

Fix alpha5 reported issues :
- cannot build when importing play-services.
- zip exception with wrong size entries on some platforms.
- make sure we don't add the same artifacts to the built list leading to wrong deployment list.

Fix a regression in 1.4.0-beta1 where the build would fail claiming that a resource overlay had removed a resource needed by a library if an app or android library depended on multiple android libraries which depend on different versions of the same android library.

Allow a comma-separated list of serials in ANDROID_SERIAL when installing or running tests

Fix installation failure on L+ devices when the APK name contains a space.

Fix various issues related to AAPT error output.

Incremental Jacoco instrumentation should provide faster incremental builds. The Jacoco instrumenter is invoked directly by the android plugin. In order to force a newer version of the Jacoco instrumenter it should be added as a build script dependency.

Vector drawable support for generating PNGs at build time.

PNGs are generated for every vector drawable found in a resource directory that does not specify an API version (or specifies a version lower than 21).

This only happens if minSdk is below 21.

Densities to use can be set using the new "generatedDensities" property in defaultConfig or per-flavor.

Multiple modules (e.g. app and lib) now share the same mockable android.jar (for unit testing) which is generated only once. Delete $rootDir/build to regenerate it.

Multi-dex support now available for test projects.

Test now automatically depend on com.android.support:multidex-instrumentation

New API to manipulate .class files before they are converted to Dex.

Custom transforms can be created (implements com.android.build.transform.api.Transform, from artifact com.android.tools.build:transform-api:1.4.0-beta2)

Transform can apply to the current project, sub projects, and/or external libraries.

Transforms are added via android.registerTransform(Transform). No need to deal with wiring tasks together.

We’re looking for feedback on the API.

More info: http://tools.android.com/tech-docs/new-build-system/transform-api

The Dex task is not available through the variant API anymore….

The API is still there but will throw an exception indicating how to fix this.

1.4.0-beta (2015/08/24)

Instead of processing java resources during the packaging of the APK,moved this upfront before the obfuscation tasks. This will allowthe obfuscation tasks to have a chance to adapt the java resourcesfollowing packages obfuscation

made java resources extraction from libraries incremental tasks.

Fixed issue with using jni code in experimental library plugin.

Allow platform version to be set separately from compileSdkVersion in experimental plugin.

Prevent a consumer of a library removing a resource from that library, which would lead to a runtime NoSuchFieldError.

Allow a comma-separated list of serials in ANDROID_SERIAL when installing or running tests

Fix installation failure on L+ devices when the APK name contains a space.

Fix various issues related to AAPT error output.

Vector drawable support for generating PNGs at build time.

PNGs are generated for every vector drawable found in a resource directory that does not specify an API version (or specifies a version lower than 21).

This only happens if minSdk is below 21.

Densities to use can be set using the new "generatedDensities" property in defaultConfig or per-flavor.

Multiple modules (e.g. app and lib) now share the same mockable android.jar (for unit testing) which is generated only once. Delete $rootDir/build to regenerate it.

1.3.1 (2015/08/11)

fixed issue when ZipAlign task would not consume previous' task output when it the file name is customized.

Added support for controlling the thread pool size for android tasks on the command line or in the gradle.properties file. The following example sets this to 4:./gradlew <tasks> -Pcom.android.build.threadPoolSize=4

It's now possible to specify instrumentation test runner arguments in build.gradle (in defaultConfig or per flavor):android {
defaultConfig {testInstrumentationRunnerArguments size: "medium" }}This can also be done on the command line:./gradlew cC -Pandroid.testInstrumentationRunnerArguments.size=medium

Final modifier is stripped from public instance fields in the platform jar.

Test-only ProGuard files. When running instrumentation tests (i.e. connectedCheck) against a minified variant, the test APK needs to be processed by ProGuard to
rename references to code in the main APK. Flags for this ProGuard run (mostly for silencing warnings) can now be specified like this:android.buildType.minified.testProguardFile "test-proguard-rules.pro"

1.2.0-beta1 (2015/03/25)

Mainly a bug fixing release with very few new features.

Better support for unit tests (libraries can now have unit tests, etc...)

Added timeOut option to adbOptions to set the timeout when installing APKs on devices.

New option, android.testOptions.unitTests.returnDefaultValues to control the behaviour of the "mockable" android.jar.

Task names that used to contain 'Test', e.g. 'assembleDebugTest' now use 'AndroidTest', e.g. 'assembleDebugAndroidTest'. This is to distinguish them from the unit test tasks, e.g. 'assembleDebugUnitTest'.

ProGuard configuration files are no longer applied to the test APK. If minification is enabled, the test APK will be processed by ProGuard only to apply the mapping file generated when minifying the main APK.

Fixes and changes to the dependency management:

Properly handle 'provided' and 'package' scopes to do what they should be doing.

'provided' and 'package' cannot be used with Android Libraries, and will generate an error

sync tested and test dependency trees:

if the same version of an artifact is present in both, it'll get skipped in the test app.

if the version is different it'll generate a build error. Gradle provides mechanism to resolve this.

Added support for anyDpi resource qualifier in the resource merger.

Projects with large number of Android Modules will see evaluation and IDE sync speed improvements (YMMV)

Density split using aapt 21+ now use --preferred-density allowing for missing density version of some bitmaps.

hasProperty() will now work again on read-only wrapper returned by the variant API.

Setting applicationId(Suffix) in a Library project will now properly fail.

Fixed issue where embedding a micro app could add new permissions to the main app manifest.

0.14.4 (2014/11/19)

This should be considered 1.0-RC (sort of, see above)

Fixed proguardFiles DSL issue.

Fixed compatibility with Studio 0.9.x

Compatible with Gradle 2.1, 2.2 and 2.2.1

0.14.3 (2014/11/18)

Variant Specific BuildConfigField/resValue

applicationVariants.all { variant ->

variant.buildConfigField "int", "VALUE", "1"

variant.resValue "string", "name", "value"

}

Variant (and multi-flavor) specific dependency configurationmulti-flavor is all the flavors without the build Type. Only exists for 2+ dimensions of Flavors.Current limitation: Requires defining the configuration manually first (run the dependencies task to see the names)

Fixed issue 64302: Add renderscript support mode jar to the dependencies in the IDE model.

Fixed issue 64094: buildConfigField can now replace previous values inside the same type/flavors.

Add support for NDK prebuilts in library projects.

Parallelize pre-dexing to speed up clean builds.

Incremental dexing re-enabled (though it'll be automatically disabled in some builds for some cases that dx doesn't support yet.)

Added 'provided' dependency scope for compile only (not packaged) dependencies.Additional scope per buildtype and flavors are also available (debugProvided, myFlavorProvided,etc...)

Lint improvements:

New "lintVital" task, run automatically as part of assembling release variants, which checks only fatal-severity issues

Replace Java parser in lint with ECJ; must faster and fixes bug where lint could hang on certain source constructs

Lint HTML report now writes links to source files and images as URLs relative to the report location

Variant API improvements:

getPreBuild() returns the prebuild task for the variant

getSourceSets() returns the sorted sourcesets for the task, from lower to higher priority

createZipAlignTask(String taskName, File inputFile, File outputFile)This creates and return a new zipalign task. Useful if you have a custom plugin providing custom signing of APKs.This also makes the assemble task depend on the new zipalign task, and wires variant.getOutputFile() to return the result of the zipalign task.

project.android.registerJavaArtifact() now receives a Configuration object to pass the dependencies to the IDE. See artifactApi sample.

You can now have a variant specific source folder if you have flavors.

Only for app (not library or test). Name is src/flavorDebug/... or src/flavor1Flavor2Debug/

Note the camelcase naming, with lower case for first letter.

Its components (res, manifest, etc...) have higher priority than components from build type or flavors.

There is also a "flavor combination" source folder available when more than one flavor dimension is used. For instance src/flavor1Flavor2/

Note that this is for all combinations of *all* dimensions.

Its priority is higher than single-flavor sourcesets, but lower than build-types.

Lint improvements

Revamped lint integration. Lint is now run as part of the check task, and will analyze all variants and then merge the results and create a report which lists which variants each error applies to (unless an error applies to all variants). You can also run lint on a specific variant, e.g. lintDebug or lintFreeRelease.

Lint will no longer report errors in AAR libraries. This version of the plugin also picks up some new lint checks.

A new DSL allows configuration of lint from build.gradle. This is read and used in Studio

See 'basic' sample.

Build config improvements and DSL changes.

buildConfigLine is replaced by buildConfigField

Only one field per property

expects 3 values, type, name, value.

This allows overriding a value in flavor or build type.

See "basic" sample.

Build Config now automatically contain more constants for PACKAGE_NAME, VERSION_CODE, VERSION_NAME, BUILD_TYPE, FLAVOR as well as FLAVOR_<group> if there are several flavor dimensions.

Switch to ProGuard 4.10

Added ability to test proguarded (obfuscated) apps.

New option on product Flavor (and defaultConfig) allow filtering of resources through the -c option of aapt

You can pass single value (resConfig) or multiple values (resConfigs) through the DSL.

All values from the default config and flavors get combined and passed to aapt.

See "basic" sample.

Jar files are now pre-dexed for faster dexing.

Incremental dexing is currently disabled, as we have uncovered some issues.

Renderscript support mode.

See sample 'rsSupportMode'

New test-related DSL properties on defaultConfig and flavors:

testHandleProfiling: boolean, fills in the handleProfiling attribute on the instrumentation node in the manifest.

testFunctionalTest: boolean, fills in the functionalTest attribute on the instrumentation node in the manifest.

API to add extra artifacts on variants. This will let you register Java or Android artifacts, for instance for alternative test artifacts.

See sample 'artifactApi' for the API (sample is not meant to be used, it's for testing).

Fixed issue with parentActivityName when handling different package name in the manifest merger.

Allow files inside folder META-INF/ from jars to be packaged in the APK.

0.6.3

Fixed ClassNotFoundException:MergingException introduced in 0.6.2

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

0.6.1

Fixed issue with "lint" task when executing task "check"

0.6.0

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:

android {

compileOptions.encoding = "UTF-8"

}

0.5.7

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.

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.)

0.5.6

Enable support for Gradle 1.7

0.5.5

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.

0.5.4

Fixed incremental compilation issue with declare-styleable

0.5.3

Fix a crashing bug in PrepareDependenciesTask

0.5.2

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.

0.5.1

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.

0.4.3

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.

0.4.2

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.

0.4.1

Fixes

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.