groovy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pa...@apache.org
Subject [groovy] 02/03: conditionally enable preview feature
Date Tue, 22 Oct 2019 10:42:18 GMT
This is an automated email from the ASF dual-hosted git repository.

paulk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/groovy.git

commit ced8aadba1f819e3ab1a08b122aaba7dde1fec97
Author: Paul King <paulk@asert.com.au>
AuthorDate: Tue Oct 22 20:41:17 2019 +1000

    conditionally enable preview feature
---
 settings.gradle | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/settings.gradle b/settings.gradle
index 895526a..d7875d2 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -16,6 +16,8 @@
  *  specific language governing permissions and limitations
  *  under the License.
  */
+import org.gradle.util.GradleVersion
+
 def subprojects = ['groovy-ant',
         'groovy-bsf',
         'groovy-cli-commons',
@@ -55,6 +57,10 @@ rootProject.children.each { prj ->
     prj.projectDir = new File("$rootDir/subprojects/$prj.name")
 }
 
-rootProject.name = 'groovy' // TODO should this be groovy-core?
+rootProject.name = 'groovy'
 
-enableFeaturePreview('GROOVY_COMPILATION_AVOIDANCE')
+GradleVersion gradleVersion = GradleVersion.current()
+GradleVersion gradle5_6 = GradleVersion.version('5.6')
+if (gradleVersion >= gradle5_6) {
+    enableFeaturePreview('GROOVY_COMPILATION_AVOIDANCE')
+}


Mime
View raw message