Skip to content

Commit bd5f4e5

Browse files
authored
Drop Built-Date, Built-JDK, Created-By from plugin manifests (#7578)
`new Date()` was evaluated at configuration time on every Gradle invocation, so each plugin jar's manifest embedded the build wall-clock. That made the jars non-deterministic byte-for-byte across builds and broke Gradle's configuration cache for plugin tasks. The companion `Built-JDK` and `Created-By` attributes were dropped at the same time because: 1. Nothing in the codebase reads any of these three attributes (`grep -rn 'Built-Date|Built-JDK|Created-By'` returns only the writer line). They were inert metadata. 2. The main `pcgen.jar` manifest does not carry equivalents, so the plugin jars were the odd ones out. 3. Real reproducibility would also require pinning archive timestamps (`preserveFileTimestamps = false`), file ordering (`reproducibleFileOrder = true`), and the JDK/Gradle versions across environments — for *all* archive tasks in the project, not just the plugin jars. Keeping `Built-JDK`/`Created-By` on plugin jars only would be inconsistent: it would leak environment info from a subset of artifacts without buying real reproducibility. If a future PR pursues full reproducible builds, it can apply those settings project-wide and re-introduce diagnostic attributes uniformly. Verified: two clean builds of `:jarExportPlugins` now produce byte-identical jars; configuration cache stores successfully for `:jarAllPlugins`.
1 parent 1dc4cd3 commit bd5f4e5

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

code/gradle/plugins.gradle

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,7 @@ def createJarTask = {taskName, archiveName, description, includePattern ->
2626
attributes(
2727
"Implementation-Title": "PCGen ${taskName.replace('jar', '').toLowerCase()} plugins",
2828
"Implementation-Version": project.version,
29-
"Class-Path": "lib/pcgen.jar",
30-
"Built-Date": new Date(),
31-
"Built-JDK": "${System.getProperty('java.vm.version')} (${System.getProperty('java.vendor')})",
32-
"Created-By": "Gradle ${project.gradle.gradleVersion}"
29+
"Class-Path": "lib/pcgen.jar"
3330
)
3431
}
3532

0 commit comments

Comments
 (0)