Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace deprecated usage of AbstractArchiveTask.getArchivePath #117

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,12 @@ private void createDistributionContentTasks(Project project, Distribution distri
TaskProvider<Jar> 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<String, Object> 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);
});

Expand All @@ -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)));
});
Expand Down