diff --git a/changelog/@unreleased/pr-1693.v2.yml b/changelog/@unreleased/pr-1693.v2.yml new file mode 100644 index 000000000..4ad455e76 --- /dev/null +++ b/changelog/@unreleased/pr-1693.v2.yml @@ -0,0 +1,7 @@ +type: fix +fix: + description: Do not use the remote build cache for `mergeDiagnosticJson`; it takes + far longer than just doing the operation locally. Avoids spamming output with + "Requesting from remote build cache" too. + links: + - https://github.com/palantir/sls-packaging/pull/1693 diff --git a/gradle-sls-packaging/src/main/java/com/palantir/gradle/dist/artifacts/ExtractFileFromJar.java b/gradle-sls-packaging/src/main/java/com/palantir/gradle/dist/artifacts/ExtractFileFromJar.java index e36dc2a2a..df0fffc68 100644 --- a/gradle-sls-packaging/src/main/java/com/palantir/gradle/dist/artifacts/ExtractFileFromJar.java +++ b/gradle-sls-packaging/src/main/java/com/palantir/gradle/dist/artifacts/ExtractFileFromJar.java @@ -22,7 +22,6 @@ import java.nio.file.Files; import java.util.zip.ZipEntry; import java.util.zip.ZipFile; -import org.gradle.api.artifacts.transform.CacheableTransform; import org.gradle.api.artifacts.transform.InputArtifact; import org.gradle.api.artifacts.transform.TransformAction; import org.gradle.api.artifacts.transform.TransformOutputs; @@ -30,10 +29,12 @@ import org.gradle.api.provider.Provider; import org.gradle.api.tasks.PathSensitive; import org.gradle.api.tasks.PathSensitivity; +import org.gradle.work.DisableCachingByDefault; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -@CacheableTransform +@DisableCachingByDefault( + because = "Extracting a single file from a zip is much faster than making network requests to the build cache") public abstract class ExtractFileFromJar implements TransformAction { private static final Logger log = LoggerFactory.getLogger(ExtractFileFromJar.class);