diff --git a/docs/html/tools/building/building-studio.jd b/docs/html/tools/building/building-studio.jd index 7ba716fc3f424..2b18b6673885c 100644 --- a/docs/html/tools/building/building-studio.jd +++ b/docs/html/tools/building/building-studio.jd @@ -394,11 +394,10 @@ parent.link=index.html
  • Change the app manifest
  • -
  • Change resources reference by the app manifest +
  • Change resources referenced by the app manifest
  • -
  • Change an Android widget UI element (requires a - Clean and Rerun) +
  • Change an Android widget UI element
  • @@ -415,8 +414,17 @@ parent.link=index.html If your build process automatically updates any part of the app manifest, such as automatically iterating versionCode or versionName, you will not be able to benefit from the full - performance of Instant Run. We recommend that you disable automatic updates - to any part in the app manifest in your debug build variants. + performance of Instant Run. When using Instant Run, you should disable + automatic updates to any part in the app manifest in your debug build + variants. +

    + +

    + When updating an Android widget UI element, you need to perform a Clean and Rerun to see your changes. Alternatively, because + performing clean builds may take longer while using Instant Run, you can + temporarily disable Instant Run while making + updates to your widget UI.

    @@ -608,7 +616,49 @@ android {

    You should experiment with these settings by incrementing their values and observing the effect on your build times. You could experience a negative - impact to performance if you allocate too many resources to the DEX'ing process. + impact to performance if you allocate too many resources to the dexing process. +

    + +

    + Enabling dexing-in-process and incremental Java compilation +

    + +

    + Android + Plugin for Gradle version 2.1.0 and higher features additional build + process improvements, including incremental Java compilation and + dexing-in-process. Incremental Java compilation is enabled by default and + reduces compilation time during development by only recompiling portions of + the source that have changed or need to be recompiled. +

    + +

    + Dexing-in-process performs dexing within the build process rather than in a + separate, external VM processes. This not only makes incremental builds much + faster, but also significantly speeds up full builds. To enable this feature, + you need to set the Gradle daemon's maximum heap size to at least 2048 MB. You + can do this by including the following in your project's + gradle.properties file: + +

    +org.gradle.jvmargs = -Xmx2048m
    +
    + +

    + +

    + If you have defined a value for + javaMaxHeapSize in your module-level build.gradle + file, you need to set the daemon's max heap size to the value of + javaMaxHeapSize + 1024 MB. For example, if you have set + javaMaxHeapSize to "2g", you need to add the following to your + project's gradle.properties file: + +

    +org.gradle.jvmargs = -Xmx3072m
    +
    +

    diff --git a/docs/html/tools/revisions/gradle-plugin.jd b/docs/html/tools/revisions/gradle-plugin.jd index 20492f7d0c075..f77cfd6794bcb 100644 --- a/docs/html/tools/revisions/gradle-plugin.jd +++ b/docs/html/tools/revisions/gradle-plugin.jd @@ -73,7 +73,7 @@ page.title=Android Plugin for Gradle Release Notes 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 + the Android Plugin for Gradle to version 2.1.0 from the build.gradle file:

    @@ -81,7 +81,7 @@ page.title=Android Plugin for Gradle Release Notes buildscript { ... dependencies { - classpath 'com.android.tools.build:gradle:2.0.0' + classpath 'com.android.tools.build:gradle:2.1.0' } } @@ -138,6 +138,108 @@ distributionUrl = https\://services.gradle.org/distributions/gradle-2.10-all.zip

    Android Plugin for Gradle, Revision 2.1.0 (April 2016) +

    + +
    +
    +
    Dependencies:
    + +
    + +
    + +
    New:
    +
    +
      +
    • Added support for the N Developer Preview, JDK 8, and Java 8 language features using the Jack + toolchain. To find out more, read the N Preview guide. + +

      + Note: Instant + Run does not currently work with Jack and will be disabled while + using the new toolchain. You only need to use Jack if you are developing + for the N Preview and want to use the supported Java 8 language features. +

      +
    • + +
    • Added default support for incremental Java compilation to reduce + compilation time during development. It does this by only recompiling + portions of the source that have changed or need to be recompiled. To disable + this feature, add the following code to your module-level + build.gradle file: + +
      +android {
      +  ...
      +  compileOptions {
      +    incremental false
      +  }
      +}
      +
      +
    • + +
    • +

      + Added support for dexing-in-process which performs dexing within the build + process rather than in a separate, external VM processes. This not only makes + incremental builds faster, but also speeds up full builds. The feature is + enabled by default for projects that have set the Gradle daemon's maximum heap + size to at least 2048 MB. You can do this by including the following in your + project's gradle.properties file: + +

      +org.gradle.jvmargs = -Xmx2048m
      +
      +

      + +

      + If you have defined a value for + javaMaxHeapSize in your module-level build.gradle + file, you need to set org.gradle.jvmargs to the value of + javaMaxHeapSize + 1024 MB. For example, if you have set + javaMaxHeapSize to "2048m", you need to add the following to your + project's gradle.properties file: + +

      +org.gradle.jvmargs = -Xmx3072m
      +
      +

      + +

      + To disable dexing-in-process, add the following code to your module-level + build.gradle file: + +

      +android {
      +  ...
      +  dexOptions {
      +      dexInProcess false
      +  }
      +}
      +
      +

      +
    • +
    +
    +
    +
    + +
    +

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