-
Notifications
You must be signed in to change notification settings - Fork 840
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
97 lines (77 loc) · 2.45 KB
/
build.gradle.kts
File metadata and controls
97 lines (77 loc) · 2.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
import org.jackhuang.hmcl.gradle.ci.CheckUpdate
import org.jackhuang.hmcl.gradle.docs.UpdateDocuments
import org.jackhuang.hmcl.gradle.l10n.ParseLanguageSubtagRegistry
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<JavaCompile> {
options.encoding = "UTF-8"
}
@Suppress("UnstableApiUsage")
tasks.withType<Checkstyle> {
maxHeapSize.set("2g")
}
configure<CheckstyleExtension> {
sourceSets = setOf()
}
dependencies {
"testImplementation"(rootProject.libs.junit.jupiter)
"testRuntimeOnly"("org.junit.platform:junit-platform-launcher")
}
tasks.withType<Test> {
useJUnitPlatform()
testLogging.showStandardStreams = true
}
configure<PublishingExtension> {
publications {
create<MavenPublication>("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<ParseLanguageSubtagRegistry>("parseLanguageSubtagRegistry") {
languageSubtagRegistryFile.set(layout.projectDirectory.file("language-subtag-registry"))
sublanguagesFile.set(layout.projectDirectory.file("HMCLCore/src/main/resources/assets/lang/sublanguages.csv"))
defaultScriptFile.set(layout.projectDirectory.file("HMCLCore/src/main/resources/assets/lang/default_script.csv"))
}
tasks.register<UpdateDocuments>("updateDocuments") {
documentsDir.set(layout.projectDirectory.dir("docs"))
}
tasks.register<CheckUpdate>("checkUpdateDev") {
uri.set("https://ci.huangyuhui.net/job/HMCL-nightly")
}
tasks.register<CheckUpdate>("checkUpdateStable") {
uri.set("https://ci.huangyuhui.net/job/HMCL-stable")
}