Skip to content

Commit

Permalink
Fixup maven publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
der_frühling committed Apr 9, 2024
1 parent d0379c8 commit 9e4c873
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 13 deletions.
28 changes: 15 additions & 13 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -14,6 +15,7 @@ version = mod_version

subprojects {
apply plugin: "dev.architectury.loom"
apply plugin: "maven-publish"

loom {
silentMojangMappingsLicense()
Expand All @@ -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 {
Expand Down Expand Up @@ -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")
}
}
}
}
}
3 changes: 3 additions & 0 deletions common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9e4c873

Please sign in to comment.