From 7f1638195790bd96751e44a17a874f4d39e9d25d Mon Sep 17 00:00:00 2001 From: Eric Sword Date: Thu, 14 Nov 2024 12:43:06 -0500 Subject: [PATCH] use new file permissions API --- .../com/palantir/gradle/dist/service/DistTarTask.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/gradle-sls-packaging/src/main/java/com/palantir/gradle/dist/service/DistTarTask.java b/gradle-sls-packaging/src/main/java/com/palantir/gradle/dist/service/DistTarTask.java index 8fef17ea5..f1d79a13e 100644 --- a/gradle-sls-packaging/src/main/java/com/palantir/gradle/dist/service/DistTarTask.java +++ b/gradle-sls-packaging/src/main/java/com/palantir/gradle/dist/service/DistTarTask.java @@ -27,7 +27,6 @@ import org.gradle.api.tasks.bundling.Jar; import org.gradle.api.tasks.bundling.Tar; -@SuppressWarnings("deprecation") // for the setFileMode calls final class DistTarTask { static final String SCRIPTS_DIST_LOCATION = "service/bin"; @@ -54,7 +53,7 @@ static void configure( root.from("service/bin", t -> { t.into("service/bin"); - t.setFileMode(0755); + t.filePermissions(filePerms -> filePerms.unix(0755)); }); // We do this trick of iterating through every java version and making a from with a lazy value to be lazy @@ -89,17 +88,17 @@ static void configure( root.into(SCRIPTS_DIST_LOCATION, t -> { t.from(project.getLayout().getBuildDirectory().dir("scripts")); - t.setFileMode(0755); + t.filePermissions(filePerms -> filePerms.unix(0755)); }); root.into("service/monitoring/bin", t -> { t.from(project.getLayout().getBuildDirectory().dir("monitoring")); - t.setFileMode(0755); + t.filePermissions(filePerms -> filePerms.unix(0755)); }); root.into("service/lib/linux-x86-64", t -> { t.from(project.getLayout().getBuildDirectory().dir("libs/linux-x86-64")); - t.setFileMode(0755); + t.filePermissions(filePerms -> filePerms.unix(0755)); }); DeploymentDirInclusion.includeFromDeploymentDirs(