Files
CraterLib/Forge/build.gradle

128 lines
3.3 KiB
Groovy
Raw Normal View History

// Adjust the output jar name here
archivesBaseName = "${mod_name.replace(" ", "")}-Forge-${minecraft_version}"
2022-05-12 00:18:53 +02:00
dependencies {
// Compat
// NOT AVAILABLE ON FORGE modImplementation("maven.modrinth:vanishmod:${vanishmod}")
2022-05-12 00:18:53 +02:00
modImplementation("me.shedaniel.cloth:cloth-config-forge:${cloth_config}")
modImplementation("unimaven.curseforge:playerrevive-266890:${player_revive}")
modImplementation("unimaven.curseforge:creativecore-257814:${creative_core}")
// Do not edit or remove
implementation project(":Common")
2022-05-12 00:18:53 +02:00
}
shadowJar {
from sourceSets.main.output
configurations = [project.configurations.shade]
2022-05-12 00:18:53 +02:00
dependencies {
exclude(dependency('com.google.code.gson:.*'))
relocate 'me.hypherionmc.moonconfig', 'shadow.hypherionmc.moonconfig'
relocate 'me.hypherionmc.mcdiscordformatter', 'shadow.hypherionmc.mcdiscordformatter'
relocate 'net.kyori', 'shadow.kyori'
2022-05-12 00:18:53 +02:00
}
setArchiveClassifier('dev-shadow')
mergeServiceFiles()
2022-05-12 00:18:53 +02:00
}
/**
* ===============================================================================
* = DO NOT EDIT BELOW THIS LINE UNLESS YOU KNOW WHAT YOU ARE DOING =
* ===============================================================================
*/
2022-05-12 00:18:53 +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
}
remapJar {
inputFile.set shadowJar.archiveFile
dependsOn shadowJar
archiveClassifier.set null
2022-05-12 00:18:53 +02:00
}
jar {
archiveClassifier.set "dev"
2022-05-12 00:18:53 +02:00
}
processResources {
from project(":Common").sourceSets.main.resources
def buildProps = project.properties.clone()
2022-05-12 00:18:53 +02:00
filesMatching("META-INF/mods.toml") {
expand buildProps
}
}
compileTestJava.enabled = false
tasks.withType(JavaCompile).configureEach {
source(project(":Common").sourceSets.main.allSource)
}
2022-05-12 00:18:53 +02:00
/**
* Publishing Config
*/
2022-05-12 00:18:53 +02:00
publishing {
publications {
mavenJava(MavenPublication) {
artifactId project.archivesBaseName
from components.java
artifact(remapJar) {
builtBy remapJar
}
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
}
}
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")
setIsManualRelease(true)
curseDepends {
optional("cloth-config")
}
modrinthDepends {
optional("cloth-config")
}
2023-12-02 15:46:59 +02:00
}