summaryrefslogtreecommitdiffstats
path: root/build.xml
blob: 87483f1f2b1d66ed1ba406e41a147ece32b6e910 (plain)
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
<?xml version="1.0" encoding="UTF-8"?>
<!--
   Copyright (C) 2014 The Android Open Source Project

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

        http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
-->

<project name="jill" default="dist">

  <import file="../jack/build.xml"/>

  <target name="dist" depends="jill, jillunittests"/>

  <target name="clean" depends="jill-clean, jillunittests-clean,
    asm4-clean" />

  <dirname property="jill-project.dir" file="${ant.file.jill}"/>

  <property name="jill.dir" value="${jill-project.dir}/jill" />
  <property name="asm4.dir" value="${jill-project.dir}/asm4" />


  <!-- ******************* -->
  <!-- jill                -->
  <!-- ******************* -->
  <property name="jill.build.dir" value="${jill.dir}/build/jill" />
  <property name="jill.libs.dir" value="${jill.dir}/libs" />
  <property name="jill.build.outdir" value="${jill.build.dir}/classes" />
  <property name="jill.dist.dir" value="${jill.dir}/dist" />
  <property name="jill.execname" value="jill.jar" />

  <target name="jill-clean">
    <delete dir="${jill.build.dir}" />
    <delete dir="${jill.dist.dir}" />
    <delete dir="${jill.libs.dir}" />
  </target>

  <target name="jill-copy-libs" depends="sched-lib,guava-lib,asm4-lib,args4j-lib,jsr305-lib,
    dexcomparator-lib">
    <copy todir="${jill.libs.dir}" flatten="true">
      <filelist id="jill.libs.filelist" dir="/" >
        <file name="${schedlib.dist.dir}/${schedlib.libname}"/>
        <file name="${guava.dist.dir}/${guava.libname}"/>
        <file name="${args4j.dist.dir}/${args4j.libname}"/>
        <file name="${jsr305.dist.dir}/${jsr305.libname}"/>
        <file name="${asm4.dist.dir}/${asm4.libname}"/>
        <file name="${dexcomparator.dist.dir}/${dexcomparator.libname}"/>
      </filelist>
    </copy>
  </target>

  <target name="jill" depends="jill-copy-libs">
    <!-- project layout -->
    <mkdir dir="${jill.build.outdir}"/>
    <mkdir dir="${jill.dist.dir}"/>
    <!-- compile -->
    <javac srcdir="${jill.dir}/src"
          destdir="${jill.build.outdir}"
          source="1.5" target="1.5"
          debug="true" includeantruntime="false">
      <classpath>
        <fileset dir="${jill.libs.dir}">
           <include name="**/*.jar"/>
         </fileset>
      </classpath>
    </javac>
    <!-- package -->
    <copy todir="${jill.build.outdir}">
      <fileset dir="${jill.dir}/rsc">
        <include name="**/*" />
      </fileset>
      <fileset dir="${guava.build.outdir}">
        <include name="**/*" />
      </fileset>
      <fileset dir="${schedlib.build.outdir}">
        <include name="**/*" />
      </fileset>
      <fileset dir="${args4j.build.outdir}">
        <include name="**/*" />
      </fileset>
      <fileset dir="${jsr305.build.outdir}">
        <include name="**/*" />
      </fileset>
      <fileset dir="${asm4.build.outdir}">
        <include name="**/*" />
      </fileset>
    </copy>
    <jar destfile="${jill.dist.dir}/${jill.execname}"
          manifest="${jill.dir}/etc/manifest.txt"
          basedir="${jill.build.outdir}"
          includes="**"/>
  </target>


  <!-- ******************* -->
  <!-- jillunittests       -->
  <!-- ******************* -->
  <property name="jillunittests.build.dir" value="${jill.dir}/build/jillunittests" />
  <property name="jillunittests.build.outdir" value="${jillunittests.build.dir}/classes" />
  <property name="jillunittests.execname" value="jillunittests.jar" />

  <target name="jillunittests-clean">
    <delete dir="${jillunittests.build.dir}" />
    <delete dir="${jill.dist.dir}/${jillunittests.execname}" />
  </target>

  <target name="jillunittests" depends="jill, jackunittests">
    <!-- project layout -->
    <mkdir dir="${jillunittests.build.outdir}"/>
    <!-- compile -->
    <javac srcdir="${jill.dir}/tests"
          destdir="${jillunittests.build.outdir}"
          source="1.5" target="1.5"
          debug="true" includeantruntime="false">
      <classpath>
        <filelist dir="/">
          <file name="${jill.dist.dir}/${jill.execname}" />
          <file name="${jackunittests.dist.dir}/${jackunittests.execname}" />
        </filelist>
      </classpath>
    </javac>
    <!-- package -->
    <copy todir="${jillunittests.build.outdir}">
        <fileset dir="${jill.build.outdir}">
          <include name="**/*" />
        </fileset>
        <filelist dir="/">
        <file name="${jackunittests.dist.dir}/${jackunittests.execname}" />
      </filelist>
    </copy>
    <jar destfile="${jill.dist.dir}/${jillunittests.execname}"
            basedir="${jillunittests.build.outdir}"
            includes="**"/>
  </target>


  <!-- ******************* -->
  <!-- asm4                -->
  <!-- ******************* -->
  <property name="asm4.build.dir" value="${asm4.dir}/build" />
  <property name="asm4.build.outdir" value="${asm4.build.dir}/classes" />
  <property name="asm4.dist.dir" value="${asm4.dir}/dist" />
  <property name="asm4.libname" value="asm4-lib.jar" />

  <target name="asm4-clean">
    <delete dir="${asm4.build.dir}" />
    <delete dir="${asm4.dist.dir}" />
  </target>

  <target name="asm4-lib">
    <!-- project layout -->
    <mkdir dir="${asm4.build.outdir}"/>
    <mkdir dir="${asm4.dist.dir}"/>
    <!-- compile -->
    <javac srcdir="${asm4.dir}/src"
          destdir="${asm4.build.outdir}"
          source="1.5" target="1.5"
          debug="true" includeantruntime="false"/>
    <!-- package -->
    <jar destfile="${asm4.dist.dir}/${asm4.libname}"
          basedir="${asm4.build.outdir}"
          includes="**"/>
  </target>

</project>