blob: 051cc327e7076aad17ebeb50e019123d57d6eb40 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (C) 2014 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<project name="jack" default="all"
xmlns:if="ant:if"
xmlns:unless="ant:unless"
xmlns:ivy="antlib:org.apache.ivy.ant">
<description>
This buildfile is used to build all Jack projects and run tests.
</description>
<target name="all" description="build all Jack projects" depends="dexcomparator-lib,
jack,
jack-api,
jack-api-src,
jack-annotations-lib,
jack-test-annotations-lib,
jackunittests,
jack-tests,
sched-lib,
schedtests-lib,
jill,
jill-api,
jack-jar-tools,
jack-jacoco-reporter"/>
<target name="clean" depends="jack-clean,
jack-api-lib-clean,
jack-api-clean,
jack-api-src-clean,
jack-annotations-lib-clean,
jack-test-annotations-lib-clean,
jack-intermediate-clean,
jackunittests-lib-clean,
jackunittests-clean,
jack-tests-clean,
antlr-clean,
args4j-lib-clean,
ecj-clean,
ecj-tests-clean,
simple-lib-clean,
freemarker-lib-clean,
guava-lib-clean,
jsr305-lib-clean,
maths-lib-clean,
sched-lib-clean,
sched-build-lib-clean,
sched-build-clean,
schedtests-lib-clean,
watchmaker-lib-clean,
antlr-rt-lib-clean,
allocation-lib-clean,
junit4-lib-clean,
junit4-jack-lib-clean,
junit4-clean,
hamcrest-core-lib-clean,
dexcomparator-clean,
dex-lib-clean,
ddm-lib-clean,
dx-ref-lib-clean,
core-stubs-mini-clean,
jack-default-lib-clean,
jill-clean,
jill-api-lib-clean,
jill-api-src-clean,
jack-jar-tools-clean,
jack-jacoco-reporter-clean,
jacoco-clean,
asm4-clean,
gson-clean,
dist-clean" />
<dirname property="jack-project.dir" file="${ant.file.jack}"/>
<property name="jack.dir" value="${jack-project.dir}/jack" />
<property name="jack-api.dir" value="${jack-project.dir}/jack-api" />
<property name="jack-tests.dir" value="${jack-project.dir}/jack-tests" />
<property name="antlr.dir" value="${jack-project.dir}/antlr"/>
<property name="args4j.dir" value="${jack-project.dir}/args4j"/>
<property name="ddm-lib.dir" value="${jack-project.dir}/ddmlib"/>
<property name="ecj.dir" value="${jack-project.dir}/ecj"/>
<property name="ecj-tests.dir" value="${jack-project.dir}/ecj-tests-lib"/>
<property name="simple.dir" value="${jack-project.dir}/simple"/>
<property name="freemarker.dir" value="${jack-project.dir}/freemarker"/>
<property name="guava.dir" value="${jack-project.dir}/guava"/>
<property name="jsr305.dir" value="${jack-project.dir}/jsr305"/>
<property name="maths.dir" value="${jack-project.dir}/maths"/>
<property name="sched.dir" value="${jack-project.dir}/sched"/>
<property name="watchmaker.dir" value="${jack-project.dir}/watchmaker"/>
<property name="antlr-rt.dir" value="${jack-project.dir}/antlr-runtime"/>
<property name="allocation.dir" value="${jack-project.dir}/java-allocation-instrumenter"/>
<property name="junit4.dir" value="${jack-project.dir}/junit4"/>
<property name="hamcrest-core.dir" value="${jack-project.dir}/hamcrest-core"/>
<property name="dexcomparator.dir" value="${jack-project.dir}/dexcomparator"/>
<property name="dexlib.dir" value="${jack-project.dir}/dexlib"/>
<property name="tools.dir" value="${jack-project.dir}/tools"/>
<property name="dx-ref.dir" value="${jack-project.dir}/dx-ref"/>
<property name="core-stubs-mini.dir" value="${jack-project.dir}/core-stubs-mini"/>
<property name="jack-jar-tools.dir" value="${jack-project.dir}/jack-jar-tools"/>
<property name="jack-jacoco-reporter.dir" value="${jack-project.dir}/jack-jacoco-reporter"/>
<property name="jacoco.dir" value="${jack-project.dir}/jacoco"/>
<property name="jill.dir" value="${jack-project.dir}/jill" />
<property name="jill-api.dir" value="${jack-project.dir}/jill-api" />
<property name="asm4.dir" value="${jack-project.dir}/asm4" />
<property name="gson.dir" value="${jack-project.dir}/gson"/>
<taskdef name="jarjar" classname="com.tonicsystems.jarjar.JarJarTask"
classpath="${jack-project.dir}/jarjar/jarjar.jar"/>
<!-- ******************* -->
<!-- Distributed files -->
<!-- ******************* -->
<property name="jack-top-dist.dir" value="${jack-project.dir}/dist" />
<property name="jack.dist-doc.dir" value="${jack-top-dist.dir}/doc" />
<property name="jack.doc.dir" value="${jack.dist-doc.dir}/jack" />
<property name="jack-internal-doc.dir" value="${jack.doc.dir}/jack-internal" />
<property name="jack-external-doc.dir" value="${jack.doc.dir}/jack-external" />
<property name="jack-server.doc.dir" value="${jack.dist-doc.dir}/server" />
<property name="jack.coverage.doc.dir" value="${jack.dist-doc.dir}/coverage" />
<target name="dist-clean">
<delete dir="${jack-top-dist.dir}"/>
</target>
<target name="dist" depends="jack-dist, jill-dist, tools-dist"/>
<scriptdef name="generateUuid" language="javascript">
<attribute name="result" />
<![CDATA[
project.setProperty(attributes.get("result"), java.util.UUID.randomUUID());
]]>
</scriptdef>
<scriptdef name="getHostame" language="javascript">
<attribute name="result" /> <![CDATA[
project.setProperty(attributes.get("result"), java.net.InetAddress.getLocalHost().getCanonicalHostName());
]]>
</scriptdef>
<target name="generate-eng-signature">
<getHostame result="hostname"/>
<property name="sign.eng.releaser" value="${user.name}@${hostname}"/>
<generateUuid result="sign.eng.buildid"/>
</target>
<target name="dist-check-version-files">
<condition property="dist.version.file" value="${version.file}" else="${jack-project.dir}/version.properties">
<isset property="version.file"/>
</condition>
</target>
<target name="server-dist-check-version-files">
<condition property="server.dist.version.file" value="${server.version.file}" else="${server-project.dir}/version.properties">
<isset property="server.version.file"/>
</condition>
</target>
<target name="dist-doc" depends="server-dist-check-version-files,jack,jill,sched-lib">
<union id="dist-doc.classpath.files">
<fileset dir="${jack.dir}/libs" />
<fileset dir="${sched.dir}/libs" />
<fileset file="${schedlib.dist.dir}/${schedlib.libname}" />
<fileset file="${jill.dist.dir}/${jill.libname}" />
<fileset file="${jack.dist.dir}/${jack.libname}" />
</union>
<pathconvert property="dist-doc.classpath.path" refid="dist-doc.classpath.files" />
<!-- Jack and Sched -->
<mkdir dir="${jack-internal-doc.dir}" />
<javadoc destdir="${jack-internal-doc.dir}"
author="true"
version="true"
use="true"
windowtitle="Jack"
classpath="${dist-doc.classpath.path}"
nodeprecated="true">
<fileset dir="${jack.dir}/src" excludes="**/tonicsystems/jarjar/**" includes="**/*.java" />
<fileset dir="${sched.dir}/src" includes="**/*.java" />
</javadoc>
<!-- Jack API and Jill API -->
<mkdir dir="${jack-external-doc.dir}/jack-api" />
<javadoc destdir="${jack-external-doc.dir}"
author="true"
version="true"
use="true"
windowtitle="Jack API"
classpath="${dist-doc.classpath.path}"
nodeprecated="true">
<fileset dir="${jack-api.dir}/src" includes="**/*.java" />
<fileset dir="${jill-api.dir}/src" includes="**/*.java" />
</javadoc>
<java jar="${jack.dist.dir}/${jack.execname}" fork="true" failonerror="true"
output="${jack.doc.dir}/cli-usage.txt">
<arg value="--help"/>
</java>
<java jar="${jack.dist.dir}/${jack.execname}" fork="true" failonerror="true"
output="${jack.doc.dir}/properties.txt">
<arg value="--help-properties"/>
<arg value="--sanity-checks"/>
<arg value="off"/>
</java>
<java jar="${jack.dist.dir}/${jack.execname}" fork="true" failonerror="true"
output="${jack.doc.dir}/properties-dev.txt">
<arg value="--help-properties"/>
<arg value="--sanity-checks"/>
<arg value="on"/>
</java>
<!-- Jack server -->
<mkdir dir="${jack-server.doc.dir}" />
<copy file="${jack-project.dir}/server/jack-server/README-jack-server.md"
todir="${jack-server.doc.dir}" />
<property file="${server.dist.version.file}" prefix="jack-server"/>
<replace file="${jack-server.doc.dir}/README-jack-server.md"
token="%%VERSION%%"
value="${jack-server.version}"
encoding="UTF-8"/>
<exec executable="pandoc" failifexecutionfails="false">
<arg line="--from=markdown --to=plain --output=${jack-server.doc.dir}/README-jack-server.txt ${jack-server.doc.dir}/README-jack-server.md"/>
</exec>
<!-- Jack coverage -->
<mkdir dir="${jack.coverage.doc.dir}" />
<copy file="${jack-project.dir}/jacoco/README.md"
todir="${jack.coverage.doc.dir}" />
<exec executable="pandoc" failifexecutionfails="false">
<arg line="--from=markdown --to=plain --output=${jack.coverage.doc.dir}/README.txt ${jack.coverage.doc.dir}/README.md"/>
</exec>
</target>
<target name="jack-dist"
description="package a Jack distribution"
depends="dist-check-version-files,
jack,
jack-api,
jack-api-src,
jack-annotations-lib,
generate-eng-signature">
<mkdir dir="${jack-top-dist.dir}"/>
<tempfile property="jack-sign.tmp" prefix="ant-jack-sign" destdir="${java.io.tmpdir}" deleteonexit="true"/>
<mkdir dir="${jack-sign.tmp}"/>
<copy file="${dist.version.file}" tofile="${jack-sign.tmp}/version.properties"/>
<propertyfile file="${jack-sign.tmp}/version.properties">
<entry key="releaser" default="${sign.eng.releaser}"/>
<entry key="version.buildid" default="${sign.eng.buildid}"/>
</propertyfile>
<copy file="${jack-api.dist.dir}/${jack-api-src.name}" tofile="${jack-top-dist.dir}/${jack-api-src.name}" />
<jarjar jarfile="${jack-sign.tmp}/${jack.execname}" filesetmanifest="merge">
<zipfileset src="${jack.dist.dir}/${jack.execname}"
excludes="jack-version.properties"/>
<rule pattern="com.google.common.**" result="com.android.jack.google.common.@1"/>
<rule pattern="com.google.thirdparty.**" result="com.android.jack.google.thirdparty.@1"/>
<rule pattern="com.tonicsystems.**" result="com.android.jack.tonicsystems.@1"/>
<rule pattern="freemarker.**" result="com.android.jack.freemarker.@1"/>
<rule pattern="org.antlr.**" result="com.android.jack.antlr.@1"/>
<rule pattern="org.kohsuke.**" result="com.android.jack.kohsuke.@1"/>
<rule pattern="org.objectweb.**" result="com.android.jack.objectweb.@1"/>
<rule pattern="org.uncommons.**" result="com.android.jack.uncommons.@1"/>
<rule pattern="org.eclipse.**" result="com.android.jack.eclipse.@1"/>
</jarjar>
<mkdir dir="${jack-sign.tmp}/with-empty-directories" />
<mkdir dir="${jack-sign.tmp}/without-empty-directories" />
<unzip src="${jack-sign.tmp}/${jack.execname}" dest="${jack-sign.tmp}/with-empty-directories"/>
<copy includeemptydirs="false" todir="${jack-sign.tmp}/without-empty-directories">
<fileset dir="${jack-sign.tmp}/with-empty-directories" />
</copy>
<jar destfile="${jack-top-dist.dir}/${jack.execname}" manifest="${jack.dir}/etc/manifest.txt">
<fileset dir="${jack-sign.tmp}/without-empty-directories"/>
</jar>
<copy file="${jack-sign.tmp}/version.properties" tofile="${jack-sign.tmp}/jack-version.properties"/>
<jar destfile="${jack-top-dist.dir}/${jack.execname}" update="true"
basedir="${jack-sign.tmp}"
includes="jack-version.properties"/>
<jar destfile="${jack-top-dist.dir}/${jack-api.name}" filesetmanifest="merge">
<zipfileset src="${jack-api.dist.dir}/${jack-api.name}"
excludes="jack-api-version.properties"/>
</jar>
<copy file="${jack-sign.tmp}/version.properties" tofile="${jack-sign.tmp}/jack-api-version.properties"/>
<jar destfile="${jack-top-dist.dir}/${jack-api.name}" update="true"
basedir="${jack-sign.tmp}"
includes="jack-api-version.properties"/>
<jar destfile="${jack-top-dist.dir}/${jack-annotations.libname}" filesetmanifest="merge">
<zipfileset src="${jack.dist.dir}/${jack-annotations.libname}"
excludes="jack-annotations-version.properties"/>
</jar>
<copy file="${jack-sign.tmp}/version.properties" tofile="${jack-sign.tmp}/jack-annotations-version.properties"/>
<jar destfile="${jack-top-dist.dir}/${jack-annotations.libname}" update="true"
basedir="${jack-sign.tmp}"
includes="jack-annotations-version.properties"/>
<delete dir="${jack-sign.tmp}"/>
</target>
<target name="jill-dist"
description="package a Jill distribution"
depends="dist-check-version-files,
jill,
jill-api,
jill-api-src,
generate-eng-signature">
<mkdir dir="${jack-top-dist.dir}"/>
<jar destfile="${jack-top-dist.dir}/${jill.execname}" filesetmanifest="merge">
<zipfileset src="${jill.dist.dir}/${jill.execname}"
excludes="jill-version.properties"/>
</jar>
<jar destfile="${jack-top-dist.dir}/${jill-api.name}" filesetmanifest="merge">
<zipfileset src="${jill-api.dist.dir}/${jill-api.name}"
excludes="jill-api-version.properties"/>
</jar>
<tempfile property="jill-sign.tmp" prefix="ant-jill-sign" destdir="${java.io.tmpdir}" deleteonexit="true"/>
<mkdir dir="${jill-sign.tmp}"/>
<copy file="${dist.version.file}" tofile="${jill-sign.tmp}/version.properties"/>
<propertyfile file="${jill-sign.tmp}/version.properties">
<entry key="releaser" default="${sign.eng.releaser}"/>
<entry key="version.buildid" default="${sign.eng.buildid}"/>
</propertyfile>
<copy file="${jill-sign.tmp}/version.properties" tofile="${jill-sign.tmp}/jill-version.properties"/>
<jar destfile="${jack-top-dist.dir}/${jill.execname}" update="true"
basedir="${jill-sign.tmp}"
includes="jill-version.properties"/>
<copy file="${jill-sign.tmp}/version.properties" tofile="${jill-sign.tmp}/jill-api-version.properties"/>
<jar destfile="${jack-top-dist.dir}/${jill-api.name}" update="true"
basedir="${jill-sign.tmp}"
includes="jill-api-version.properties"/>
<delete dir="${jill-sign.tmp}"/>
</target>
<target name="tools-dist"
description="package a tools distribution"
depends="dist-check-version-files,
jack-jar-tools,
jack-jacoco-reporter,
generate-eng-signature">
<mkdir dir="${jack-top-dist.dir}"/>
<tempfile property="tools-sign.tmp" prefix="ant-tools-sign" destdir="${java.io.tmpdir}" deleteonexit="true"/>
<mkdir dir="${tools-sign.tmp}"/>
<copy file="${dist.version.file}" tofile="${tools-sign.tmp}/version.properties"/>
<propertyfile file="${tools-sign.tmp}/version.properties">
<entry key="releaser" default="${sign.eng.releaser}"/>
<entry key="version.buildid" default="${sign.eng.buildid}"/>
</propertyfile>
<jar destfile="${jack-top-dist.dir}/${jack-jar-tools.name}" filesetmanifest="merge">
<zipfileset src="${jack-jar-tools.dist.dir}/${jack-jar-tools.name}"
excludes="jack-jar-tools-version.properties"/>
</jar>
<copy file="${tools-sign.tmp}/version.properties" tofile="${tools-sign.tmp}/jack-jar-tools-version.properties"/>
<jar destfile="${jack-top-dist.dir}/${jack-jar-tools.name}" update="true"
basedir="${tools-sign.tmp}"
includes="jack-jar-tools-version.properties"/>
<jar destfile="${jack-top-dist.dir}/${jack-jacoco-reporter.name}" filesetmanifest="merge">
<zipfileset src="${jack-jacoco-reporter.dist.dir}/${jack-jacoco-reporter.name}"/>
</jar>
<delete dir="${tools-sign.tmp}"/>
</target>
<!-- ******************* -->
<!-- Jack-lib -->
<!-- ******************* -->
<property name="jack.build.dir" value="${jack.dir}/build/jack-lib" />
<property name="jack.libs.dir" value="${jack.dir}/libs" />
<property name="jack.prebuilts.dir" value="${jack.dir}/prebuilts" />
<property name="jack.build.outdir" value="${jack.build.dir}/classes" />
<property name="jack.tools.dir" value="${jack.dir}/tools" />
<property name="jack.dist.dir" value="${jack.dir}/dist" />
<property name="jack.libname" value="jack-lib.jar" />
<target name="jack-lib-clean">
<delete dir="${jack.build.dir}"/>
<delete file="${jack.dist.dir}/${jack.libname}"/>
<delete dir="${jack.libs.dir}"/>
<delete dir="${jack.tools.dir}"/>
</target>
<target name="jack-copy-libs" depends="ecj,guava-lib,args4j-lib,antlr-rt-lib,jsr305-lib,
junit4,dex-lib,dx-ref-lib,jack-api-lib">
<copy todir="${jack.libs.dir}" flatten="true">
<filelist dir="/" >
<file name="${ecj.dist.dir}/${ecj.libname}"/>
<file name="${guava.dist.dir}/${guava.libname}"/>
<file name="${args4j.dist.dir}/${args4j.libname}"/>
<file name="${antlr-rt.dist.dir}/${antlr-rt.libname}"/>
<file name="${jsr305.dist.dir}/${jsr305.libname}"/>
<file name="${junit4.dist.dir}/${junit4.execname}"/>
<file name="${dexlib.dist.dir}/${dexlib.libname}"/>
<file name="${dx-ref.dist.dir}/${dx-ref.libname}"/>
<file name="${jack-api.dist.dir}/${jack-api.lib.name}"/>
</filelist>
</copy>
</target>
<target name="jack-create-version-file">
<!-- make it writable or copy won't work if replacement is needed -->
<chmod file="${jack.dir}/rsc/jack-version.properties" perm="a+w"/>
<attrib file="${jack.dir}/rsc/jack-version.properties" readonly="false"/>
<copy file="${jack-project.dir}/version.properties" tofile="${jack.dir}/rsc/jack-version.properties"/>
<chmod file="${jack.dir}/rsc/jack-version.properties" perm="a-w"/>
<attrib file="${jack.dir}/rsc/jack-version.properties" readonly="true"/>
</target>
<target name="jack-lib-compile-step1"
depends="jack-copy-libs,jack-create-version-file,sched-build,antlr,sched-build-lib,allocation-lib,
freemarker-lib,maths-lib,sched-lib,watchmaker-lib,jill-lib,jill-api-lib,asm4-lib">
<!-- project layout -->
<!-- avoid incremental compilation with annotation processor -->
<mkdir dir="${jack.build.outdir}"/>
<mkdir dir="${jack.libs.dir}"/>
<mkdir dir="${jack.dist.dir}"/>
<mkdir dir="${jack.tools.dir}"/>
<!-- fetch dependencies -->
<filelist id="jack.link.libs.fileset" dir="/">
<file name="${sched-build.dist.dir}/${sched-build.libname}" />
<file name="${allocation.dist.dir}/${allocation.libname}" />
</filelist>
<filelist id="jack.static.libs.fileset" dir="/">
<file name="${jack-api.dist.dir}/${jack-api.lib.name}"/>
<file name="${ecj.dist.dir}/${ecj.libname}" />
<file name="${guava.dist.dir}/${guava.libname}" />
<file name="${jsr305.dist.dir}/${jsr305.libname}" />
<file name="${args4j.dist.dir}/${args4j.libname}" />
<file name="${antlr-rt.dist.dir}/${antlr-rt.libname}" />
<file name="${schedlib.dist.dir}/${schedlib.libname}" />
<file name="${freemarker.dist.dir}/${freemarker.libname}" />
<file name="${watchmaker.dist.dir}/${watchmaker.libname}" />
<file name="${maths.dist.dir}/${maths.libname}" />
<file name="${jill.dist.dir}/${jill.libname}" />
<file name="${jill-api.dist.dir}/${jill-api.lib.name}" />
<file name="${asm4.dist.dir}/${asm4.libname}" />
</filelist>
<copy todir="${jack.tools.dir}" flatten="true">
<filelist dir="/" >
<file name="${sched-build.dist.dir}/${sched-build.execname}" />
<file name="${antlr.dist.dir}/${antlr.execname}" />
</filelist>
</copy>
</target>
<target name="jack-lib-generate-proguard-parser-check">
<uptodate property="jack-lib.uptodate.proguardparser"
srcfile="${jack.dir}/src/com/android/jack/shrob/proguard/Proguard.g"
targetfile="${jack.dir}/src/com/android/jack/shrob/proguard/ProguardParser.java"/>
</target>
<target name="jack-lib-generate-preprocessor-parser-check">
<uptodate property="jack-lib.uptodate.preprocessorparser"
srcfile="${jack.dir}/src/com/android/jack/preprocessor/PreProcessor.g"
targetfile="${jack.dir}/src/com/android/jack/preprocessor/PreProcessorParser.java"/>
</target>
<target name="jack-lib-generate-proguard-parser"
depends="jack-lib-compile-step1,jack-lib-generate-proguard-parser-check"
unless="jack-lib.uptodate.proguardparser">
<!-- generate ProGuard parser -->
<java jar="${jack.tools.dir}/${antlr.execname}" fork="true" failonerror="true">
<arg line="-fo" />
<arg line="${jack.dir}/src/com/android/jack/shrob/proguard"/>
<arg line="${jack.dir}/src/com/android/jack/shrob/proguard/Proguard.g"/>
</java>
</target>
<target name="jack-lib-generate-preprocessor-parser"
depends="jack-lib-compile-step1,jack-lib-generate-preprocessor-parser-check"
unless="jack-lib.uptodate.preprocessorparser">
<!-- generate PreProcessor parser -->
<java jar="${jack.tools.dir}/${antlr.execname}" fork="true" failonerror="true">
<arg line="-fo" />
<arg line="${jack.dir}/src/com/android/jack/preprocessor"/>
<arg line="${jack.dir}/src/com/android/jack/preprocessor/PreProcessor.g"/>
</java>
</target>
<target name="jack-lib-compile-step2"
depends="jack-lib-generate-proguard-parser,jack-lib-generate-preprocessor-parser">
<!-- compile -->
<dependset>
<sources>
<!-- All source files -->
<fileset dir="${jack.dir}/src" />
<filelist refid="jack.link.libs.fileset" />
<filelist refid="jack.static.libs.fileset" />
</sources>
<targets>
<fileset dir="${jack.build.outdir}"/>
</targets>
</dependset>
<javac encoding="UTF-8" srcdir="${jack.dir}/src"
destdir="${jack.build.outdir}"
source="1.7" target="1.7"
debug="true" includeantruntime="false" includeDestClasses="false">
<classpath>
<filelist refid="jack.link.libs.fileset" />
<filelist refid="jack.static.libs.fileset" />
</classpath>
<compilerarg line="-processor com.android.sched.build.SchedAnnotationProcessor" />
<compilerarg line="-Xlint:-options"/>
</javac>
</target>
<target name="jack-lib" depends="jack-lib-compile-step2">
<copy todir="${jack.build.outdir}">
<fileset dir="${jack.dir}/rsc" includes="**"/>
</copy>
<copy file="${jack-project.dir}/version.properties" tofile="${jack.build.outdir}/jack-version.properties"/>
<jar destfile="${jack.dist.dir}/${jack.libname}"
basedir="${jack.build.outdir}" includes="**"/>
</target>
<!-- ******************* -->
<!-- jack-intermediate -->
<!-- ******************* -->
<property name="jack.intermediate.dist.dir" value="${jack.dir}/dist"/>
<property name="jack.intermediate.build.dir" value="${jack.dir}/build/jack-intermediate"/>
<property name="jack.intermediate.build.outdir" value="${jack.intermediate.build.dir}/classes"/>
<property name="jack.intermediatename" value="jack-intermediate.jar"/>
<target name="jack-intermediate-clean" depends="jack-lib-clean">
<delete dir="${jack.intermediate.build.dir}"/>
<delete file="${jack.intermediate.dist.dir}/${jack.intermediatename}"/>
</target>
<target name="jack-intermediate-check">
<pathconvert property="jack.static.libs.list" pathsep=" " refid="jack.static.libs.fileset" />
<uptodate property="jack-intermediate.uptodate"
targetfile="${jack.intermediate.dist.dir}/${jack.intermediatename}">
<srcfiles dir="${jack.build.outdir}"/>
<srcfiles dir="/" includes="${jack.static.libs.list}"/>
</uptodate>
</target>
<target name="jack-intermediate" depends="jack-lib,jack-intermediate-check" unless="jack-intermediate.uptodate">
<!-- package -->
<copy todir="${jack.intermediate.build.outdir}">
<fileset dir="${jack.build.outdir}"/>
</copy>
<jar destfile="${jack.intermediate.build.dir}/${jack.intermediatename}"
manifest="${jack.dir}/etc/manifest.txt" basedir="${jack.intermediate.build.outdir}" includes="**"/>
<pathconvert property="jack.static.libs.list" pathsep=" " refid="jack.static.libs.fileset" />
<!-- add sched support -->
<mkdir dir="${jack.intermediate.dist.dir}"/>
<java jar="${jack.tools.dir}/${sched-build.execname}" fork="true" failonerror="true">
<arg value="${jack.intermediate.build.dir}/${jack.intermediatename}" />
<arg line="${jack.static.libs.list}" />
<arg value="${jack.intermediate.dist.dir}/${jack.intermediatename}" />
</java>
</target>
<!-- ******************* -->
<!-- jack -->
<!-- ******************* -->
<property name="jack.exec.build.dir" value="${jack.dir}/build/jack"/>
<property name="jack.exec.build.outdir" value="${jack.exec.build.dir}/classes"/>
<property name="jack.execname" value="jack.jar"/>
<target name="jack-clean" depends="jack-lib-clean">
<delete dir="${jack.exec.build.dir}"/>
<delete file="${jack.dist.dir}/${jack.execname}"/>
</target>
<target name="jack.check">
<uptodate property="jack.uptodate"
targetfile="${jack.dist.dir}/${jack.execname}">
<srcfiles dir="${jack.build.outdir}"/>
<srcfiles file="${jack.intermediate.dist.dir}/${jack.intermediatename}"/>
<srcfiles file="${jack-default-lib.build.jack}"/>
<srcfiles file="${jack.dir}/etc/manifest.txt"/>
</uptodate>
</target>
<target name="jack" depends="jack-intermediate,jack-default-lib,jack.check" unless="${jack.uptodate}">
<copy todir="${jack.exec.build.outdir}">
<fileset dir="${jack.build.outdir}"/>
</copy>
<!-- package -->
<unzip dest="${jack.exec.build.outdir}" src="${jack.intermediate.dist.dir}/${jack.intermediatename}"/>
<mkdir dir="${jack.exec.build.outdir}/jack-default-lib"/>
<unzip src="${jack-default-lib.build.jack}" dest="${jack.exec.build.outdir}/jack-default-lib"/>
<jar destfile="${jack.dist.dir}/${jack.execname}"
manifest="${jack.dir}/etc/manifest.txt"
basedir="${jack.exec.build.outdir}"
includes="**">
</jar>
</target>
<!-- ******************* -->
<!-- jack-api-lib -->
<!-- ******************* -->
<property name="jack-api.lib.build.dir" value="${jack-api.dir}/build/lib" />
<property name="jack-api.lib.build.outdir" value="${jack-api.lib.build.dir}/classes" />
<property name="jack-api.libs.dir" value="${jack-api.dir}/libs" />
<property name="jack-api.dist.dir" value="${jack-api.dir}/dist" />
<property name="jack-api.lib.name" value="jack-api-lib.jar" />
<target name="jack-api-lib-clean">
<delete dir="${jack-api.lib.build.dir}"/>
<delete file="${jack-api.dist.dir}/${jack-api.lib.name}"/>
<delete dir="${jack-api.libs.dir}"/>
</target>
<target name="jack-api-lib-copy-libs" depends="jsr305-lib">
<copy todir="${jack-api.libs.dir}" flatten="true">
<filelist dir="/" >
<file name="${jsr305.dist.dir}/${jsr305.libname}"/>
</filelist>
</copy>
</target>
<target name="jack-api-lib" depends="jack-api-lib-copy-libs">
<mkdir dir="${jack-api.lib.build.outdir}"/>
<dependset>
<sources>
<!-- All source files -->
<fileset dir="${jack-api.dir}/src" />
<fileset file="${jsr305.dist.dir}/${jsr305.libname}"/>
</sources>
<targets>
<fileset dir="${jack-api.lib.build.outdir}"/>
</targets>
</dependset>
<javac encoding="UTF-8" srcdir="${jack-api.dir}/src" destdir="${jack-api.lib.build.outdir}"
source="1.6" target="1.6" debug="true"
includeantruntime="false" includeDestClasses="false" nowarn="true">
<classpath>
<filelist dir="/" files="${jsr305.dist.dir}/${jsr305.libname}" />
</classpath>
<exclude name="com/android/jack/api/example/**"/>
</javac>
<jar destfile="${jack-api.dist.dir}/${jack-api.lib.name}">
<fileset dir="${jack-api.lib.build.outdir}"/>
</jar>
</target>
<!-- ******************* -->
<!-- jack-api -->
<!-- ******************* -->
<property name="jack-api.build.dir" value="${jack-api.dir}/build/exec" />
<property name="jack-api.name" value="jack-api.jar" />
<target name="jack-api-clean">
<delete dir="${jack-api.build.dir}"/>
<delete file="${jack-api.dist.dir}/${jack-api.name}"/>
</target>
<target name="jack-api" depends="jack-api-lib">
<copy file="${jack-project.dir}/version.properties"
tofile="${jack-api.build.dir}/jack-api-version.properties"/>
<jar destfile="${jack-api.dist.dir}/${jack-api.name}">
<fileset dir="${jsr305.build.outdir}"/>
<fileset dir="${jack-api.lib.build.outdir}"/>
<fileset dir="${jack-api.build.dir}" includes="jack-api-version.properties"/>
</jar>
</target>
<!-- ******************* -->
<!-- jack-api-src -->
<!-- ******************* -->
<property name="jack-api-src.name" value="jack-api-src.zip" />
<target name="jack-api-src-clean">
<delete file="${jack-api.dist.dir}/${jack-api-src.name}"/>
</target>
<target name="jack-api-src">
<zip destfile="${jack-api.dist.dir}/${jack-api-src.name}"
basedir="${jack-api.dir}/src" />
</target>
<!-- *************************** -->
<!-- jack-test-annotations-lib -->
<!-- *************************** -->
<property name="jack-test-annotations.build.dir" value="${jack-tests.dir}/build/annotations" />
<property name="jack-test-annotations.build.outdir" value="${jack-test-annotations.build.dir}/classes" />
<property name="jack-test-annotations.libname" value="jack-test-annotations.jar" />
<target name="jack-test-annotations-lib-clean">
<delete dir="${jack-test-annotations.build.dir}" />
<delete file="${jack.dist.dir}/${jack-test-annotations.libname}" />
<delete dir="${jack-test-annotations.build.outdir}" />
</target>
<target name="jack-test-annotations-lib">
<mkdir dir="${jack-test-annotations.build.outdir}"/>
<dependset>
<sources>
<fileset dir="${jack-tests.dir}/src/com/android/jack/annotations" includes="**/*.java" />
</sources>
<targets>
<fileset file="${jack.dist.dir}/${jack-test-annotations.libname}"/>
</targets>
</dependset>
<javac encoding="UTF-8" srcdir="${jack-tests.dir}/src"
includes="com/android/jack/annotations/**/*.java"
destdir="${jack-test-annotations.build.outdir}"
source="1.6" target="1.6" debug="true"
includeantruntime="false" includeDestClasses="false" nowarn="true" />
<copy file="${jack-project.dir}/version.properties"
tofile="${jack-test-annotations.build.outdir}/jack-test-annotations-version.properties"/>
<jar destfile="${jack-tests.dist.dir}/${jack-test-annotations.libname}">
<fileset dir="${jack-test-annotations.build.outdir}"/>
</jar>
</target>
<!-- ********************************** -->
<!-- jack-test-annotations-jack-lib -->
<!-- ********************************** -->
<property name="jack-test-annotations-jack.libname" value="jack-test-annotations-lib.jack" />
<target name="jack-test-annotations-jack-lib" depends="jack-intermediate, jack-test-annotations-lib">
<!-- compile -->
<java jar="${jack.intermediate.dist.dir}/${jack.intermediatename}" fork="true" failonerror="true">
<arg value="--verbose"/>
<arg value="error"/>
<arg value="-D"/>
<arg value="jack.classpath.default-libraries=false"/>
<arg value="--import"/>
<arg value="${jack-tests.dist.dir}/${jack-test-annotations.libname}"/>
<arg value="--output-jack"/>
<arg value="${jack-tests.prebuilts.dir}/${jack-test-annotations-jack.libname}"/>
</java>
</target>
<!-- ********************** -->
<!-- jack-annotations-lib -->
<!-- ********************** -->
<property name="jack-annotations.build.dir" value="${jack.dir}/build/annotations" />
<property name="jack-annotations.build.outdir" value="${jack-annotations.build.dir}/classes" />
<property name="jack-annotations.libname" value="jack-annotations.jar" />
<target name="jack-annotations-lib-clean">
<delete dir="${jack-annotations.build.dir}" />
<delete file="${jack.dist.dir}/${jack-annotations.libname}" />
<delete dir="${jack-annotations.build.outdir}" />
</target>
<target name="jack-annotations-lib">
<mkdir dir="${jack-annotations.build.outdir}"/>
<dependset>
<sources>
<fileset dir="${jack.dir}/src/com/android/jack/annotations" includes="**/*.java" />
</sources>
<targets>
<fileset file="${jack.dist.dir}/${jack-annotations.libname}"/>
</targets>
</dependset>
<javac encoding="UTF-8" srcdir="${jack.dir}/src"
includes="com/android/jack/annotations/**/*.java"
destdir="${jack-annotations.build.outdir}"
source="1.6" target="1.6" debug="true"
includeantruntime="false" includeDestClasses="false" nowarn="true" />
<copy file="${jack-project.dir}/version.properties"
tofile="${jack-annotations.build.outdir}/jack-annotations-version.properties"/>
<jar destfile="${jack.dist.dir}/${jack-annotations.libname}">
<fileset dir="${jack-annotations.build.outdir}"/>
</jar>
</target>
<!-- ******************* -->
<!-- jackunittests-lib -->
<!-- ******************* -->
<property name="jackunittests.build.dir" value="${jack.dir}/build/jackunittests-lib" />
<property name="jackunittests.libs.dir" value="${jack.dir}/libs" />
<property name="jackunittests.build.outdir" value="${jackunittests.build.dir}/classes" />
<property name="jackunittests.dist.dir" value="${jack.dir}/dist" />
<property name="jackunittests.tools.dir" value="${jack.dir}/tools" />
<property name="jackunittests.libname" value="jackunittests-lib.jar" />
<target name="jackunittests-lib-clean">
<delete dir="${jackunittests.build.dir}" />
<delete dir="${jackunittests.libs.dir}" />
<delete file="${jackunittests.dist.dir}/${jackunittests.libname}" />
</target>
<target name="jackunittests-lib-check">
<filelist id="jackunittests.link.libs.fileset" dir="/">
<file name="${sched-build.dist.dir}/${sched-build.libname}" />
</filelist>
<filelist id="jackunittests.static.libs.fileset" dir="/">
<file name="${jack.dist.dir}/${jack.libname}" />
<file name="${junit4.dist.dir}/${junit4.execname}" />
<file name="${dexlib.dist.dir}/${dexlib.libname}" />
<file name="${dx-ref.dist.dir}/${dx-ref.libname}" />
<file name="${dexcomparator.dist.dir}/${dexcomparator.libname}" />
</filelist>
<union id="jackunittests.uptodate.files">
<fileset dir="${jack.dir}/tests"/>
<dirset dir="${jack.dir}/tests"/>
<filelist refid="jackunittests.static.libs.fileset"/>
<filelist refid="jack.static.libs.fileset"/>
<filelist refid="jackunittests.static.libs.fileset"/>
</union>
<uptodate property="jackunittests-lib.uptodate" targetfile="${jackunittests.dist.dir}/${jackunittests.libname}">
<srcresources refid="jackunittests.uptodate.files" />
</uptodate>
</target>
<target name="jackunittests-lib" depends="jack-copy-libs,jack-lib,junit4,dex-lib,dx-ref-lib,dexcomparator-lib,
sched-build,sched-build-lib,jackunittests-lib-check" unless="jackunittests-lib.uptodate">
<!-- project layout -->
<delete dir="${jackunittests.build.outdir}" />
<mkdir dir="${jackunittests.build.outdir}" />
<mkdir dir="${jackunittests.libs.dir}" />
<mkdir dir="${jackunittests.dist.dir}" />
<!-- fetch dependencies -->
<copy file="${sched-build.dist.dir}/${sched-build.execname}" todir="${jackunittests.tools.dir}" />
<!-- compile -->
<javac encoding="UTF-8" srcdir="${jack.dir}/tests" destdir="${jackunittests.build.outdir}"
source="1.7" target="1.7" debug="true"
includeantruntime="false" includeDestClasses="false" nowarn="true">
<classpath>
<filelist refid="jackunittests.link.libs.fileset"/>
<filelist refid="jack.static.libs.fileset"/>
<filelist refid="jackunittests.static.libs.fileset"/>
</classpath>
<compilerarg line="-processor com.android.sched.build.SchedAnnotationProcessor" />
</javac>
<!-- package -->
<jar destfile="${jackunittests.dist.dir}/${jackunittests.libname}"
basedir="${jackunittests.build.outdir}" includes="**" />
</target>
<!-- ******************* -->
<!-- jackunittests -->
<!-- ******************* -->
<property name="jackunittests.exec.build.dir" value="${jack.dir}/build/jackunittests" />
<property name="jackunittests.execname" value="jackunittests.jar"/>
<target name="jackunittests-clean">
<delete dir="${jackunittests.exec.build.dir}" />
<delete file="${jackunittests.dist.dir}/${jackunittests.execname}" />
</target>
<target name="jackunittests" depends="jackunittests-lib" unless="jackunittests-lib.uptodate">
<mkdir dir="${jackunittests.exec.build.dir}" />
<jar manifest="${jack.dir}/etc/manifest.txt"
destfile="${jackunittests.exec.build.dir}/${jackunittests.execname}" basedir="${jackunittests.build.outdir}"/>
<!-- add sched support -->
<pathconvert property="jackunittests.static.libs.list" pathsep=" " refid="jackunittests.static.libs.fileset" />
<pathconvert property="jack.static.libs.list" pathsep=" " refid="jack.static.libs.fileset" />
<java jar="${jackunittests.tools.dir}/${sched-build.execname}" fork="true" failonerror="true">
<arg value="${jackunittests.exec.build.dir}/${jackunittests.execname}" />
<arg line="${jackunittests.static.libs.list}" />
<arg line="${jack.static.libs.list}" />
<arg value="${jackunittests.dist.dir}/${jackunittests.execname}" />
</java>
</target>
<!-- ******************* -->
<!-- jack-tests -->
<!-- ******************* -->
<property name="jack-tests.libs.dir" value="${jack-tests.dir}/libs" />
<property name="jack-tests.prebuilts.dir" value="${jack-tests.dir}/prebuilts" />
<property name="jack-tests.build.dir" value="${jack-tests.dir}/intermediates" />
<property name="jack-tests.build.outdir" value="${jack-tests.build.dir}/classes" />
<property name="jack-tests.dist.dir" value="${jack-tests.dir}/dist" />
<property name="jack-tests.libname" value="jack-tests-lib.jar" />
<property name="jack-tests.execname" value="jack-tests.jar" />
<property name="jack-tests-for-sched.execname" value="jack-tests-for-sched.jar" />
<target name="jack-tests-clean">
<delete dir="${jack-tests.libs.dir}" />
<delete dir="${jack-tests.build.dir}" />
<delete file="${jack-tests.dist.dir}/${jack-tests.libname}" />
<delete file="${jack-tests.dist.dir}/${jack-tests.execname}" />
</target>
<target name="jack-tests-copy-libs" depends="jack-api-lib,junit4,dx-ref-lib,ddm-lib,ecj,
antlr-rt-lib,guava-lib,dex-lib,jsr305-lib,dexcomparator-lib">
<copy todir="${jack-tests.libs.dir}" flatten="true">
<filelist dir="/" >
<file name="${jack-api.dist.dir}/${jack-api.lib.name}"/>
<file name="${junit4.dist.dir}/${junit4.execname}"/>
<file name="${dx-ref.dist.dir}/${dx-ref.libname}"/>
<file name="${ddm-lib.dist.dir}/${ddm-lib.libname}"/>
<file name="${ecj.dist.dir}/${ecj.libname}"/>
<file name="${antlr-rt.dist.dir}/${antlr-rt.libname}"/>
<file name="${guava.dist.dir}/${guava.libname}"/>
<file name="${dexlib.dist.dir}/${dexlib.libname}"/>
<file name="${jsr305.dist.dir}/${jsr305.libname}"/>
<file name="${dexcomparator.dist.dir}/${dexcomparator.libname}"/>
</filelist>
</copy>
</target>
<target name="jack-tests-check">
<union id="jack-tests.uptodate.files">
<fileset id="jack-test.src.fileset" dir="${jack-tests.dir}/src"/>
<fileset id="jack-test.src.fileset" dir="${jack-tests.dir}/tests"/>
<filelist dir="/">
<file name="${jackunittests.dist.dir}/${jackunittests.execname}" />
<file name="${ddm-lib.dist.dir}/${ddm-lib.libname}" />
<file name="${jack-api.dist.dir}/${jack-api.lib.name}"/>
<file name="${schedtests.dist.dir}/${schedtests.libname}"/>
</filelist>
<filelist refid="jackunittests.static.libs.fileset" />
<filelist refid="jack.static.libs.fileset" />
<filelist files="${jack-tests.prebuilts.dir}/${ecj-tests.libname}" />
</union>
<uptodate property="jack-tests.uptodate"
targetfile="${jack-tests.dist.dir}/${jack-tests.execname}">
<srcresources refid="jack-tests.uptodate.files" />
</uptodate>
</target>
<target name="jack-tests" depends="jack-tests-copy-libs, jack-lib, jackunittests, jill-api, schedtests-lib,jack-tests-check"
unless="jack-tests.uptodate">
<!-- project layout -->
<delete dir="${jack-tests.build.outdir}"/>
<mkdir dir="${jack-tests.build.outdir}"/>
<mkdir dir="${jack-tests.dist.dir}"/>
<!-- compile -->
<javac
encoding="UTF-8"
destdir="${jack-tests.build.outdir}"
source="1.7" target="1.7"
debug="true" includeantruntime="false" nowarn="true">
<src path="${jack-tests.dir}/src"/>
<src path="${jack-tests.dir}/tests"/>
<exclude name="com/android/jack/annotation/processor/sample2/src/**"/>
<exclude name="com/android/jack/annotation/test019/jack/**"/>
<exclude name="com/android/jack/classpath/test002/lib1override/**"/>
<exclude name="com/android/jack/encoding/tests/**"/>
<exclude name="com/android/jack/enums/test003/link/Other.java"/>
<exclude name="com/android/jack/enums/test003/link/Values.java"/>
<exclude name="com/android/jack/error/test001/jack/A.java"/>
<exclude name="com/android/jack/error/test002/jack/A.java"/>
<exclude name="com/android/jack/frontend/test002/jack/PackageName/ClassInConflictingPackage.java"/>
<exclude name="com/android/jack/frontend/test008/jack/NoOuterContext.java"/>
<exclude name="com/android/jack/frontend/test010/jack/UnusedLocalVar.java"/>
<exclude name="com/android/jack/frontend/test013/jack/ExtendingInnerOnly.java"/>
<exclude name="com/android/jack/frontend/test014/jack/ExtendingInnerInStaticContext.java"/>
<exclude name="com/android/jack/frontend/test015/jack/WithOuterContextButStatic.java"/>
<exclude name="com/android/jack/frontend/test016/jack/WithDuplicated.java"/>
<exclude name="com/android/jack/frontend/test017/jack/InvalidQualification.java"/>
<exclude name="com/android/jack/nopackage/jack/**"/>
<exclude name="com/android/jack/multidex/test004/jack/**"/>
<exclude name="com/android/jack/java8/lambda/**"/>
<exclude name="com/android/jack/java8/defaultmethod/**"/>
<exclude name="com/android/jack/java8/staticmethod/**"/>
<exclude name="com/android/jack/java8/methodref/**"/>
<exclude name="com/android/jack/java8/inference/**"/>
<exclude name="com/android/jack/java8/gwt/**"/>
<exclude name="com/android/jack/java8/retrolambda/**"/>
<exclude name="com/android/jack/java8/intersectiontype/**"/>
<exclude name="com/android/jack/java8/annotation/**"/>
<exclude name="com/android/jack/java8/variable/**"/>
<exclude name="com/android/jack/java8/bridges/**"/>
<exclude name="com/android/jack/jarjar/test003/dontcompile/**"/>
<exclude name="com/android/jack/jarjar/test004/dontcompile/**"/>
<exclude name="com/android/jack/jarjar/test006/dontcompile/**"/>
<exclude name="com/android/jack/lookup/test001/liboverride/**"/>
<exclude name="com/android/jack/frontend/test005/jack/**"/>
<exclude name="com/android/jack/frontend/test006/jack/**"/>
<exclude name="com/android/jack/frontend/test007/**"/>
<exclude name="com/android/jack/jill/test001/**"/>
<exclude name="com/android/jack/jill/test002/**"/>
<exclude name="com/android/jack/jill/test003/**"/>
<exclude name="com/android/jack/jill/test004/**"/>
<exclude name="com/android/jack/optimizations/lambdas/test001/**"/>
<exclude name="com/android/jack/optimizations/lambdas/test002/**"/>
<exclude name="com/android/jack/optimizations/lambdas/test003/**"/>
<exclude name="com/android/jack/optimizations/lambdas/test004/**"/>
<exclude name="com/android/jack/optimizations/lambdas/test005/**"/>
<exclude name="com/android/jack/optimizations/lambdas/test006/**"/>
<exclude name="com/android/jack/optimizations/lambdas/test007/**"/>
<exclude name="com/android/jack/optimizations/lambdas/test008/**"/>
<exclude name="com/android/jack/sourcepath/test002/jack/Sourcepath002.java"/>
<exclude name="com/android/jack/shrob/test062/jack/**"/>
<exclude name="com/android/jack/shrob/test066/jack/**"/>
<exclude name="com/android/jack/shrob/test067/jack/**"/>
<exclude name="com/android/jack/shrob/test068/jack/**"/>
<classpath>
<filelist dir="/">
<file name="${jill-api.dist.dir}/${jill-api.lib.name}" />
<file name="${jackunittests.dist.dir}/${jackunittests.execname}" />
<file name="${ddm-lib.dist.dir}/${ddm-lib.libname}" />
<file name="${jack-api.dist.dir}/${jack-api.lib.name}"/>
<file name="${schedtests.dist.dir}/${schedtests.libname}"/>
<file name="${jack-tests.prebuilts.dir}/${ecj-tests.libname}"/>
</filelist>
</classpath>
</javac>
<!-- package -->
<jar destfile="${jack-tests.build.dir}/${jack-tests.libname}"
basedir="${jack-tests.build.outdir}" includes="**"/>
<!-- add sched support -->
<pathconvert property="jackunittests.static.libs.list" pathsep=" " refid="jackunittests.static.libs.fileset" />
<pathconvert property="jack.static.libs.list" pathsep=" " refid="jack.static.libs.fileset" />
<java jar="${jackunittests.tools.dir}/${sched-build.execname}" fork="true" failonerror="true">
<arg value="${jack-tests.build.dir}/${jack-tests.libname}" />
<arg value="${jackunittests.dist.dir}/${jackunittests.libname}" />
<arg line="${jackunittests.static.libs.list}" />
<arg line="${jack.static.libs.list}" />
<arg value="${ddm-lib.dist.dir}/${ddm-lib.libname}" />
<arg value="${jack-tests.prebuilts.dir}/${ecj-tests.libname}" />
<arg value="${jack-tests.dist.dir}/${jack-tests.execname}" />
</java>
<jar update="true" destfile="${jack-tests.dist.dir}/${jack-tests.execname}"
manifest="${jack-tests.dir}/etc/manifest.txt">
<metainf dir="${jack.dir}/rsc/META-INF" includes="services/**" />
<metainf dir="${jill.dir}/rsc/META-INF" includes="services/**" />
</jar>
<!-- build lib for sched tests -->
<java jar="${jackunittests.tools.dir}/${sched-build.execname}" fork="true" failonerror="true">
<arg value="${jack-tests.build.dir}/${jack-tests.libname}" />
<arg value="${junit4.dist.dir}/${junit4.execname}" />
<arg value="${schedtests.dist.dir}/${schedtests.libname}" />
<arg value="${schedlib.dist.dir}/${schedlib.libname}" />
<arg value="${guava.dist.dir}/${guava.libname}" />
<arg value="${freemarker.dist.dir}/${freemarker.libname}" />
<arg value="${maths.dist.dir}/${maths.libname}" />
<arg value="${watchmaker.dist.dir}/${watchmaker.libname}" />
<arg value="${jack-tests.dist.dir}/${jack-tests-for-sched.execname}" />
</java>
<jar update="true" destfile="${jack-tests.dist.dir}/${jack-tests-for-sched.execname}"
manifest="${jack-tests.dir}/etc/manifest.txt">
</jar>
</target>
<!-- ******************* -->
<!-- jill -->
<!-- ******************* -->
<property name="jill.build.dir" value="${jill.dir}/build/jill" />
<property name="jill.libs.dir" value="${jill.dir}/libs" />
<property name="jill.build.outdir" value="${jill.build.dir}/classes" />
<property name="jill.exec.build.dir" value="${jill.build.dir}/package" />
<property name="jill.dist.dir" value="${jill.dir}/dist" />
<property name="jill.execname" value="jill.jar" />
<property name="jill.libname" value="jill-lib.jar" />
<target name="jill-clean">
<delete dir="${jill.build.dir}" />
<delete dir="${jill.dist.dir}" />
<delete dir="${jill.libs.dir}" />
</target>
<target name="jill-copy-libs" depends="jill-api-lib,sched-lib,guava-lib,asm4-lib,args4j-lib,jsr305-lib">
<copy todir="${jill.libs.dir}" flatten="true">
<filelist id="jill.libs.filelist" dir="/" >
<file name="${jill-api.dist.dir}/${jill-api.lib.name}"/>
<file name="${schedlib.dist.dir}/${schedlib.libname}"/>
<file name="${guava.dist.dir}/${guava.libname}"/>
<file name="${args4j.dist.dir}/${args4j.libname}"/>
<file name="${jsr305.dist.dir}/${jsr305.libname}"/>
<file name="${asm4.dist.dir}/${asm4.libname}"/>
</filelist>
</copy>
</target>
<target name="jill-check">
<union id="jill.uptodate.files">
<fileset dir="${jill.dir}/src" />
<dirset dir="${jill.dir}/src" />
<fileset dir="${jill.dir}/rsc"/>
<dirset dir="${jill.dir}/rsc"/>
<filelist refid="jill.libs.filelist" />
</union>
<uptodate property="jill.uptodate" targetfile="${jill.dist.dir}/${jill.execname}">
<srcresources refid="jill.uptodate.files" />
</uptodate>
</target>
<target name="jill-create-version-file">
<!-- make it writable or copy won't work if replacement is needed -->
<chmod file="${jill.dir}/rsc/jill-version.properties" perm="a+w"/>
<attrib file="${jill.dir}/rsc/jill-version.properties" readonly="false"/>
<copy file="${jack-project.dir}/version.properties" tofile="${jill.dir}/rsc/jill-version.properties"/>
<chmod file="${jill.dir}/rsc/jill-version.properties" perm="a-w"/>
<attrib file="${jill.dir}/rsc/jill-version.properties" readonly="true"/>
</target>
<target name="jill-compile" depends="jill-copy-libs, jill-check, jill-create-version-file" unless="jill.uptodate">
<!-- project layout -->
<delete dir="${jill.build.outdir}"/>
<mkdir dir="${jill.build.outdir}"/>
<mkdir dir="${jill.dist.dir}"/>
<!-- compile -->
<javac encoding="UTF-8" srcdir="${jill.dir}/src"
destdir="${jill.build.outdir}"
source="1.7" target="1.7"
debug="true" includeantruntime="false">
<classpath>
<filelist refid="jill.libs.filelist" />
</classpath>
</javac>
</target>
<target name="jill-lib" depends="jill-compile">
<copy file="${jack-project.dir}/version.properties"
tofile="${jill.build.outdir}/jill-version.properties"/>
<jar destfile="${jill.dist.dir}/${jill.libname}"
basedir="${jill.build.outdir}"
includes="**"/>
</target>
<target name="jill" depends="jill-compile" unless="jill.uptodate">
<mkdir dir="${jill.exec.build.dir}"/>
<copy todir="${jill.exec.build.dir}">
<fileset dir="${jill.build.outdir}">
<include name="**/*" />
</fileset>
<fileset dir="${jill.dir}/rsc">
<include name="**/*" />
</fileset>
<fileset dir="${jill-api.lib.build.outdir}">
<include name="**/*" />
</fileset>
<fileset dir="${schedlib.build.outdir}">
<include name="**/*" />
</fileset>
<fileset dir="${args4j.build.outdir}">
<include name="**/*" />
</fileset>
<fileset dir="${jsr305.build.outdir}">
<include name="**/*" />
</fileset>
<fileset dir="${asm4.build.outdir}">
<include name="**/*" />
</fileset>
</copy>
<unzip dest="${jill.exec.build.dir}" src="${guava.dist.dir}/${guava.libname}">
<patternset excludes="META-INF/**"/>
</unzip>
<copy file="${jack-project.dir}/version.properties"
tofile="${jill.exec.build.dir}/jill-version.properties"/>
<jar destfile="${jill.dist.dir}/${jill.execname}"
manifest="${jill.dir}/etc/manifest.txt"
basedir="${jill.exec.build.dir}"
includes="**"/>
</target>
<!-- ******************* -->
<!-- jill-api-lib -->
<!-- ******************* -->
<property name="jill-api.lib.build.dir" value="${jill-api.dir}/build/lib" />
<property name="jill-api.lib.build.outdir" value="${jill-api.lib.build.dir}/classes" />
<property name="jill-api.libs.dir" value="${jill-api.dir}/libs" />
<property name="jill-api.dist.dir" value="${jill-api.dir}/dist" />
<property name="jill-api.lib.name" value="jill-api-lib.jar" />
<target name="jill-api-lib-clean">
<delete dir="${jill-api.lib.build.dir}"/>
<delete dir="${jill-api.dist.dir}"/>
<delete dir="${jill-api.libs.dir}"/>
</target>
<target name="jill-api-lib-copy-libs" depends="jsr305-lib">
<copy todir="${jill-api.libs.dir}" flatten="true">
<filelist dir="/" >
<file name="${jsr305.dist.dir}/${jsr305.libname}"/>
</filelist>
</copy>
</target>
<target name="jill-api-check">
<uptodate property="jill-api.uptodate" targetfile="${jill-api.dist.dir}/${jill-api.lib.name}">
<srcfiles dir="${jill-api.dir}/src" />
<srcresources>
<dirset dir="${jill-api.dir}/src" />
</srcresources>
<srcfiles file="${jsr305.dist.dir}/${jsr305.libname}" />
</uptodate>
</target>
<target name="jill-api-lib" depends="jill-api-lib-copy-libs, jill-api-check" unless="jill-api.uptodate">
<delete dir="${jill-api.lib.build.outdir}"/>
<mkdir dir="${jill-api.lib.build.outdir}"/>
<javac encoding="UTF-8" srcdir="${jill-api.dir}/src" destdir="${jill-api.lib.build.outdir}"
source="1.6" target="1.6" debug="true"
includeantruntime="false" includeDestClasses="false" nowarn="true">
<classpath>
<filelist dir="/" files="${jsr305.dist.dir}/${jsr305.libname}" />
</classpath>
<exclude name="com/android/jack/api/example/**"/>
</javac>
<jar destfile="${jill-api.dist.dir}/${jill-api.lib.name}">
<fileset dir="${jill-api.lib.build.outdir}"/>
</jar>
</target>
<!-- ******************* -->
<!-- jill-api -->
<!-- ******************* -->
<property name="jill-api.build.dir" value="${jill-api.dir}/build/exec" />
<property name="jill-api.build.outdir" value="${jill-api.build.dir}/classes" />
<property name="jill-api.name" value="jill-api.jar" />
<target name="jill-api" depends="jill-api-lib">
<copy file="${jack-project.dir}/version.properties"
tofile="${jill-api.lib.build.outdir}/jill-api-version.properties"/>
<jar destfile="${jill-api.dist.dir}/${jill-api.name}">
<fileset dir="${jsr305.build.outdir}"/>
<fileset dir="${jill-api.lib.build.outdir}"/>
</jar>
</target>
<!-- ******************* -->
<!-- jill-api-src -->
<!-- ******************* -->
<property name="jill-api-src.name" value="jill-api-src.zip" />
<target name="jill-api-src-clean">
<delete dir="${jill-api.dist.dir}/${jill-api-src.name}"/>
</target>
<target name="jill-api-src">
<zip destfile="${jill-api.dist.dir}/${jill-api-src.name}"
basedir="${jill-api.dir}/src" />
</target>
<!-- ******************* -->
<!-- antlr -->
<!-- ******************* -->
<property name="antlr.dist.dir" value="${antlr.dir}/dist" />
<property name="antlr.execname" value="antlr.jar"/>
<target name="antlr-clean">
<delete dir="${antlr.dist.dir}"/>
</target>
<target name="antlr">
<mkdir dir="${antlr.dist.dir}"/>
<copy file="${antlr.dir}/antlr-3.4-complete.jar" tofile="${antlr.dist.dir}/${antlr.execname}"/>
</target>
<!-- ******************* -->
<!-- args4j-lib -->
<!-- ******************* -->
<property name="args4j.build.dir" value="${args4j.dir}/build"/>
<property name="args4j.build.outdir" value="${args4j.build.dir}/classes"/>
<property name="args4j.dist.dir" value="${args4j.dir}/dist"/>
<property name="args4j.libname" value="args4j-lib.jar"/>
<target name="args4j-lib-clean">
<delete dir="${args4j.build.dir}"/>
<delete dir="${args4j.dist.dir}"/>
</target>
<target name="args4j-lib">
<!-- project layout -->
<mkdir dir="${args4j.build.outdir}"/>
<mkdir dir="${args4j.dist.dir}"/>
<!-- compile -->
<dependset>
<sources>
<!-- All source files -->
<fileset dir="${args4j.dir}/args4j/src" />
</sources>
<targets>
<fileset file="${args4j.dist.dir}/${args4j.libname}"/>
</targets>
</dependset>
<javac encoding="UTF-8" srcdir="${args4j.dir}/args4j/src"
destdir="${args4j.build.outdir}"
source="1.6" target="1.6"
debug="true" includeantruntime="false" includeDestClasses="false" nowarn="true"/>
<!-- package -->
<copy todir="${args4j.build.outdir}">
<fileset dir="${args4j.dir}/args4j/src">
<include name="**/*.properties"/>
</fileset>
</copy>
<jar destfile="${args4j.dist.dir}/${args4j.libname}"
basedir="${args4j.build.outdir}"
includes="**"/>
</target>
<!-- ******************* -->
<!-- ddmlib -->
<!-- ******************* -->
<property name="ddm-lib.libname" value="ddmlib.jar"/>
<property name="ddm-lib.dist.dir" value="${ddm-lib.dir}/dist"/>
<target name="ddm-lib-clean">
<delete file="${ddm-lib.dist.dir}/${ddm-lib.libname}"/>
</target>
<target name="ddm-lib">
<mkdir dir="${ddm-lib.dist.dir}"/>
<copy file="${ddm-lib.dir}/ddmlib.jar" tofile="${ddm-lib.dist.dir}/${ddm-lib.libname}"/>
</target>
<!-- ******************* -->
<!-- ecj -->
<!-- ******************* -->
<property name="ecj.libname" value="ecj.jar"/>
<property name="ecj.dist.dir" value="${ecj.dir}/dist"/>
<target name="ecj-clean">
<delete dir="${ecj.dist.dir}"/>
</target>
<target name="ecj">
<mkdir dir="${ecj.dist.dir}"/>
<copy file="${ecj.dir}/ecj-4.7M3.jar" tofile="${ecj.dist.dir}/${ecj.libname}"/>
</target>
<!-- ******************* -->
<!-- ecj-tests-lib -->
<!-- ******************* -->
<property name="ecj-tests.libname" value="ecj-tests-lib.jar"/>
<property name="ecj-test.dist.dir" value="${ecj-tests.dir}/dist"/>
<property name="ecj-test.build.dir" value="${ecj-tests.dir}/build"/>
<target name="ecj-tests-clean">
<delete dir="${ecj-test.dist.dir}"/>
<delete dir="${ecj-test.build.dir}"/>
</target>
<target name="ecj-tests-lib">
<mkdir dir="${ecj-test.dist.dir}"/>
<jarjar destfile="${ecj-test.build.dir}/ecj-tests-lib-tmp.jar">
<zipfileset src="${ecj-tests.dir}/ecj-4.6M2.jar"/>
<zipfileset src="${ecj-tests.dir}/org.eclipse.equinox.common_3.8.0.v20150911-2106.jar"/>
<zipfileset src="${ecj-tests.dir}/org.eclipse.jdt.core_3.12.0.v20150913-1717.jar"/>
<zipfileset src="${ecj-tests.dir}/org.eclipse.jdt.core.tests.compiler_3.12.0.v20150913-1717.jar"/>
<zipfileset src="${ecj-tests.dir}/org.eclipse.test.performance_3.11.0.v20150223-0658.jar"/>
<rule pattern="org.eclipse.**" result="com.android.jack.test.eclipse.@1"/>
</jarjar>
<mkdir dir="${ecj-test.build.dir}/with-empty-directories" />
<mkdir dir="${ecj-test.build.dir}/without-empty-directories" />
<unzip src="${ecj-test.build.dir}/ecj-tests-lib-tmp.jar" dest="${ecj-test.build.dir}/with-empty-directories"/>
<copy includeemptydirs="false" todir="${ecj-test.build.dir}/without-empty-directories">
<fileset dir="${ecj-test.build.dir}/with-empty-directories" />
</copy>
<jar destfile="${ecj-test.dist.dir}/${ecj-tests.libname}">
<fileset dir="${ecj-test.build.dir}/without-empty-directories" excludes="META-INF/**"/>
</jar>
<copy file="${ecj-test.dist.dir}/${ecj-tests.libname}" todir="${jack-tests.prebuilts.dir}" flatten="true"/>
</target>
<!-- ******************* -->
<!-- simple-lib -->
<!-- ******************* -->
<property name="simple.libname" value="simple-lib.jar"/>
<property name="simple.dist.dir" value="${simple.dir}/dist"/>
<property name="simple.build.outdir" value="${simple.dir}/build/classes"/>
<target name="simple-lib-clean">
<delete dir="${simple.dist.dir}"/>
<delete dir="${simple.build.outdir}"/>
</target>
<target name="simple-lib">
<mkdir dir="${simple.dist.dir}"/>
<mkdir dir="${simple.build.outdir}"/>
<unzip dest="${simple.build.outdir}" src="${simple.dir}/simple-common-6.0.1-jack.jar"/>
<unzip dest="${simple.build.outdir}" src="${simple.dir}/simple-http-6.0.1-jack.jar"/>
<unzip dest="${simple.build.outdir}" src="${simple.dir}/simple-transport-6.0.1-jack.jar"/>
<jar basedir="${simple.build.outdir}" destfile="${simple.dist.dir}/${simple.libname}"/>
</target>
<!-- ******************* -->
<!-- dx-ref-lib -->
<!-- ******************* -->
<property name="dx-ref.libname" value="dx-ref.jar" />
<property name="dx-ref.dist.dir" value="${dx-ref.dir}/dist" />
<target name="dx-ref-lib-clean">
<delete dir="${dx-ref.dist.dir}" />
</target>
<target name="dx-ref-lib">
<mkdir dir="${dx-ref.dist.dir}" />
<copy file="${dx-ref.dir}/dx.jar" tofile="${dx-ref.dist.dir}/${dx-ref.libname}" />
</target>
<!-- ******************* -->
<!-- freemarker-lib -->
<!-- ******************* -->
<property name="freemarker.libname" value="freemarker-lib.jar"/>
<property name="freemarker.dist.dir" value="${freemarker.dir}/dist"/>
<target name="freemarker-lib-clean">
<delete dir="${freemarker.dist.dir}"/>
</target>
<target name="freemarker-lib">
<mkdir dir="${freemarker.dist.dir}"/>
<copy file="${freemarker.dir}/freemarker-2.3.25-incubating.jar" tofile="${freemarker.dist.dir}/${freemarker.libname}"/>
</target>
<!-- ******************* -->
<!-- guava-lib -->
<!-- ******************* -->
<property name="guava.dist.dir" value="${guava.dir}/dist"/>
<property name="guava.libname" value="guava-lib.jar"/>
<target name="guava-lib-clean">
<delete dir="${guava.dist.dir}"/>
</target>
<target name="guava-lib">
<mkdir dir="${guava.dist.dir}"/>
<copy file="${guava.dir}/guava-18.0.jar" tofile="${guava.dist.dir}/${guava.libname}"/>
</target>
<!-- ******************* -->
<!-- jsr305-lib -->
<!-- ******************* -->
<property name="jsr305.build.dir" value="${jsr305.dir}/build"/>
<property name="jsr305.build.outdir" value="${jsr305.build.dir}/classes"/>
<property name="jsr305.dist.dir" value="${jsr305.dir}/dist"/>
<property name="jsr305.libname" value="jsr305-lib.jar"/>
<target name="jsr305-lib-clean">
<delete dir="${jsr305.build.dir}"/>
<delete dir="${jsr305.dist.dir}"/>
</target>
<target name="jsr305-lib">
<!-- project layout -->
<mkdir dir="${jsr305.build.outdir}"/>
<mkdir dir="${jsr305.dist.dir}"/>
<!-- compile -->
<dependset>
<sources>
<fileset dir="${jsr305.dir}/ri/src/main/java" />
</sources>
<targets>
<fileset dir="${jsr305.build.outdir}"/>
</targets>
</dependset>
<javac encoding="UTF-8" srcdir="${jsr305.dir}/ri/src/main/java"
destdir="${jsr305.build.outdir}"
source="1.6" target="1.6"
debug="true" includeantruntime="false" includeDestClasses="false" nowarn="true"/>
<!-- package -->
<jar destfile="${jsr305.dist.dir}/${jsr305.libname}"
basedir="${jsr305.build.outdir}"
includes="**"/>
</target>
<!-- ******************* -->
<!-- maths-lib -->
<!-- ******************* -->
<property name="maths.build.dir" value="${maths.dir}/build" />
<property name="maths.build.outdir" value="${maths.build.dir}/classes" />
<property name="maths.dist.dir" value="${maths.dir}/dist" />
<property name="maths.libname" value="maths-lib.jar" />
<target name="maths-lib-clean">
<delete dir="${maths.build.dir}"/>
<delete dir="${maths.dist.dir}"/>
</target>
<target name="maths-lib">
<!-- project layout -->
<mkdir dir="${maths.build.outdir}"/>
<mkdir dir="${maths.dist.dir}"/>
<!-- compile -->
<dependset>
<sources>
<fileset dir="${maths.dir}/core/src/java/main" />
</sources>
<targets>
<fileset dir="${maths.build.outdir}"/>
</targets>
</dependset>
<javac encoding="UTF-8" srcdir="${maths.dir}/core/src/java/main"
destdir="${maths.build.outdir}"
source="1.6" target="1.6"
debug="true" includeantruntime="false" includeDestClasses="false" nowarn="true"/>
<!-- package -->
<jar destfile="${maths.dist.dir}/${maths.libname}"
basedir="${maths.build.outdir}"
includes="**"/>
</target>
<!-- ******************* -->
<!-- sched-lib -->
<!-- ******************* -->
<property name="schedlib.build.dir" value="${sched.dir}/build/sched-lib" />
<property name="schedlib.libs.dir" value="${sched.dir}/libs" />
<property name="schedlib.build.outdir" value="${schedlib.build.dir}/classes" />
<property name="schedlib.dist.dir" value="${sched.dir}/dist" />
<property name="schedlib.libname" value="sched-lib.jar" />
<target name="sched-lib-clean">
<delete dir="${schedlib.build.dir}" />
<delete dir="${schedlib.libs.dir}" />
<delete file="${schedlib.dist.dir}/${schedlib.libname}" />
</target>
<target name="sched-copy-libs" depends="guava-lib,jsr305-lib,allocation-lib,freemarker-lib,
watchmaker-lib,maths-lib,junit4">
<copy todir="${schedlib.libs.dir}" flatten="true">
<filelist dir="/">
<file name="${guava.dist.dir}/${guava.libname}" />
<file name="${jsr305.dist.dir}/${jsr305.libname}" />
<file name="${allocation.dist.dir}/${allocation.libname}" />
<file name="${freemarker.dist.dir}/${freemarker.libname}" />
<file name="${watchmaker.dist.dir}/${watchmaker.libname}" />
<file name="${maths.dist.dir}/${maths.libname}" />
<file name="${junit4.dist.dir}/${junit4.execname}" />
</filelist>
</copy>
</target>
<target name="sched-lib" depends="sched-copy-libs,sched-build-lib,guava-lib,jsr305-lib,
allocation-lib,freemarker-lib,watchmaker-lib,maths-lib">
<!-- project layout -->
<!-- avoid incremental compilation with annotation processor -->
<mkdir dir="${schedlib.build.outdir}"/>
<mkdir dir="${schedlib.libs.dir}"/>
<mkdir dir="${schedlib.dist.dir}"/>
<filelist id="schedlib.link.libs.fileset" dir="/">
<file name="${sched-build.dist.dir}/${sched-build.libname}" />
<file name="${guava.dist.dir}/${guava.libname}" />
<file name="${jsr305.dist.dir}/${jsr305.libname}" />
<file name="${allocation.dist.dir}/${allocation.libname}" />
<file name="${freemarker.dist.dir}/${freemarker.libname}" />
<file name="${watchmaker.dist.dir}/${watchmaker.libname}" />
<file name="${maths.dist.dir}/${maths.libname}" />
</filelist>
<!-- compile -->
<dependset>
<sources>
<fileset dir="${sched.dir}/src" />
<filelist refid="schedlib.link.libs.fileset"/>
</sources>
<targets>
<fileset dir="${schedlib.build.outdir}"/>
</targets>
</dependset>
<javac encoding="UTF-8" srcdir="${sched.dir}/src" destdir="${schedlib.build.outdir}"
source="1.7" target="1.7" debug="true" includeantruntime="false" includeDestClasses="false">
<classpath>
<filelist refid="schedlib.link.libs.fileset"/>
</classpath>
<compilerarg line="-processor com.android.sched.build.SchedAnnotationProcessor" />
<compilerarg line="-Xlint:-options"/>
</javac>
<!-- package -->
<copy todir="${schedlib.build.outdir}" >
<fileset dir="${sched.dir}/rsc">
<include name="**"/>
</fileset>
</copy>
<jar destfile="${schedlib.dist.dir}/${schedlib.libname}"
basedir="${schedlib.build.outdir}"
includes="**"/>
</target>
<!-- ******************* -->
<!-- sched-build-lib -->
<!-- ******************* -->
<property name="sched-build.build.dir" value="${sched.dir}/build/sched-build-lib" />
<property name="sched-build.build.outdir" value="${sched-build.build.dir}/classes" />
<property name="sched-build.dist.dir" value="${sched.dir}/dist" />
<property name="sched-build.libname" value="sched-build-lib.jar" />
<target name="sched-build-lib-clean">
<delete dir="${sched-build.build.dir}" />
<delete file="${sched-build.dist.dir}/${sched-build.libname}" />
</target>
<target name="sched-build-lib-compile" depends="sched-copy-libs">
<!-- project layout -->
<mkdir dir="${sched-build.build.outdir}"/>
<mkdir dir="${sched-build.dist.dir}"/>
<!-- compile -->
<dependset>
<sources>
<filelist dir="${sched.dir}/src">
<file name="com/android/sched/build/SchedAnnotationProcessor.java" />
<file name="com/android/sched/build/JarMerger.java"/>
</filelist>
<fileset file="${jsr305.dist.dir}/${jsr305.libname}" />
</sources>
<targets>
<fileset dir="${sched-build.build.outdir}"/>
</targets>
</dependset>
<javac
encoding="UTF-8"
srcdir="${sched.dir}/src"
destdir="${sched-build.build.outdir}"
source="1.6" target="1.6"
debug="true" includeantruntime="false" includeDestClasses="false">
<compilerarg line="-Xlint:-options"/>
<classpath>
<fileset file="${jsr305.dist.dir}/${jsr305.libname}"/>
</classpath>
<include name="com/android/sched/build/SchedAnnotationProcessor.java" />
<include name="com/android/sched/build/JarMerger.java"/>
</javac>
</target>
<target name="sched-build-lib" depends="sched-build-lib-compile">
<!-- package -->
<copy todir="${sched-build.build.outdir}">
<fileset dir="${sched.dir}/rsc-ap">
<include name="**" />
</fileset>
</copy>
<jar destfile="${sched-build.dist.dir}/${sched-build.libname}"
basedir="${sched-build.build.outdir}" includes="**"/>
</target>
<!-- ******************* -->
<!-- sched-build -->
<!-- ******************* -->
<property name="sched-build.execname" value="sched-build.jar" />
<property name="sched-build.exec.build.dir" value="${sched.dir}/build/sched-build" />
<property name="sched-build.exec.build.outdir" value="${sched-build.exec.build.dir}/classes" />
<target name="sched-build-clean" depends="sched-build-lib-clean">
<delete dir="${sched-build.exec.build.dir}" />
<delete file="${sched.dir}/tools/${sched-build.execname}" />
<delete file="${sched-build.dist.dir}/${sched-build.execname}" />
</target>
<target name="sched-build" depends="sched-build-lib-compile">
<!-- package -->
<copy todir="${sched-build.exec.build.outdir}">
<fileset dir="${sched-build.build.outdir}" includes="**/*.class" />
</copy>
<copy todir="${sched-build.exec.build.outdir}">
<fileset dir="${sched.dir}/rsc-ap">
<include name="**" />
</fileset>
</copy>
<jar destfile="${sched-build.dist.dir}/${sched-build.execname}"
basedir="${sched-build.exec.build.outdir}" includes="**" manifest="${sched.dir}/etc/manifest.txt" />
<copy file="${sched-build.dist.dir}/${sched-build.execname}" todir="${sched.dir}/tools"/>
</target>
<!-- ******************* -->
<!-- schedtests-lib -->
<!-- ******************* -->
<property name="schedtests.build.dir" value="${sched.dir}/build/schedtests" />
<property name="schedtests.build.outdir" value="${schedtests.build.dir}/classes" />
<property name="schedtests.dist.dir" value="${sched.dir}/dist" />
<property name="schedtests.libname" value="schedtests-lib.jar" />
<target name="schedtests-lib-clean">
<delete dir="${schedtests.build.dir}" />
<delete dir="${schedtests.dist.dir}" />
</target>
<target name="schedtests-lib" depends="jack,sched-build,sched-copy-libs,sched-lib,guava-lib,jsr305-lib,junit4-lib">
<!-- project layout -->
<mkdir dir="${schedtests.build.outdir}" />
<mkdir dir="${schedtests.dist.dir}" />
<filelist id="schedtests.link.libs.fileset" dir="/">
<file name="${sched-build.dist.dir}/${sched-build.libname}" />
<file name="${schedlib.dist.dir}/${schedlib.libname}" />
<file name="${guava.dist.dir}/${guava.libname}" />
<file name="${jsr305.dist.dir}/${jsr305.libname}" />
<file name="${junit4.dist.dir}/${junit4.libname}" />
</filelist>
<!-- compile -->
<dependset>
<sources>
<fileset dir="${sched.dir}/tests" />
<filelist refid="schedtests.link.libs.fileset" />
</sources>
<targets>
<fileset dir="${schedtests.build.outdir}"/>
</targets>
</dependset>
<javac encoding="UTF-8"
srcdir="${sched.dir}/tests"
destdir="${schedtests.build.outdir}"
source="1.7" target="1.7"
debug="true" includeantruntime="false" includeDestClasses="false">
<compilerarg line="-Xlint:-options"/>
<classpath>
<filelist refid="schedtests.link.libs.fileset"/>
</classpath>
<compilerarg line="-processor com.android.sched.build.SchedAnnotationProcessor" />
<compilerarg line="-Xlint:-options"/>
</javac>
<!-- package -->
<jar destfile="${schedtests.dist.dir}/${schedtests.libname}"
basedir="${schedtests.build.outdir}" includes="**" />
</target>
<!-- ******************* -->
<!-- watchmaker-lib -->
<!-- ******************* -->
<property name="watchmaker.build.dir" value="${watchmaker.dir}/build"/>
<property name="watchmaker.libs.dir" value="${watchmaker.dir}/libs"/>
<property name="watchmaker.build.outdir" value="${watchmaker.build.dir}/classes"/>
<property name="watchmaker.dist.dir" value="${watchmaker.dir}/dist" />
<property name="watchmaker.libname" value="watchmaker-lib.jar"/>
<target name="watchmaker-lib-clean">
<delete dir="${watchmaker.build.dir}"/>
<delete dir="${watchmaker.dist.dir}"/>
</target>
<target name="watchmaker-lib" depends="maths-lib,guava-lib">
<!-- project layout -->
<mkdir dir="${watchmaker.build.outdir}"/>
<mkdir dir="${watchmaker.dist.dir}"/>
<!-- compile -->
<dependset>
<sources>
<fileset dir="${watchmaker.dir}/framework/src/java/main" />
<filelist dir="/">
<file name="${maths.dist.dir}/${maths.libname}" />
<file name="${guava.dist.dir}/${guava.libname}" />
</filelist>
</sources>
<targets>
<fileset dir="${watchmaker.build.outdir}"/>
</targets>
</dependset>
<javac encoding="UTF-8"
srcdir="${watchmaker.dir}/framework/src/java/main"
destdir="${watchmaker.build.outdir}"
source="1.6" target="1.6"
debug="true" includeantruntime="false" includeDestClasses="false" nowarn="true">
<classpath>
<filelist dir="/">
<file name="${maths.dist.dir}/${maths.libname}" />
<file name="${guava.dist.dir}/${guava.libname}" />
</filelist>
</classpath>
</javac>
<!-- package -->
<jar destfile="${watchmaker.dist.dir}/${watchmaker.libname}"
basedir="${watchmaker.build.outdir}"
includes="**"/>
</target>
<!-- ******************* -->
<!-- antlr-runtime-lib -->
<!-- ******************* -->
<property name="antlr-rt.build.dir" value="${antlr-rt.dir}/build" />
<property name="antlr-rt.build.outdir" value="${antlr-rt.build.dir}/classes" />
<property name="antlr-rt.dist.dir" value="${antlr-rt.dir}/dist" />
<property name="antlr-rt.libname" value="antlr-runtime-lib.jar" />
<target name="antlr-rt-lib-clean">
<delete dir="${antlr-rt.build.dir}" />
<delete dir="${antlr-rt.dist.dir}" />
</target>
<target name="antlr-rt-lib">
<!-- project layout -->
<mkdir dir="${antlr-rt.build.outdir}"/>
<mkdir dir="${antlr-rt.dist.dir}"/>
<!-- compile -->
<dependset>
<sources>
<fileset dir="${antlr-rt.dir}/antlr-3.4/runtime/Java/src/main/java" />
</sources>
<targets>
<fileset dir="${antlr-rt.build.outdir}"/>
</targets>
</dependset>
<javac encoding="UTF-8"
srcdir="${antlr-rt.dir}/antlr-3.4/runtime/Java/src/main/java"
destdir="${antlr-rt.build.outdir}"
source="1.6" target="1.6"
debug="true" includeantruntime="false" includeDestClasses="false" nowarn="true">
<exclude name="org/antlr/runtime/tree/DOTTreeGenerator.java" />
</javac>
<!-- package -->
<jar destfile="${antlr-rt.dist.dir}/${antlr-rt.libname}"
basedir="${antlr-rt.build.outdir}"
includes="**"/>
</target>
<!-- ******************* -->
<!-- allocation-lib -->
<!-- ******************* -->
<property name="allocation.build.dir" value="${allocation.dir}/build" />
<property name="allocation.build.outdir" value="${allocation.build.dir}/classes" />
<property name="allocation.dist.dir" value="${allocation.dir}/dist" />
<property name="allocation.libname" value="allocation-lib.jar" />
<target name="allocation-lib-clean">
<delete dir="${allocation.build.dir}" />
<delete dir="${allocation.dist.dir}" />
</target>
<target name="allocation-lib" depends="guava-lib">
<!-- project layout -->
<mkdir dir="${allocation.build.outdir}"/>
<mkdir dir="${allocation.dist.dir}"/>
<!-- compile -->
<dependset>
<sources>
<fileset dir="${allocation.dir}/src/main/java" />
<fileset file="${guava.dist.dir}/${guava.libname}" />
</sources>
<targets>
<fileset file="${allocation.dist.dir}/${allocation.libname}"/>
</targets>
</dependset>
<javac encoding="UTF-8"
srcdir="${allocation.dir}/src/main/java"
destdir="${allocation.build.outdir}"
source="1.6" target="1.6"
debug="true" includeantruntime="false" includeDestClasses="false" nowarn="true">
<classpath>
<filelist dir="/" files="${guava.dist.dir}/${guava.libname}" />
</classpath>
</javac>
<!-- package -->
<jar destfile="${allocation.dist.dir}/${allocation.libname}"
basedir="${allocation.build.outdir}"
includes="**"/>
</target>
<!-- ******************* -->
<!-- junit4-lib -->
<!-- ******************* -->
<property name="junit4.build.dir" value="${junit4.dir}/build/junit4-lib" />
<property name="junit4.build.outdir" value="${junit4.build.dir}/classes" />
<property name="junit4.dist.dir" value="${junit4.dir}/dist" />
<property name="junit4.libname" value="junit4-lib.jar" />
<target name="junit4-lib-clean">
<delete dir="${junit4.build.dir}" />
<delete file="${junit4.dist.dir}/${junit4.libname}" />
</target>
<target name="junit4-lib-compile" depends="hamcrest-core-lib">
<!-- project layout -->
<mkdir dir="${junit4.build.outdir}"/>
<mkdir dir="${junit4.dist.dir}"/>
<!-- compile -->
<dependset>
<sources>
<fileset dir="${junit4.dir}/src/main/java" />
<fileset file="${hamcrest-core.dist.dir}/${hamcrest-core.libname}" />
</sources>
<targets>
<fileset dir="${junit4.build.outdir}"/>
</targets>
</dependset>
<javac encoding="UTF-8"
srcdir="${junit4.dir}/src/main/java"
destdir="${junit4.build.outdir}"
source="1.6" target="1.6"
debug="true" includeantruntime="false" includeDestClasses="false" nowarn="true">
<classpath>
<filelist dir="/" files="${hamcrest-core.dist.dir}/${hamcrest-core.libname}"/>
</classpath>
</javac>
</target>
<target name="junit4-lib" depends="junit4-lib-compile">
<!-- package -->
<jar destfile="${junit4.dist.dir}/${junit4.libname}"
basedir="${junit4.build.outdir}"
includes="**"/>
</target>
<!-- ******************* -->
<!-- junit4 -->
<!-- ******************* -->
<property name="junit4.execname" value="junit4.jar" />
<property name="junit4.exec.build.dir" value="${junit4.dir}/build/junit4" />
<property name="junit4.exec.build.outdir" value="${junit4.exec.build.dir}/classes" />
<target name="junit4-clean" depends="junit4-lib-clean">
<delete file="${junit4.dist.dir}/${junit4.execname}" />
<delete dir="${junit4.exec.build.dir}"/>
</target>
<target name="junit4" depends="junit4-lib-compile">
<!-- package -->
<copy todir="${junit4.exec.build.outdir}">
<fileset dir="${junit4.build.outdir}" includes="**/*.class" />
</copy>
<copy todir="${junit4.exec.build.outdir}">
<fileset dir="${hamcrest-core.build.outdir}"/>
</copy>
<jar destfile="${junit4.dist.dir}/${junit4.execname}"
basedir="${junit4.exec.build.outdir}"
includes="**"/>
</target>
<!-- ******************* -->
<!-- junit4-jack-lib -->
<!-- ******************* -->
<property name="junit4-jack.build.dir" value="${junit4.dir}/build/junit4-jack-lib" />
<property name="junit4-jack.build.outdir" value="${junit4-jack.build.dir}/classes" />
<property name="junit4-jack.dist.dir" value="${junit4.dir}/dist" />
<property name="junit4-jack.libname" value="junit4-lib.jack" />
<target name="junit4-jack-lib-clean">
<delete dir="${junit4-jack.build.dir}" />
<delete file="${junit4-jack.dist.dir}/${junit4-jack.libname}" />
</target>
<target name="junit4-jack-lib" depends="jack-intermediate,hamcrest-core-jack-lib">
<!-- project layout -->
<mkdir dir="${junit4-jack.build.outdir}"/>
<mkdir dir="${junit4-jack.dist.dir}"/>
<!-- compile -->
<java jar="${jack.intermediate.dist.dir}/${jack.intermediatename}" fork="true" failonerror="true">
<arg value="--verbose"/>
<arg value="error"/>
<arg value="-D"/>
<arg value="jack.classpath.default-libraries=false"/>
<arg value="--classpath"/>
<arg value="${jack.prebuilts.dir}/${core-stubs-mini.jack.libname}:${hamcrest-core-jack.dist.dir}/${hamcrest-core-jack.libname}"/>
<arg value="--output-jack"/>
<arg value="${junit4-jack.dist.dir}/${junit4-jack.libname}"/>
<arg value="${junit4.dir}/src/main/java"/>
</java>
<copy file="${junit4-jack.dist.dir}/${junit4-jack.libname}" todir="${jack-tests.prebuilts.dir}" />
</target>
<!-- ******************* -->
<!-- hamcrest-core-lib -->
<!-- ******************* -->
<property name="hamcrest-core.build.dir" value="${hamcrest-core.dir}/build" />
<property name="hamcrest-core.build.outdir" value="${hamcrest-core.build.dir}/classes" />
<property name="hamcrest-core.dist.dir" value="${hamcrest-core.dir}/dist" />
<property name="hamcrest-core.libname" value="hamcrest-core-lib.jar" />
<target name="hamcrest-core-lib-clean">
<delete dir="${hamcrest-core.build.dir}" />
<delete dir="${hamcrest-core.dist.dir}" />
</target>
<target name="hamcrest-core-lib">
<!-- project layout -->
<mkdir dir="${hamcrest-core.build.outdir}"/>
<mkdir dir="${hamcrest-core.dist.dir}"/>
<!-- compile -->
<dependset>
<sources>
<fileset dir="${hamcrest-core.dir}/src" />
</sources>
<targets>
<fileset dir="${hamcrest-core.build.outdir}"/>
</targets>
</dependset>
<javac encoding="UTF-8"
srcdir="${hamcrest-core.dir}/src"
destdir="${hamcrest-core.build.outdir}"
source="1.6" target="1.6"
debug="true" includeantruntime="false" includeDestClasses="false" nowarn="true"/>
<!-- package -->
<jar destfile="${hamcrest-core.dist.dir}/${hamcrest-core.libname}"
basedir="${hamcrest-core.build.outdir}"
includes="**"/>
</target>
<!-- ************************ -->
<!-- hamcrest-core-jack-lib -->
<!-- ************************ -->
<property name="hamcrest-core-jack.build.dir" value="${hamcrest-core.dir}/build" />
<property name="hamcrest-core-jack.build.outdir" value="${hamcrest-core-jack.build.dir}/classes" />
<property name="hamcrest-core-jack.dist.dir" value="${hamcrest-core.dir}/dist" />
<property name="hamcrest-core-jack.libname" value="hamcrest-core-jack-lib.zip" />
<target name="hamcrest-core-jack-lib-clean">
<delete dir="${hamcrest-core-jack.build.dir}" />
<delete dir="${hamcrest-core-jack.dist.dir}" />
</target>
<target name="hamcrest-core-jack-lib" depends="jack-intermediate">
<!-- project layout -->
<mkdir dir="${hamcrest-core-jack.build.outdir}"/>
<mkdir dir="${hamcrest-core-jack.dist.dir}"/>
<!-- compile -->
<java jar="${jack.intermediate.dist.dir}/${jack.intermediatename}" fork="true" failonerror="true">
<arg value="--verbose"/>
<arg value="error"/>
<arg value="-D"/>
<arg value="jack.classpath.default-libraries=false"/>
<arg value="--classpath"/>
<arg value="${jack.prebuilts.dir}/${core-stubs-mini.jack.libname}"/>
<arg value="--output-jack"/>
<arg value="${hamcrest-core-jack.dist.dir}/${hamcrest-core-jack.libname}"/>
<arg value="${hamcrest-core.dir}/src"/>
</java>
</target>
<!-- *************** -->
<!-- dexcomparator -->
<!-- *************** -->
<property name="dexcomparator.execname" value="dexcomparator.jar" />
<property name="dexcomparator.build.dir" value="${dexcomparator.dir}/build" />
<property name="dexcomparator.libs.dir" value="${dexcomparator.dir}/libs" />
<property name="dexcomparator.build.outdir" value="${dexcomparator.build.dir}/classes" />
<property name="dexcomparator.dist.dir" value="${dexcomparator.dir}/dist" />
<target name="dexcomparator-clean">
<delete dir="${dexcomparator.build.dir}" />
<delete dir="${dexcomparator.libs.dir}" />
<delete dir="${dexcomparator.dist.dir}" />
</target>
<target name="dexcomparator-compile" depends="jack-lib, dex-lib,jsr305-lib,guava-lib,args4j-lib">
<!-- project layout -->
<mkdir dir="${dexcomparator.build.outdir}"/>
<mkdir dir="${dexcomparator.libs.dir}"/>
<mkdir dir="${dexcomparator.dist.dir}"/>
<!-- fetch dependencies -->
<copy todir="${dexcomparator.libs.dir}" flatten="true">
<filelist dir="/">
<file name="${dexlib.dist.dir}/${dexlib.libname}" />
<file name="${jsr305.dist.dir}/${jsr305.libname}" />
<file name="${guava.dist.dir}/${guava.libname}" />
<file name="${args4j.dist.dir}/${args4j.libname}" />
<file name="${jack.dist.dir}/${jack.libname}" />
</filelist>
</copy>
<!-- compile -->
<dependset>
<sources>
<!-- All source files -->
<fileset dir="${dexcomparator.dir}/src" />
<fileset dir="${dexcomparator.libs.dir}">
<include name="**/*.jar"/>
</fileset>
</sources>
<targets>
<fileset dir="${dexcomparator.build.outdir}"/>
</targets>
</dependset>
<javac encoding="UTF-8"
srcdir="${dexcomparator.dir}/src"
destdir="${dexcomparator.build.outdir}"
source="1.6" target="1.6"
debug="true" includeantruntime="false" includeDestClasses="false">
<compilerarg line="-Xlint:-options"/>
<classpath>
<fileset dir="${dexcomparator.libs.dir}">
<include name="**/*.jar"/>
</fileset>
</classpath>
</javac>
</target>
<target name="dexcomparator" depends="dexcomparator-compile">
<jar destfile="${dexcomparator.dist.dir}/${dexcomparator.execname}"
manifest="${dexcomparator.dir}/etc/manifest.txt"
basedir="${dexcomparator.build.outdir}" includes="**">
<zipgroupfileset dir="${dexcomparator.dir}/libs" includes="**/*.jar" />
</jar>
</target>
<!-- ******************* -->
<!-- dexcomparator-lib -->
<!-- ******************* -->
<property name="dexcomparator.libname" value="dexcomparator-lib.jar" />
<target name="dexcomparator-lib" depends="dexcomparator-compile">
<!-- package -->
<jar destfile="${dexcomparator.dist.dir}/${dexcomparator.libname}"
basedir="${dexcomparator.build.outdir}"
includes="**"/>
</target>
<!-- ******************* -->
<!-- dex-lib -->
<!-- ******************* -->
<property name="dexlib.build.dir" value="${dexlib.dir}/build" />
<property name="dexlib.build.outdir" value="${dexlib.build.dir}/classes" />
<property name="dexlib.dist.dir" value="${dexlib.dir}/dist" />
<property name="dexlib.libname" value="dex-lib.jar" />
<property name="dexlib.version" value="1.4.2" />
<target name="dex-lib-clean">
<delete dir="${dexlib.build.dir}" />
<delete dir="${dexlib.dist.dir}" />
</target>
<target name="dex-lib-compile" depends="guava-lib,jsr305-lib">
<!-- project layout -->
<mkdir dir="${dexlib.build.outdir}"/>
<mkdir dir="${dexlib.dist.dir}"/>
<!-- compile -->
<filelist id="dex-lib-compile.classpath" dir="/">
<file name="${guava.dist.dir}/${guava.libname}"/>
<file name="${jsr305.dist.dir}/${jsr305.libname}"/>
</filelist>
<dependset>
<sources>
<fileset dir="${dexlib.dir}/src/main/java" />
<filelist refid="dex-lib-compile.classpath" />
</sources>
<targets>
<fileset dir="${dexlib.build.outdir}"/>
</targets>
</dependset>
<javac encoding="UTF-8"
srcdir="${dexlib.dir}/src/main/java"
destdir="${dexlib.build.outdir}"
source="1.6" target="1.6"
debug="true" includeantruntime="false" includeDestClasses="false" nowarn="true"
updatedproperty="dexlib.updated">
<classpath>
<filelist refid="dex-lib-compile.classpath" />
</classpath>
</javac>
</target>
<target name="dex-lib" depends="dex-lib-compile" if="dexlib.updated" >
<!-- generate dexlib.properties -->
<echo message="application.version=${dexlib.version}"
file="${dexlib.build.outdir}/dexlib.properties"/>
<!-- package -->
<jar destfile="${dexlib.dist.dir}/${dexlib.libname}"
basedir="${dexlib.build.outdir}"
includes="**"/>
</target>
<!-- ******************* -->
<!-- asm4 -->
<!-- ******************* -->
<property name="asm4.build.dir" value="${asm4.dir}/build" />
<property name="asm4.build.outdir" value="${asm4.build.dir}/classes" />
<property name="asm4.dist.dir" value="${asm4.dir}/dist" />
<property name="asm4.libname" value="asm4-lib.jar" />
<target name="asm4-clean">
<delete dir="${asm4.build.dir}" />
<delete dir="${asm4.dist.dir}" />
</target>
<target name="asm4-lib">
<!-- project layout -->
<mkdir dir="${asm4.build.outdir}"/>
<mkdir dir="${asm4.dist.dir}"/>
<!-- compile -->
<dependset>
<sources>
<fileset dir="${asm4.dir}/src" />
</sources>
<targets>
<fileset file="${asm4.dist.dir}/${asm4.libname}"/>
</targets>
</dependset>
<javac encoding="UTF-8" srcdir="${asm4.dir}/src"
destdir="${asm4.build.outdir}"
source="1.5" target="1.5"
debug="true" includeantruntime="false"/>
<!-- package -->
<jar destfile="${asm4.dist.dir}/${asm4.libname}"
basedir="${asm4.build.outdir}"
includes="**"/>
</target>
<!-- ******************* -->
<!-- gson -->
<!-- ******************* -->
<property name="gson.build.dir" value="${gson.dir}/build" />
<property name="gson.build.outdir" value="${gson.build.dir}/classes" />
<property name="gson.dist.dir" value="${gson.dir}/dist" />
<property name="gson.libname" value="gson.jar"/>
<target name="gson-clean">
<delete dir="${gson.build.dir}" />
<delete dir="${gson.dist.dir}" />
</target>
<target name="gson-lib">
<!-- project layout -->
<mkdir dir="${gson.build.outdir}"/>
<mkdir dir="${gson.dist.dir}"/>
<!-- compile -->
<dependset>
<sources>
<fileset dir="${gson.dir}/gson/src/main/java" />
</sources>
<targets>
<fileset file="${gson.dist.dir}/${gson.libname}"/>
</targets>
</dependset>
<javac encoding="UTF-8" srcdir="${gson.dir}/gson/src/main/java"
destdir="${gson.build.outdir}"
source="1.5" target="1.5"
debug="true" includeantruntime="false"/>
<!-- package -->
<jar destfile="${gson.dist.dir}/${gson.libname}"
basedir="${gson.build.outdir}"
includes="**"/>
</target>
<!-- ******************* -->
<!-- jacoco -->
<!-- ******************* -->
<property name="jacoco.dist.dir" value="${jacoco.dir}/dist" />
<property name="jacoco.core.libname" value="org.jacoco.core.jar"/>
<property name="jacoco.report.libname" value="org.jacoco.report.jar"/>
<target name="jacoco-clean">
<delete dir="${jacoco.dist.dir}"/>
</target>
<target name="jacoco-libs">
<mkdir dir="${jacoco.dist.dir}"/>
<copy file="${jacoco.dir}/org.jacoco.core-0.7.5.201505241946.jar" tofile="${jacoco.dist.dir}/${jacoco.core.libname}"/>
<copy file="${jacoco.dir}/org.jacoco.report-0.7.5.201505241946.jar" tofile="${jacoco.dist.dir}/${jacoco.report.libname}"/>
</target>
<!-- ******************* -->
<!-- jack-default-lib -->
<!-- ******************* -->
<property name="jack-default-lib.build.jack" value="${jack.dir}/build/default-lib.jack"/>
<target name="jack-default-lib-clean">
<delete file="${jack-default-lib.build.jack}" />
</target>
<target name="jack-default-lib.check">
<uptodate property="jack-default-lib.uptodate"
targetfile="${jack-default-lib.build.jack}">
<srcfiles dir="${jack.dir}/src" includes="com/android/jack/annotations/**/*.java"/>
<srcresources>
<dirset dir="${jack.dir}/src" includes="com/android/jack/annotations"/>
</srcresources>
<srcfiles file="${jack.intermediate.dist.dir}/${jack.intermediatename}"/>
<srcfiles file="${jack.prebuilts.dir}/${core-stubs-mini.jack.libname}"/>
</uptodate>
</target>
<target name="jack-default-lib" depends="jack-intermediate,jack-default-lib.check" unless="jack-default-lib.uptodate">
<fileset id="jack-default-lib.src.fileset" dir="${jack.dir}/src" includes="com/android/jack/annotations/**/*.java"/>
<pathconvert property="jack-default-lib.src.list" pathsep=" " refid="jack-default-lib.src.fileset" />
<java jar="${jack.intermediate.dist.dir}/${jack.intermediatename}" fork="true" failonerror="true">
<arg value="--verbose"/>
<arg value="error"/>
<arg value="-D"/>
<arg value="jack.classpath.default-libraries=false"/>
<arg value="--classpath"/>
<arg value="${jack.prebuilts.dir}/${core-stubs-mini.jack.libname}"/>
<arg value="--output-jack"/>
<arg value="${jack-default-lib.build.jack}"/>
<arg line="${jack-default-lib.src.list}"/>
</java>
</target>
<!-- ******************* -->
<!-- core-stubs-mini -->
<!-- ******************* -->
<property name="core-stubs-mini.dist.dir" value="${core-stubs-mini.dir}/dist"/>
<property name="core-stubs-mini.build.dir" value="${core-stubs-mini.dir}/build"/>
<property name="core-stubs-mini.build.outdir" value="${core-stubs-mini.build.dir}/classes"/>
<property name="core-stubs-mini.libname" value="core-stubs-mini.jar"/>
<property name="core-stubs-mini.jack.libname" value="core-stubs-mini.jack"/>
<target name="core-stubs-mini-clean">
<delete dir="${core-stubs-mini.build.dir}" />
<delete dir="${core-stubs-mini.dist.dir}" />
</target>
<target name="core-stubs-mini" depends="jack-intermediate">
<mkdir dir="${core-stubs-mini.dist.dir}"/>
<mkdir dir="${core-stubs-mini.build.outdir}"/>
<fileset dir="${core-stubs-mini.dir}/src">
<include name="**/*.java"/>
</fileset>
<java jar="${jack.intermediate.dist.dir}/${jack.intermediatename}" fork="true" failonerror="true">
<arg value="--verbose"/>
<arg value="error"/>
<arg value="-D"/>
<arg value="jack.classpath.default-libraries=false"/>
<arg value="--output-jack"/>
<arg value="${core-stubs-mini.dist.dir}/${core-stubs-mini.jack.libname}"/>
<arg value="${core-stubs-mini.dir}/src"/>
</java>
<dependset>
<sources>
<!-- All source files -->
<fileset dir="${core-stubs-mini.dir}/src" />
</sources>
<targets>
<fileset dir="${core-stubs-mini.build.outdir}"/>
</targets>
</dependset>
<javac encoding="UTF-8"
srcdir="${core-stubs-mini.dir}/src"
destdir="${core-stubs-mini.build.outdir}"
source="1.6" target="1.6" debug="true" includeantruntime="false" includeDestClasses="false"
nowarn="true"/>
<jar destfile="${core-stubs-mini.dist.dir}/${core-stubs-mini.libname}"
basedir="${core-stubs-mini.build.outdir}"
includes="**"/>
<filelist id="core-stubs-mini.result.libs" dir="/">
<file name="${core-stubs-mini.dist.dir}/${core-stubs-mini.libname}"/>
<file name="${core-stubs-mini.dist.dir}/${core-stubs-mini.jack.libname}"/>
</filelist>
<copy todir="${jack-tests.prebuilts.dir}" flatten="true">
<filelist refid="core-stubs-mini.result.libs" />
</copy>
<copy todir="${jack.prebuilts.dir}" flatten="true">
<filelist refid="core-stubs-mini.result.libs" />
</copy>
</target>
<!-- ******************* -->
<!-- prebuilts -->
<!-- ******************* -->
<target name="prebuilts" description="build and deploy prebuilt libraries"
depends="core-stubs-mini,junit4-lib,junit4-jack-lib,ecj-tests-lib, jack-test-annotations-jack-lib"/>
<!-- ******************* -->
<!-- tests -->
<!-- ******************* -->
<property name="jack.tests.output" value="${jack-project.dir}/tests-results"/>
<condition property="jack.tests.assertions" value="-da" else="-ea">
<istrue value="${tests.disable-assertions}"/>
</condition>
<condition property="jack.tests.runtime.tolerant" value="true" else="false">
<istrue value="${tests.runtime.tolerant}"/>
</condition>
<condition property="jack.tests.console-output" value="--console-output" else="">
<istrue value="${tests.console-output}"/>
</condition>
<condition property="jack.runtime.version" value="-Druntime.version=${runtime.version}" else="">
<isset property="runtime.version"/>
</condition>
<filelist id="jack.junit.tests.classpath" dir="/">
<file name="${jack-tests.dist.dir}/${jack-tests.execname}" />
</filelist>
<target name="test-jack-clean" >
<delete dir="${jack.tests.output}"/>
</target>
<target name="tests-check-config">
<fail message="tests.config is undefined" unless="tests.config" />
</target>
<target name="tests-check-name">
<fail message="test.name is undefined" unless="test.name" />
</target>
<target name="test-jack-dump" depends="tests-check-config">
<mkdir dir="${jack-tests.dir}/dump"/>
<java fork="true" failonerror="true"
output="${jack-tests.dir}/dump/PreSubmitTests.js"
classname="com.android.jack.test.junit.JackJUnitLauncher">
<jvmarg value="-Dtests.dump=true" />
<jvmarg value="-Dtests.config=${tests.config}"/>
<jvmarg line="${jack.runtime.version}"/>
<classpath>
<filelist refid="jack.junit.tests.classpath" />
</classpath>
<arg value="com.android.jack.PreSubmitTests"/>
</java>
</target>
<target name="test-jack-long-dump" depends="tests-check-config">
<mkdir dir="${jack-tests.dir}/dump"/>
<java fork="true" failonerror="true"
output="${jack-tests.dir}/dump/LongLastingTests.js"
classname="com.android.jack.test.junit.JackJUnitLauncher">
<jvmarg value="-Dtests.dump=true" />
<jvmarg value="-Dtests.config=${tests.config}"/>
<jvmarg line="${jack.runtime.version}"/>
<classpath>
<filelist refid="jack.junit.tests.classpath"/>
</classpath>
<arg value="com.android.jack.LongLastingTests"/>
</java>
</target>
<target name="test-sched-dump" depends="tests-check-config">
<mkdir dir="${jack-tests.dir}/dump"/>
<java fork="true" failonerror="true"
output="${jack-tests.dir}/dump/SchedAllTests.js"
classname="com.android.jack.test.junit.JackJUnitLauncher">
<jvmarg value="-Dtests.dump=true" />
<jvmarg value="-Dtests.config=${tests.config}"/>
<classpath>
<filelist refid="jack.junit.tests.classpath" />
<filelist dir="/" files="${schedtests.dist.dir}/${schedtests.libname}"/>
</classpath>
<arg value="com.android.sched.SchedAllTests"/>
</java>
</target>
<target name="test-jack-by-name" description="run Jack tests with name passed via -Dtest.name"
depends="tests-check-config, tests-check-name, jack, jack-tests, test-jack-by-name-nodep">
</target>
<target name="test-jack-by-name-nodep">
<mkdir dir="${jack.tests.output}/test-jack-by-name/html"/>
<java fork="true" resultproperty="test-jack.failure"
classname="com.android.jack.test.junit.JackJunitLauncherXml">
<jvmarg value="-Dfile.encoding=utf-8" />
<jvmarg value="-Dtests.config=${tests.config}"/>
<jvmarg value="-Dtests.runtime.tolerant=${jack.tests.runtime.tolerant}"/>
<jvmarg value="${jack.tests.assertions}"/>
<jvmarg line="${jack.runtime.version}"/>
<classpath>
<filelist refid="jack.junit.tests.classpath" />
</classpath>
<arg value="${jack.tests.output}/test-jack-by-name/test-jack-by-name.xml" />
<arg value="${test.name}" />
<arg line="${jack.tests.console-output}" />
</java>
<junitreport todir="${jack.tests.output}/test-jack-by-name">
<fileset dir="${jack.tests.output}/test-jack-by-name">
<include name="test-jack-by-name.xml"/>
</fileset>
<report format="frames" todir="${jack.tests.output}/test-jack-by-name/html"/>
</junitreport>
<fail message="TESTS FAILED">
<condition>
<isfailure code="${test-jack.failure}"/>
</condition>
</fail>
</target>
<target name="test-jack" description="run Jack tests that must pass before submitting a change"
depends="tests-check-config, jack, jack-tests, test-jack-nodep">
</target>
<target