diff --git a/build.gradle b/build.gradle index 283271b..ef07d8a 100644 --- a/build.gradle +++ b/build.gradle @@ -3,6 +3,7 @@ plugins { id 'idea' id "architectury-plugin" version "3.4-SNAPSHOT" id "dev.architectury.loom" version "1.5-SNAPSHOT" apply false + id "maven-publish" } architectury { @@ -14,6 +15,7 @@ version = mod_version subprojects { apply plugin: "dev.architectury.loom" + apply plugin: "maven-publish" loom { silentMojangMappingsLicense() @@ -23,6 +25,19 @@ subprojects { minecraft "com.mojang:minecraft:${rootProject.minecraft_version}" mappings loom.officialMojangMappings() } + + publishing { + repositories { + maven { + name = "GitHubPackages" + url = uri("https://maven.pkg.github.com/der-fruhling/create-train-perspective") + credentials { + username = project.findProperty("gpr.user") ?: System.getenv("USERNAME") + password = project.findProperty("gpr.key") ?: System.getenv("TOKEN") + } + } + } + } } allprojects { @@ -54,17 +69,4 @@ allprojects { java { withSourcesJar() } - - publishing { - repositories { - maven { - name = "GitHubPackages" - url = "https://maven.pkg.github.com/der-fruhling/create-train-perspective" - credentials { - username = System.getenv("GITHUB_ACTOR") - password = System.getenv("GITHUB_TOKEN") - } - } - } - } } diff --git a/common/build.gradle b/common/build.gradle index c0d0bf1..853e939 100644 --- a/common/build.gradle +++ b/common/build.gradle @@ -2,6 +2,9 @@ architectury { common(rootProject.enabled_platforms.split(",")) } +group = rootProject.group +version = rootProject.version + 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