aboutsummaryrefslogtreecommitdiff
path: root/buildScripts/create-eclipse-project.ant.xml
blob: 89e2f91fa84872459aeaa3a378c422737f3c9644 (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
178
179
180
181
182
183
<!--
 Copyright (C) 2010-2020 The Project Lombok Authors.
  
  Permission is hereby granted, free of charge, to any person obtaining a copy
  of this software and associated documentation files (the "Software"), to deal
  in the Software without restriction, including without limitation the rights
  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  copies of the Software, and to permit persons to whom the Software is
  furnished to do so, subject to the following conditions:
  
  The above copyright notice and this permission notice shall be included in
  all copies or substantial portions of the Software.
  
  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  THE SOFTWARE.
-->
<project name="lombok.create-eclipse-project" default="" xmlns:ivy="antlib:com.zwitserloot.ivyplusplus" basedir="..">
	<description>
This buildfile is part of projectlombok.org. It creates the infrastructure needed to develop lombok on eclipse.
	</description>
	
	<target name="eclipse" depends="eclipse.projectfiles, eclipse.testtarget.default" description="Downloads dependencies, create eclipse project files, as well as debug/run test targets. Open this directory as project in eclipse (via import... existing projects)" />
	
	<target name="eclipse.projectfiles" depends="deps">
		<ivy:eclipsegen source="1.6">
			<srcdir dir="src/core" />
			<srcdir dir="src/core8" />
			<srcdir dir="src/launch" />
			<srcdir dir="src/utils" />
			<srcdir dir="src/eclipseAgent" />
			<srcdir dir="src/installer" />
			<srcdir dir="src/delombok" />
			<srcdir dir="src/stubs" />
			<srcdir dir="src/support" />
			<srcdir dir="experimental/src" />
			<srcdir dir="test/transform/src" />
			<srcdir dir="test/core/src" />
			<srcdir dir="test/bytecode/src" />
			<srcdir dir="test/configuration/src" />
			<srcdir dir="test/stubs" />
			<conf name="build" sources="sources" />
			<conf name="javac6" sources="sources" />
			<conf name="eclipse-oxygen" sources="sources" />
			<conf name="test" sources="sources" />
			<conf name="buildtools" sources="sources" />
			<local org="org.projectlombok" name="lombok.patcher" dir="../lombok.patcher" />
			<settings>
				<url url="https://projectlombok.org/downloads/lombok.eclipse.settings" />
			</settings>
			<apt location="lib/build/projectlombok.org-spi.jar" />
		</ivy:eclipsegen>
	</target>
	
	<target name="eclipse.testtarget.default" depends="deps, compile.support">
		<property name="cp.test" refid="cp.test" />
		<property name="cp.stripe" refid="cp.stripe" />
		<property name="cp.eclipse-202006" refid="cp.eclipse-202006" />
		
		<java classname="lombok.eclipseCreate.CreateEclipseDebugTarget" failonerror="true">
			<classpath>
				<path refid="cp.buildtools" />
				<pathelement location="build/support" />
			</classpath>
			<arg value="name=Lombok-test Base" />
			<arg value="testType=lombok.TestBase" />
			<arg value="jvmTarget=1.8" />
			<arg value="bootpath=${jdk8-rt.loc}" />
			<arg value="conf.test=${cp.test}" />
			<arg value="conf.stripe=${cp.stripe}" />
			<arg value="favorite" />
		</java>
		
		<java classname="lombok.eclipseCreate.CreateEclipseDebugTarget" failonerror="true">
			<classpath>
				<path refid="cp.buildtools" />
				<pathelement location="build/support" />
			</classpath>
			<arg value="name=Lombok-test Eclipse-202006" />
			<arg value="testType=lombok.TestEclipse" />
			<arg value="jvmTarget=1.8" />
			<arg value="bootpath=${jdk8-rt.loc}" />
			<arg value="conf.test=${cp.test}" />
			<arg value="conf.stripe=${cp.stripe}" />
			<arg value="conf.eclipse-oxygen=${cp.eclipse-202006}" />
			<arg value="favorite" />
		</java>
		
		<java classname="lombok.eclipseCreate.CreateEclipseDebugTarget" failonerror="true">
			<classpath>
				<path refid="cp.buildtools" />
				<pathelement location="build/support" />
			</classpath>
			<arg value="name=Lombok-test Javac14" />
			<arg value="testType=lombok.TestJavac" />
			<arg value="jvmTarget=14" />
			<arg value="conf.test=${cp.test}" />
			<arg value="conf.stripe=${cp.stripe}" />
			<arg value="favorite" />
		</java>
	</target>
	
	<target name="eclipse.testtarget.javac" depends="compile.support" description="Makes an eclipse launch target for running the tests for javac">
		<property name="cp.test" refid="cp.test" />
		<property name="cp.stripe" refid="cp.stripe" />
		
		<input message="Which javac do you want to target? Enter a version, such as '11'." validargs="8,11,13,14,15" addproperty="testtarget.jvmTarget.input" />
		
		<condition property="testtarget.jvmtarget" value="1.8" else="${testtarget.jvmTarget.input}"><equals arg1="${testtarget.jvmTarget.input}" arg2="8" /></condition>
		<property name="testtarget.confname" value="javac${testtarget.jvmTarget.input}" />
		<property name="testtarget.confcp" refid="cp.javac${testtarget.jvmTarget.input}" />
		
		<java classname="lombok.eclipseCreate.CreateEclipseDebugTarget" failonerror="true">
			<classpath>
				<path refid="cp.buildtools" />
				<pathelement location="build/support" />
			</classpath>
			<arg value="name=Lombok-test Javac ${testtarget.jvmTarget.input}" />
			<arg value="testType=lombok.TestJavac" />
			<arg value="jvmTarget=${testtarget.jvmTarget}" />
			<arg value="conf.test=${cp.test}" />
			<arg value="conf.stripe=${cp.stripe}" />
			<arg value="conf.${testtarget.confname}=${testtarget.confcp}" />
			<arg value="favorite" />
		</java>
	</target>
	
	<target name="eclipse.testtarget.eclipse" depends="compile.support" description="Makes an eclipse launch target for running the tests for eclipse support">
		<property name="cp.test" refid="cp.test" />
		<property name="cp.stripe" refid="cp.stripe" />
		
		<input message="Which JDK do you want to target? Enter a version, such as '11'. Suggested (default): 8" validargs="8,11,14" defaultvalue="8" addproperty="testtarget.jvmTarget.input" />
		<input message="Which eclipse do you want to target? Enter a version, such as 'oxygen'." validargs="oxygen" addproperty="testtarget.eclipseTarget" />
		
		<condition property="testtarget.jvmtarget" value="1.8" else="${testtarget.jvmTarget.input}"><equals arg1="${testtarget.jvmTarget.input}" arg2="8" /></condition>
		<property name="testtarget.confname" value="eclipse-${testtarget.eclipseTarget}" />
		<property name="testtarget.confcp" refid="cp.eclipse-${testtarget.eclipseTarget}" />
		
		<java classname="lombok.eclipseCreate.CreateEclipseDebugTarget" failonerror="true">
			<classpath>
				<path refid="cp.buildtools" />
				<pathelement location="build/support" />
			</classpath>
			<arg value="name=Lombok-test Eclipse-${testtarget.eclipseTarget}" />
			<arg value="testType=lombok.TestEclipse" />
			<arg value="jvmTarget=${testtarget.jvmTarget}" />
			<arg value="conf.test=${cp.test}" />
			<arg value="conf.stripe=${cp.stripe}" />
			<arg value="conf.${testtarget.confname}=${testtarget.confcp}" />
			<arg value="favorite" />
		</java>
	</target>
	
	<target name="eclipse.testtarget.ecj" depends="compile.support" description="Makes an eclipse launch target for running the tests for ecj support">
		<property name="cp.test" refid="cp.test" />
		<property name="cp.stripe" refid="cp.stripe" />
		
		<input message="Which JDK do you want to target? Enter a version, such as '11'. Suggested (default): 8" validargs="8,11,14" defaultvalue="8" addproperty="testtarget.jvmTarget.input" />
		<input message="Which ecj do you want to target? Enter a version, such as '8'." validargs="8,11,14" addproperty="testtarget.ecjTarget" />
		
		<condition property="testtarget.jvmtarget" value="1.8" else="${testtarget.jvmTarget.input}"><equals arg1="${testtarget.jvmTarget.input}" arg2="8" /></condition>
		<property name="testtarget.confname" value="ecj${testtarget.ecjTarget}" />
		<property name="testtarget.confcp" refid="cp.ecj${testtarget.ecjTarget}" />
		
		<java classname="lombok.eclipseCreate.CreateEclipseDebugTarget" failonerror="true">
			<classpath>
				<path refid="cp.buildtools" />
				<pathelement location="build/support" />
			</classpath>
			<arg value="name=Lombok-test ECJ${testtarget.ecjTarget}" />
			<arg value="testType=lombok.TestEclipse" />
			<arg value="jvmTarget=${testtarget.jvmTarget}" />
			<arg value="conf.test=${cp.test}" />
			<arg value="conf.stripe=${cp.stripe}" />
			<arg value="conf.${testtarget.confname}=${testtarget.confcp}" />
			<arg value="favorite" />
		</java>
	</target>
</project>