changeset 30:bf31e9ad44cf

SC-181 Upgrade to gradle 5.0 for version 0.4.5, fix problems with VersionClassPlugin
author Greg Shepherd <shepherd@ssdt-ohio.org>
date Tue, 18 Feb 2020 16:36:38 -0500
parents e531fc141b17
children bd084c7d01df 3fd8e36d8f5e
files build.gradle gradle.properties gradle/wrapper/gradle-wrapper.jar gradle/wrapper/gradle-wrapper.properties src/main/groovy/org/ssdt_ohio/gradle/plugins/VersionClassPlugin.groovy
diffstat 5 files changed, 42 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/build.gradle	Tue Dec 04 19:48:59 2018 +0000
+++ b/build.gradle	Tue Feb 18 16:36:38 2020 -0500
@@ -1,5 +1,12 @@
 
-def ssdtInit = 'init40'
+/*
+ * Copyright (c) 2020.  Ohio Department of Education. - All Rights Reserved.
+ * Unauthorized copying of this file, in any medium, is strictly prohibited.
+ * Written by the State Software Development Team (http://ssdt.oecn.k12.oh.us/)
+ *
+ */
+
+def ssdtInit = 'init50'
 apply from: "${gradle.ext.has('ssdtDevelkitLocation') ? gradle.ssdtDevelkitLocation : 'http://hg.ssdt-ohio.org/browse/public/develkit'}/${ssdtInit}.gradle"
 
 description = "SSDT Gradle Plugins"
@@ -12,7 +19,7 @@
 
 defaultTasks 'clean', 'build'
 
-sourceCompatibility = 1.6
+sourceCompatibility = 1.8
 
 dependencies {
     compile     localGroovy()
@@ -24,7 +31,7 @@
 }
 
 idea.project {
-    jdkName = '1.6'
+    jdkName = '1.8'
 }
 
 idea.module {
--- a/gradle.properties	Tue Dec 04 19:48:59 2018 +0000
+++ b/gradle.properties	Tue Feb 18 16:36:38 2020 -0500
@@ -1,2 +1,9 @@
-version=0.4.4.SNAPSHOT
+#
+# Copyright (c) 2020.  Ohio Department of Education. - All Rights Reserved.
+# Unauthorized copying of this file, in any medium, is strictly prohibited.
+# Written by the State Software Development Team (http://ssdt.oecn.k12.oh.us/)
+#
+#
+
+version=0.4.5.SNAPSHOT
 group=org.ssdt_ohio
Binary file gradle/wrapper/gradle-wrapper.jar has changed
--- a/gradle/wrapper/gradle-wrapper.properties	Tue Dec 04 19:48:59 2018 +0000
+++ b/gradle/wrapper/gradle-wrapper.properties	Tue Feb 18 16:36:38 2020 -0500
@@ -1,6 +1,12 @@
-#Tue Dec 04 14:47:14 EST 2018
-distributionBase=GRADLE_USER_HOME
-distributionPath=wrapper/dists
-zipStoreBase=GRADLE_USER_HOME
-zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-bin.zip
+#
+# Copyright (c) 2020.  Ohio Department of Education. - All Rights Reserved.
+# Unauthorized copying of this file, in any medium, is strictly prohibited.
+# Written by the State Software Development Team (http://ssdt.oecn.k12.oh.us/)
+#
+#
+
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-5.0-all.zip
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
--- a/src/main/groovy/org/ssdt_ohio/gradle/plugins/VersionClassPlugin.groovy	Tue Dec 04 19:48:59 2018 +0000
+++ b/src/main/groovy/org/ssdt_ohio/gradle/plugins/VersionClassPlugin.groovy	Tue Feb 18 16:36:38 2020 -0500
@@ -1,3 +1,10 @@
+/*
+ * Copyright (c) 2020.  Ohio Department of Education. - All Rights Reserved.
+ * Unauthorized copying of this file, in any medium, is strictly prohibited.
+ * Written by the State Software Development Team (http://ssdt.oecn.k12.oh.us/)
+ *
+ */
+
 package org.ssdt_ohio.gradle.plugins
 
 import org.gradle.api.Plugin
@@ -77,7 +84,8 @@
 
         makeVersionClassTask.getInputs().files(project.sourceSets.main.getAllSource().findAll{ !it.name.startsWith('ProjectVersion')}
         )
-        makeVersionClassTask.getOutputs().file( project.buildDir.name + '/' + genSrc)
+        
+        makeVersionClassTask.getOutputs().dir(project.buildDir.name + '/' + genSrc)
 
         if (project.getBuildFile() != null && project.getBuildFile().exists()) {
             makeVersionClassTask.getInputs().files(project.getBuildFile())
@@ -97,8 +105,9 @@
 
         def source = project.sourceSets.main.groovy.getSrcDirTrees()
 
-        def files = project.sourceSets.main.groovy as File[]
-        if (!files ) {
+        def files = project.sourceSets.main.groovy
+        
+        if (!files || files.size() == 0) {
             return null
         }