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.jar
file that is compatible with popular mocking frameworks, for example Mockito. - Added new test tasks
testDebug
,testRelease
, andtestMyFlavorDebug
when 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.gradle
file 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.returnDefaultValues
option 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
Test
in test task names withAndroidTest
. For example, theassembleDebugTest
task is nowassembleDebugAndroidTest
task. Unit test tasks still haveUnitTest
in 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
provided
andpackage
scopes.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
anyDpi
resource 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. |