diff init20.gradle @ 206:cf65e7327fe8

use project property for required java version
author smith@nwoca.org
date Mon, 31 Aug 2015 22:16:53 +0100
parents 55a2f489dbf7
children 07baf02b6034
line wrap: on
line diff
--- a/init20.gradle	Mon Aug 31 21:57:16 2015 +0100
+++ b/init20.gradle	Mon Aug 31 22:16:53 2015 +0100
@@ -72,10 +72,6 @@
 gradle.environment.put('branchStream', gradle.branch.stream)
 gradle.environment.put('branchHash', gradle.branch.hash)
 
-if (gradle.bambooBuild) {
-	gradle.runtimeInfo.requireJava( gradle.environment['requireJavaVersion'] )
-
-}
 
 def cacheTimeout = 60 * 60 * 8 
 if (gradle.environment['dependencyTimeout']) {
@@ -136,6 +132,11 @@
 
 rootProject.afterEvaluate { r ->
 
+
+	if (gradle.bambooBuild && r.hasProperty('requireJavaVersion')) {
+		gradle.runtimeInfo.requireJava( r.getProperty('requireJavaVersion') )
+	}
+
     if (r.plugins.hasPlugin(org.gradle.plugins.ide.idea.IdeaPlugin)) {
 
         r.idea.project.ipr.withXml { xml ->