comparison src/main/groovy/org/ssdt_ohio/gradle/plugins/VersionClassPlugin.groovy @ 24:cfbdbeba877f

fix location of ProjectVersion class
author smith@nwoca.org
date Thu, 04 Aug 2016 03:29:38 +0100
parents 4ff2030d2074
children 278d28eea819
comparison
equal deleted inserted replaced
23:e2d02e8742be 24:cfbdbeba877f
99 def files = project.sourceSets.main.groovy as File[] 99 def files = project.sourceSets.main.groovy as File[]
100 if (!files ) { 100 if (!files ) {
101 return null 101 return null
102 } 102 }
103 103
104 def targetDir = files.first().parentFile.toString() 104 def targetDir = files.sort {
105 it.parentFile.toString().replaceAll('(\\\\|/)','.').split(/\./).size()
106 }.first().parentFile.toString()
105 107
106 def targetPackage = targetDir 108 def targetPackage = targetDir
107 source.each { 109 source.each {
108 targetPackage -= it.getDir().getPath().toString() 110 targetPackage -= it.getDir().getPath().toString()
109 } 111 }