-
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathbuild.xml
54 lines (47 loc) · 2.1 KB
/
build.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<project name="uno-jar" default="testAntTask" basedir="." xmlns:ns="antlib:com.needhamsoftware.unojar.ant">
<!-- TESTING ONLY: This does not build the project. It merely tests that the ant task actually works
in an ant build. This is not meant to do anything else useful -->
<path id="unojar.lib.path">
<fileset dir="ant/build" includes="libs/*.jar"/>
</path>
<fileset id="test.files" dir="${basedir}/tests/build/classes/java/test" includes="com/needhamsoftware/unojar/TestMain.class"/>
<fileset id="test.lib.files" dir="${basedir}/tests/build/classes/java/test" includes="com/needhamsoftware/unojar/LibTest.class"/>
<target name="testAntTask" depends="build.boot.jar, build.lib.test.jar">
<taskdef uri="antlib:com.needhamsoftware.unojar.ant"
classpathref="unojar.lib.path" resource="com/needhamsoftware/unojar/antlib.xml"/>
<ns:unojar destfile="${basedir}/build/test.jar" >
<ns:main>
<fileset refid="test.files"/>
</ns:main>
<ns:manifest>
<attribute name="Uno-Jar-Main-Class" value="com.needhamsoftware.unojar.TestMain"/>
</ns:manifest>
<ns:lib>
<fileset dir="build" includes="libTest.jar"/>
</ns:lib>
</ns:unojar>
</target>
<!-- This build is just for testing purposes we rely on a previous run of the gradle build to build the classes etc -->
<property name="boot.jar" value="uno-jar-boot.jar"/>
<property name="src.dir" value="core/src/main"/>
<property name="classes.dir" value="core/build/classes/java/main"/>
<target name="build.boot.jar" >
<delete file="${boot.jar}"/>
<jar destfile="build/${boot.jar}" manifest="${src.dir}/manifests/boot-manifest.mf">
<fileset dir="${classes.dir}">
<include name=".version"/>
<include name="com/**"/>
<exclude name="**/Detect*"/>
</fileset>
<fileset dir="${basedir}">
<include name="LICENSE.txt"/>
<include name="NOTICE.txt"/>
</fileset>
</jar>
</target>
<target name="build.lib.test.jar">
<jar destfile="build/libTest.jar">
<fileset refid="test.lib.files"/>
</jar>
</target>
</project>