2022-01-15 01:18:02 +01:00
|
|
|
plugins {
|
|
|
|
java
|
|
|
|
`java-library`
|
|
|
|
id("com.diffplug.spotless") version "6.1.2"
|
|
|
|
id ("com.github.node-gradle.node") version "3.0.1"
|
|
|
|
id ("com.github.johnrengelman.shadow") version "7.1.2"
|
|
|
|
}
|
|
|
|
|
2024-04-04 02:07:09 +02:00
|
|
|
group = "de.bluecolored.bluemap"
|
2022-07-30 16:07:10 +02:00
|
|
|
version = System.getProperty("bluemap.version") ?: "?" // set by BlueMapCore
|
2022-01-15 01:18:02 +01:00
|
|
|
|
2024-03-29 13:08:59 +01:00
|
|
|
val javaTarget = 16
|
2022-01-15 01:18:02 +01:00
|
|
|
java {
|
|
|
|
sourceCompatibility = JavaVersion.toVersion(javaTarget)
|
|
|
|
targetCompatibility = JavaVersion.toVersion(javaTarget)
|
|
|
|
}
|
|
|
|
|
|
|
|
repositories {
|
|
|
|
mavenCentral()
|
2024-04-04 02:07:09 +02:00
|
|
|
maven ("https://libraries.minecraft.net")
|
|
|
|
maven ("https://repo.bluecolored.de/releases")
|
2022-01-15 01:18:02 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2024-04-04 02:07:09 +02:00
|
|
|
api ("de.bluecolored.bluemap:BlueMapCommon")
|
2022-01-15 01:18:02 +01:00
|
|
|
|
|
|
|
@Suppress("GradlePackageUpdate")
|
|
|
|
implementation ("commons-cli:commons-cli:1.5.0")
|
|
|
|
|
|
|
|
testImplementation ("org.junit.jupiter:junit-jupiter:5.8.2")
|
|
|
|
testRuntimeOnly ("org.junit.jupiter:junit-jupiter-engine:5.8.2")
|
|
|
|
}
|
|
|
|
|
|
|
|
spotless {
|
|
|
|
java {
|
|
|
|
target ("src/*/java/**/*.java")
|
|
|
|
|
|
|
|
licenseHeaderFile("../../HEADER")
|
|
|
|
indentWithSpaces()
|
|
|
|
trimTrailingWhitespace()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
tasks.withType(JavaCompile::class).configureEach {
|
|
|
|
options.apply {
|
|
|
|
encoding = "utf-8"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
tasks.withType(AbstractArchiveTask::class).configureEach {
|
|
|
|
isReproducibleFileOrder = true
|
|
|
|
isPreserveFileTimestamps = false
|
|
|
|
}
|
|
|
|
|
|
|
|
tasks.test {
|
|
|
|
useJUnitPlatform()
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
tasks.jar {
|
|
|
|
manifest {
|
|
|
|
attributes (
|
|
|
|
"Main-Class" to "de.bluecolored.bluemap.cli.BlueMapCLI"
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
tasks.shadowJar {
|
|
|
|
destinationDirectory.set(file("../../build/release"))
|
2022-07-30 16:07:10 +02:00
|
|
|
archiveFileName.set("BlueMap-${project.version}-${project.name}.jar")
|
2022-01-15 01:18:02 +01:00
|
|
|
|
|
|
|
//relocate ("com.flowpowered.math", "de.bluecolored.shadow.flowpowered.math") //DON"T relocate this, because the API depends on it
|
|
|
|
relocate ("com.google", "de.bluecolored.shadow.google")
|
|
|
|
relocate ("com.typesafe", "de.bluecolored.shadow.typesafe")
|
2024-02-23 21:58:50 +01:00
|
|
|
relocate ("de.bluecolored.bluenbt", "de.bluecolored.shadow.bluenbt")
|
2022-01-15 01:18:02 +01:00
|
|
|
relocate ("org.spongepowered.configurate", "de.bluecolored.shadow.configurate")
|
|
|
|
relocate ("com.github.benmanes.caffeine", "de.bluecolored.shadow.benmanes.caffeine")
|
|
|
|
relocate ("org.aopalliance", "de.bluecolored.shadow.aopalliance")
|
|
|
|
relocate ("javax.inject", "de.bluecolored.shadow.javax.inject")
|
|
|
|
relocate ("javax.annotation", "de.bluecolored.shadow.javax.annotation")
|
|
|
|
relocate ("com.mojang.brigadier", "de.bluecolored.shadow.mojang.brigadier")
|
|
|
|
relocate ("org.checkerframework", "de.bluecolored.shadow.checkerframework")
|
|
|
|
relocate ("org.codehaus", "de.bluecolored.shadow.codehaus")
|
|
|
|
relocate ("io.leangen.geantyref", "de.bluecolored.shadow.geantyref")
|
2023-05-09 22:52:29 +02:00
|
|
|
relocate ("io.airlift", "de.bluecolored.shadow.airlift")
|
2022-01-15 01:18:02 +01:00
|
|
|
relocate ("org.apache.commons", "de.bluecolored.shadow.apache.commons")
|
2024-02-07 23:01:31 +01:00
|
|
|
relocate ("net.jpountz", "de.bluecolored.shadow.jpountz")
|
2022-01-15 01:18:02 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
tasks.register("release") {
|
|
|
|
dependsOn(tasks.shadowJar)
|
|
|
|
}
|
2022-10-24 23:24:41 +02:00
|
|
|
|
|
|
|
tasks.register("publish") {
|
|
|
|
|
|
|
|
}
|