expose checkCompatibility task

Project: http://git-wip-us.apache.org/repos/asf/groovy/repo
Commit: http://git-wip-us.apache.org/repos/asf/groovy/commit/9accb0e3
Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/9accb0e3
Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/9accb0e3

Branch: refs/heads/GROOVY_2_4_X
Commit: 9accb0e3d9154196639a5b367a4e17aea4d1f419
Parents: 16859fa
Author: paulk <[email protected]>
Authored: Tue Dec 27 17:01:23 2016 +1000
Committer: paulk <[email protected]>
Committed: Tue Dec 27 17:02:19 2016 +1000

----------------------------------------------------------------------
 build.gradle           | 5 +++++
 gradle/assemble.gradle | 4 ++--
 gradle/upload.gradle   | 1 +
 3 files changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/groovy/blob/9accb0e3/build.gradle
----------------------------------------------------------------------
diff --git a/build.gradle b/build.gradle
index 393d150..3349147 100644
--- a/build.gradle
+++ b/build.gradle
@@ -435,6 +435,11 @@ compileTestGroovy {
     groovyOptions.fork(memoryMaximumSize: groovycTest_mx)
 }
 
+// TODO superfluous to check for JDK7 for Gradle version 3.2+ but leave for 
future?
+task checkCompatibility {
+    assert JavaVersion.current().java7Compatible
+}
+
 apply from: 'gradle/test.gradle'
 apply from: 'gradle/groovydoc.gradle'
 apply from: 'gradle/docs.gradle'

http://git-wip-us.apache.org/repos/asf/groovy/blob/9accb0e3/gradle/assemble.gradle
----------------------------------------------------------------------
diff --git a/gradle/assemble.gradle b/gradle/assemble.gradle
index 84af440..8a91a28 100644
--- a/gradle/assemble.gradle
+++ b/gradle/assemble.gradle
@@ -575,7 +575,7 @@ def installDir = {
         System.properties.installDirectory ?: "$buildDir/install"
 }
 
-task installGroovy(type: Sync, dependsOn: distBin) {
+task installGroovy(type: Sync, dependsOn: [checkCompatibility, distBin]) {
     description 'Generates a groovy distribution into an install directory'
     doLast {
         logger.lifecycle "Groovy installed under ${installDir()}"
@@ -586,7 +586,7 @@ task installGroovy(type: Sync, dependsOn: distBin) {
 
 import org.gradle.api.file.DuplicatesStrategy
 
-task dist(type: Zip, dependsOn: [distBin, distSrc, distDoc, syncDoc]) {
+task dist(type: Zip, dependsOn: [checkCompatibility, distBin, distSrc, 
distDoc, syncDoc]) {
     description = 'Generates the binary, sources, documentation and full 
distributions'
     baseName = 'apache-groovy'
     duplicatesStrategy = DuplicatesStrategy.EXCLUDE

http://git-wip-us.apache.org/repos/asf/groovy/blob/9accb0e3/gradle/upload.gradle
----------------------------------------------------------------------
diff --git a/gradle/upload.gradle b/gradle/upload.gradle
index 410ca78..bd64084 100644
--- a/gradle/upload.gradle
+++ b/gradle/upload.gradle
@@ -34,6 +34,7 @@ def removeJarjaredDependencies = { p ->
 allprojects {
     apply plugin: 'maven'
     apply from: "${rootProject.projectDir}/gradle/pomconfigurer.gradle"
+    install.dependsOn checkCompatibility
 }
 
 apply from: 'gradle/backports.gradle'

Reply via email to