diff --git a/build.gradle b/build.gradle index 99bfa1f..68acba0 100644 --- a/build.gradle +++ b/build.gradle @@ -1,12 +1,10 @@ plugins { id "architectury-plugin" version "3.4-SNAPSHOT" id "dev.architectury.loom" version "1.7-SNAPSHOT" apply false - id "me.modmuss50.mod-publish-plugin" version "0.7.4" apply false + id "me.modmuss50.mod-publish-plugin" version "0.7.+" id "com.github.johnrengelman.shadow" version "8.1.+" apply false } -apply plugin: "me.modmuss50.mod-publish-plugin" - architectury.minecraft = minecraft_version Map modProperties() { @@ -17,8 +15,9 @@ Map modProperties() { ] } -import groovy.json.JsonSlurper import groovy.json.JsonOutput +import groovy.json.JsonSlurper +import net.fabricmc.loom.task.AbstractRemapJarTask subprojects { apply plugin: "dev.architectury.loom" @@ -33,7 +32,6 @@ subprojects { processResources { def properties = modProperties() - inputs.properties properties filesMatching(["META-INF/*mods.toml", "fabric.mod.json", "pack.mcmeta"]) { @@ -47,6 +45,10 @@ subprojects { } } } + + tasks.withType(AbstractRemapJarTask).configureEach { + archiveAppendix = project.name + } } allprojects { @@ -89,15 +91,15 @@ publishMods { def fabric = publishOptions { file = fabricJar - additionalFiles.from forgeSources + additionalFiles.from fabricSources version = project.version + "-fabric" - displayName = "[Fabric 1.16-1.20.4] $display_name $project.version" + displayName = "[Fabric 1.16-1.20.4] $display_name $version" modLoaders.addAll "fabric", "quilt" } def forge = publishOptions { file = forgeJar - additionalFiles.from fabricSources + additionalFiles.from forgeSources version = project.version + "-forge" displayName = "[Forge 1.17-1.20.4] $display_name $version" modLoaders.add "forge" @@ -114,7 +116,6 @@ publishMods { accessToken = providers.environmentVariable('MODRINTH_TOKEN') dryRun = !accessToken.present projectId = modrinth_id - version } def curseOptions = curseforgeOptions { diff --git a/common/build.gradle b/common/build.gradle index 3af4fd1..84e6454 100644 --- a/common/build.gradle +++ b/common/build.gradle @@ -7,19 +7,6 @@ architectury { //loom.mixin.useLegacyMixinAp = false // doesnt remap Block -//tasks.withType(TransformingTask).configureEach { -// transformers.set transformers.get().findAll { !(it instanceof RemapInjectables) } -//} - -sourcesJar { - archiveClassifier.set archiveClassifier.get() + '-common' -} - -jar { - archiveClassifier.set 'common' - manifest.attributes.clear() -} - dependencies { // We depend on fabric loader here to use the fabric @Environment annotations and get the mixin dependencies // Do NOT use other classes from fabric loader diff --git a/fabric/build.gradle b/fabric/build.gradle index b78f507..828b9f2 100644 --- a/fabric/build.gradle +++ b/fabric/build.gradle @@ -54,20 +54,20 @@ dependencies { shadowJar { configurations = [project.configurations.shadowCommon] archiveClassifier = "dev-shadow" + destinationDirectory.set destinationDirectory.dir('../devlibs').get() + exclude "architectury_inject*/**" } remapJar { injectAccessWidener = true inputFile.set shadowJar.archiveFile dependsOn shadowJar - archiveClassifier.set('fabric') } sourcesJar { def commonSources = project(":common").sourcesJar dependsOn commonSources from commonSources.archiveFile.map { zipTree(it) } - archiveClassifier.set archiveClassifier.get() + '-fabric' } components.java { diff --git a/forge/build.gradle b/forge/build.gradle index 419c14c..3726d84 100644 --- a/forge/build.gradle +++ b/forge/build.gradle @@ -61,6 +61,8 @@ processResources { shadowJar { configurations = [project.configurations.shadowCommon] archiveClassifier = "dev-shadow" + destinationDirectory.set destinationDirectory.dir('../devlibs').get() + exclude "architectury_inject*/**" } import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar @@ -87,14 +89,12 @@ build.dependsOn tasks.register("neoforgeJar", ShadowJar) { remapJar { inputFile.set shadowJar.archiveFile dependsOn shadowJar - archiveClassifier.set 'forge' } sourcesJar { def commonSources = project(":common").sourcesJar dependsOn commonSources from commonSources.archiveFile.map { zipTree(it) } - archiveClassifier.set archiveClassifier.get() + '-forge' } components.java {