mirror of
https://github.com/wisplite/crystalline-sky.git
synced 2026-10-30 13:32:18 -05:00
modfest template
This commit is contained in:
@@ -0,0 +1,79 @@
|
||||
//file:noinspection GroovyAssignabilityCheck
|
||||
//file:noinspection GroovyAccessibility
|
||||
plugins {
|
||||
id "maven-publish"
|
||||
alias libs.plugins.loom
|
||||
alias libs.plugins.minotaur
|
||||
}
|
||||
|
||||
version = "$modVersion+$branchName"
|
||||
base.archivesName = project.slug
|
||||
|
||||
repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
minecraft libs.mc
|
||||
mappings variantOf(libs.yarn) { classifier "v2" }
|
||||
|
||||
modImplementation libs.fl
|
||||
modImplementation libs.fapi
|
||||
}
|
||||
|
||||
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) }
|
||||
}
|
||||
|
||||
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
|
||||
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()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user