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
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. +
+ ++ 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 ++
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)
+
+ 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. +
+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)