From 5a74f8e66537c0434c11cbd2c47e31bb70a4f3a4 Mon Sep 17 00:00:00 2001 From: Paul Fridrick Date: Fri, 6 Dec 2019 15:15:48 +0100 Subject: [PATCH] Replace deprecated usage of AbstractArchiveTask.getArchivePath --- .../playframework/plugins/PlayDistributionPlugin.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/gradle/playframework/plugins/PlayDistributionPlugin.java b/src/main/java/org/gradle/playframework/plugins/PlayDistributionPlugin.java index f4685580..effeec10 100644 --- a/src/main/java/org/gradle/playframework/plugins/PlayDistributionPlugin.java +++ b/src/main/java/org/gradle/playframework/plugins/PlayDistributionPlugin.java @@ -85,12 +85,12 @@ private void createDistributionContentTasks(Project project, Distribution distri TaskProvider distributionJarTask = project.getTasks().register(jarTaskName, Jar.class, jar -> { jar.setDescription("Assembles an application jar suitable for deployment."); jar.dependsOn(mainJarTask, assetsJarTask); - jar.from(project.zipTree(mainJarTask.get().getArchivePath())); + jar.from(project.zipTree(mainJarTask.get().getArchiveFile().get().getAsFile())); jar.setDestinationDir(distJarDir); jar.setBaseName(mainJarTask.get().getBaseName()); Map classpath = new HashMap<>(); - classpath.put("Class-Path", new PlayManifestClasspath(project.getConfigurations().getByName(RUNTIME_CLASSPATH_CONFIGURATION_NAME), assetsJarTask.get().getArchivePath())); + classpath.put("Class-Path", new PlayManifestClasspath(project.getConfigurations().getByName(RUNTIME_CLASSPATH_CONFIGURATION_NAME), assetsJarTask.get().getArchiveFile().get().getAsFile())); jar.getManifest().attributes(classpath); }); @@ -107,7 +107,7 @@ private void createDistributionContentTasks(Project project, Distribution distri CopySpec distSpec = distribution.getContents(); distSpec.into("lib", copySpec -> { copySpec.from(distributionJarTask); - copySpec.from(assetsJarTask.get().getArchivePath()); + copySpec.from(assetsJarTask.get().getArchiveFile().get().getAsFile()); copySpec.from(project.getConfigurations().getByName(RUNTIME_CLASSPATH_CONFIGURATION_NAME)); copySpec.eachFile(new PrefixArtifactFileNames(project.getConfigurations().getByName(RUNTIME_CLASSPATH_CONFIGURATION_NAME))); });