Skip to content

Commit d6e9f24

Browse files
committed
Fix using the deprecated archivePath property
1 parent 45a28b6 commit d6e9f24

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

libs/gretty/src/main/groovy/org/akhikhl/gretty/GrettyPlugin.groovy

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ class GrettyPlugin implements Plugin<Project> {
296296

297297
if(project.gretty.overlays) {
298298

299-
project.ext.finalArchivePath = archiveTask.archivePath
299+
project.ext.finalArchivePath = archiveTask.archiveFile.get().asFile
300300

301301
archiveTask.archiveFileName = 'partial.' + (project.tasks.findByName('war') ? 'war' : 'jar')
302302

@@ -309,7 +309,7 @@ class GrettyPlugin implements Plugin<Project> {
309309
dependsOn archiveTask
310310
for(String overlay in project.gretty.overlays)
311311
inputs.file { ProjectUtils.getFinalArchivePath(project.project(overlay)) }
312-
inputs.file archiveTask.archivePath
312+
inputs.file archiveTask.archiveFile.get().asFile
313313
outputs.dir "${project.buildDir}/explodedWebapp"
314314
doLast {
315315
ProjectUtils.prepareExplodedWebAppFolder(project)

libs/gretty/src/main/groovy/org/akhikhl/gretty/ProductConfigurer.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ class ProductConfigurer {
171171
from outputDir, { into outputDir.name }
172172

173173
doLast {
174-
ant.checksum file: it.archivePath
174+
ant.checksum file: it.archiveFile.get().asFile
175175
}
176176
}
177177

libs/gretty/src/main/groovy/org/akhikhl/gretty/ProjectUtils.groovy

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ final class ProjectUtils {
6666
if(proj.extensions.findByName('gretty'))
6767
for(def overlay in proj.gretty.overlays) {
6868
overlay = proj.project(overlay)
69-
File archivePath = overlay.tasks.findByName('jar')?.archivePath
69+
File archivePath = overlay.tasks.findByName('jar')?.archiveFile.get().asFile
7070
if(archivePath)
7171
overlayJars.add(archivePath)
7272
addOverlayJars(overlay) // recursion
@@ -159,7 +159,7 @@ final class ProjectUtils {
159159
if(project != null) {
160160
def addProjectClassPath
161161
addProjectClassPath = { Project proj ->
162-
urls.addAll(project.tasks.jar.archivePath.toURI().toURL())
162+
urls.addAll(project.tasks.jar.archiveFile.get().asFile.toURI().toURL())
163163
def files = proj.configurations[dependencyConfig]
164164
def grettyProvidedCompileConfig = proj.configurations.findByName('grettyProvidedCompile')
165165
if(grettyProvidedCompileConfig)
@@ -238,7 +238,7 @@ final class ProjectUtils {
238238
}
239239

240240
static File getFinalArchivePath(Project project) {
241-
project.ext.properties.containsKey('finalArchivePath') ? project.ext.finalArchivePath : (project.tasks.findByName('war') ?: project.tasks.jar).archivePath
241+
project.ext.properties.containsKey('finalArchivePath') ? project.ext.finalArchivePath : (project.tasks.findByName('war') ?: project.tasks.jar).archiveFile.get().asFile
242242
}
243243

244244
static File getWebAppDir(Project project) {
@@ -300,7 +300,7 @@ final class ProjectUtils {
300300
}
301301
}
302302
project.copy {
303-
from project.zipTree((project.tasks.findByName('war') ?: project.tasks.jar).archivePath)
303+
from project.zipTree((project.tasks.findByName('war') ?: project.tasks.jar).archiveFile)
304304
into "${project.buildDir}/explodedWebapp"
305305
}
306306
}

0 commit comments

Comments
 (0)