mirror of
https://github.com/wisplite/crystalline-sky.git
synced 2026-10-30 13:32:18 -05:00
128 lines
3.1 KiB
Groovy
128 lines
3.1 KiB
Groovy
//file:noinspection GroovyAssignabilityCheck
|
|
//file:noinspection GroovyAccessibility
|
|
plugins {
|
|
id "maven-publish"
|
|
alias libs.plugins.loom
|
|
alias libs.plugins.minotaur
|
|
}
|
|
|
|
boolean inCI = System.getenv("GITHUB_RUN_NUMBER") != null
|
|
|
|
version = "$modVersion+$branchName"
|
|
base.archivesName = project.slug
|
|
|
|
repositories {
|
|
exclusiveContent {
|
|
forRepository {
|
|
//noinspection ForeignDelegate
|
|
maven {
|
|
name 'Modrinth'
|
|
url "https://api.modrinth.com/maven"
|
|
}
|
|
}
|
|
filter {
|
|
includeGroup "maven.modrinth"
|
|
}
|
|
}
|
|
exclusiveContent {
|
|
forRepository {
|
|
//noinspection ForeignDelegate
|
|
maven {
|
|
name 'Terraformers'
|
|
url "https://maven.terraformersmc.com/"
|
|
}
|
|
}
|
|
filter {
|
|
includeGroup "com.terraformersmc"
|
|
}
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
minecraft libs.mc
|
|
mappings loom.layered {
|
|
it.mappings variantOf(libs.yarn) { classifier "v2" }
|
|
it.mappings file("custom_mappings.tiny")
|
|
}
|
|
|
|
modImplementation libs.fl
|
|
modImplementation libs.fapi
|
|
|
|
if (!inCI) {
|
|
modRuntimeOnly libs.mm
|
|
}
|
|
|
|
include(implementation(annotationProcessor(libs.mixinextras.get())))
|
|
}
|
|
|
|
processResources {
|
|
final Map<String, String> meta = [
|
|
version : version,
|
|
modId : modId,
|
|
modName : modName,
|
|
modDescription: modDescription,
|
|
homepage : "https://modrinth.com/mod/${slug}",
|
|
issues : "https://github.com/${user}/${slug}/issues",
|
|
sources : "https://github.com/${user}/${slug}",
|
|
license : license,
|
|
authors : authors.split(", ").join("\",\n \""),
|
|
contributors : contributors.split(", ").join("\",\n \""),
|
|
members : "${authors}${contributors ? ". Contributions by ${contributors}." : ""}",
|
|
mc : compatibleVersions.split(", ")[0],
|
|
fl : libs.versions.fl.get(),
|
|
fapi : libs.versions.fapi.get(),
|
|
]
|
|
inputs.properties meta
|
|
filesMatching("*.mod.json") { expand(meta) }
|
|
filesMatching("META-INF/*mods.toml") { expand(meta) }
|
|
|
|
// don't add development or to-do files into built jar
|
|
exclude("**/*.bbmodel", "**/*.lnk", "**/*.xcf", "**/*.blend", "**/*.blend1")
|
|
}
|
|
|
|
loom {
|
|
runs.configureEach {
|
|
vmArg("-XX:+AllowEnhancedClassRedefinition")
|
|
vmArg("-XX:+IgnoreUnrecognizedVMOptions")
|
|
vmArg("-Dmixin.debug.export=true")
|
|
vmArg("-Dfabric-tag-conventions-v2.missingTagTranslationWarning=VERBOSE")
|
|
}
|
|
}
|
|
|
|
tasks.withType(JavaCompile).configureEach {
|
|
it.options.encoding = "UTF-8"
|
|
it.options.release = 21
|
|
}
|
|
|
|
java {
|
|
withSourcesJar()
|
|
sourceCompatibility = JavaVersion.VERSION_21
|
|
targetCompatibility = JavaVersion.VERSION_21
|
|
}
|
|
|
|
|
|
publishing {
|
|
repositories {
|
|
}
|
|
publications {
|
|
mavenJava(MavenPublication) {
|
|
from components.java
|
|
}
|
|
}
|
|
}
|
|
|
|
modrinth {
|
|
token = "$System.env.MODRINTH_TOKEN"
|
|
projectId = slug
|
|
versionNumber = project.version
|
|
versionType = System.getenv().getOrDefault("RELEASE_TYPE", "release")
|
|
uploadFile = remapJar
|
|
gameVersions = compatibleVersions.split(", ").toList()
|
|
loaders = compatibleLoaders.split(", ").toList()
|
|
changelog = "$System.env.CHANGELOG"
|
|
syncBodyFrom = "<!--DO NOT EDIT MANUALLY: synced from gh readme-->\n" + rootProject.file("README.md").text
|
|
dependencies {
|
|
required.version "fabric-api", libs.versions.fapi.get()
|
|
}
|
|
}
|