changeset 18:4ff2030d2074

USASR-1921: Update VersionClassPlugin to allow buildscript to specify package in which to generate ProjectVersion.groovy file
author Christopher Springer <springer@nwoca.org>
date Thu, 07 Jan 2016 17:08:00 +0000
parents 3741247de37a
children c3527be50f56
files src/main/groovy/org/ssdt_ohio/gradle/plugins/VersionClassPlugin.groovy
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/main/groovy/org/ssdt_ohio/gradle/plugins/VersionClassPlugin.groovy	Thu Jan 01 00:01:02 2015 +0000
+++ b/src/main/groovy/org/ssdt_ohio/gradle/plugins/VersionClassPlugin.groovy	Thu Jan 07 17:08:00 2016 +0000
@@ -2,6 +2,7 @@
 
 import org.gradle.api.Plugin
 import org.gradle.api.Project
+import org.gradle.api.plugins.ExtraPropertiesExtension.UnknownPropertyException
 import org.gradle.api.plugins.GroovyPlugin
 
 class VersionClassPlugin implements Plugin<Project> {
@@ -88,7 +89,11 @@
 
 
 
-    private getTargetClass(project) {
+    private getTargetClass(Project project) {
+        try {
+            return project.extensions.extraProperties.get('versionPackage')
+        } catch (UnknownPropertyException ex) {}
+
         def source = project.sourceSets.main.groovy.getSrcDirTrees()
 
         def files = project.sourceSets.main.groovy as File[]