2022-12-07 13:27:32 +08:00
|
|
|
import java.nio.charset.Charset
|
|
|
|
import java.nio.charset.StandardCharsets
|
|
|
|
|
2022-12-05 22:16:06 +08:00
|
|
|
plugins {
|
|
|
|
id 'java'
|
|
|
|
}
|
|
|
|
|
|
|
|
repositories {
|
|
|
|
mavenCentral()
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2022-12-07 13:27:32 +08:00
|
|
|
|
|
|
|
compileOnly "com.github.spotbugs:spotbugs-annotations:${lib_spotbugs_v}"
|
|
|
|
|
2022-12-05 22:16:06 +08:00
|
|
|
testImplementation "org.junit.jupiter:junit-jupiter-api:${lib_junit_v}"
|
|
|
|
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${lib_junit_v}"
|
2022-12-07 13:27:32 +08:00
|
|
|
|
2022-12-05 22:16:06 +08:00
|
|
|
}
|
|
|
|
|
2022-12-07 13:27:32 +08:00
|
|
|
final JavaVersion proj_java = JavaVersion.VERSION_17
|
|
|
|
final Charset proj_source_encoding = StandardCharsets.UTF_8
|
|
|
|
|
|
|
|
group 'cc.sukazyo'
|
|
|
|
version projVersion
|
|
|
|
|
2022-12-05 22:16:06 +08:00
|
|
|
test {
|
|
|
|
useJUnitPlatform()
|
2022-12-07 13:27:32 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
java {
|
|
|
|
|
|
|
|
sourceCompatibility proj_java
|
|
|
|
targetCompatibility proj_java
|
|
|
|
|
|
|
|
withSourcesJar()
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
tasks.withType(JavaCompile) {
|
|
|
|
options.encoding = proj_source_encoding.name()
|
|
|
|
}
|
|
|
|
|
|
|
|
tasks.withType(Javadoc) {
|
|
|
|
options.encoding = proj_source_encoding.name()
|
|
|
|
options.docEncoding = proj_source_encoding.name()
|
|
|
|
options.charSet = proj_source_encoding.name()
|
|
|
|
}
|