-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathbuild.xml
118 lines (101 loc) · 4.42 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
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
<project name="lombok-javabeans" xmlns:ivy="antlib:com.zwitserloot.ivyplusplus">
<property name="ivy.retrieve.pattern" value="lib/[conf]/[artifact].[ext]" />
<available file="lib/ivyplusplus.jar" property="ivyplusplus.available" />
<target name="clean" description="Removes all generated files.">
<delete dir="build" quiet="true" />
<delete dir="dist" quiet="true" />
</target>
<target name="distclean" depends="clean" description="Deletes everything that this build script has ever generated.">
<delete dir="lib" quiet="true" />
<delete dir="dist" quiet="true" />
<delete dir=".settings" quiet="true" />
<delete file=".project" quiet="true" />
<delete file=".classpath" quiet="true" />
</target>
<target name="download-ipp" unless="ivyplusplus.available">
<mkdir dir="lib" />
<get src="http://projectlombok.org/downloads/ivyplusplus.jar" dest="lib/ivyplusplus.jar" usetimestamp="true" />
</target>
<target name="ensure-ipp" depends="download-ipp">
<taskdef classpath="lib/ivyplusplus.jar" resource="com/zwitserloot/ivyplusplus/antlib.xml" uri="antlib:com.zwitserloot.ivyplusplus" />
</target>
<target name="config-ivy" depends="ensure-ipp">
<ivy:configure file="buildScripts/ivysettings.xml" />
</target>
<target name="deps" depends="ensureBuildDeps, ensureRuntimeDeps, ensureTestDeps" />
<target name="ensureBuildDeps" depends="config-ivy">
<ivy:resolve file="buildScripts/ivy.xml" refresh="true" conf="build" />
<ivy:retrieve />
</target>
<target name="ensureRuntimeDeps" depends="config-ivy">
<ivy:resolve file="buildScripts/ivy.xml" refresh="true" conf="runtime" />
<ivy:retrieve />
</target>
<target name="ensureTestDeps" depends="config-ivy">
<ivy:resolve file="buildScripts/ivy.xml" refresh="true" conf="test" />
<ivy:retrieve />
</target>
<target name="contrib" depends="config-ivy" description="Downloads various non-crucial documentation, sources, etc that are useful when developing lombok.ast.">
<ivy:resolve file="buildScripts/ivy.xml" refresh="true" conf="contrib" />
<ivy:retrieve />
</target>
<target name="eclipse" depends="deps, contrib" description="Creates eclipse project files and downloads all dependencies. Open this directory as project in eclipse after running this target.">
<ivy:eclipsegen source="1.6">
<srcdir dir="src/core" />
<srcdir dir="src/eclipse" />
<srcdir dir="src/javac" />
<srcdir dir="test/core" />
<srcdir dir="test/eclipse" />
<srcdir dir="test/javac" />
<conf name="build" sources="contrib" />
<conf name="test" sources="contrib" />
<settings>
<url url="http://cloud.github.com/downloads/alexruiz/dw-lombok/lombok.eclipse.settings" />
</settings>
<apt location="lib/build/spi.jar" />
</ivy:eclipsegen>
</target>
<path id="build.path">
<fileset dir="lib/build">
<include name="*.jar" />
</fileset>
</path>
<path id="runtime.path">
<fileset dir="lib/runtime">
<include name="*.jar" />
</fileset>
</path>
<path id="test.path">
<fileset dir="lib/test">
<include name="*.jar" />
</fileset>
</path>
<target name="compile" depends="ensureBuildDeps" description="Compiles the code.">
<mkdir dir="build/lombok-javabeans" />
<delete file="build/lombok-javabeans/META-INF/services/javax.annotation.processing.Processor" quiet="true" />
<ivy:compile destdir="build/lombok-javabeans" source="1.6" target="1.6" includeantruntime="false">
<src path="src/core" />
<src path="src/eclipse" />
<src path="src/javac" />
<include name="lombok/**" />
<classpath location="build/lombok-javabeans" />
<classpath refid="build.path" />
</ivy:compile>
<mkdir dir="build/lombok-javabeans/META-INF" />
<mkdir dir="build/lombok-javabeans/META-INF/services" />
<echo file="build/lombok-javabeans/META-INF/services/javax.annotation.processing.Processor">lombok.core.AnnotationProcessor</echo>
</target>
<target name="dist" description="Builds jar file" depends="compile">
<mkdir dir="dist" />
<jar destfile="dist/lombok-javabeans.jar">
<fileset dir="build/lombok-javabeans">
<exclude name="com/sun/**"/>
</fileset>
<manifest>
<attribute name="Premain-Class" value="lombok.core.Agent" />
<attribute name="Agent-Class" value="lombok.core.Agent" />
<attribute name="Can-Redefine-Classes" value="true" />
</manifest>
</jar>
</target>
</project>