Skip to content

Commit

Permalink
Mark publication
Browse files Browse the repository at this point in the history
  • Loading branch information
shedaniel committed Oct 26, 2024
2 parents ddb48e2 + 7dd3627 commit 2f2be7e
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 18 deletions.
1 change: 1 addition & 0 deletions .github/workflows/curseforge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ on:
- 14.x-1.20.4
- 15.x-1.20.5
- 16.x-1.21
- 17.x-1.21.2

jobs:
build:
Expand Down
13 changes: 7 additions & 6 deletions fabric/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -100,16 +100,17 @@ publishing {
publication.artifactId = rootProject.name + "-" + projectName + "-fabric"
project.afterEvaluate {
def project = project(":" + projectName)
publication.artifact(project.fakeJar) { classifier null }
def normalArtifact, sourceArtifact
publication.artifact(project.fakeJar) { classifier null; normalArtifact = it }
def remapSourcesJarTask = project.remapSourcesJar
publication.artifact(remapSourcesJarTask) {
builtBy remapSourcesJarTask
classifier "sources"
sourceArtifact = it
}

// Hack to inherit the dependencies without inheriting the artifacts
publication.setArtifacts(publication.artifacts)
from components.java
publication.setArtifacts([normalArtifact, sourceArtifact])
}
}
}
Expand All @@ -120,7 +121,7 @@ unifiedPublishing {
project {
displayName = "[Fabric $rootProject.supported_version] v$project.version"
releaseType = rootProject.unstable == "false" ? "release" : "alpha"
gameVersions = ["1.21.1"]
gameVersions = ["1.21.2", "1.21.3"]
gameLoaders = ["fabric"]
changelog = rootProject.releaseChangelog

Expand All @@ -145,7 +146,7 @@ unifiedPublishing {
curseforge {
token = project.hasProperty("danielshe_curse_api_key") ? project.property("danielshe_curse_api_key") : System.getenv("danielshe_curse_api_key")
id = "310111"
gameVersions.addAll "Java 17", project.minecraft_version
gameVersions.addAll "Java 17"
}
}

Expand All @@ -154,7 +155,7 @@ unifiedPublishing {
token = project.hasProperty("modrinth_key") ? project.property("modrinth_key") : System.getenv("modrinth_key")
id = "nfn13YXA"
version = "$project.version+$project.name"
gameVersions.addAll project.minecraft_version
// gameVersions.addAll project.minecraft_version
}
}
}
Expand Down
7 changes: 4 additions & 3 deletions forge/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -210,15 +210,16 @@ publishing {
project.afterEvaluate {
def project = project(":" + projectName)
remapSrg.inputFile = project.fakeForgeJar.archiveFile
publication.artifact(remapSrg) { classifier null }
def normalArtifact, sourceArtifact
publication.artifact(remapSrg) { classifier null; normalArtifact = it }
publication.artifact(remapSrgSourcesJar) {
builtBy remapSrgSourcesJar
classifier "sources"
sourceArtifact = it
}

// Hack to inherit the dependencies without inheriting the artifacts
publication.setArtifacts(publication.artifacts)
from components.java
publication.setArtifacts([normalArtifact, sourceArtifact])
}
}
}
Expand Down
15 changes: 6 additions & 9 deletions neoforge/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -147,15 +147,16 @@ publishing {
project.afterEvaluate {
def project = project(":" + projectName)
remapMojang.inputFile = project.fakeForgeJar.archiveFile
publication.artifact(remapMojang) { classifier null }
def normalArtifact, sourceArtifact
publication.artifact(remapMojang) { classifier null; normalArtifact = it }
publication.artifact(remapMojangSourcesJar) {
builtBy remapMojangSourcesJar
classifier "sources"
sourceArtifact = it
}

// Hack to inherit the dependencies without inheriting the artifacts
publication.setArtifacts(publication.artifacts)
from components.java
publication.setArtifacts([normalArtifact, sourceArtifact])
}
}
}
Expand All @@ -167,7 +168,7 @@ unifiedPublishing {
project {
displayName = "[NeoForge $rootProject.supported_version] v$project.version"
releaseType = "beta"
gameVersions = ["1.21.1"]
gameVersions = ["1.21.2", "1.21.3"]
gameLoaders = ["neoforge"]
changelog = rootProject.releaseChangelog

Expand All @@ -189,7 +190,6 @@ unifiedPublishing {
token = project.hasProperty("danielshe_curse_api_key") ? project.property("danielshe_curse_api_key") : System.getenv("danielshe_curse_api_key")
id = "310111"
gameVersions.addAll "Java 17"
gameVersions.addAll project.minecraft_version

relations {
depends "roughly-enough-items-hacks"
Expand All @@ -202,14 +202,13 @@ unifiedPublishing {
token = project.hasProperty("modrinth_key") ? project.property("modrinth_key") : System.getenv("modrinth_key")
id = "nfn13YXA"
version = "$project.version+$project.name"
gameVersions.addAll project.minecraft_version
}
}
}
project {
displayName = "[NeoForge $rootProject.supported_version] v$project.version"
releaseType = "release"
gameVersions = ["1.21.1"]
gameVersions = ["1.21.2", "1.21.3"]
gameLoaders = ["neoforge"]
changelog = rootProject.releaseChangelog

Expand All @@ -231,7 +230,6 @@ unifiedPublishing {
token = project.hasProperty("danielshe_curse_api_key") ? project.property("danielshe_curse_api_key") : System.getenv("danielshe_curse_api_key")
id = "567899"
gameVersions.addAll "Java 17"
gameVersions.addAll project.minecraft_version
}
}

Expand All @@ -241,7 +239,6 @@ unifiedPublishing {
token = project.hasProperty("modrinth_key") ? project.property("modrinth_key") : System.getenv("modrinth_key")
id = "OM4ZYSws"
version = "$project.version+$project.name"
gameVersions.addAll project.minecraft_version
}
}
}
Expand Down

0 comments on commit 2f2be7e

Please sign in to comment.