Fix build-coverage to include WTK libraries (needed for J2ME math tests.)
This commit is contained in:
@@ -21,6 +21,8 @@
|
|||||||
|
|
||||||
<taskdef classpathref="cobertura.classpath" resource="tasks.properties" />
|
<taskdef classpathref="cobertura.classpath" resource="tasks.properties" />
|
||||||
|
|
||||||
|
<import file="wtk.xml"/>
|
||||||
|
|
||||||
<target name="clean" description="Remove all files created by the build/test process.">
|
<target name="clean" description="Remove all files created by the build/test process.">
|
||||||
<delete dir="build" failonerror="no"/>
|
<delete dir="build" failonerror="no"/>
|
||||||
<delete file="cobertura.log" />
|
<delete file="cobertura.log" />
|
||||||
@@ -36,9 +38,10 @@
|
|||||||
<mkdir dir="${coverage.html.dir}" />
|
<mkdir dir="${coverage.html.dir}" />
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="compile" depends="init">
|
<target name="compile" depends="init,wtk-or-fail">
|
||||||
<javac destdir="${classes.dir}" debug="yes" target="1.5">
|
<javac destdir="${classes.dir}" debug="yes" target="1.5">
|
||||||
<classpath refid="cobertura.classpath" />
|
<classpath refid="cobertura.classpath" />
|
||||||
|
<classpath refid="wtk-libs" />
|
||||||
<src path="src/core"/>
|
<src path="src/core"/>
|
||||||
<src path="src/debug"/>
|
<src path="src/debug"/>
|
||||||
<src path="src/j2me"/>
|
<src path="src/j2me"/>
|
||||||
|
|||||||
26
build.xml
26
build.xml
@@ -4,6 +4,8 @@
|
|||||||
<property name="jar.name.j2me" value="luaj-j2me-${version}.jar"/>
|
<property name="jar.name.j2me" value="luaj-j2me-${version}.jar"/>
|
||||||
<property name="jar.name.j2se" value="luaj-j2se-${version}.jar"/>
|
<property name="jar.name.j2se" value="luaj-j2se-${version}.jar"/>
|
||||||
|
|
||||||
|
<import file="wtk.xml"/>
|
||||||
|
|
||||||
<target name="clean">
|
<target name="clean">
|
||||||
<delete dir="build"/>
|
<delete dir="build"/>
|
||||||
<delete>
|
<delete>
|
||||||
@@ -57,30 +59,6 @@
|
|||||||
</jar>
|
</jar>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="load-env">
|
|
||||||
<property environment="env"/>
|
|
||||||
<echo>WTK_HOME from env ${env.WTK_HOME}</echo>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="try-default-wtk-path" depends="load-env" unless="env.WTK_HOME">
|
|
||||||
<available property="env.WTK_HOME" value="c:\WTK-2.2" file="c:\WTK-2.2\lib\cldcapi11.jar"/>
|
|
||||||
<available property="env.WTK_HOME" value="/opt/WTK2.2" file="/opt/WTK2.2/lib/cldcapi11.jar"/>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="find-wtk" depends="try-default-wtk-path" unless="wtk.home" if="env.WTK_HOME">
|
|
||||||
<property name="wtk.home" value="${env.WTK_HOME}"/>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="wtk-or-fail" depends="find-wtk">
|
|
||||||
<fail unless="wtk.home" message="Sun Wireless Toolkit required to build component jars."/>
|
|
||||||
<echo>Using WTK found in ${wtk.home}</echo>
|
|
||||||
<path id="wtk-libs">
|
|
||||||
<pathelement path="${wtk.home}/lib/cldcapi11.jar"/>
|
|
||||||
<pathelement path="${wtk.home}/lib/midpapi20.jar"/>
|
|
||||||
<pathelement path="${wtk.home}/lib/mmapi.jar"/>
|
|
||||||
</path>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="dist">
|
<target name="dist">
|
||||||
<delete dir="build/luaj-${version}"/>
|
<delete dir="build/luaj-${version}"/>
|
||||||
<mkdir dir="build/luaj-${version}/src"/>
|
<mkdir dir="build/luaj-${version}/src"/>
|
||||||
|
|||||||
25
wtk.xml
Normal file
25
wtk.xml
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
<project>
|
||||||
|
<target name="load-env">
|
||||||
|
<property environment="env"/>
|
||||||
|
<echo>WTK_HOME from env ${env.WTK_HOME}</echo>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="try-default-wtk-path" depends="load-env" unless="env.WTK_HOME">
|
||||||
|
<available property="env.WTK_HOME" value="c:\WTK-2.2" file="c:\WTK-2.2\lib\cldcapi11.jar"/>
|
||||||
|
<available property="env.WTK_HOME" value="/opt/WTK2.2" file="/opt/WTK2.2/lib/cldcapi11.jar"/>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="find-wtk" depends="try-default-wtk-path" unless="wtk.home" if="env.WTK_HOME">
|
||||||
|
<property name="wtk.home" value="${env.WTK_HOME}"/>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="wtk-or-fail" depends="find-wtk">
|
||||||
|
<fail unless="wtk.home" message="Sun Wireless Toolkit required to build component jars."/>
|
||||||
|
<echo>Using WTK found in ${wtk.home}</echo>
|
||||||
|
<path id="wtk-libs">
|
||||||
|
<pathelement path="${wtk.home}/lib/cldcapi11.jar"/>
|
||||||
|
<pathelement path="${wtk.home}/lib/midpapi20.jar"/>
|
||||||
|
<pathelement path="${wtk.home}/lib/mmapi.jar"/>
|
||||||
|
</path>
|
||||||
|
</target>
|
||||||
|
</project>
|
||||||
Reference in New Issue
Block a user