|
20 | 20 |
|
21 | 21 | -->
|
22 | 22 |
|
23 |
| -<project name="Test Groovyc Task" default="test1"> |
| 23 | +<project name="Test Groovyc Task"> |
24 | 24 |
|
25 |
| - <property name="srcPath" value="."/> |
26 |
| - <property name="destPath" value="${user.dir}/build/classes/groovy/test"/> |
27 |
| - |
28 |
| - <property name="javaVersion" value="8"/> |
| 25 | + <property name="srcPath" location="."/> |
| 26 | + <property name="destPath" location="${user.dir}/build/classes/groovy/test"/> |
29 | 27 |
|
30 | 28 | <path id="groovyMaterials">
|
31 | 29 | <pathelement path="${java.class.path}"/>
|
32 | 30 | </path>
|
33 | 31 |
|
34 | 32 | <taskdef name="groovyc" classname="org.codehaus.groovy.ant.Groovyc" classpathref="groovyMaterials"/>
|
35 | 33 |
|
| 34 | + <presetdef name="compile-plain"> |
| 35 | + <groovyc srcdir="${srcPath}" destdir="${destPath}"/> |
| 36 | + </presetdef> |
| 37 | + |
| 38 | + <presetdef name="compile-joint"> |
| 39 | + <groovyc srcdir="${srcPath}" destdir="${destPath}"> |
| 40 | + <javac debug="true" release="8"/> |
| 41 | + </groovyc> |
| 42 | + </presetdef> |
| 43 | + |
| 44 | + |
36 | 45 | <target name="GroovycTest1_NoFork_NoClasspath">
|
37 |
| - <groovyc srcdir="${srcPath}" destdir="${destPath}" includes="GroovycTest1.groovy"/> |
| 46 | + <compile-plain includes="GroovycTest1.groovy"/> |
38 | 47 | <java classname="org.codehaus.groovy.ant.GroovycTest1"/>
|
39 | 48 | </target>
|
40 | 49 |
|
41 | 50 | <target name="GroovycTest1_NoFork_WithGroovyClasspath">
|
42 |
| - <groovyc srcdir="${srcPath}" destdir="${destPath}" includes="GroovycTest1.groovy" |
43 |
| - classpathref="groovyMaterials"/> |
| 51 | + <compile-plain includes="GroovycTest1.groovy" classpathref="groovyMaterials"/> |
44 | 52 | <java classname="org.codehaus.groovy.ant.GroovycTest1"/>
|
45 | 53 | </target>
|
46 | 54 |
|
47 | 55 | <target name="GroovycTest1_NoFork_WithJavaClasspath">
|
48 |
| - <groovyc srcdir="${srcPath}" destdir="${destPath}" includes="GroovycTest1.groovy"/> |
| 56 | + <compile-plain includes="GroovycTest1.groovy"/> |
49 | 57 | <java classname="org.codehaus.groovy.ant.GroovycTest1" classpathref="groovyMaterials"/>
|
50 | 58 | </target>
|
51 | 59 |
|
52 | 60 | <target name="GroovycTest1_NoFork_WithBothClasspath">
|
53 |
| - <groovyc srcdir="${srcPath}" destdir="${destPath}" includes="GroovycTest1.groovy" |
54 |
| - classpathref="groovyMaterials"/> |
| 61 | + <compile-plain includes="GroovycTest1.groovy" classpathref="groovyMaterials"/> |
55 | 62 | <java classname="org.codehaus.groovy.ant.GroovycTest1" classpathref="groovyMaterials"/>
|
56 | 63 | </target>
|
57 | 64 |
|
58 | 65 | <target name="GroovycTest1_ForkGroovy_NoClasspath">
|
59 |
| - <groovyc srcdir="${srcPath}" destdir="${destPath}" includes="GroovycTest1.groovy" fork="true"/> |
| 66 | + <compile-plain includes="GroovycTest1.groovy" fork="true"/> |
60 | 67 | <java classname="org.codehaus.groovy.ant.GroovycTest1"/>
|
61 | 68 | </target>
|
62 | 69 |
|
63 | 70 | <target name="GroovycTest1_ForkGroovy_WithGroovyClasspath">
|
64 |
| - <groovyc srcdir="${srcPath}" destdir="${destPath}" includes="GroovycTest1.groovy" classpathref="groovyMaterials" |
65 |
| - fork="true"/> |
| 71 | + <compile-plain includes="GroovycTest1.groovy" classpathref="groovyMaterials" fork="true"/> |
66 | 72 | <java classname="org.codehaus.groovy.ant.GroovycTest1"/>
|
67 | 73 | </target>
|
68 | 74 |
|
69 | 75 | <target name="GroovycTest1_ForkGroovy_WithJavaClasspath">
|
70 |
| - <groovyc srcdir="${srcPath}" destdir="${destPath}" includes="GroovycTest1.groovy" fork="true"/> |
| 76 | + <compile-plain includes="GroovycTest1.groovy" fork="true"/> |
71 | 77 | <java classname="org.codehaus.groovy.ant.GroovycTest1" classpathref="groovyMaterials"/>
|
72 | 78 | </target>
|
73 | 79 |
|
74 | 80 | <target name="GroovycTest1_ForkGroovy_WithBothClasspath">
|
75 |
| - <groovyc srcdir="${srcPath}" destdir="${destPath}" includes="GroovycTest1.groovy" classpathref="groovyMaterials" |
76 |
| - fork="true"/> |
| 81 | + <compile-plain includes="GroovycTest1.groovy" classpathref="groovyMaterials" fork="true"/> |
77 | 82 | <java classname="org.codehaus.groovy.ant.GroovycTest1" classpathref="groovyMaterials"/>
|
78 | 83 | </target>
|
79 | 84 |
|
80 | 85 | <target name="GroovycTest1_Joint_NoFork_NoClasspath">
|
81 |
| - <groovyc srcdir="${srcPath}" destdir="${destPath}" includes="GroovycTest1.groovy,GroovyTest2.java"> |
82 |
| - <javac source="${javaVersion}" target="${javaVersion}" debug="true"/> |
83 |
| - </groovyc> |
| 86 | + <compile-joint includes="GroovycTest1.groovy,GroovyTest2.java"/> |
84 | 87 | <java classname="org.codehaus.groovy.ant.GroovycTest1"/>
|
85 | 88 | <java classname="org.codehaus.groovy.ant.GroovycTest2"/>
|
86 | 89 | </target>
|
87 | 90 |
|
88 | 91 | <target name="GroovycTest1_Joint_NoFork_WithGroovyClasspath">
|
89 |
| - <groovyc srcdir="${srcPath}" destdir="${destPath}" includes="GroovycTest1.groovy,GroovycTest2.java" |
90 |
| - classpathref="groovyMaterials"> |
91 |
| - <javac source="${javaVersion}" target="${javaVersion}" debug="true"/> |
92 |
| - </groovyc> |
| 92 | + <compile-joint includes="GroovycTest1.groovy,GroovycTest2.java" classpathref="groovyMaterials"/> |
93 | 93 | <java classname="org.codehaus.groovy.ant.GroovycTest1"/>
|
94 | 94 | <java classname="org.codehaus.groovy.ant.GroovycTest2"/>
|
95 | 95 | </target>
|
96 | 96 |
|
97 | 97 | <target name="Groovyc_Joint_NoFork_NestedCompilerArg_WithGroovyClasspath">
|
98 |
| - <groovyc srcdir="${srcPath}" destdir="${destPath}" includes="IncorrectGenericsUsage.java" |
99 |
| - classpathref="groovyMaterials"> |
100 |
| - <javac source="${javaVersion}" target="${javaVersion}" debug="true"> |
| 98 | + <compile-joint includes="IncorrectGenericsUsage.java" classpathref="groovyMaterials"> |
| 99 | + <javac> |
101 | 100 | <compilerarg value="-Xlint"/>
|
102 | 101 | </javac>
|
103 |
| - </groovyc> |
| 102 | + </compile-joint> |
104 | 103 | </target>
|
105 | 104 |
|
106 | 105 | <target name="GroovycTest1_Joint_NoFork_WithJavaClasspath">
|
107 |
| - <groovyc srcdir="${srcPath}" destdir="${destPath}" includes="GroovycTest1.groovy,GroovycTest2.java"> |
108 |
| - <javac source="${javaVersion}" target="${javaVersion}" debug="true"/> |
109 |
| - </groovyc> |
| 106 | + <compile-joint includes="GroovycTest1.groovy,GroovycTest2.java"/> |
110 | 107 | <java classname="org.codehaus.groovy.ant.GroovycTest1" classpathref="groovyMaterials"/>
|
111 | 108 | <java classname="org.codehaus.groovy.ant.GroovycTest2" classpathref="groovyMaterials"/>
|
112 | 109 | </target>
|
113 | 110 |
|
114 | 111 | <target name="GroovycTest1_Joint_NoFork_WithBothClasspath">
|
115 |
| - <groovyc srcdir="${srcPath}" destdir="${destPath}" includes="GroovycTest1.groovy,GroovycTest2.java" |
116 |
| - classpathref="groovyMaterials"> |
117 |
| - <javac source="${javaVersion}" target="${javaVersion}" debug="true"/> |
118 |
| - </groovyc> |
| 112 | + <compile-joint includes="GroovycTest1.groovy,GroovycTest2.java" classpathref="groovyMaterials"/> |
119 | 113 | <java classname="org.codehaus.groovy.ant.GroovycTest1" classpathref="groovyMaterials"/>
|
120 | 114 | <java classname="org.codehaus.groovy.ant.GroovycTest2" classpathref="groovyMaterials"/>
|
121 | 115 | </target>
|
122 | 116 |
|
123 | 117 | <target name="GroovycTest1_Joint_ForkGroovy_NoClasspath">
|
124 |
| - <groovyc srcdir="${srcPath}" destdir="${destPath}" includes="GroovycTest1.groovy,GroovycTest2.java" fork="true"> |
125 |
| - <javac source="${javaVersion}" target="${javaVersion}" debug="true"/> |
126 |
| - </groovyc> |
| 118 | + <compile-joint includes="GroovycTest1.groovy,GroovycTest2.java" fork="true"/> |
127 | 119 | <java classname="org.codehaus.groovy.ant.GroovycTest1"/>
|
128 | 120 | <java classname="org.codehaus.groovy.ant.GroovycTest2"/>
|
129 | 121 | </target>
|
130 | 122 |
|
131 | 123 | <target name="GroovycTest1_Joint_ForkGroovy_WithGroovyClasspath">
|
132 |
| - <groovyc srcdir="${srcPath}" destdir="${destPath}" includes="GroovycTest1.groovy,GroovycTest2.java" fork="true" |
133 |
| - classpathref="groovyMaterials"> |
134 |
| - <javac source="${javaVersion}" target="${javaVersion}" debug="true"/> |
135 |
| - </groovyc> |
| 124 | + <compile-joint includes="GroovycTest1.groovy,GroovycTest2.java" fork="true" classpathref="groovyMaterials"/> |
136 | 125 | <java classname="org.codehaus.groovy.ant.GroovycTest1"/>
|
137 | 126 | <java classname="org.codehaus.groovy.ant.GroovycTest2"/>
|
138 | 127 | </target>
|
139 | 128 |
|
140 | 129 | <target name="GroovycTest1_Joint_ForkGroovy_WithJavaClasspath">
|
141 |
| - <groovyc srcdir="${srcPath}" destdir="${destPath}" includes="GroovycTest1.groovy,GroovycTest2.java" fork="true"> |
142 |
| - <javac source="${javaVersion}" target="${javaVersion}" debug="true"/> |
143 |
| - </groovyc> |
| 130 | + <compile-joint includes="GroovycTest1.groovy,GroovycTest2.java" fork="true"/> |
144 | 131 | <java classname="org.codehaus.groovy.ant.GroovycTest1" classpathref="groovyMaterials"/>
|
145 | 132 | <java classname="org.codehaus.groovy.ant.GroovycTest2" classpathref="groovyMaterials"/>
|
146 | 133 | </target>
|
147 | 134 |
|
148 | 135 | <target name="GroovycTest1_Joint_ForkGroovy_WithBothClasspath">
|
149 |
| - <groovyc srcdir="${srcPath}" destdir="${destPath}" includes="GroovycTest1.groovy,GroovycTest2.java" fork="true" |
150 |
| - classpathref="groovyMaterials"> |
151 |
| - <javac source="${javaVersion}" target="${javaVersion}" debug="true"/> |
152 |
| - </groovyc> |
| 136 | + <compile-joint includes="GroovycTest1.groovy,GroovycTest2.java" fork="true" classpathref="groovyMaterials"/> |
153 | 137 | <java classname="org.codehaus.groovy.ant.GroovycTest1" classpathref="groovyMaterials"/>
|
154 | 138 | <java classname="org.codehaus.groovy.ant.GroovycTest2" classpathref="groovyMaterials"/>
|
155 | 139 | </target>
|
156 | 140 |
|
157 | 141 | <target name="GroovycTest1_ForkGroovy_NoClasspath_WithJavaHome">
|
158 |
| - <groovyc srcdir="${srcPath}" destdir="${destPath}" includes="GroovycTest1.groovy" fork="true" |
159 |
| - javahome="${alt.java.home}"/> |
| 142 | + <compile-plain includes="GroovycTest1.groovy" fork="true" javahome="${alt.java.home}"/> |
160 | 143 | <java classname="org.codehaus.groovy.ant.GroovycTest1"/>
|
161 | 144 | </target>
|
162 | 145 |
|
163 | 146 | <target name="GroovycTest1_ForkGroovy_WithGroovyClasspath_WithJavaHome">
|
164 |
| - <groovyc srcdir="${srcPath}" destdir="${destPath}" includes="GroovycTest1.groovy" classpathref="groovyMaterials" |
165 |
| - fork="true" javahome="${alt.java.home}"/> |
| 147 | + <compile-plain includes="GroovycTest1.groovy" classpathref="groovyMaterials" fork="true" javahome="${alt.java.home}"/> |
166 | 148 | <java classname="org.codehaus.groovy.ant.GroovycTest1"/>
|
167 | 149 | </target>
|
168 | 150 |
|
169 | 151 | <target name="GroovycTest1_ForkGroovy_WithJavaClasspath_WithJavaHome">
|
170 |
| - <groovyc srcdir="${srcPath}" destdir="${destPath}" includes="GroovycTest1.groovy" fork="true" |
171 |
| - javahome="${alt.java.home}"/> |
| 152 | + <compile-plain includes="GroovycTest1.groovy" fork="true" javahome="${alt.java.home}"/> |
172 | 153 | <java classname="org.codehaus.groovy.ant.GroovycTest1" classpathref="groovyMaterials"/>
|
173 | 154 | </target>
|
174 | 155 |
|
175 | 156 | <target name="GroovycTest1_ForkGroovy_WithBothClasspath_WithJavaHome">
|
176 |
| - <groovyc srcdir="${srcPath}" destdir="${destPath}" includes="GroovycTest1.groovy" classpathref="groovyMaterials" |
177 |
| - fork="true" javahome="${alt.java.home}"/> |
| 157 | + <compile-plain includes="GroovycTest1.groovy" classpathref="groovyMaterials" fork="true" javahome="${alt.java.home}"/> |
178 | 158 | <java classname="org.codehaus.groovy.ant.GroovycTest1" classpathref="groovyMaterials"/>
|
179 | 159 | </target>
|
180 | 160 |
|
181 | 161 | <target name="GroovycTest1_ForkGroovy_NoClasspath_Fail">
|
182 |
| - <groovyc srcdir="${srcPath}" destdir="${destPath}" includes="GroovyTestBad1.groovy" fork="true"/> |
183 |
| - <java classname="org.codehaus.groovy.ant.GroovycTest1"/> |
| 162 | + <compile-plain includes="GroovyTestBad1.groovy" fork="true"/> |
184 | 163 | </target>
|
185 | 164 |
|
186 | 165 | <target name="noForkNoAntRuntime">
|
187 |
| - <groovyc srcdir="${srcPath}" destdir="${destPath}" includes="GroovycTest1.groovy" fork="false" includeAntRuntime="false"/> |
| 166 | + <compile-plain includes="GroovycTest1.groovy" fork="false" includeAntRuntime="false"/> |
188 | 167 | </target>
|
189 | 168 |
|
190 | 169 | <!-- GROOVY-9197 -->
|
191 | 170 | <target name="jointForkedCompilation_ExternalJarOnClasspath">
|
192 |
| - <presetdef name="compile"> |
193 |
| - <groovyc fork="true" includeantruntime="false"> |
194 |
| - <javac debug="true" source="${javaVersion}" target="${javaVersion}"/> |
195 |
| - </groovyc> |
196 |
| - </presetdef> |
197 |
| - |
198 | 171 | <path id="the.classpath">
|
199 | 172 | <path refid="groovyMaterials"/>
|
200 | 173 | <fileset file="commons-lang3-3.4.jar"/>
|
201 | 174 | </path>
|
202 | 175 |
|
203 |
| - <compile srcdir="${srcPath}" destdir="${destPath}" includes="MakesExternalReference.java"> |
| 176 | + <compile-joint fork="true" includeantruntime="false" includes="MakesExternalReference.java"> |
204 | 177 | <classpath refid="the.classpath"/>
|
205 |
| - </compile> |
| 178 | + </compile-joint> |
206 | 179 |
|
207 | 180 | <java classname="org.codehaus.groovy.ant.MakesExternalReference" classpathref="the.classpath"/>
|
208 | 181 | </target>
|
209 | 182 |
|
| 183 | + <!-- GROOVY-11573 --> |
| 184 | + <target name="jointForkedCompilation_ParameterMetadataCheck"> |
| 185 | + <compile-joint fork="true" configscript="params.groovy" includes="ParameterMetadataCheck.java"/> |
| 186 | + <java classname="org.codehaus.groovy.ant.ParameterMetadataCheck"/> |
| 187 | + </target> |
| 188 | + |
210 | 189 | <target name="clean">
|
211 | 190 | <delete quiet="true">
|
212 | 191 | <fileset dir="${destPath}/org/codehaus/groovy/ant">
|
| 192 | + <include name="*_Result.txt"/> |
213 | 193 | <include name="GroovycTest1*.class"/>
|
214 | 194 | <include name="GroovycTest2*.class"/>
|
215 | 195 | <include name="IncorrectGenericsUsage.class"/>
|
216 | 196 | <include name="MakesExternalReference.class"/>
|
| 197 | + <include name="ParameterMetadataCheck.class"/> |
217 | 198 | </fileset>
|
218 | 199 | </delete>
|
219 | 200 | </target>
|
|
0 commit comments