summaryrefslogtreecommitdiffstats
path: root/docs/html/guide/topics
diff options
context:
space:
mode:
authorRich Slogar <rslogar@google.com>2015-05-12 17:05:40 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-05-12 17:05:40 +0000
commita27dd186b265b58eae490d4e19ec11268ea54f12 (patch)
tree169c03a53aebe5b7561ac6c33c40f794cc2a4bb4 /docs/html/guide/topics
parentc1e973477d635e08ab656bba3dbaf73927feaae8 (diff)
parente78f136b1dbe11dc98c5699da24df49fd9dae795 (diff)
downloadframeworks_base-a27dd186b265b58eae490d4e19ec11268ea54f12.zip
frameworks_base-a27dd186b265b58eae490d4e19ec11268ea54f12.tar.gz
frameworks_base-a27dd186b265b58eae490d4e19ec11268ea54f12.tar.bz2
am e78f136b: Merge "docs: renderscript using gradle settings" into lmp-docs
* commit 'e78f136b1dbe11dc98c5699da24df49fd9dae795': docs: renderscript using gradle settings
Diffstat (limited to 'docs/html/guide/topics')
-rw-r--r--docs/html/guide/topics/renderscript/compute.jd107
1 files changed, 79 insertions, 28 deletions
diff --git a/docs/html/guide/topics/renderscript/compute.jd b/docs/html/guide/topics/renderscript/compute.jd
index 2e7ce56..eef8cda 100644
--- a/docs/html/guide/topics/renderscript/compute.jd
+++ b/docs/html/guide/topics/renderscript/compute.jd
@@ -185,50 +185,101 @@ precision (such as SIMD CPU instructions).</p>
<p>You can check and update the installed version of these tools in the
<a href="{@docRoot}tools/help/sdk-manager.html">Android SDK Manager</a>.</p>
-<p class="note">
- <strong>Note:</strong> Use of Support Library RenderScript APIs is not currently supported with
- Android Studio or Gradle-based builds.
-</p>
-<p>To use the Support Library RenderScript APIs in Eclipse:</p>
+<p>To use the Support Library RenderScript APIs:</p>
<ol>
<li>Make sure you have the required Android SDK version and Build Tools version installed.</li>
- <li>Open the {@code project.properties} file in the root folder of your application project.</li>
- <li>Add the following lines to the file:
+ <li> Update the settings for the Android build process to include the RenderScript settings:
+
+ <p><strong>For Android Studio or Gradle-based builds</strong></p>
+ <ul>
+ <li>Open the {@code build.gradle} file in the app folder of your application module. </li>
+ <li>Add the following RenderScript settings to the file:
+
+<pre>
+android {
+ compileSdkVersion 19
+ buildToolsVersion "19.0.3"
+
+ defaultConfig {
+ minSdkVersion 8
+ targetSdkVersion 16
+<strong>
+ renderscriptTargetApi 18
+ renderscriptSupportModeEnabled true
+</strong>
+ }
+}
+</pre>
+
+
+ <p>The settings listed above control specific behavior in the Android build process:</p>
+
+ <ul>
+ <li>{@code renderscriptTargetApi} - Specifies the bytecode version to be generated. We
+ recommend you set this value to the highest available API level and set
+ {@code renderscriptSupportModeEnabled}
+ to {@code true}. Valid values for this setting are any integer value
+ from 11 to the most recently released API level. If your minimum SDK version specified in your
+ application manifest is set to a different value, that value is ignored and the target value
+ in the build file is used to set the minimum SDK version.</li>
+ <li>{@code renderscriptSupportModeEnabled} - Specifies that the generated bytecode should fall
+ back to a compatible version if the device it is running on does not support the target
+ version.
+ </li>
+ <li>{@code buildToolsVersion} - The version of the Android SDK build tools to use. This value
+ should be set to {@code 18.1.0} or higher. If this option is not specified, the highest
+ installed build tools version is used. You should always set this value to ensure the
+ consistency of builds across development machines with different configurations.</li>
+ </ul>
+
+ </li>
+
+ <p><strong>For Eclipse</strong></p>
+ <ul>
+ <li>Open the {@code project.properties} file in the root folder of your application project.</li>
+ <li>Add the following lines to the file:
+
<pre>
renderscript.target=18
renderscript.support.mode=true
sdk.buildtools=18.1.0
</pre>
- </li>
+
+ <p>The settings listed above control specific behavior in the Android build process:</p>
+
+ <ul>
+ <li>{@code renderscript.target} - Specifies the bytecode version to be generated. We
+ recommend you set this value to the highest available API level and set
+ {@code renderscript.support.mode} to {@code true}. Valid values for this setting are any
+ integer value from 11 to the most recently released API level. If your minimum SDK version
+ specified in your application manifest is set to a higher value, this value is ignored and
+ the target value is set to the minimum SDK version.</li>
+ <li>{@code renderscript.support.mode} - Specifies that the generated bytecode should fall
+ back to a compatible version if the device it is running on does not support the target version.
+ </li>
+ <li>{@code sdk.buildtools} - The version of the Android SDK build tools to use. This value
+ should be set to {@code 18.1.0} or higher. If this option is not specified, the highest
+ installed build tools version is used. You should always set this value to ensure the
+ consistency of builds across development machines with different configurations.</li>
+ </ul>
+ </li>
+
+ </ul>
+
+ </ul>
+
<li>In your application classes that use RenderScript, add an import for the Support Library
classes:
+
<pre>
import android.support.v8.renderscript.*;
</pre>
- </li>
-</ol>
-<p>The {@code project.properties} settings listed above control specific behavior in the Android
- build process:</p>
-
-<ul>
- <li>{@code renderscript.target} - Specifies the bytecode version to be generated. We
- recommend you set this value the highest available API level and set {@code
- renderscript.support.mode} to {@code true}. Valid values for this setting are any integer value
- from 11 to the most recently released API level. If your minimum SDK version specified in your
- application manifest is set to a higher value, this value is ignored and the target value is set
- to the minimum SDK version.</li>
- <li>{@code renderscript.support.mode} - Specifies that the generated bytecode should fall
- back to a compatible version if the device it is running on does not support the target version.
- </li>
- <li>{@code sdk.buildtools} - The version of the Android SDK build tools to use. This value
- should be set to {@code 18.1.0} or higher. If this option is not specified, the highest
- installed build tools version is used. You should always set this value to ensure the
- consistency of builds across development machines with different configurations.</li>
-</ul>
+ </li>
+ </0l>
<h2 id="using-rs-from-java">Using RenderScript from Java Code</h2>