diff --git a/fabric/build.gradle b/fabric/build.gradle index 966ae070..5500b7f2 100644 --- a/fabric/build.gradle +++ b/fabric/build.gradle @@ -55,6 +55,16 @@ remapJar { classifier null } +task renameJarForPublication(type: Zip, dependsOn: remapJar) { + from remapJar.archiveFile.map { zipTree(it) } + extension "jar" + metadataCharset "UTF-8" + destinationDirectory = base.libsDirectory + classifier project.name +} + +assemble.dependsOn renameJarForPublication + jar { classifier "dev" } @@ -105,7 +115,7 @@ unifiedPublishing { changelog = releaseChangelog() gameVersions = ["1.18.2"] gameLoaders = ["fabric", "quilt"] - mainPublication remapJar + mainPublication renameJarForPublication relations { depends { curseforge = "fabric-api" diff --git a/forge/build.gradle b/forge/build.gradle index b5a8dff0..90a0b864 100644 --- a/forge/build.gradle +++ b/forge/build.gradle @@ -68,6 +68,16 @@ remapJar { classifier null } +task renameJarForPublication(type: Zip, dependsOn: remapJar) { + from remapJar.archiveFile.map { zipTree(it) } + extension "jar" + metadataCharset "UTF-8" + destinationDirectory = base.libsDirectory + classifier project.name +} + +assemble.dependsOn renameJarForPublication + jar { classifier "dev" } @@ -118,7 +128,7 @@ unifiedPublishing { changelog = releaseChangelog() gameVersions = ["1.18.2"] gameLoaders = ["forge"] - mainPublication remapJar + mainPublication renameJarForPublication var CURSE_API_KEY = project.findProperty("CURSE_API_KEY") ?: System.getenv("CURSE_API_KEY") if (CURSE_API_KEY != null) { diff --git a/testmod-common/build.gradle b/testmod-common/build.gradle index 94d51010..8b7e33cc 100644 --- a/testmod-common/build.gradle +++ b/testmod-common/build.gradle @@ -2,7 +2,7 @@ dependencies { // We depend on fabric loader here to use the fabric @Environment annotations // Do NOT use other classes from fabric loader modImplementation "net.fabricmc:fabric-loader:${rootProject.fabric_loader_version}" - implementation project(":common") + implementation project(path: ":common", configuration: "namedElements") } architectury {