diff options
author | Xavier Ducrohet <xav@android.com> | 2011-01-10 18:35:03 -0800 |
---|---|---|
committer | Xavier Ducrohet <xav@android.com> | 2011-01-18 16:51:18 -0800 |
commit | 68d0fb4cbfa47402910027c97bc91410da75ea10 (patch) | |
tree | 9306373df13e571ddfd4a7483abdcac458e13560 /files | |
parent | 2afb28704a1d522aa17a9921a1643e2797c78255 (diff) | |
download | sdk-68d0fb4cbfa47402910027c97bc91410da75ea10.zip sdk-68d0fb4cbfa47402910027c97bc91410da75ea10.tar.gz sdk-68d0fb4cbfa47402910027c97bc91410da75ea10.tar.bz2 |
Add renderscript support to the Ant build system.
Change-Id: Iba1c956d33725716923da89b788f7f8d14524e41
Diffstat (limited to 'files')
-rw-r--r-- | files/ant/main_rules.xml | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/files/ant/main_rules.xml b/files/ant/main_rules.xml index e63f941..a8d7266 100644 --- a/files/ant/main_rules.xml +++ b/files/ant/main_rules.xml @@ -22,6 +22,10 @@ classname="com.android.ant.AidlExecTask" classpathref="android.antlibs" /> + <taskdef name="renderscript" + classname="com.android.ant.RenderScriptTask" + classpathref="android.antlibs" /> + <taskdef name="apkbuilder" classname="com.android.ant.ApkBuilderTask" classpathref="android.antlibs" /> @@ -294,7 +298,7 @@ <target name="-pre-build"/> <!-- Generates the R.java file for this project's resources. --> - <target name="-resource-src" depends="-dirs, -pre-build"> + <target name="-resource-src" depends="-dirs"> <if condition="${manifest.hasCode}"> <then> <echo>Generating R.java / Manifest.java from the resources...</echo> @@ -330,12 +334,31 @@ </if> </target> + <!-- Compiles RenderScript files into Java and bytecode. --> + <target name="-renderscript" depends="-dirs"> + <if condition="${manifest.hasCode}"> + <then> + <echo>Compiling RenderScript files into Java classes and RenderScript bytecode...</echo> + <renderscript executable="${renderscript}" + framework="${android.rs}" + genFolder="${gen.absolute.dir}" + resFolder="${resource.absolute.dir}/raw"> + <source path="${source.absolute.dir}"/> + <source refid="project.libraries.src"/> + </renderscript> + </then> + <else> + <echo>hasCode = false. Skipping...</echo> + </else> + </if> + </target> + <!-- empty default pre-compile target. Create a similar target in your build.xml and it'll be called instead of this one. --> <target name="-pre-compile"/> <!-- Compiles this project's .java files into .class files. --> - <target name="compile" depends="-resource-src, -aidl, -pre-compile" + <target name="compile" depends="-pre-build, -aidl, -renderscript, -resource-src, -pre-compile" description="Compiles project's .java files into .class files"> <if condition="${manifest.hasCode}"> <then> |