Stay organized with collections
Save and categorize content based on your preferences.
Android plugin for Gradle, revision 1.3.0 (July 2015)
Dependencies:
|
Minimum version |
Default version |
Notes |
Gradle |
2.2.1 |
2.2.1 |
To learn more, see updating Gradle. |
SDK Build Tools |
21.1.1 |
21.1.1 |
Install or configure SDK Build Tools. |
General Notes:
-
Added support for the com.android.build.threadPoolSize
property to control the Android
task thread pool size from
the gradle.properties
file or the command line. The
following example sets this property to 4.
-Pcom.android.build.threadPoolSize=4
- Set the default build behavior to exclude
LICENSE
and LICENSE.txt
files from APKs. To include these files in an APK, remove these files from the
packagingOptions.excludes
property in the build.gradle
file.
For example:
android {
packagingOptions.excludes = []
}
android {
packagingOptions.excludes.clear()
}
- Added the
sourceSets
task to inspect the set of all available source sets.
- Enhanced unit test support to recognize multi-flavor and
build variant source folders. For example, to test an app with multi-flavors
flavor1
and flavorA
with the Debug
build type,
the test source sets are:
- test
- testFlavor1
- testFlavorA
- testFlavor1FlavorA
- testFlavor1FlavorADebug
Android tests already recognized multi-flavor source folders.
- Improved unit test support to:
- Run
javac
on main and test sources, even if the useJack
property is set to true
in your build file.
- Correctly recognize dependencies for each build type.
- Added support for specifying instrumentation test-runner arguments from the command line.
For example:
./gradlew connectedCheck
-Pandroid.testInstrumentationRunnerArguments.size=medium
-Pandroid.testInstrumentationRunnerArguments.class=TestA,TestB
Added support for arbitrary additional Android Asset Packaging Tool (AAPT) parameters
in the build.gradle
file. For example:
android {
aaptOptions {
additionalParameters "--custom_option", "value"
}
}
android {
aaptOptions {
additionalParameters += listOf("--custom_option", "value")
}
}
- Added support for a
test APK module as a separate test module, using the
targetProjectPath
and targetVariant
properties to set the APK
path and target variant.
Note: A test APK module does not support product
flavors and can only target a single variant. Also, Jacoco is not supported yet.
- Added resource name validation before merging resources.
- When building an AAR (Android ARchive) package for library modules, do not provide an
automatic
@{applicationId}
placeholder in the
manifest merger settings.
Instead, use a different placeholder, such as @{libApplicationId}
and
provide a value for it if you want to include application Ids in the archive library.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-08-21 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-21 UTC."],[],[],null,["\u003cbr /\u003e\n\nAndroid plugin for Gradle, revision 1.3.0 (July 2015)\n=====================================================\n\n**Dependencies:**\n\n| | Minimum version | Default version | Notes |\n|----------------:|:---------------:|:---------------:|:----------------------------------------------------------------------------------------------------------:|\n| Gradle | 2.2.1 | 2.2.1 | To learn more, see [updating Gradle](/build/releases/gradle-plugin?buildsystem=ndk-build#updating-gradle). |\n| SDK Build Tools | 21.1.1 | 21.1.1 | [Install](/studio/intro/update#sdk-manager) or [configure](/tools/releases/build-tools) SDK Build Tools. |\n\n**General Notes:**\n\n- Added support for the `com.android.build.threadPoolSize`\n property to control the `Android` task thread pool size from\n the `gradle.properties` file or the command line. The\n following example sets this property to 4.\n\n \n -Pcom.android.build.threadPoolSize=4\n \n \n- Set the default build behavior to exclude `LICENSE` and `LICENSE.txt` files from APKs. To include these files in an APK, remove these files from the `packagingOptions.excludes` property in the `build.gradle` file. For example: \n\n ```groovy\n android {\n packagingOptions.excludes = []\n }\n \n ``` \n\n ```kotlin\n android {\n packagingOptions.excludes.clear()\n }\n \n ```\n- Added the `sourceSets` task to inspect the set of all available source sets.\n- Enhanced unit test support to recognize multi-flavor and [build variant](/tools/building/configuring-gradle#workBuildVariants) source folders. For example, to test an app with multi-flavors `flavor1` and `flavorA` with the `Debug` build type, the test source sets are:\n - test\n - testFlavor1\n - testFlavorA\n - testFlavor1FlavorA\n - testFlavor1FlavorADebug\n\n Android tests already recognized multi-flavor source folders.\n- Improved unit test support to:\n - Run `javac` on main and test sources, even if the `useJack` property is set to `true` in your build file.\n - Correctly recognize dependencies for each build type.\n- Added support for specifying instrumentation test-runner arguments from the command line. For example: \n\n ```\n ./gradlew connectedCheck \n\n -Pandroid.testInstrumentationRunnerArguments.size=medium \n\n -Pandroid.testInstrumentationRunnerArguments.class=TestA,TestB\n \n ```\n- Added support for arbitrary additional Android Asset Packaging Tool (AAPT) parameters\n in the `build.gradle` file. For example:\n\n ```groovy\n android {\n aaptOptions {\n additionalParameters \"--custom_option\", \"value\"\n }\n }\n \n ``` \n\n ```kotlin\n android {\n aaptOptions {\n additionalParameters += listOf(\"--custom_option\", \"value\")\n }\n }\n \n ```\n- Added support for a [test APK module](/tools/studio/studio-features#test-module) as a separate test module, using the `targetProjectPath` and `targetVariant` properties to set the APK path and target variant.\n\n **Note:** A test APK module does not support product\n flavors and can only target a single variant. Also, Jacoco is not supported yet.\n- Added resource name validation before merging resources.\n- When building an AAR (Android ARchive) package for library modules, do not provide an automatic `@{applicationId}` placeholder in the [manifest merger](/tools/building/manifest-merge) settings. Instead, use a different placeholder, such as `@{libApplicationId}` and provide a value for it if you want to include application Ids in the archive library.\n\n\u003cbr /\u003e"]]