Android Plugin for Gradle,修订版 1.1.0(2015 年 2 月)


    <li>Gradle 2.2.1 or higher.</li>
    <li>Build Tools 21.1.1 or higher.</li>

<dt>General Notes:</dt>
    <li>Added new unit test support</li>
        <a href="/training/activity-testing/activity-unit-testing">unit
          tests</a> to run on the local JVM against a special version
        of the <code>android.jar</code> file that is compatible with
        popular mocking frameworks, for example Mockito.</li>
      <li>Added new test tasks <code>testDebug</code>,
        <code>testRelease</code>, and <code>testMyFlavorDebug</code>
        when using product flavors.</li>
      <li>Added new source folders recognized as unit tests:
        <code>src/test/java/</code>, <code>src/testDebug/java/</code>,
      <li>Added new configurations in the <code>build.gradle</code> file
        for declaring test-only dependencies, for example,
        <code>testCompile 'junit:junit:4.11'</code>,
        <code>testMyFlavorCompile 'some:library:1.0'</code>.
        <p class="note"><strong>Note:</strong> Test-only dependencies
          are not currently compatible with Jack (Java Android Compiler
      <li>Added the
        option to control the behaviour of the mockable android.jar.</li>
    <li>Replaced <code>Test</code> in test task names with
      <code>AndroidTest</code>. For example, the
      <code>assembleDebugTest</code> task is now
      <code>assembleDebugAndroidTest</code> task. Unit test tasks
      still have <code>UnitTest</code> in the task name, for example
    <li>Modified <a href="/tools/help/proguard">ProGuard</a>
      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.</li>
    <li>Updated dependency management
      <li>Fixed issues using <code>provided</code> and
        <code>package</code> scopes.
        <p class="note"><strong>Note:</strong> These scopes are
          incompatible with AAR (Android ARchive) packages and will
          cause a build with AAR packages to fail.</p></li>
      <li>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.</li>
    <li>Added support for <code>anyDpi</code>
      <a href="/guide/topics/resources/providing-resources">resource
        qualifier</a> in resource merger.</li>
    <li>Improved evaluation and IDE sync speeds for projects with a
      large number of Android <a href="/studio/projects">modules</a>.</li>