Repository: groovy
Updated Branches:
  refs/heads/parrot 68c8c5f45 -> 2f7e354a3


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/370df790
Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/370df790
Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/370df790

Branch: refs/heads/parrot
Commit: 370df790d5b32468131b1572f46f3edbfa492d48
Parents: 7dbeb82
Author: paulk <pa...@asert.com.au>
Authored: Tue Dec 27 17:01:23 2016 +1000
Committer: paulk <pa...@asert.com.au>
Committed: Tue Dec 27 17:01:23 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/370df790/build.gradle
----------------------------------------------------------------------
diff --git a/build.gradle b/build.gradle
index 2e3dbe3..9ed8d26 100644
--- a/build.gradle
+++ b/build.gradle
@@ -465,6 +465,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/370df790/gradle/assemble.gradle
----------------------------------------------------------------------
diff --git a/gradle/assemble.gradle b/gradle/assemble.gradle
index 0a3d49e..8922eea 100644
--- a/gradle/assemble.gradle
+++ b/gradle/assemble.gradle
@@ -577,7 +577,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()}"
@@ -588,7 +588,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/370df790/gradle/upload.gradle
----------------------------------------------------------------------
diff --git a/gradle/upload.gradle b/gradle/upload.gradle
index f74a32c..7659a1d 100644
--- a/gradle/upload.gradle
+++ b/gradle/upload.gradle
@@ -35,6 +35,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