From 14b7069646d807e26dd992ba00275685cc8ea044 Mon Sep 17 00:00:00 2001 From: Paul Fridrick Date: Fri, 6 Dec 2019 15:28:20 +0100 Subject: [PATCH] Replace deprecated usage of Distribution.getBaseName Signed-off-by: Paul Fridrick --- README.adoc | 2 +- .../playframework/InDepthUserGuideSamplesIntegrationTest.groovy | 2 +- .../gradle/playframework/plugins/PlayDistributionPlugin.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.adoc b/README.adoc index 205bb42e..2087adfb 100644 --- a/README.adoc +++ b/README.adoc @@ -16,7 +16,7 @@ To engage in the development of the plugin, follow the minimum requirements show |========================== |Tool |Minimum Version |JDK |Oracle JDK or OpenJDK 8.x, anything higher won't work with Scala 2.11 -|Gradle |5.1 or higher +|Gradle |6.0 or higher |IDE |IntelliJ 2018.2 or higher |========================== diff --git a/src/docTest/groovy/org/gradle/playframework/InDepthUserGuideSamplesIntegrationTest.groovy b/src/docTest/groovy/org/gradle/playframework/InDepthUserGuideSamplesIntegrationTest.groovy index f33ca3db..5af50b2f 100644 --- a/src/docTest/groovy/org/gradle/playframework/InDepthUserGuideSamplesIntegrationTest.groovy +++ b/src/docTest/groovy/org/gradle/playframework/InDepthUserGuideSamplesIntegrationTest.groovy @@ -19,7 +19,7 @@ import spock.lang.Unroll */ @Unroll class InDepthUserGuideSamplesIntegrationTest extends Specification { - private static final String[] VERSIONS_UNDER_TEST = ["5.1.1", "5.2.1", "5.5.1", "5.6.4", "6.0.1", "6.1.1", "6.3"] + private static final String[] VERSIONS_UNDER_TEST = ["6.0.1", "6.1.1", "6.3"] @Rule Sample sample = Sample.from("src/docs/samples") diff --git a/src/main/java/org/gradle/playframework/plugins/PlayDistributionPlugin.java b/src/main/java/org/gradle/playframework/plugins/PlayDistributionPlugin.java index 1e4f6b5a..57bde697 100644 --- a/src/main/java/org/gradle/playframework/plugins/PlayDistributionPlugin.java +++ b/src/main/java/org/gradle/playframework/plugins/PlayDistributionPlugin.java @@ -138,7 +138,7 @@ private void createDistributionZipTasks(Project project, Distribution distributi final String capitalizedDistName = capitalizeDistributionName(distribution.getName()); final String stageTaskName = "stage" + capitalizedDistName + "Dist"; final File stageDir = new File(project.getBuildDir(), "stage"); - final String baseName = (distribution.getBaseName() != null && "".equals(distribution.getBaseName())) ? distribution.getBaseName() : distribution.getName(); + final String baseName = (distribution.getDistributionBaseName().isPresent() && "".equals(distribution.getDistributionBaseName().get())) ? distribution.getDistributionBaseName().get() : distribution.getName(); TaskProvider stageSyncTask = project.getTasks().register(stageTaskName, Sync.class, sync -> { sync.setDescription("Copies the '" + distribution.getName() + "' distribution to a staging directory.");