diff --git a/build.gradle.kts b/build.gradle.kts index d1a181b9da..9f6e66c2ee 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -24,6 +24,10 @@ tasks.withType { options.encoding = "UTF-8" } +// Disable the default publish task if it exists +tasks.replace("publish").dependsOn(":fabric:publish", ":neoforge:publish") +tasks.replace("publishToMavenLocal").dependsOn(":fabric:publishToMavenLocal", ":neoforge:publishToMavenLocal") + tasks.jar { enabled = false } diff --git a/fabric/build.gradle.kts b/fabric/build.gradle.kts index ce75894c4a..4aac3bd3d6 100644 --- a/fabric/build.gradle.kts +++ b/fabric/build.gradle.kts @@ -89,4 +89,16 @@ tasks { } remapJar.get().destinationDirectory = rootDir.resolve("build").resolve("libs") +} + +publishing { + publications { + create("maven") { + groupId = "net.caffeinemc" + artifactId = "sodium-fabric" + version = project.version.toString() + + from(components["java"]) + } + } } \ No newline at end of file diff --git a/neoforge/build.gradle.kts b/neoforge/build.gradle.kts index 3235b1ef56..ca6bd41b6d 100644 --- a/neoforge/build.gradle.kts +++ b/neoforge/build.gradle.kts @@ -73,6 +73,18 @@ dependencies { jarJar(project(":neoforge", "serviceConfig")) } +publishing { + publications { + create("maven") { + groupId = "net.caffeinemc" + artifactId = "sodium-neoforge" + version = project.version.toString() + + from(components["java"]) + } + } +} + tasks.jar { val api = project.project(":common").sourceSets.getByName("api") from(api.output.classesDirs)