jadb/build.xml

147 lines
5.1 KiB
XML
Raw Normal View History

<?xml version="1.0" encoding="UTF-8"?>
<project name="jadb" default="all">
<property file="build.properties"/>
2016-03-03 07:29:34 +01:00
<property environment="env"/>
<property name="jdk.home.1.6" value="${env.JAVA_HOME}"/>
<!-- Compiler options -->
<property name="compiler.debug" value="on"/>
<property name="compiler.generate.no.warnings" value="off"/>
<property name="compiler.args" value=""/>
<property name="compiler.max.memory" value="700m"/>
<patternset id="ignored.files">
<exclude name="**/*.hprof/**"/>
<exclude name="**/*.pyc/**"/>
<exclude name="**/*.pyo/**"/>
<exclude name="**/*.rbc/**"/>
<exclude name="**/*~/**"/>
<exclude name="**/.DS_Store/**"/>
<exclude name="**/.git/**"/>
<exclude name="**/.hg/**"/>
<exclude name="**/.svn/**"/>
<exclude name="**/CVS/**"/>
<exclude name="**/RCS/**"/>
<exclude name="**/SCCS/**"/>
<exclude name="**/__pycache__/**"/>
<exclude name="**/_svn/**"/>
<exclude name="**/rcs/**"/>
<exclude name="**/vssver.scc/**"/>
<exclude name="**/vssver2.scc/**"/>
</patternset>
<patternset id="library.patterns">
<include name="*.war"/>
<include name="*.swc"/>
<include name="*.apk"/>
<include name="*.zip"/>
<include name="*.ear"/>
<include name="*.egg"/>
<include name="*.ane"/>
<include name="*.jar"/>
</patternset>
<patternset id="compiler.resources">
<exclude name="**/?*.java"/>
<exclude name="**/?*.form"/>
<exclude name="**/?*.class"/>
<exclude name="**/?*.groovy"/>
<exclude name="**/?*.scala"/>
<exclude name="**/?*.flex"/>
<exclude name="**/?*.kt"/>
<exclude name="**/?*.clj"/>
</patternset>
<!-- JDK definitions -->
2016-03-03 07:29:34 +01:00
<property name="jdk.bin.1.6" value="${jdk.home.1.6}/bin"/>
<path id="jdk.classpath.1.6">
<fileset dir="${jdk.home.1.6}">
<include name="lib/deploy.jar"/>
<include name="lib/dt.jar"/>
<include name="lib/javaws.jar"/>
<include name="lib/jce.jar"/>
<include name="lib/jconsole.jar"/>
<include name="lib/management-agent.jar"/>
<include name="lib/plugin.jar"/>
<include name="lib/sa-jdi.jar"/>
<include name="../Classes/charsets.jar"/>
<include name="../Classes/classes.jar"/>
<include name="../Classes/jsse.jar"/>
<include name="../Classes/ui.jar"/>
<include name="lib/ext/apple_provider.jar"/>
<include name="lib/ext/dnsns.jar"/>
<include name="lib/ext/localedata.jar"/>
<include name="lib/ext/sunjce_provider.jar"/>
<include name="lib/ext/sunpkcs11.jar"/>
</fileset>
</path>
<property name="project.jdk.home" value="${jdk.home.1.6}"/>
<property name="project.jdk.bin" value="${jdk.bin.1.6}"/>
<property name="project.jdk.classpath" value="jdk.classpath.1.6"/>
<!-- Project Libraries -->
<path id="library.junit-4.10.classpath">
<pathelement location="${basedir}/lib/junit-4.10.jar"/>
</path>
<!-- Modules -->
<import file="${basedir}/module_jadb.xml"/>
<target name="init" description="Build initialization">
<!-- Perform any build initialization in this target -->
</target>
<target name="clean" depends="clean.module.jadb" description="cleanup all"/>
<target name="build.modules" depends="init, clean, compile.module.jadb" description="build all modules"/>
<target name="init.artifacts">
<property name="artifacts.temp.dir" value="${basedir}/__artifacts_temp"/>
<property name="artifact.output.jadb:jar" value="${basedir}/out/artifacts/jadb_jar"/>
<mkdir dir="${artifacts.temp.dir}"/>
<property name="temp.jar.path.jadb.jar" value="${artifacts.temp.dir}/jadb.jar"/>
</target>
<target name="artifact.jadb:jar" depends="init.artifacts, compile.module.jadb" description="Build &#39;jadb:jar&#39; artifact">
<property name="artifact.temp.output.jadb:jar" value="${artifacts.temp.dir}/jadb_jar"/>
<mkdir dir="${artifact.temp.output.jadb:jar}"/>
<jar destfile="${temp.jar.path.jadb.jar}" duplicate="preserve" filesetmanifest="mergewithoutmain">
<zipfileset dir="${jadb.output.dir}"/>
<zipfileset file="${basedir}/META-INF/MANIFEST.MF" prefix="META-INF"/>
</jar>
<copy file="${temp.jar.path.jadb.jar}" tofile="${artifact.temp.output.jadb:jar}/jadb.jar"/>
</target>
<target name="build.all.artifacts" depends="artifact.jadb:jar" description="Build all artifacts">
<mkdir dir="${artifact.output.jadb:jar}"/>
<copy todir="${artifact.output.jadb:jar}">
<fileset dir="${artifact.temp.output.jadb:jar}"/>
</copy>
<!-- Delete temporary files -->
<delete dir="${artifacts.temp.dir}"/>
</target>
<target name="all" depends="build.modules, build.all.artifacts" description="build all"/>
2016-03-03 07:11:31 +01:00
<target name="test" depends="build.modules">
<junit haltonfailure="yes">
<classpath>
<pathelement path="bin/"/>
<pathelement location="lib/junit-4.10.jar"/>
</classpath>
<formatter type="plain" usefile="false" />
<batchtest>
<fileset dir="test/">
<include name="**/*TestCases.java" />
<include name="**/*Fixture.java" />
</fileset>
</batchtest>
</junit>
2016-03-03 07:11:31 +01:00
</target>
</project>