Commit b8b7de26 authored by uprime815's avatar uprime815
Browse files

adjusting the build script

parent cb6fe721
......@@ -24,7 +24,7 @@ T3 requires Java 8.
<p>export JAVA_HOME=/cygdrive/c/apps/Java/jdk1.8
<li>run "ant jarT3" to build.
<li>run "ant jar" to build.
</ol>
......
......@@ -2,100 +2,69 @@
<!-- Need Java-8. Set JAVA_HOME to Java8 before running this build -->
<property name="commonSrc" value="T3commonSrc" />
<property name="T3src" value="src" />
<property name="T3isrc" value="T3i" />
<property name="build" value="build" />
<property name="build" value="../../build/t3" />
<property name="tests" value="test" />
<property name="libs" value="libs" />
<property name="RELEASEname" value="T3v0" />
<property name="dist" value="dist" />
<property name="dist" value="${build}/dist" />
<target name="init">
<mkdir dir="${build}/T3common/classes" />
<mkdir dir="${build}/T3/classes" />
<mkdir dir="${build}/T3i/classes" />
<mkdir dir="${build}/classes" />
<mkdir dir="${build}/docs" />
<mkdir dir="${build}/docs/javadocs" />
</target>
<target name="compileCommon" depends="init" description="Compiling the source of common-T3.">
<echo>Compiling source of common-T3... </echo>
<javac srcdir="${commonSrc}"
compiler="javac1.7"
debug="on"
destdir="${build}/T3common/classes"
source="1.7"
target="1.7">
<compilerarg value="-Xlint"/>
<classpath>
<pathelement location="${libs}/cli/commons-cli-1.2.jar"/>
</classpath>
</javac>
</target>
<target name="jarCommon" depends="compileCommon" description="Jarring all common-T3 classes.">
<echo>Copying licenses... </echo>
<copy file="license.txt" todir="${build}/T3common/classes"/>
<copy file="gpl_license.txt" todir="${build}/T3common/classes"/>
<echo>Jarring all common-T3 classes... </echo>
<jar basedir="${build}/T3common/classes" destfile="${build}/Common${RELEASEname}.jar" >
<zipgroupfileset dir="${libs}/cli" includes="commons-cli-1.2.jar"/>
</jar>
</target>
<target name="compileT3" depends="jarCommon" description="Compile the source of T3 tools.">
<target name="compile" depends="init" description="Compile the source of T3 tools.">
<echo>Compiling T3 tools... </echo>
<javac srcdir="${T3src}"
<javac srcdir="./src"
compiler="javac1.8"
debug="on"
destdir="${build}/T3/classes"
destdir="${build}/classes"
source="1.8"
target="1.8">
<compilerarg value="-Xlint"/>
<classpath>
<pathelement location="${build}/Common${RELEASEname}.jar"/>
<pathelement location="${libs}/cli/commons-cli-1.2.jar"/>
</classpath>
</javac>
</target>
<target name="jarT3" depends="compileT3" description="Jarring all T3 classes.">
<target name="jar" depends="compile" description="Jarring all T3 classes.">
<echo>Copying licenses... </echo>
<copy file="license.txt" todir="${build}/T3/classes"/>
<copy file="gpl_license.txt" todir="${build}/T3/classes"/>
<echo>Jarring all T3 classes... </echo>
<jar basedir="${build}/T3/classes" destfile="${build}/${RELEASEname}.jar" >
<zipgroupfileset dir="${build}" includes="Common${RELEASEname}.jar"/>
<jar basedir="${build}/classes" destfile="${build}/${RELEASEname}.jar" >
<zipgroupfileset dir="${libs}/cli" includes="commons-cli-1.2.jar"/>
</jar>
</target>
<target name="javadocs" depends="jarT3" description="Generating javadocs.">
<target name="javadocs" depends="compile" description="Generating javadocs.">
<echo>Generating javadocs... </echo>
<javadoc2 sourcepath="${commonSrc}:${T3src}" destdir="${build}/docs/javadocs"
<javadoc2 sourcepath="./src" destdir="${build}/docs/javadocs"
author="true"
version="true"
classpath="${build}/T3common/classes:${build}/T3/classes"
classpath="${build}/classes"
/>
</target>
<property name="VERSION" value="${RELEASEname}"/>
<!-- for packing a distribution zip -->
<target name="dist" depends="javadocs">
<target name="dist" depends="jar,javadocs">
<delete dir="${dist}"/>
<mkdir dir="${dist}/${VERSION}" />
<mkdir dir="${dist}/${VERSION}/bin" />
<copy file="license.txt" todir="${dist}/${VERSION}"/>
<copy file="gpl_license.txt" todir="${dist}/${VERSION}"/>
<copy file="${build}/${RELEASEname}.jar" todir="${dist}/${VERSION}/bin"/>
<copy file="${build}/Common${RELEASEname}.jar" todir="${dist}/${VERSION}/bin"/>
<mkdir dir="${dist}/${VERSION}/docs" />
<copy todir="${dist}/${VERSION}/docs">
<fileset dir="${build}/docs/javadocs"/>
<mkdir dir="${dist}" />
<copy file="license.txt" todir="${dist}"/>
<copy file="gpl_license.txt" todir="${dist}"/>
<copy file="${build}/${RELEASEname}.jar" todir="${dist}"/>
<mkdir dir="${dist}/docs" />
<copy todir="${dist}/docs">
<fileset dir="${build}/docs"/>
<fileset dir="./docs"/>
</copy>
<zip basedir="${dist}/${VERSION}" destfile="${dist}/${VERSION}.zip" />
<zip basedir="${dist}" destfile="${build}/${VERSION}_dist.zip" />
</target>
<target name="clean" description="Cleaning.">
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment