2021-05-29 09:32:55 +02:00
|
|
|
plugins {
|
|
|
|
`java-library`
|
|
|
|
`maven-publish`
|
|
|
|
}
|
|
|
|
|
|
|
|
tasks {
|
|
|
|
// Variable replacements
|
|
|
|
processResources {
|
2022-01-09 18:58:44 +01:00
|
|
|
filesMatching(listOf("plugin.yml", "META-INF/sponge_plugins.json", "fabric.mod.json", "bungee.yml")) {
|
2021-05-29 09:32:55 +02:00
|
|
|
expand("version" to project.version, "description" to project.description, "url" to "https://github.com/ViaVersion/ViaBackwards")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
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"))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
java {
|
|
|
|
javaTarget(8)
|
|
|
|
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")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|