File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
grails-gradle-plugin/src/main/groovy/org/grails/gradle/plugin/core Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -156,7 +156,10 @@ class GrailsGradlePlugin extends GroovyPlugin {
156156 }
157157
158158 protected Task createBuildPropertiesTask (Project project ) {
159- def buildInfoFile = project. file(" ${ project.buildDir} /grails.build.info" )
159+
160+ def resourcesDir = SourceSets . findMainSourceSet(project). output. resourcesDir
161+ def buildInfoFile = new File (resourcesDir, " META-INF/grails.build.info" )
162+
160163
161164 def buildPropertiesTask = project. tasks. create(" buildProperties" )
162165 def buildPropertiesContents = [' grails.env' : Environment . isSystemSet() ? Environment . current. name : Environment . PRODUCTION . name,
@@ -168,6 +171,7 @@ class GrailsGradlePlugin extends GroovyPlugin {
168171 buildPropertiesTask. outputs. file(buildInfoFile)
169172 buildPropertiesTask << {
170173 project. buildDir. mkdirs()
174+ ant. mkdir(dir :buildInfoFile. parentFile)
171175 ant. propertyfile(file : buildInfoFile) {
172176 for (me in buildPropertiesTask. inputs. properties) {
173177 entry key : me. key, value : me. value
@@ -176,12 +180,8 @@ class GrailsGradlePlugin extends GroovyPlugin {
176180 }
177181
178182 project. afterEvaluate {
179- project. tasks. withType(Jar ) { Jar jar ->
180- jar. dependsOn(buildPropertiesTask)
181- jar. metaInf {
182- from(buildInfoFile)
183- }
184- }
183+ TaskContainer tasks = project. tasks
184+ tasks. findByName(" processResources" )?. dependsOn(buildPropertiesTask)
185185 }
186186 }
187187
You can’t perform that action at this time.
0 commit comments