mirror of
https://github.com/CivMC/Civ.git
synced 2026-07-18 00:20:44 +00:00
68 lines
1.7 KiB
Groovy
68 lines
1.7 KiB
Groovy
pluginManager.withPlugin("java-library") {
|
|
java {
|
|
toolchain {
|
|
languageVersion = JavaLanguageVersion.of(17)
|
|
}
|
|
withSourcesJar()
|
|
withJavadocJar()
|
|
}
|
|
|
|
tasks.withType(JavaCompile).configureEach {
|
|
options.encoding = "UTF-8"
|
|
options.release = 17
|
|
}
|
|
|
|
tasks.withType(ProcessResources).configureEach {
|
|
filteringCharset = "UTF-8"
|
|
}
|
|
|
|
// TODO
|
|
// tasks.withType(Test).configureEach {
|
|
// useJUnitPlatform()
|
|
// testLogging {
|
|
// events(*TestLogEvent.values())
|
|
// exceptionFormat = TestExceptionFormat.FULL
|
|
// showCauses = true
|
|
// showExceptions = true
|
|
// showStackTraces = true
|
|
// }
|
|
// }
|
|
}
|
|
|
|
pluginManager.withPlugin("maven-publish") {
|
|
def githubActor = System.getenv("GITHUB_ACTOR")
|
|
def githubToken = System.getenv("GITHUB_TOKEN")
|
|
|
|
publishing {
|
|
repositories {
|
|
if (githubActor && githubToken) {
|
|
maven {
|
|
name = "GitHubPackages"
|
|
url = "https://maven.pkg.github.com/CivMC/Civ"
|
|
credentials {
|
|
username = githubActor
|
|
password = githubToken
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
publications {
|
|
mavenJava(MavenPublication) {
|
|
from components.java
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
pluginManager.withPlugin("com.gradle.enterprise") {
|
|
gradleEnterprise {
|
|
buildScan {
|
|
if (System.getenv("CI")) {
|
|
it.tag("CI")
|
|
it.termsOfServiceUrl = "https://gradle.com/terms-of-service"
|
|
it.termsOfServiceAgree = "yes"
|
|
}
|
|
}
|
|
}
|
|
} |