Merge "Docs: Android Plugin DSL Ref 2.0.0 was just published. Added some useful links." into mnc-mr-docs

This commit is contained in:
Adarsh Fernando
2016-04-11 21:33:32 +00:00
committed by Android (Google) Code Review
2 changed files with 31 additions and 17 deletions

View File

@@ -548,21 +548,25 @@ parent.link=index.html
When you deploy a clean build, Android Studio instruments your app to allow When you deploy a clean build, Android Studio instruments your app to allow
Instant Run to push code and resource updates. Although updating the running Instant Run to push code and resource updates. Although updating the running
app happens much more quickly, the first build may take longer to complete. app happens much more quickly, the first build may take longer to complete.
You can improve the build process by configuring a few DEX options, such as You can improve the build process by configuring a few <a class=
<code>maxProcessCount</code> and <code>javaMaxHeapSize</code>. "external-link" href=
"http://google.github.io/android-gradle-dsl/current/com.android.build.gradle.internal.dsl.DexOptions.html">
<code>DexOptions</code></a> settings:
</p> </p>
<dl> <dl>
<dt> <dt>
<code>maxProcessCount</code> <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:maxProcessCount">
<code>maxProcessCount</code></a>
</dt> </dt>
<dd> <dd>
Sets the maximum number of DEX processes that can be started Sets the maximum number of DEX processes that can be started concurrently.
concurrently. If the Gradle daemon is already running, you need to If the Gradle daemon is already running, you need to stop the process
stop the process before initializing it with a new maximum process count. before initializing it with a new maximum process count. You can terminate
You can terminate the Gradle daemon by calling one of the following from the Gradle daemon by calling one of the following from the
the <em>Terminal</em> window: <em>Terminal</em> window:
<ul> <ul>
<li>On Windows, call <code>gradlew --stop</code> <li>On Windows, call <code>gradlew --stop</code>
</li> </li>
@@ -573,7 +577,9 @@ parent.link=index.html
</dd> </dd>
<dt> <dt>
<code>javaMaxHeapSize</code> <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>
</dt> </dt>
<dd> <dd>
@@ -593,7 +599,7 @@ parent.link=index.html
android { android {
... ...
dexOptions { dexOptions {
maxProcessCount 4 maxProcessCount 4 // this is the default value
javaMaxHeapSize "2g" javaMaxHeapSize "2g"
} }
} }

View File

@@ -28,14 +28,20 @@ page.title=Android Plugin for Gradle Release Notes
</h2> </h2>
<ol> <ol>
<li>
<a class="external-link" href=
"http://google.github.io/android-gradle-dsl/current/">Android Plugin DSL
Reference</a>
</li>
<li> <li>
<a href="{@docRoot}sdk/installing/studio-build.html">Build System <a href="{@docRoot}sdk/installing/studio-build.html">Build System
Overview</a> Overview</a>
</li> </li>
<li> <li>
<a href="{@docRoot}tools/building/plugin-for-gradle.html">Android <a href="{@docRoot}tools/building/plugin-for-gradle.html">Android Plugin
Plugin for Gradle</a> for Gradle</a>
</li> </li>
</ol> </ol>
</div> </div>
@@ -166,15 +172,17 @@ distributionUrl = https\://services.gradle.org/distributions/gradle-2.10-all.zip
connected device. connected device.
</li> </li>
<li>Added <code>maxProcessCount</code> to control how many slave dex processes can <li>Added <a class="external-link" href=
be spawned concurrently. The following code, in the module-level "http://google.github.io/android-gradle-dsl/current/com.android.build.gradle.internal.dsl.DexOptions.html#com.android.build.gradle.internal.dsl.DexOptions:maxProcessCount">
<code>maxProcessCount</code></a> to control how many slave dex processes can be
spawned concurrently. The following code, in the module-level
<code>build.gradle</code> file, sets the maximum number of concurrent processes <code>build.gradle</code> file, sets the maximum number of concurrent processes
to 4: to 4:
<pre> <pre>
android { android {
... ...
dexOptions { dexOptions {
maxProcessCount = 4 maxProcessCount = 4 // this is the default value
} }
} }
</pre> </pre>
@@ -192,11 +200,11 @@ android {
... ...
buildTypes { buildTypes {
debug { debug {
minifyEnabed true minifyEnabled true
useProguard false useProguard false
} }
release { release {
minifyEnabed true minifyEnabled true
useProguard true // this is a default setting useProguard true // this is a default setting
} }
} }