Mercurial > public > gradleplugins
diff src/main/groovy/org/ssdt_ohio/gradle/plugins/VersionClassPlugin.groovy @ 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 | 278d28eea819 |
children |
line wrap: on
line diff
--- 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 }