45 lines
1.1 KiB
Kotlin
45 lines
1.1 KiB
Kotlin
repositories {
|
|
System.getenv("MAVEN_CENTRAL_REPO").let { repo ->
|
|
if (repo.isNullOrBlank())
|
|
mavenCentral()
|
|
else
|
|
maven(url = repo)
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
implementation(libs.jetbrains.annotations)
|
|
implementation(libs.gson)
|
|
implementation(libs.jna)
|
|
implementation(libs.kala.compress.tar)
|
|
implementation(libs.kala.compress.ar)
|
|
implementation(libs.weburl)
|
|
implementation(libs.jsoup)
|
|
implementation(libs.icu4j)
|
|
implementation("org.apache.maven:maven-artifact:3.9.16")
|
|
|
|
testImplementation(libs.junit.jupiter)
|
|
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
|
|
}
|
|
|
|
java {
|
|
sourceCompatibility = JavaVersion.VERSION_17
|
|
targetCompatibility = JavaVersion.VERSION_17
|
|
}
|
|
|
|
tasks.withType<JavaCompile> {
|
|
options.encoding = "UTF-8"
|
|
}
|
|
|
|
tasks.test {
|
|
useJUnitPlatform()
|
|
// ProjectBuilder injects compatibility classes through java.lang on modular JDKs.
|
|
jvmArgs("--add-opens=java.base/java.lang=ALL-UNNAMED")
|
|
}
|
|
|
|
tasks.processResources {
|
|
into("org/jackhuang/hmcl/gradle/l10n") {
|
|
from(projectDir.resolve("../HMCLCore/src/main/resources/assets/lang/"))
|
|
}
|
|
}
|