summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Adarsh Fernando <adarshf@google.com> 2016-04-26 18:45:26 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2016-04-26 18:45:28 +0000
commitaa53fb10d6cb7de197b336e45f96aa1b17af7139 (patch)
tree1c8aa4aa931366b5e53d067b7ca7aa3e9bae499c
parent96e6abb248938118fede112304ef80b3b9f70084 (diff)
parente9565806301b24209b3a59a231e37abcfcf5f989 (diff)
Merge "Docs: Gradle 2.1.0 Release Notes" into mnc-docs
-rw-r--r--docs/html/tools/building/building-studio.jd62
-rw-r--r--docs/html/tools/revisions/gradle-plugin.jd106
2 files changed, 160 insertions, 8 deletions
diff --git a/docs/html/tools/building/building-studio.jd b/docs/html/tools/building/building-studio.jd
index 7ba716fc3f42..2b18b6673885 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
<li>Change the app manifest
</li>
- <li>Change resources reference by the app manifest
+ <li>Change resources referenced by the app manifest
</li>
- <li>Change an Android widget UI element (requires a <a href="#rerun">
- Clean and Rerun</a>)
+ <li>Change an Android widget UI element
</li>
</ul>
</td>
@@ -415,8 +414,17 @@ parent.link=index.html
If your build process automatically updates any part of the app manifest,
such as automatically iterating <code>versionCode</code> or
<code>versionName</code>, 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.
+ </p>
+
+ <p>
+ When updating an Android widget UI element, you need to perform a <a href=
+ "#rerun">Clean and Rerun</a> to see your changes. Alternatively, because
+ performing clean builds may take longer while using Instant Run, you can
+ temporarily <a href="#disable-ir">disable Instant Run</a> while making
+ updates to your widget UI.
</p>
</td>
</tr>
@@ -608,7 +616,49 @@ android {
<p>
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.
+</p>
+
+<h4>
+ Enabling dexing-in-process and incremental Java compilation
+</h4>
+
+<p>
+ <a href="{@docRoot}tools/revisions/gradle-plugin.html#revisions">Android
+ Plugin for Gradle version 2.1.0</a> 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.
+</p>
+
+<p>
+ 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
+ <code>gradle.properties</code> file:
+
+<pre>
+org.gradle.jvmargs = -Xmx2048m
+</pre>
+
+</p>
+
+<p>
+ If you have defined a value for <a class="external-link" href=
+ "http://google.github.io/android-gradle-dsl/current/com.android.build.gradle.internal.dsl.DexOptions.html#com.android.build.gradle.internal.dsl.DexOptions:javaMaxHeapSize">
+ <code>javaMaxHeapSize</code></a> in your module-level <code>build.gradle</code>
+ file, you need to set the daemon's max heap size to the value of
+ <code>javaMaxHeapSize</code> + 1024 MB. For example, if you have set
+ <code>javaMaxHeapSize</code> to "2g", you need to add the following to your
+ project's <code>gradle.properties</code> file:
+
+<pre>
+org.gradle.jvmargs = -Xmx3072m
+</pre>
+
</p>
<h4 id="windows-defender">
diff --git a/docs/html/tools/revisions/gradle-plugin.jd b/docs/html/tools/revisions/gradle-plugin.jd
index 20492f7d0c07..f77cfd6794bc 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</strong> &gt; <strong>Project</strong> menu in Android Studio, or
the top-level <code>build.gradle</code> 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
<code>build.gradle</code> file:
</p>
@@ -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'
}
}
</pre>
@@ -138,6 +138,108 @@ distributionUrl = https\://services.gradle.org/distributions/gradle-2.10-all.zip
<div class="toggle-content opened">
<p><a href="#" onclick="return toggleContent(this)">
<img src="{@docRoot}assets/images/styles/disclosure_up.png" class="toggle-content-img"
+ alt=""/>Android Plugin for Gradle, Revision 2.1.0</a> <em>(April 2016)</em>
+ </p>
+
+ <div class="toggle-content-toggleme">
+ <dl>
+ <dt>Dependencies:</dt>
+
+ <dd>
+ <ul>
+ <li>Gradle 2.10 or higher.
+ </li>
+
+ <li>
+ <a href="{@docRoot}tools/revisions/build-tools.html">Build Tools 23.0.2</a>
+ or higher.
+ </li>
+ </ul>
+ </dd>
+
+ <dt>New:</dt>
+ <dd>
+ <ul>
+ <li>Added support for the N Developer Preview, JDK 8, and <a href=
+ "{@docRoot}preview/j8-jack.html">Java 8 language features</a> using the Jack
+ toolchain. To find out more, read the <a href=
+ "{@docRoot}preview/overview.html">N Preview guide</a>.
+
+ <p class="note">
+ <strong>Note:</strong> <a href=
+ "{@docRoot}tools/building/building-studio.html#instant-run">Instant
+ Run</a> 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.
+ </p>
+ </li>
+
+ <li>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
+ <code>build.gradle</code> file:
+
+<pre>
+android {
+ ...
+ compileOptions {
+ incremental false
+ }
+}
+</pre>
+ </li>
+
+ <li>
+ <p>
+ 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 <code>gradle.properties</code> file:
+
+<pre>
+org.gradle.jvmargs = -Xmx2048m
+</pre>
+ </p>
+
+ <p>
+ If you have defined a value for <a class="external-link" href=
+ "http://google.github.io/android-gradle-dsl/current/com.android.build.gradle.internal.dsl.DexOptions.html#com.android.build.gradle.internal.dsl.DexOptions:javaMaxHeapSize">
+ <code>javaMaxHeapSize</code></a> in your module-level <code>build.gradle</code>
+ file, you need to set <code>org.gradle.jvmargs</code> to the value of
+ <code>javaMaxHeapSize</code> + 1024 MB. For example, if you have set
+ <code>javaMaxHeapSize</code> to "2048m", you need to add the following to your
+ project's <code>gradle.properties</code> file:
+
+<pre>
+org.gradle.jvmargs = -Xmx3072m
+</pre>
+ </p>
+
+ <p>
+ To disable dexing-in-process, add the following code to your module-level
+ <code>build.gradle</code> file:
+
+<pre>
+android {
+ ...
+ dexOptions {
+ dexInProcess false
+ }
+}
+</pre>
+ </p>
+ </li>
+ </ul>
+ </dd>
+ </div>
+</div>
+
+<div class="toggle-content closed">
+ <p><a href="#" onclick="return toggleContent(this)">
+ <img src="{@docRoot}assets/images/styles/disclosure_down.png" class="toggle-content-img"
alt=""/>Android Plugin for Gradle, Revision 2.0.0</a> <em>(April 2016)</em>
</p>