-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.xml
91 lines (77 loc) · 3.19 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project basedir="." default="build" name="jebplugin">
<fail message="Set the plugin version number: ant -Dversion=x.y.z">
<condition>
<not>
<isset property="version"/>
</not>
</condition>
</fail>
<echo message="Plugin version: ${version}"/>
<property environment="env"/>
<echo message="JEB_HOME: ${env.JEB_HOME}"/>
<property name="jebjar" value="${env.JEB_HOME}/bin/cl/jeb.jar"/>
<echo message="JEB Core expected at location: ${jebjar}"/>
<fail message="Please set JEB_HOME environment variable to point to your JEB installation folder">
<condition>
<not>
<available file="${jebjar}"/>
</not>
</condition>
</fail>
<property name="debuglevel" value="source,lines,vars"/>
<property name="target" value="1.7"/>
<property name="source" value="1.7"/>
<!-- Mandatory properties -->
<property name="src" value="src"/>
<property name="outfile" value="out/PleaseRopPlugin-${version}.jar"/>
<property name="entryclass" value="com.pnfsoftware.pleaserop.PleaseRopPlugin"/>
<!-- External libraries, for build process (semi-colon separated) -->
<property name="extcp_build" value=""/>
<!-- External libraries, for Manifest (space separated) -->
<property name="extcp_manifest" value=""/>
<target name="build" depends="clean,compile,package"/>
<target name="audit" depends="clean,compile-audit"/>
<target name="clean">
<delete dir="bin"/>
<mkdir dir="bin"/>
</target>
<target name="compile">
<delete dir="bin"/>
<mkdir dir="bin"/>
<javac debug="true" debuglevel="${debuglevel}" destdir="bin" includeantruntime="false" source="${source}" target="${target}" encoding="UTF-8">
<src path="${src}"/>
<classpath>
<pathelement location="${jebjar}"/>
<pathelement path="${extcp_build}"/>
</classpath>
</javac>
</target>
<target name="compile-audit">
<javac debug="true" debuglevel="${debuglevel}" destdir="bin" includeantruntime="false" source="${source}" target="${target}" encoding="UTF-8"
compiler="com.google.errorprone.ErrorProneAntCompilerAdapter">
<compilerclasspath>
<pathelement location="../jeb2-common/errorprone.jar"/>
</compilerclasspath>
<src path="${src}"/>
<classpath>
<pathelement location="${jebjar}"/>
<pathelement path="${extcp_build}"/>
</classpath>
</javac>
</target>
<target name="package">
<delete file="${outfile}"/>
<jar destfile="${outfile}">
<manifest>
<attribute name="Class-Path" value="${extcp_manifest}"/>
<attribute name="JebPlugin-entryclass" value="${entryclass}"/>
<attribute name="JebPlugin-version" value="${version}"/>
</manifest>
<fileset dir="bin"/>
<!-- copy resources -->
<fileset dir="${src}" excludes="**/*.java"/>
<fileset dir="." includes="README.md"/>
</jar>
</target>
</project>