From 98a670fd6dac40be9a5ee9a56691999b0baf752a Mon Sep 17 00:00:00 2001 From: Tobias Schulte Date: Fri, 16 Jun 2017 11:29:04 +0200 Subject: [PATCH] fix: jnlp-war plugin works with gradle 4.0 Closes #40 --- .../jnlp/war/GradleJnlpWarPluginExtension.groovy | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/gradle-jnlp-plugin/src/main/groovy/de/gliderpilot/gradle/jnlp/war/GradleJnlpWarPluginExtension.groovy b/gradle-jnlp-plugin/src/main/groovy/de/gliderpilot/gradle/jnlp/war/GradleJnlpWarPluginExtension.groovy index d7267da..deca670 100644 --- a/gradle-jnlp-plugin/src/main/groovy/de/gliderpilot/gradle/jnlp/war/GradleJnlpWarPluginExtension.groovy +++ b/gradle-jnlp-plugin/src/main/groovy/de/gliderpilot/gradle/jnlp/war/GradleJnlpWarPluginExtension.groovy @@ -87,14 +87,15 @@ class GradleJnlpWarPluginExtension { duplicatesStrategy = DuplicatesStrategy.EXCLUDE includeEmptyDirs = false } + project.tasks.create("configureWar").doLast { + launchers.values()*.resolve() + launchersSpec.eachFile { + it.path = it.path.replaceAll('.*?/(.*)', '$1') + } + } project.war { + dependsOn project.tasks.configureWar with launchersSpec - doFirst { - launchers.values()*.resolve() - launchersSpec.eachFile { - it.path = it.path.replaceAll('.*?/(.*)', '$1') - } - } } }