Skip to content

Commit

Permalink
Replace deprecated usage of AbstractArchiveTask.setDestinationDir
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Fridrick <[email protected]>
  • Loading branch information
PaulFridrick committed Oct 2, 2020
1 parent b0b48a5 commit c861245
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ private void createDistributionContentTasks(Project project, Distribution distri
jar.setDescription("Assembles an application jar suitable for deployment.");
jar.dependsOn(mainJarTask, assetsJarTask);
jar.from(project.zipTree(mainJarTask.get().getArchivePath()));
jar.setDestinationDir(distJarDir);
jar.getDestinationDirectory().set(distJarDir);
jar.setBaseName(mainJarTask.get().getBaseName());

Map<String, Object> classpath = new HashMap<>();
Expand Down Expand Up @@ -153,15 +153,15 @@ private void createDistributionZipTasks(Project project, Distribution distributi
TaskProvider<Zip> distZipTask = project.getTasks().register(distributionZipTaskName, Zip.class, zip -> {
zip.setDescription("Packages the '" + distribution.getName() + "' distribution as a zip file.");
zip.setBaseName(baseName);
zip.setDestinationDir(new File(project.getBuildDir(), "distributions"));
zip.getDestinationDirectory().set(new File(project.getBuildDir(), "distributions"));
zip.from(stageSyncTask);
});

final String distributionTarTaskName = "create" + capitalizedDistName + "TarDist";
TaskProvider<Tar> distTarTask = project.getTasks().register(distributionTarTaskName, Tar.class, tar -> {
tar.setDescription("Packages the '" + distribution.getName() + "' distribution as a tar file.");
tar.setBaseName(baseName);
tar.setDestinationDir(new File(project.getBuildDir(), "distributions"));
tar.getDestinationDirectory().set(new File(project.getBuildDir(), "distributions"));
tar.from(stageSyncTask);
});

Expand Down

0 comments on commit c861245

Please sign in to comment.