comparison 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
comparison
equal deleted inserted replaced
205:55a2f489dbf7 206:cf65e7327fe8
70 gradle.environment.put('hgRepositoryUrl', gradle.hgRepositoryUrl) 70 gradle.environment.put('hgRepositoryUrl', gradle.hgRepositoryUrl)
71 gradle.environment.put('branchName', gradle.branch.name) 71 gradle.environment.put('branchName', gradle.branch.name)
72 gradle.environment.put('branchStream', gradle.branch.stream) 72 gradle.environment.put('branchStream', gradle.branch.stream)
73 gradle.environment.put('branchHash', gradle.branch.hash) 73 gradle.environment.put('branchHash', gradle.branch.hash)
74 74
75 if (gradle.bambooBuild) {
76 gradle.runtimeInfo.requireJava( gradle.environment['requireJavaVersion'] )
77
78 }
79 75
80 def cacheTimeout = 60 * 60 * 8 76 def cacheTimeout = 60 * 60 * 8
81 if (gradle.environment['dependencyTimeout']) { 77 if (gradle.environment['dependencyTimeout']) {
82 cacheTimeout = gradle.environment['dependencyTimeout'] as Integer 78 cacheTimeout = gradle.environment['dependencyTimeout'] as Integer
83 println "setting changing dependency timeout to $cacheTimeout seconds" 79 println "setting changing dependency timeout to $cacheTimeout seconds"
133 } 129 }
134 130
135 apply from: "${gradle.ssdtDevelkitLocation}/metrics.gradle" 131 apply from: "${gradle.ssdtDevelkitLocation}/metrics.gradle"
136 132
137 rootProject.afterEvaluate { r -> 133 rootProject.afterEvaluate { r ->
134
135
136 if (gradle.bambooBuild && r.hasProperty('requireJavaVersion')) {
137 gradle.runtimeInfo.requireJava( r.getProperty('requireJavaVersion') )
138 }
138 139
139 if (r.plugins.hasPlugin(org.gradle.plugins.ide.idea.IdeaPlugin)) { 140 if (r.plugins.hasPlugin(org.gradle.plugins.ide.idea.IdeaPlugin)) {
140 141
141 r.idea.project.ipr.withXml { xml -> 142 r.idea.project.ipr.withXml { xml ->
142 if (file('.hg').exists()) { 143 if (file('.hg').exists()) {