Skip to content

Commit

Permalink
Try adding modrinth publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
Gcat101 committed Nov 11, 2024
1 parent 29acc61 commit 859b382
Show file tree
Hide file tree
Showing 3 changed files with 89 additions and 40 deletions.
62 changes: 44 additions & 18 deletions fabric/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id "com.github.johnrengelman.shadow" version "7.0.0"
id "com.matthewprenger.cursegradle" version "1.4.0"
id "me.shedaniel.unified-publishing" version "0.1.+" apply false
}

def ENV = System.getenv()
Expand Down Expand Up @@ -82,24 +82,50 @@ components.java {
}
}

if (ENV.CURSEFORGE_KEY) {
curseforge {
apiKey = ENV.CURSEFORGE_KEY
project {
id = project.curseforge_id_fabric
releaseType = project.curseforge_type
addGameVersion "Fabric"
addGameVersion "1.16.4"
addGameVersion "1.16.5"
mainArtifact(remapJar.archivePath)
relations {
requiredDependency 'rhizo'
requiredDependency 'architectury-api'
requiredDependency 'fabric-api'
optionalDependency 'probejs-legacy'
unifiedPublishing {
project {
releaseType = project.artifact_type
gameVersions = [
"1.16.4",
"1.16.5"
]
gameLoaders = ["fabric", "quilt"]
displayName = "$project.mod_name Fabric $project.version"
// changelog = getGitChangelog()
mainPublication remapJar

relations {
depends {
curseforge = modrinth = "architectury-api"
}
depends {
curseforge = modrinth = "fabric-api"
}
depends {
curseforge = "rhizo"
}

optional {
curseforge = modrinth = "roughly-enough-items"
}
optional {
curseforge = "probejs-legacy"
}
}

if (ENV.CURSEFORGE_KEY) {
curseforge {
token = ENV.CURSEFORGE_KEY
id = project.curseforge_id
}
}

if (ENV.MODRINTH_TOKEN) {
modrinth {
token = ENV.MODRINTH_TOKEN
id = project.modrinth_id
version = "$project.version+$project.name"
}
// changelog = getGitChangelog
// changelogType = 'markdown'
}
}
}
Expand Down
60 changes: 41 additions & 19 deletions forge/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id "com.github.johnrengelman.shadow" version "7.0.0"
id "com.matthewprenger.cursegradle" version "1.4.0"
id "me.shedaniel.unified-publishing" version "0.1.+" apply false
}

def ENV = System.getenv()
Expand Down Expand Up @@ -129,25 +129,47 @@ components.java {
}
}

if (ENV.CURSEFORGE_KEY) {
curseforge {
apiKey = ENV.CURSEFORGE_KEY
project {
id = project.curseforge_id_forge
releaseType = project.curseforge_type
addGameVersion "Forge"
addGameVersion "1.16.4"
addGameVersion "1.16.5"
mainArtifact(remapJar.archivePath)
relations {
requiredDependency 'rhizo'
requiredDependency 'architectury-api'
optionalDependency 'jei'
optionalDependency 'game-stages'
optionalDependency 'probejs-legacy'
unifiedPublishing {
project {
releaseType = project.artifact_type
gameVersions = [
"1.16.4",
"1.16.5"
]
gameLoaders = ["forge"]
displayName = "$project.mod_name Forge $project.version"
// changelog = getGitChangelog()
mainPublication remapJar

relations {
depends {
curseforge = modrinth = "architectury-api"
}
depends {
curseforge = "rhizo"
}

optional {
curseforge = modrinth = "jei"
}
optional {
curseforge = "probejs-legacy"
}
}

if (ENV.CURSEFORGE_KEY) {
curseforge {
token = ENV.CURSEFORGE_KEY
id = project.curseforge_id
}
}

if (ENV.MODRINTH_TOKEN) {
modrinth {
token = ENV.MODRINTH_TOKEN
id = project.modrinth_id
version = "$project.version+$project.name"
}
// changelog = getGitChangelog
// changelogType = 'markdown'
}
}
}
Expand Down
7 changes: 4 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@ org.gradle.caching=true

mod_id=kubejs
archives_base_name=kubejs
mod_name=KesseractJS
mod_version=1605.3.20
maven_group=dev.latvian.mods
mod_author=LatvianModder

curseforge_id_forge=1025372
curseforge_id_fabric=1025372
curseforge_type=release
curseforge_id=1025372
modrinth_id=9s7vCvdT
artifact_type=release

minecraft_version=1.16.5
rhizo_version_forge=5506575
Expand Down

0 comments on commit 859b382

Please sign in to comment.