133 lines
3.3 KiB
Groovy
133 lines
3.3 KiB
Groovy
archivesBaseName = "${mod_name.replace(" ", "")}-Fabric-${minecraft_version}"
|
|
|
|
dependencies {
|
|
// Core
|
|
modImplementation "net.fabricmc.fabric-api:fabric-api:${fabric_api}"
|
|
|
|
shade "me.hypherionmc.moon-config:core:${moon_config}"
|
|
shade "me.hypherionmc.moon-config:toml:${moon_config}"
|
|
shade "com.hypherionmc:rpcsdk:1.0"
|
|
|
|
modImplementation("com.terraformersmc:modmenu:${mod_menu_version}") {
|
|
exclude(group: "net.fabricmc.fabric-api")
|
|
}
|
|
|
|
// Do not edit or remove
|
|
implementation project(":Common")
|
|
}
|
|
|
|
shadowJar {
|
|
from sourceSets.main.output
|
|
configurations = [project.configurations.shade]
|
|
|
|
dependencies {
|
|
relocate 'me.hypherionmc.moonconfig', 'shadow.hypherionmc.moonconfig'
|
|
}
|
|
|
|
setArchiveClassifier('dev-shadow')
|
|
}
|
|
|
|
/**
|
|
* ===============================================================================
|
|
* = DO NOT EDIT BELOW THIS LINE UNLESS YOU KNOW WHAT YOU ARE DOING =
|
|
* ===============================================================================
|
|
*/
|
|
|
|
unimined.minecraft {
|
|
fabric {
|
|
loader fabric_loader
|
|
accessWidener(project(":Common").file("src/main/resources/${mod_id}.aw"))
|
|
}
|
|
}
|
|
|
|
remapJar {
|
|
inputFile.set shadowJar.archiveFile
|
|
dependsOn shadowJar
|
|
archiveClassifier.set null
|
|
}
|
|
|
|
jar {
|
|
archiveClassifier.set "dev"
|
|
}
|
|
|
|
processResources {
|
|
from project(":Common").sourceSets.main.resources
|
|
def buildProps = project.properties.clone()
|
|
|
|
filesMatching(['fabric.mod.json']) {
|
|
expand buildProps
|
|
}
|
|
}
|
|
|
|
compileTestJava.enabled = false
|
|
|
|
tasks.withType(JavaCompile).configureEach {
|
|
source(project(":Common").sourceSets.main.allSource)
|
|
}
|
|
|
|
/**
|
|
* Publishing Config
|
|
*/
|
|
publishing {
|
|
publications {
|
|
mavenJava(MavenPublication) {
|
|
groupId project.group
|
|
artifactId project.archivesBaseName
|
|
version project.version
|
|
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)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
repositories {
|
|
maven {
|
|
url "https://maven.firstdark.dev/" + (project.release ? "releases" : "snapshots")
|
|
credentials {
|
|
username System.getenv("MAVEN_USER")
|
|
password System.getenv("MAVEN_PASS")
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
publisher {
|
|
apiKeys {
|
|
modrinth = System.getenv("MODRINTH_TOKEN")
|
|
curseforge = System.getenv("CURSE_TOKEN")
|
|
}
|
|
|
|
curseID = curse_id
|
|
modrinthID = modrinth_id
|
|
versionType = "release"
|
|
changelog = rootProject.file("changelog-fabric.md")
|
|
version = "${minecraft_version}-${project.version}"
|
|
displayName = "[FABRIC/QUILT 1.20.2] CraterLib - ${project.version}"
|
|
gameVersions = ["1.20.2"]
|
|
loaders = ["fabric", "quilt"]
|
|
artifact = remapJar
|
|
|
|
modrinthDepends {
|
|
required = ["P7dR8mSH"]
|
|
}
|
|
|
|
curseDepends {
|
|
required = ["fabric-api"]
|
|
}
|
|
}
|
|
|
|
publishCurseforge.dependsOn(remapJar)
|
|
publishModrinth.dependsOn(remapJar) |