comparison init20.gradle @ 203:e90ce1d50d85

add java version display
author smith@nwoca.org
date Mon, 31 Aug 2015 21:10:18 +0100
parents 8aab0c2c1259
children a3c507b868a9
comparison
equal deleted inserted replaced
200:8aab0c2c1259 203:e90ce1d50d85
2 import groovy.transform.ToString 2 import groovy.transform.ToString
3 3
4 final GradleVersion gradleCurrent = GradleVersion.current() 4 final GradleVersion gradleCurrent = GradleVersion.current()
5 final GradleVersion gradleV20 = GradleVersion.version('2.0') 5 final GradleVersion gradleV20 = GradleVersion.version('2.0')
6 println "Gradle Version: $gradleCurrent" 6 println "Gradle Version: $gradleCurrent"
7 println "Java Version: ${System.getProperty('java.version')}"
8
7 if (gradleCurrent < gradleV20) { 9 if (gradleCurrent < gradleV20) {
8 throw new RuntimeException("this init script requires Gradle version 2.0 or higher") 10 throw new RuntimeException("this init script requires Gradle version 2.0 or higher")
9 } 11 }
10 12
11 gradle.ext.ssdtDevelkitLocation = gradle.ext.has('ssdtDevelkitLocation') ? gradle.ssdtDevelkitLocation : 'http://hg.ssdt-ohio.org/browse/public/develkit' 13 gradle.ext.ssdtDevelkitLocation = gradle.ext.has('ssdtDevelkitLocation') ? gradle.ssdtDevelkitLocation : 'http://hg.ssdt-ohio.org/browse/public/develkit'
413 415
414 root.subprojects { p -> 416 root.subprojects { p ->
415 if (root.useIndy()) { 417 if (root.useIndy()) {
416 def groovyIndy = p.configurations.compile.files.find { f -> f.name.startsWith('groovy-all') && f.name.contains('-indy') } 418 def groovyIndy = p.configurations.compile.files.find { f -> f.name.startsWith('groovy-all') && f.name.contains('-indy') }
417 if (groovyIndy) { 419 if (groovyIndy) {
418 // println "enabling indy compilation on $p" 420 println "enabling indy compilation on $p"
419 [compileGroovy.groovyOptions, compileTestGroovy.groovyOptions]*.with { 421 [compileGroovy.groovyOptions, compileTestGroovy.groovyOptions]*.with {
420 optimizationOptions = [indy: true] 422 optimizationOptions = [indy: true]
421 } 423 }
422 } 424 }
423 } 425 }