Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 61 lines (51 sloc) 2.06 kB
3e17890 1.1 branch is now trunk
graeme authored
1 /*
2 * Copyright 2004-2005 the original author or authors.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
835947f @burtbeckwith cleanup
burtbeckwith authored
16
3e17890 1.1 branch is now trunk
graeme authored
17 import org.codehaus.groovy.control.CompilerConfiguration
18 import org.springframework.core.io.FileSystemResource
19
20 /**
21 * Gant script containing the Grails classpath setup.
22 *
23 * @author Peter Ledbrook
4da84ba @graemerocher First cut of Ivy support and dependency resolution DSL
graemerocher authored
24 * @author Graeme Rocher
3e17890 1.1 branch is now trunk
graeme authored
25 *
26 * @since 1.1
27 */
28
29 // No point doing this stuff more than once.
30 if (getBinding().variables.containsKey("_grails_classpath_called")) return
31 _grails_classpath_called = true
32
33 includeTargets << grailsScript("_GrailsSettings")
34
35 classpathSet = false
36 includePluginJarsOnClasspath = true
53845f1 @graemerocher More refactoring of package/compile scripts into classes
graemerocher authored
37 projectCompiler = new org.codehaus.groovy.grails.compiler.GrailsProjectCompiler(pluginSettings, rootLoader)
38 projectCompiler.ant = ant
3e17890 1.1 branch is now trunk
graeme authored
39
d372887 @graemerocher updated Gant snapshot that doesn't output the verbose task informatio…
graemerocher authored
40 target(name:'classpath', description: "Sets the Grails classpath", prehook:null, posthook:null) {
3e17890 1.1 branch is now trunk
graeme authored
41 setClasspath()
42 }
43
53845f1 @graemerocher More refactoring of package/compile scripts into classes
graemerocher authored
44 // The following variables are here for compatibility with older versions of Grails
45 getPluginLibDirs = pluginSettings.&pluginLibDirectories
46 getPluginJarFiles = pluginSettings.&pluginJarFiles
47 getJarFiles = projectCompiler.&getJarFiles
48 getExtraDependencies = projectCompiler.&getExtraDependencies
49 commonClasspath = projectCompiler.commonClasspath
50 compileClasspath = projectCompiler.compileClasspath
51 testClasspath = projectCompiler.testClasspath
52 runtimeClasspath = projectCompiler.runtimeClasspath
3e17890 1.1 branch is now trunk
graeme authored
53
54 void setClasspath() {
55 // Make sure the following code is only executed once.
56 if (classpathSet) return
57
53845f1 @graemerocher More refactoring of package/compile scripts into classes
graemerocher authored
58 projectCompiler.configureClasspath()
3e17890 1.1 branch is now trunk
graeme authored
59 classpathSet = true
60 }
Something went wrong with that request. Please try again.