import org.jackhuang.hmcl.gradle.ci.CheckUpdate import org.jackhuang.hmcl.gradle.docs.UpdateDocuments 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")) } System.getenv("MAVEN_CENTRAL_REPO").let { repo -> if (repo.isNullOrBlank()) mavenCentral() else maven(url = repo) } maven(url = "https://jitpack.io") maven(url = "https://libraries.minecraft.net") } tasks.withType { options.encoding = "UTF-8" } configure { sourceSets = setOf() } dependencies { "testImplementation"(rootProject.libs.junit.jupiter) "testRuntimeOnly"("org.junit.platform:junit-platform-launcher") } tasks.withType { useJUnitPlatform() testLogging.showStandardStreams = true } configure { publications { create("maven") { from(components["java"]) } } repositories { mavenLocal() } } tasks.register("checkstyle") { dependsOn(tasks["checkstyleMain"], tasks["checkstyleTest"]) } } org.jackhuang.hmcl.gradle.javafx.JavaFXUtils.register(rootProject) defaultTasks("clean", "build") tasks.register("updateDocuments") { documentsDir.set(layout.projectDirectory.dir("docs")) } tasks.register("checkUpdateDev") { tagPrefix.set("v") api.set("https://ci.huangyuhui.net/job/HMCL/lastSuccessfulBuild/api/json") } tasks.register("checkUpdateStable") { tagPrefix.set("release-") api.set("https://ci.huangyuhui.net/job/HMCL-stable/lastSuccessfulBuild/api/json") }