2022-11-17 17:22:51 +08:00
|
|
|
import java.nio.charset.Charset
|
|
|
|
import java.nio.charset.StandardCharsets
|
|
|
|
|
2022-10-09 00:49:26 +08:00
|
|
|
plugins {
|
|
|
|
id 'java'
|
2022-11-17 22:34:14 +08:00
|
|
|
id 'java-library'
|
2022-10-09 00:49:26 +08:00
|
|
|
id 'maven-publish'
|
|
|
|
}
|
|
|
|
|
|
|
|
repositories {
|
|
|
|
mavenCentral()
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
|
|
|
|
/** provide javax.annotations.Nonnull annotations etc. */
|
|
|
|
compileOnly "com.github.spotbugs:spotbugs-annotations:${lib_spotbugs_v}"
|
|
|
|
|
|
|
|
testImplementation "org.junit.jupiter:junit-jupiter-api:${lib_junit_v}"
|
|
|
|
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${lib_junit_v}"
|
|
|
|
|
2022-11-28 18:03:21 +08:00
|
|
|
testImplementation project(":sekai-meta")
|
2022-11-21 16:26:17 +08:00
|
|
|
|
2022-10-09 00:49:26 +08:00
|
|
|
}
|
|
|
|
|
2022-11-17 17:22:51 +08:00
|
|
|
final JavaVersion proj_java = JavaVersion.VERSION_17
|
|
|
|
final Charset proj_source_encoding = StandardCharsets.UTF_8
|
|
|
|
|
|
|
|
group 'cc.sukazyo'
|
|
|
|
version projVersion
|
|
|
|
|
2022-10-09 00:49:26 +08:00
|
|
|
test {
|
|
|
|
useJUnitPlatform()
|
|
|
|
}
|
|
|
|
|
|
|
|
java {
|
|
|
|
|
2022-11-17 17:22:51 +08:00
|
|
|
sourceCompatibility proj_java
|
|
|
|
targetCompatibility proj_java
|
2022-10-09 00:49:26 +08:00
|
|
|
|
|
|
|
withSourcesJar()
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2022-11-17 17:22:51 +08:00
|
|
|
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()
|
|
|
|
}
|
|
|
|
|
2022-10-09 00:49:26 +08:00
|
|
|
publishing {
|
|
|
|
repositories{
|
|
|
|
maven {
|
|
|
|
name 'builds'
|
|
|
|
url publishLocalArchiveRepoUrl
|
|
|
|
}
|
|
|
|
maven {
|
|
|
|
name '-ws-'
|
|
|
|
url publishMvnRepoUrl
|
|
|
|
credentials {
|
|
|
|
username publishMvnRepoUsername
|
|
|
|
password publishMvnRepoPassword
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
publications {
|
|
|
|
main (MavenPublication) {
|
|
|
|
from components.java
|
|
|
|
groupId = project.group
|
|
|
|
artifactId = project.archivesBaseName
|
|
|
|
version = project.version
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|