2025-09-07 15:47:17 +08:00
|
|
|
import org.jackhuang.hmcl.gradle.docs.UpdateDocuments
|
|
|
|
|
|
2022-01-01 13:43:54 +08:00
|
|
|
plugins {
|
|
|
|
|
id("checkstyle")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
group = "org.jackhuang"
|
|
|
|
|
version = "3.0"
|
|
|
|
|
|
|
|
|
|
subprojects {
|
|
|
|
|
apply {
|
|
|
|
|
plugin("java")
|
|
|
|
|
plugin("idea")
|
|
|
|
|
plugin("maven-publish")
|
|
|
|
|
plugin("checkstyle")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
repositories {
|
|
|
|
|
flatDir {
|
|
|
|
|
name = "libs"
|
|
|
|
|
dirs = setOf(rootProject.file("lib"))
|
|
|
|
|
}
|
|
|
|
|
mavenCentral()
|
|
|
|
|
maven(url = "https://jitpack.io")
|
2024-01-08 20:35:46 +08:00
|
|
|
maven(url = "https://libraries.minecraft.net")
|
2022-01-01 13:43:54 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
tasks.withType<JavaCompile> {
|
|
|
|
|
options.encoding = "UTF-8"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
configure<CheckstyleExtension> {
|
|
|
|
|
sourceSets = setOf()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
dependencies {
|
2025-08-01 19:26:11 +08:00
|
|
|
"testImplementation"(rootProject.libs.junit.jupiter)
|
|
|
|
|
"testRuntimeOnly"("org.junit.platform:junit-platform-launcher")
|
2023-01-14 01:48:38 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
tasks.withType<Test> {
|
|
|
|
|
useJUnitPlatform()
|
|
|
|
|
testLogging.showStandardStreams = true
|
2022-01-01 13:43:54 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
configure<PublishingExtension> {
|
|
|
|
|
publications {
|
|
|
|
|
create<MavenPublication>("maven") {
|
|
|
|
|
from(components["java"])
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
repositories {
|
|
|
|
|
mavenLocal()
|
|
|
|
|
}
|
|
|
|
|
}
|
2025-07-31 19:41:02 +08:00
|
|
|
|
|
|
|
|
tasks.register("checkstyle") {
|
|
|
|
|
dependsOn(tasks["checkstyleMain"], tasks["checkstyleTest"])
|
|
|
|
|
}
|
2022-01-01 13:43:54 +08:00
|
|
|
}
|
|
|
|
|
|
2025-05-20 23:55:24 +08:00
|
|
|
org.jackhuang.hmcl.gradle.javafx.JavaFXUtils.register(rootProject)
|
2022-01-23 19:30:21 +08:00
|
|
|
|
2022-01-01 13:43:54 +08:00
|
|
|
defaultTasks("clean", "build")
|
2025-09-07 15:47:17 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
tasks.register<UpdateDocuments>("updateDocuments") {
|
|
|
|
|
documentsDir.set(layout.projectDirectory.dir("docs"))
|
|
|
|
|
}
|