2023-11-12 12:30:11 +02:00
|
|
|
// Adjust the output jar name here
|
|
|
|
archivesBaseName = "${mod_name.replace(" ", "")}-Forge-${minecraft_version}"
|
2022-05-12 00:18:53 +02:00
|
|
|
|
2023-11-12 12:30:11 +02:00
|
|
|
dependencies {
|
2024-05-01 18:28:52 +02:00
|
|
|
// Compat
|
2024-05-09 19:08:53 +02:00
|
|
|
// NOT AVAILABLE ON FORGE modImplementation("maven.modrinth:vanishmod:${vanishmod}")
|
2022-05-12 00:18:53 +02:00
|
|
|
|
2025-01-14 15:53:58 +02:00
|
|
|
modImplementation("me.shedaniel.cloth:cloth-config-forge:${cloth_config}")
|
2025-02-01 14:06:08 +02:00
|
|
|
modImplementation("unimaven.curseforge:playerrevive-266890:${player_revive}")
|
|
|
|
modImplementation("unimaven.curseforge:creativecore-257814:${creative_core}")
|
2025-01-14 15:53:58 +02:00
|
|
|
|
2023-11-12 12:30:11 +02:00
|
|
|
// Do not edit or remove
|
|
|
|
implementation project(":Common")
|
2022-05-12 00:18:53 +02:00
|
|
|
}
|
|
|
|
|
2023-11-12 12:30:11 +02:00
|
|
|
shadowJar {
|
|
|
|
from sourceSets.main.output
|
|
|
|
configurations = [project.configurations.shade]
|
2022-05-12 00:18:53 +02:00
|
|
|
|
2023-11-12 12:30:11 +02:00
|
|
|
dependencies {
|
2024-05-01 18:28:52 +02:00
|
|
|
exclude(dependency('com.google.code.gson:.*'))
|
|
|
|
|
2023-11-12 12:30:11 +02:00
|
|
|
relocate 'me.hypherionmc.moonconfig', 'shadow.hypherionmc.moonconfig'
|
2024-01-01 23:40:13 +02:00
|
|
|
relocate 'me.hypherionmc.mcdiscordformatter', 'shadow.hypherionmc.mcdiscordformatter'
|
2024-05-01 18:28:52 +02:00
|
|
|
relocate 'net.kyori', 'shadow.kyori'
|
2022-05-12 00:18:53 +02:00
|
|
|
}
|
|
|
|
|
2023-11-12 12:30:11 +02:00
|
|
|
setArchiveClassifier('dev-shadow')
|
2024-08-07 21:09:10 +02:00
|
|
|
mergeServiceFiles()
|
2022-05-12 00:18:53 +02:00
|
|
|
}
|
|
|
|
|
2023-11-12 12:30:11 +02:00
|
|
|
/**
|
|
|
|
* ===============================================================================
|
|
|
|
* = DO NOT EDIT BELOW THIS LINE UNLESS YOU KNOW WHAT YOU ARE DOING =
|
|
|
|
* ===============================================================================
|
|
|
|
*/
|
2022-05-12 00:18:53 +02:00
|
|
|
|
2023-11-12 12:30:11 +02:00
|
|
|
unimined.minecraft {
|
|
|
|
minecraftForge {
|
|
|
|
loader forge_version
|
|
|
|
mixinConfig("${mod_id}.mixins.json", "${mod_id}.forge.mixins.json")
|
|
|
|
}
|
2023-06-08 19:13:41 +02:00
|
|
|
}
|
|
|
|
|
2023-11-12 12:30:11 +02:00
|
|
|
remapJar {
|
|
|
|
inputFile.set shadowJar.archiveFile
|
|
|
|
dependsOn shadowJar
|
|
|
|
archiveClassifier.set null
|
2022-05-12 00:18:53 +02:00
|
|
|
}
|
|
|
|
|
2023-11-12 12:30:11 +02:00
|
|
|
jar {
|
|
|
|
archiveClassifier.set "dev"
|
2022-05-12 00:18:53 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
processResources {
|
|
|
|
from project(":Common").sourceSets.main.resources
|
2023-11-12 12:30:11 +02:00
|
|
|
def buildProps = project.properties.clone()
|
2022-05-12 00:18:53 +02:00
|
|
|
|
2023-11-12 12:30:11 +02:00
|
|
|
filesMatching("META-INF/mods.toml") {
|
|
|
|
expand buildProps
|
2022-06-10 18:58:26 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-11-12 12:30:11 +02:00
|
|
|
compileTestJava.enabled = false
|
2023-09-25 20:18:35 +02:00
|
|
|
|
2023-11-12 12:30:11 +02:00
|
|
|
tasks.withType(JavaCompile).configureEach {
|
|
|
|
source(project(":Common").sourceSets.main.allSource)
|
2022-06-10 18:58:26 +02:00
|
|
|
}
|
2022-05-12 00:18:53 +02:00
|
|
|
|
2023-09-25 20:18:35 +02:00
|
|
|
/**
|
|
|
|
* Publishing Config
|
|
|
|
*/
|
2022-05-12 00:18:53 +02:00
|
|
|
publishing {
|
|
|
|
publications {
|
|
|
|
mavenJava(MavenPublication) {
|
|
|
|
artifactId project.archivesBaseName
|
2023-11-12 12:30:11 +02:00
|
|
|
from components.java
|
|
|
|
|
|
|
|
artifact(remapJar) {
|
|
|
|
builtBy remapJar
|
|
|
|
}
|
|
|
|
|
2022-06-10 18:58:26 +02:00
|
|
|
pom.withXml {
|
|
|
|
Node pomNode = asNode()
|
|
|
|
pomNode.dependencies.'*'.findAll() {
|
|
|
|
it.artifactId.text() == 'regutils-joined-fabric' ||
|
|
|
|
it.artifactId.text() == 'core' ||
|
|
|
|
it.artifactId.text() == 'toml'
|
|
|
|
}.each() {
|
|
|
|
it.parent().remove(it)
|
|
|
|
}
|
|
|
|
}
|
2022-05-12 00:18:53 +02:00
|
|
|
}
|
|
|
|
}
|
2023-11-12 12:30:11 +02:00
|
|
|
|
2022-05-12 00:18:53 +02:00
|
|
|
repositories {
|
2024-05-01 14:11:52 +02:00
|
|
|
maven rootProject.orion.getPublishingMaven()
|
2022-05-12 00:18:53 +02:00
|
|
|
}
|
|
|
|
}
|
2022-05-12 00:20:18 +02:00
|
|
|
|
2023-06-08 19:13:41 +02:00
|
|
|
publisher {
|
|
|
|
apiKeys {
|
2024-05-05 23:15:56 +02:00
|
|
|
modrinth(System.getenv("MODRINTH_TOKEN"))
|
|
|
|
curseforge(System.getenv("CURSE_TOKEN"))
|
2024-07-05 21:10:46 +02:00
|
|
|
nightbloom(System.getenv("PLATFORM_KEY"))
|
2023-06-08 19:13:41 +02:00
|
|
|
}
|
|
|
|
|
2024-05-05 23:15:56 +02:00
|
|
|
setCurseID(curse_id)
|
|
|
|
setModrinthID(modrinth_id)
|
2024-07-05 21:10:46 +02:00
|
|
|
setNightbloomID("craterlib")
|
2024-05-05 23:15:56 +02:00
|
|
|
setVersionType("release")
|
2024-11-11 10:55:21 +02:00
|
|
|
setChangelog(rootProject.file("changelog.md"))
|
2024-05-05 23:15:56 +02:00
|
|
|
setProjectVersion("${minecraft_version}-${project.version}")
|
|
|
|
setDisplayName("[Forge 1.20.6] CraterLib - ${project.version}")
|
|
|
|
setGameVersions("1.20.6")
|
|
|
|
setLoaders("forge")
|
|
|
|
setArtifact(remapJar)
|
|
|
|
setCurseEnvironment("both")
|
2024-06-13 19:01:48 +02:00
|
|
|
setIsManualRelease(true)
|
2025-01-14 15:53:58 +02:00
|
|
|
|
|
|
|
curseDepends {
|
|
|
|
optional("cloth-config")
|
|
|
|
}
|
|
|
|
|
|
|
|
modrinthDepends {
|
|
|
|
optional("cloth-config")
|
|
|
|
}
|
2023-12-02 15:46:59 +02:00
|
|
|
}
|