Resolve gravestone mod from curseforge maven
This commit is contained in:
35
build.gradle
35
build.gradle
@@ -29,16 +29,19 @@ repositories {
|
||||
}
|
||||
}
|
||||
|
||||
// Modrinth maven (used for gravestone-mod jar to compile against).
|
||||
// Curse Maven — used to fetch gravestone-mod by CurseForge file ID. The Modrinth
|
||||
// maven was the obvious choice but it doesn't reliably serve POMs for gravestone
|
||||
// 1.21.1 builds, which makes Gradle resolution fail with a 404. Curse Maven serves
|
||||
// both the JAR and (synthesized) POM, so it just works.
|
||||
exclusiveContent {
|
||||
forRepository {
|
||||
maven {
|
||||
name = 'Modrinth'
|
||||
url = 'https://api.modrinth.com/maven'
|
||||
name = 'Curse Maven'
|
||||
url = 'https://cursemaven.com'
|
||||
}
|
||||
}
|
||||
filter {
|
||||
includeGroup 'maven.modrinth'
|
||||
includeGroup 'curse.maven'
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -88,14 +91,24 @@ dependencies {
|
||||
}
|
||||
}
|
||||
|
||||
// Gravestone Mod — compile against the published jar from Modrinth.
|
||||
// The shadowed jar contains relocated classes under de.maxhenkel.gravestone.*
|
||||
// We only reference de.maxhenkel.gravestone.events.DeathEvents (target) and
|
||||
// de.maxhenkel.gravestone.GraveUtils (referenced in @At target descriptor).
|
||||
compileOnly "maven.modrinth:gravestone-mod:${gravestone_version}"
|
||||
// Gravestone Mod via Curse Maven. The string format is:
|
||||
// curse.maven:<slug>-<projectId>:<fileId>
|
||||
// - <slug> = "gravestone-mod" (CurseForge URL slug)
|
||||
// - <projectId> = 238551 (gravestone's CurseForge project ID — fixed for the project)
|
||||
// - <fileId> = the specific build's CurseForge file ID (changes per release)
|
||||
//
|
||||
// The default fileId 7099728 is the 1.21.1-1.0.19 NeoForge build, the same one
|
||||
// used by the Corpse-Gravestone-Curios-Compat reference mod for 1.21.1. To use a
|
||||
// newer 1.21.1 build, look it up at
|
||||
// https://www.curseforge.com/minecraft/mc-mods/gravestone-mod/files (filter to 1.21.1)
|
||||
// and copy the numeric ID from the file's URL into the gravestone_curse_file_id
|
||||
// property in gradle.properties. The mixin will keep working as long as gravestone
|
||||
// doesn't refactor DeathEvents.playerDeath's signature (stable through 1.0.37).
|
||||
compileOnly "curse.maven:gravestone-mod-238551:${gravestone_curse_file_id}"
|
||||
|
||||
// Optional fallback if the modrinth jar can't be resolved: drop a gravestone JAR
|
||||
// into a 'libs/' folder in this project root, then uncomment the next line.
|
||||
// Optional fallback if Curse Maven is unreachable from your network: drop a
|
||||
// gravestone JAR into a 'libs/' folder at the project root, comment out the
|
||||
// compileOnly above, and uncomment this:
|
||||
// compileOnly fileTree(dir: 'libs', include: ['*.jar'])
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user