Skip to content

Commit

Permalink
allow customization of target/source levels for compilation. Fix for …
Browse files Browse the repository at this point in the history
…GRAILS-7693 "Allow customization of bytecode level for compiler when compiling binary plugins"
  • Loading branch information
Graeme Rocher authored and Graeme Rocher committed Sep 26, 2011
1 parent 49d9869 commit dd44b94
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
Expand Up @@ -2,6 +2,8 @@ grails.servlet.version = "2.5" // Change depending on target container complianc
grails.project.class.dir = "target/classes"
grails.project.test.class.dir = "target/test-classes"
grails.project.test.reports.dir = "target/test-reports"
grails.project.source.level = 1.6
grails.project.target.level = 1.6
//grails.project.war.file = "target/${appName}-${appVersion}.war"

grails.project.dependency.resolution = {
Expand Down
@@ -1,6 +1,8 @@
grails.project.class.dir = "target/classes"
grails.project.test.class.dir = "target/test-classes"
grails.project.test.reports.dir = "target/test-reports"
grails.project.source.level = 1.6
grails.project.target.level = 1.6
//grails.project.war.file = "target/${appName}-${appVersion}.war"

grails.project.dependency.resolution = {
Expand Down
3 changes: 3 additions & 0 deletions scripts/_GrailsClasspath.groovy
Expand Up @@ -34,6 +34,9 @@ includeTargets << grailsScript("_GrailsSettings")
classpathSet = false
includePluginJarsOnClasspath = true
projectCompiler = new GrailsProjectCompiler(pluginSettings, classLoader)
def compileConfigLevels = grailsSettings.config.grails.project
projectCompiler.javaOptions.source = compileConfigLevels.source.level ?: 1.6
projectCompiler.javaOptions.target = compileConfigLevels.target.level ?: 1.6
projectCompiler.ant = ant

target(name:'classpath', description: "Sets the Grails classpath", prehook:null, posthook:null) {
Expand Down

0 comments on commit dd44b94

Please sign in to comment.