Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-12-29 01:20:15 +01:00
75db1a7cdf
Bump Java target to 17, clean up using its new language features Remove unnecessary checked exception throwing Remove deprecated code
46 Zeilen
1.2 KiB
Plaintext
46 Zeilen
1.2 KiB
Plaintext
plugins {
|
|
`java-library`
|
|
`maven-publish`
|
|
}
|
|
|
|
tasks {
|
|
// Variable replacements
|
|
processResources {
|
|
filesMatching(listOf("plugin.yml", "META-INF/sponge_plugins.json", "fabric.mod.json", "bungee.yml")) {
|
|
expand("version" to project.version, "description" to project.description)
|
|
}
|
|
}
|
|
javadoc {
|
|
options.encoding = Charsets.UTF_8.name()
|
|
(options as StandardJavadocDocletOptions).addStringOption("Xdoclint:none", "-quiet")
|
|
}
|
|
compileJava {
|
|
options.encoding = Charsets.UTF_8.name()
|
|
options.compilerArgs.addAll(listOf("-nowarn", "-Xlint:-unchecked", "-Xlint:-deprecation"))
|
|
}
|
|
test {
|
|
useJUnitPlatform()
|
|
}
|
|
}
|
|
|
|
java {
|
|
javaTarget(17)
|
|
withSourcesJar()
|
|
}
|
|
|
|
publishing {
|
|
publications.create<MavenPublication>("mavenJava") {
|
|
groupId = rootProject.group as String
|
|
artifactId = project.name
|
|
version = rootProject.version as String
|
|
}
|
|
repositories.maven {
|
|
name = "Via"
|
|
url = uri("https://repo.viaversion.com/")
|
|
credentials(PasswordCredentials::class)
|
|
authentication {
|
|
create<BasicAuthentication>("basic")
|
|
}
|
|
}
|
|
}
|