-
Notifications
You must be signed in to change notification settings - Fork 3.9k
/
build.xml
75 lines (66 loc) · 2.64 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project default="jar" basedir="." name="runner">
<!--
Use -Dtest.class to change what tests are run on the command-line.
i.e., -Dtest.class=CommandLineRunnerTest will run just that test class.
-->
<property name="test.class" value="*Test"/>
<!-- Use -Dtest.method in conjunction with the one-test rule. -->
<property name="test.method" value=""/>
<!--
Use -Dtest.fork to specify whether or not to fork the process.
Some machines run better with forking turned off.
-->
<property name="test.fork" value="true"/>
<!--this file was created by Eclipse Runnable JAR file Export Wizard-->
<!--ANT 1.7 is required-->
<!--define folder properties-->
<property name="dir.buildfile" value="."/>
<property name="src.dir" value="${basedir}/src"/>
<property name="gen.dir" value="${basedir}/gen"/>
<property name="test.dir" value="${basedir}/test"/>
<property name="build.dir" value="${basedir}/build"/>
<property name="lib.dir" value="${basedir}/lib"/>
<property name="runner-jarfile" value="${build.dir}/${ant.project.name}.jar"/>
<property name="classes.dir" value="${build.dir}/classes"/>
<property name="testClasses.dir" value="${build.dir}/test"/>
<target name="jar" depends="compile">
<jar destfile="${runner-jarfile}">
<zipfileset src="${lib.dir}/jar-in-jar-loader.zip"/>
<fileset dir="${classes.dir}"/>
<fileset dir="${lib.dir}">
<include name="compiler.jar"/>
</fileset>
<manifest>
<attribute name="Main-Class" value="org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader"/>
<attribute name="Rsrc-Main-Class" value="org.ampproject.AmpCommandLineRunner"/>
<attribute name="Class-Path" value="."/>
<attribute name="Rsrc-Class-Path" value="./ compiler.jar"/>
</manifest>
</jar>
</target>
<target name="compile">
<mkdir dir="${classes.dir}"/>
<copy file="${src.dir}/../../../third_party/closure-compiler/compiler.jar" todir="${lib.dir}"/>
<javac srcdir="${src.dir}"
destdir="${classes.dir}"
excludes=".git,.DS_Store"
includeantruntime="false"
encoding="utf-8">
<classpath refid="srcclasspath.path"/>
<compilerarg value="-Xlint:unchecked"/>
</javac>
</target>
<target name="clean" description="delete generated files">
<delete dir="${build.dir}"/>
</target>
<path id="srcclasspath.path">
<pathelement location="${classes.dir}"/>
<fileset dir="${lib.dir}">
<include name="compiler.jar"/>
</fileset>
</path>
<path id="allclasspath.path">
<pathelement location="${classes.dir}"/>
</path>
</project>