Android plugin for Gradle, revision 1.1.0 (February 2015)
- Dependencies:
- General Notes:
-
- Added new unit test support
- Enabled
unit
tests to run on the local JVM against a special version
of the
android.jarfile that is compatible with popular mocking frameworks, for example Mockito. - Added new test tasks
testDebug,testRelease, andtestMyFlavorDebugwhen using product flavors. - Added new source folders recognized as unit tests:
src/test/java/,src/testDebug/java/,src/testMyFlavor/java/. - Added new configurations in the
build.gradlefile for declaring test-only dependencies, for example,testCompile 'junit:junit:4.11',testMyFlavorCompile 'some:library:1.0'.Note: Test-only dependencies are not compatible with Jack (Java Android Compiler Kit).
- Added the
android.testOptions.unitTests.returnDefaultValuesoption to control the behaviour of the mockable android.jar.
- Enabled
unit
tests to run on the local JVM against a special version
of the
- Replaced
Testin test task names withAndroidTest. For example, theassembleDebugTesttask is nowassembleDebugAndroidTesttask. Unit test tasks still haveUnitTestin the task name, for exampleassembleDebugUnitTest. - Modified ProGuard configuration files to no longer apply to the test APK. If minification is enabled, ProGuard processes the test APK and applies only the mapping file that is generated when minifying the main APK.
- Updated dependency management
- Fixed issues using
providedandpackagescopes.Note: These scopes are incompatible with AAR (Android ARchive) packages and cause a build with AAR packages to fail.
- Modified dependency resolution to compare the dependencies of an app under test and the test app. If an artifact with the same version is found for both apps, it's not included with the test app and is packaged only with the app under test. If an artifact with a different version is found for both apps, the build fails.
- Fixed issues using
- Added support for
anyDpiresource qualifier in resource merger. - Improved evaluation and IDE sync speeds for projects with a large number of Android modules.
- Added new unit test support
| 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. |