2022-01-11 14:52:39 +01:00
|
|
|
plugins {
|
2022-07-05 12:50:26 +02:00
|
|
|
java
|
|
|
|
`java-library`
|
|
|
|
id("com.diffplug.spotless") version "6.1.2"
|
2022-01-11 14:52:39 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
group = "de.bluecolored.bluemap.api"
|
|
|
|
|
|
|
|
val apiVersion: String by project
|
|
|
|
version = apiVersion
|
|
|
|
|
2022-01-16 14:19:43 +01:00
|
|
|
val javaTarget = 11
|
2022-01-11 14:52:39 +01:00
|
|
|
java {
|
2022-07-05 12:50:26 +02:00
|
|
|
sourceCompatibility = JavaVersion.toVersion(javaTarget)
|
|
|
|
targetCompatibility = JavaVersion.toVersion(javaTarget)
|
2022-01-11 14:52:39 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
repositories {
|
2022-07-05 12:50:26 +02:00
|
|
|
mavenCentral()
|
2022-01-11 14:52:39 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2022-07-05 12:50:26 +02:00
|
|
|
api ("com.flowpowered:flow-math:1.0.3")
|
|
|
|
implementation ("com.google.code.gson:gson:2.8.0")
|
|
|
|
compileOnly ("org.jetbrains:annotations:23.0.0")
|
2022-01-11 14:52:39 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
spotless {
|
2022-07-05 12:50:26 +02:00
|
|
|
java {
|
|
|
|
target ("src/*/java/**/*.java")
|
2022-01-11 14:52:39 +01:00
|
|
|
|
2022-07-05 12:50:26 +02:00
|
|
|
licenseHeaderFile("LICENSE_HEADER")
|
|
|
|
indentWithSpaces()
|
|
|
|
trimTrailingWhitespace()
|
|
|
|
}
|
2022-01-11 14:52:39 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
tasks.withType(JavaCompile::class).configureEach {
|
2022-07-05 12:50:26 +02:00
|
|
|
options.apply {
|
|
|
|
encoding = "utf-8"
|
|
|
|
}
|
2022-01-11 14:52:39 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
tasks.withType(AbstractArchiveTask::class).configureEach {
|
2022-07-05 12:50:26 +02:00
|
|
|
isReproducibleFileOrder = true
|
|
|
|
isPreserveFileTimestamps = false
|
2022-01-11 14:52:39 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
tasks.javadoc {
|
2022-07-05 12:50:26 +02:00
|
|
|
options {
|
|
|
|
(this as? StandardJavadocDocletOptions)?.apply {
|
|
|
|
links(
|
|
|
|
"https://docs.oracle.com/javase/8/docs/api/"
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
2022-01-11 14:52:39 +01:00
|
|
|
}
|