satura/build.gradle.kts
loki5512344 b26dfbbade
Satura: каркас мода, ядро, селекция, план, рендер, стратегии постановки и движок
Фазы 0-5: сборка Gradle/Loom, core (события, команды, конфиг), selection/plan/scan,
рендер (перенесён из Atheryx, см. NOTICE.md), стратегии ColumnDrop/BandStack,
HotbarRefill/ClickScheduler, BuildEngine и команды .build.
2026-10-16 10:21:20 +02:00

76 lines
2.2 KiB
Kotlin

plugins {
id("fabric-loom") version "1.18.4"
java
checkstyle
pmd
}
version = property("mod_version") as String
group = property("maven_group") as String
base {
archivesName.set(property("archives_base_name") as String)
}
repositories {
// nether-pathfinder — рантайм-зависимость Baritone (Aethereal) для dev-запусков
maven("https://babbaj.github.io/maven/") {
name = "Babbaj"
}
}
dependencies {
minecraft("com.mojang:minecraft:${property("minecraft_version")}")
mappings("net.fabricmc:yarn:${property("yarn_mappings")}:v2")
modImplementation("net.fabricmc:fabric-loader:${property("loader_version")}")
modImplementation("net.fabricmc.fabric-api:fabric-api:${property("fabric_version")}")
// Baritone (Aethereal): API для компиляции + сам мод в dev-рантайме
compileOnly(files("libs/aethereal-1.21.11.jar"))
modLocalRuntime(files("libs/aethereal-1.21.11.jar"))
modLocalRuntime("dev.babbaj:nether-pathfinder:1.4.1")
testImplementation(platform("org.junit:junit-bom:5.11.4"))
testImplementation("org.junit.jupiter:junit-jupiter")
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
}
java {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
withSourcesJar()
}
tasks.withType<JavaCompile>().configureEach {
options.encoding = "UTF-8"
options.release.set(21)
}
tasks.processResources {
inputs.property("version", project.version)
filesMatching("fabric.mod.json") {
expand("version" to project.version)
}
}
// Правило проекта: файл максимум 200 строк — FileLength (severity=error валит check)
checkstyle {
toolVersion = "10.21.2"
configFile = rootProject.file("config/checkstyle/checkstyle.xml")
}
pmd {
toolVersion = "7.9.0"
isConsoleOutput = true
ruleSetFiles = rootProject.files("config/pmd/pmd.xml")
ruleSets = mutableListOf()
}
tasks.test {
useJUnitPlatform()
}
// Тесты — шумные правила JUnit в PMD (assert-сообщения, число assert) не применяем
tasks.named("pmdTest") {
enabled = false
}