File: build.xml

package info (click to toggle)
jam-lib 0.1.git20180106.740247a%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, buster, sid
  • size: 916 kB
  • sloc: java: 5,415; xml: 63; makefile: 8
file content (64 lines) | stat: -rw-r--r-- 2,345 bytes parent folder | download
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
55
56
57
58
59
60
61
62
63
64
<!--              ANT build file for JAM              -->

<project name="JAM" default="dist" basedir=".">
    <description>
        Build file for JAM
    </description>
    <!-- set global properties for this build -->
    <property name="src" location="src"/>
    <property name="build" location="build"/>
    <property name="build-java9-only" location="build-java9-only"/>

    <property name="lib" location="lib"/>
    <property name="dist" location="dist"/>

    <property environment="env"/>

    <target name="init">
        <!-- Create the time stamp -->
        <tstamp/>
        <!-- Create the build directory structure used by compile -->
        <mkdir dir="${build}"/>
        <mkdir dir="${build-java9-only}"/>
        <mkdir dir="${dist}"/>
    </target>

    <target name="compile" depends="init">
        <!-- Compile the java code from ${jamsrc} into ${build} -->

        <javac source="1.6" target="1.6" srcdir="${src}" destdir="${build}">
            <include name="jam/**/*"/>
            <exclude name="jam/**/java9only/*"/>
        </javac>
        <copy todir="${build}" verbose="true">
            <fileset dir="${src}" includes="jam/**/*.png,jam/**/*.gif"/>
        </copy>
    </target>

    <target name="compile-java9-only" depends="init">
        <!-- Compile the java code from ${jamsrc} into ${build} -->
        <javac source="1.9" target="1.9" srcdir="${src}" destdir="${build-java9-only}">
            <include name="jam/**/java9only/*"/>
        </javac>
    </target>

    <target name="dist-java9-only" depends="compile-java9-only" description="generate the -java9-only distribution">
        <!-- Create the distribution directory -->
        <mkdir dir="${dist}"/>

    </target>

    <!-- jam-java9-only.jar should be compiled using Java 9 and then is linked in here -->

    <target name="dist" depends="compile, dist-java9-only" description="generate the distribution">
        <!-- Create the distribution directory -->
        <mkdir dir="${dist}"/>
        <delete file="${dist}/jam.jar"/>
        <!-- Put everything in ${build} into the jam.jar file -->
        <jar jarfile="${dist}/jam.jar">
            <fileset dir="${build}" includes="**/*.class,**/*.properties,**/*.png"/>
            <zipgroupfileset dir="${lib}" includes="jam-java9-only.jar"/>
        </jar>
    </target>

</project>