From b896cd1570eadd8c5c05cc49ab8f1d767d9077e4 Mon Sep 17 00:00:00 2001 From: Adarsh Fernando Date: Tue, 5 Apr 2016 10:26:08 -0700 Subject: Docs: Added Android Plugin for Gradle v2.0.0 Release Notes Bug:26986595 Change-Id: I790fc26dd1ffd689c6144a0b0aeaa5ee6ec7d916 --- docs/html/tools/revisions/gradle-plugin.jd | 301 ++++++++++++++++++++++------- 1 file changed, 231 insertions(+), 70 deletions(-) (limited to 'docs/html') diff --git a/docs/html/tools/revisions/gradle-plugin.jd b/docs/html/tools/revisions/gradle-plugin.jd index 540bbcdcccb4..6a35cab45405 100644 --- a/docs/html/tools/revisions/gradle-plugin.jd +++ b/docs/html/tools/revisions/gradle-plugin.jd @@ -3,42 +3,249 @@ page.title=Android Plugin for Gradle Release Notes @jd:body
- +
  • + Revisions +
  • + +

    + See also +

    -

    The Android build system uses the Android Plugin for Gradle to support building Android -applications with the Gradle build toolkit. The plugin runs -independent of Android Studio so the plugin and the Gradle build system can be updated -independently of Android Studio.

    +
      +
    1. + Build System + Overview +
    2. -

      Note: When you update Android Studio or open a project in a -previous version of Android Studio, Android Studio prompts you to automatically update the plugin -and Gradle to the latest available versions. You can choose to accept these updates based -on your project's build requirements.

      +
    3. + Android + Plugin for Gradle +
    4. +
    +
    + +

    + The Android build system uses the Android Plugin for Gradle to support + building Android applications with the Gradle build toolkit. The plugin runs + independent of Android Studio so the plugin and the Gradle build system can + be updated independently of Android Studio. +

    + +

    + Updating the Android Plugin for Gradle +

    + +

    + When you update Android Studio, you may receive a prompt to automatically + update the Android Plugin for Gradle to the latest available version. You + can choose to accept the update or manually specify a version based on + your project's build requirements. +

    + +

    + You can specify the Android Plugin for + Gradle version in either the File > Project + Structure > Project menu in Android Studio, or + the top-level build.gradle file. The plugin version applies to + all modules built in that Android Studio project. The following example sets + the Android Plugin for Gradle to version 2.0.0 from the + build.gradle file: +

    -

    Revisions

    +
    +buildscript {
    +  ...
    +  dependencies {
    +    classpath 'com.android.tools.build:gradle:2.0.0'
    +  }
    +}
    +
    +

    + Caution: You should not use dynamic dependencies in version + numbers, such as 'com.android.tools.build:gradle:2.+'. Using + this feature can cause unexpected version updates and difficulty resolving + version differences. +

    + +

    + If the specified plugin version has not been downloaded, Gradle downloads it + the next time you build your project or click Tools > + Android > Sync Project with Gradle Files + from the Android Studio main menu. +

    + +

    + Updating Gradle +

    + +

    + When you update Android Studio, you may receive a prompt to automatically + update Gradle to the latest available version. You can choose to accept the + update or manually specify a version based on your project's build + requirements. +

    + +

    + You can specify the Gradle version in either the File > + Project Structure > Project menu in + Android Studio, or by editing the Gradle distribution reference in the + gradle/wrapper/gradle-wrapper.properties file. The following + example sets the Gradle version to 2.10 in the + gradle-wrapper.properties file. +

    -

    The sections below provide notes about successive releases of -the Android Plugin for Gradle, as denoted by revision number. To determine what revision of the -plugin you are using, check the version declaration in the project-level -build.gradle file.

    +
    +...
    +distributionUrl = https\://services.gradle.org/distributions/gradle-2.10-all.zip
    +...
    +
    + +

    + Revisions +

    -

    For a summary of known issues in Android Plugin for Gradle, see http://tools.android.com/knownissues.

    +

    + For a summary of known issues in Android Plugin for Gradle, visit the + Android + Tools Project Site. +

    Android Plugin for Gradle, Revision 2.0.0 (March 2016) +

    + +
    +
    +
    Dependencies:
    + +
    + +
    + +
    New:
    +
    +
      +
    • Enables Instant Run by + supporting bytecode injection, and pushing code and resource updates to a + running app on the emulator or a physical device. +
    • + +
    • Added support for incremental builds, even when the app isn’t running. + Full build times are improved by pushing incremental changes through the + Android Debug Bridge to the + connected device. +
    • + +
    • Added maxProcessCount to control how many slave dex processes can + be spawned concurrently. The following code, in the module-level + build.gradle file, sets the maximum number of concurrent processes + to 4: +
      +android {
      +  ...
      +  dexOptions {
      +  maxProcessCount = 4
      +  }
      +}
      +
      +
    • + +
    • Added an experimental code shrinker to support pre-dexing and reduce re-dexing + of dependencies, which are not supported with Proguard. This improves the build + speed of your debug build variant. Because the experimental shrinker does not + support optimization and obfuscation, you should enable Proguard for your + release builds. To enable the experimental shrinker for your debug builds, add + the following to your module-level build.gradle file: + +
      +android {
      +  ...
      +  buildTypes {
      +    debug {
      +      minifyEnabed true
      +      useProguard false
      +    }
      +    release {
      +      minifyEnabed true
      +      useProguard true // this is a default setting
      +    }
      +  }
      +}
      +
      +
    • + +
    • Added logging support and improved performance for the resource shrinker. + The resource shrinker now logs all of its operations into a resources.txt + file located in the same folder as the Proguard log files. +
    • +
    +
    + +
    Changed behavior:
    +
    +
      +
    • When minSdkVersion is set to 18 or higher, APK signing uses + SHA256. +
    • + +
    • DSA and ECDSA keys can now sign APK packages. + +

      + Note: The Android keystore provider no + longer supports + DSA keys on Android 6.0 (API level 23) and higher. +

      + +
    • +
    +
    + +
    Fixed issues:
    +
    +
      +
    • Fixed an issue that caused duplicate AAR dependencies in both + the test and main build configurations. +
    • +
    +
    +
    +
    + +
    +

    + Android Plugin for Gradle, Revision 1.5.0 (November 2015)

    @@ -546,9 +753,6 @@ android {
    - - -

    - - - - - -

    Updating the Android Plugin for Gradle Version

    -

    The Android Plugin for Gradle version is specified in the -File > Project Structure > Project menu and the project-level -build.gradle file. The plugin version applies to all modules built in that -Android Studio project. This example sets the Android Plugin for Gradle to version 1.1.0 from the build.gradle file: -

    -...
    -     dependencies {
    -         classpath 'com.android.tools.build:gradle:1.1.0'
    -     }
    -...
    -
    - - -

    Caution: You should not use dynamic dependencies (+) in -version numbers. Using this feature can cause unexpected version updates and difficulty -resolving version differences.

    - -

    If you're building with Gradle but not using Android Studio, the build process downloads the -latest Android Plugin for Gradle when it runs.

    - - - -

    Updating the Gradle Version

    - -

    Android Studio requires Gradle version 2.2.1 or later. To view and -update the Gradle version, edit the Gradle distribution reference in the -gradle/wrapper/gradle-wrapper.properties file. This example sets the -Gradle version to 2.2.1.

    - -
    -...
    -distributionUrl=http\://services.gradle.org/distributions/gradle-2.2.1-all.zip
    -...
    -
    - -

    For more details about the supported Android Plugin for Gradle properties and syntax, click -the link to the -Plugin Language Reference.

    \ No newline at end of file + \ No newline at end of file -- cgit v1.2.3-59-g8ed1b