Skip to content

Commit

Permalink
Add "Fabric-Loom-Remap" to fabric api jar manifest
Browse files Browse the repository at this point in the history
  • Loading branch information
mezz committed Aug 19, 2023
1 parent 3d6494b commit e29a94c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
6 changes: 6 additions & 0 deletions FabricApi/build.gradle.kts
Expand Up @@ -47,6 +47,12 @@ tasks.withType<JavaCompile> {
}
}

tasks.withType<Jar> {
manifest {
attributes["Fabric-Loom-Remap"] = true
}
}

dependencies {
minecraft(
group = "com.mojang",
Expand Down
11 changes: 8 additions & 3 deletions build.gradle.kts
Expand Up @@ -59,16 +59,14 @@ subprojects {
}

tasks.withType<Jar> {
val now = java.text.SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ").format(java.util.Date())
manifest {
attributes(mapOf(
"Specification-Title" to modName,
"Specification-Vendor" to modAuthor,
"Specification-Version" to specificationVersion,
"Implementation-Title" to name,
"Implementation-Version" to archiveVersion,
"Implementation-Vendor" to modAuthor,
"Implementation-Timestamp" to now,
"Implementation-Vendor" to modAuthor
))
}
}
Expand Down Expand Up @@ -96,4 +94,11 @@ subprojects {
))
}
}

// Activate reproducible builds
// https://docs.gradle.org/current/userguide/working_with_files.html#sec:reproducible_archives
tasks.withType<AbstractArchiveTask>().configureEach {
isPreserveFileTimestamps = false
isReproducibleFileOrder = true
}
}

0 comments on commit e29a94c

Please sign in to comment.