Skip to content

Commit

Permalink
Use reproducible file order and time stamps by default
Browse files Browse the repository at this point in the history
  • Loading branch information
jpenilla committed Nov 30, 2024
1 parent d2c4d74 commit 3b5ff64
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/main/kotlin/org/incendo/cloudbuildlogic/BasePlugin.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import com.palantir.baseline.plugins.BaselineImmutables
import net.kyori.indra.IndraExtension
import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.api.tasks.bundling.AbstractArchiveTask
import org.gradle.api.tasks.compile.JavaCompile
import org.gradle.kotlin.dsl.apply
import org.gradle.kotlin.dsl.configure
Expand All @@ -30,5 +31,10 @@ class BasePlugin : Plugin<Project> {
// -options: ignore java 8 deprecation with jdk 21
options.compilerArgs.addAll(listOf("-Xlint:-processing,-classfile,-serial,-options", "-Werror"))
}

target.tasks.withType<AbstractArchiveTask>().configureEach {
isPreserveFileTimestamps = false
isReproducibleFileOrder = true
}
}
}

0 comments on commit 3b5ff64

Please sign in to comment.