Files
AnarchyMod/mc-1.21.10/build.gradle.kts
T
AlexProgrammerDEandClaude Opus 4.6 f2b75d0981 Modernize project: migrate to net.blockhost, add CI, metadata, and docs
- Migrate package from me.itskronx11 to net.blockhost across all modules
- Add MIT LICENSE and rewrite README with badges, features, and build instructions
- Add GitHub Actions CI (build.yml) and release automation (release.yml)
- Migrate MC module build files from Groovy to Kotlin DSL (build.gradle.kts)
- Update fabric.mod.json with proper metadata, contact info, and java >=21 dep
- Remove unused fabricApi configureDataGeneration block
- Add .editorconfig and root gradle.properties for shared config
- Set GitHub repo description

Co-Authored-By: Claude Opus 4.6 <[email protected]>
2026-02-21 23:53:50 +01:00

73 lines
1.8 KiB
Kotlin

plugins {
id("fabric-loom") version "1.15.4"
id("maven-publish")
}
val minecraftVersion = property("minecraft_version") as String
val loaderVersion = property("loader_version") as String
val fabricApiVersion = property("fabric_api_version") as String
version = rootProject.version
group = property("maven_group")!!
base {
archivesName.set("anarchymod-${project.name}")
}
repositories {
}
dependencies {
minecraft("com.mojang:minecraft:$minecraftVersion")
mappings(loom.officialMojangMappings())
modImplementation("net.fabricmc:fabric-loader:$loaderVersion")
modImplementation("net.fabricmc.fabric-api:fabric-api:$fabricApiVersion")
implementation(project(":common"))
}
tasks.named<Jar>("jar") {
dependsOn(project(":common").tasks.named("classes"))
from(project(":common").sourceSets["main"].output)
}
tasks.processResources {
inputs.property("version", project.version)
inputs.property("minecraft_version", minecraftVersion)
inputs.property("loader_version", loaderVersion)
filteringCharset = "UTF-8"
filesMatching("fabric.mod.json") {
expand(
"version" to project.version,
"minecraft_version" to minecraftVersion,
"loader_version" to loaderVersion,
"fabric_api_version" to fabricApiVersion
)
}
}
tasks.withType<JavaCompile>().configureEach {
options.encoding = "UTF-8"
options.release.set(21)
}
java {
toolchain.languageVersion.set(JavaLanguageVersion.of(21))
withSourcesJar()
}
tasks.jar {
from("LICENSE") {
rename { "${it}_${base.archivesName.get()}" }
}
}
publishing {
publications {
create<MavenPublication>("mavenJava") {
artifactId = base.archivesName.get()
from(components["java"])
}
}
}