[ci skip] Use commit timestamp instead of build time in manifest (#6161)

This commit is contained in:
Jason 2021-07-11 23:24:48 -07:00 committed by GitHub
parent 70ea1b2e2b
commit 40b34615b0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 16 additions and 15 deletions

View file

@ -20,10 +20,10 @@ index 67fb370cad6924895a6b27052dbd5c1767e3f0c9..3e05459f27c4c5697ae65da504d67a6a
/.project
diff --git a/build.gradle.kts b/build.gradle.kts
new file mode 100644
index 0000000000000000000000000000000000000000..e76b9f9012c7ba7253f455fa92b3891737f4ffd3
index 0000000000000000000000000000000000000000..f99a9702fe9282a1982c25cd0c003d8df80e97de
--- /dev/null
+++ b/build.gradle.kts
@@ -0,0 +1,145 @@
@@ -0,0 +1,146 @@
+import com.github.jengelman.gradle.plugins.shadow.transformers.Log4j2PluginsCacheFileTransformer
+import com.github.jengelman.gradle.plugins.shadow.transformers.Transformer
+import io.papermc.paperweight.util.Git
@ -72,11 +72,12 @@ index 0000000000000000000000000000000000000000..e76b9f9012c7ba7253f455fa92b38917
+ val git = Git(rootProject.layout.projectDirectory.path)
+ val gitHash = git("rev-parse", "--short=7", "HEAD").getText().trim()
+ val implementationVersion = System.getenv("BUILD_NUMBER") ?: "\"$gitHash\""
+ val date = git("show", "-s", "--format=%ci", gitHash).getText().trim() // Paper
+ attributes(
+ "Main-Class" to "org.bukkit.craftbukkit.Main",
+ "Implementation-Title" to "CraftBukkit",
+ "Implementation-Version" to "git-Paper-$implementationVersion",
+ "Implementation-Vendor" to SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'").format(Date()), // Paper
+ "Implementation-Vendor" to date, // Paper
+ "Specification-Title" to "Bukkit",
+ "Specification-Version" to project.version,
+ "Specification-Vendor" to "Bukkit Team",