2023-10-03 03:46:28 +02:00
|
|
|
plugins {
|
|
|
|
`java-library`
|
2024-11-12 20:10:51 +01:00
|
|
|
id("com.gradleup.shadow") version "8.3.4"
|
2023-10-03 03:46:28 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
repositories {
|
|
|
|
mavenCentral()
|
|
|
|
maven("https://repo.viaversion.com")
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2024-08-08 11:03:47 +02:00
|
|
|
api("com.google.code.gson:gson:2.11.0")
|
2024-11-12 20:09:42 +01:00
|
|
|
api("com.viaversion:nbt:5.0.1")
|
2024-11-12 20:08:34 +01:00
|
|
|
api("it.unimi.dsi:fastutil:8.5.15")
|
2024-11-12 20:11:54 +01:00
|
|
|
api("ch.qos.logback:logback-classic:1.5.12")
|
2024-10-24 21:11:42 +02:00
|
|
|
compileOnly("org.jetbrains:annotations:26.0.1")
|
2023-10-03 03:46:28 +02:00
|
|
|
// Uncomment to manually run mappings gen in ide
|
2024-10-29 13:25:56 +01:00
|
|
|
// compileOnly(files("server.jar"))
|
2023-12-22 17:45:40 +01:00
|
|
|
|
2024-11-12 20:11:00 +01:00
|
|
|
testImplementation("org.junit.jupiter:junit-jupiter:5.11.3")
|
2023-12-22 17:45:40 +01:00
|
|
|
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
|
2023-10-03 03:46:28 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
group = "com.viaversion"
|
2024-05-13 10:49:35 +02:00
|
|
|
version = "4.1.0"
|
2023-10-03 03:46:28 +02:00
|
|
|
description = "MappingsGenerator"
|
2024-04-03 16:05:37 +02:00
|
|
|
java.sourceCompatibility = JavaVersion.VERSION_21
|
2023-10-03 03:46:28 +02:00
|
|
|
|
|
|
|
tasks {
|
|
|
|
withType<JavaCompile> {
|
|
|
|
options.encoding = "UTF-8"
|
|
|
|
}
|
|
|
|
withType<Javadoc> {
|
|
|
|
options.encoding = "UTF-8"
|
|
|
|
}
|
|
|
|
|
|
|
|
jar {
|
|
|
|
manifest {
|
|
|
|
attributes["Main-Class"] = "com.viaversion.mappingsgenerator.MappingsGenerator"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
shadowJar {
|
|
|
|
archiveClassifier.set("")
|
|
|
|
archiveFileName.set("MappingsGenerator-${project.version}.jar")
|
|
|
|
|
|
|
|
relocate("com.google.gson", "com.viaversion.viaversion.libs.gson")
|
|
|
|
relocate("it.unimi.dsi.fastutil", "com.viaversion.viaversion.libs.fastutil")
|
|
|
|
|
|
|
|
// FastUtil - we only want object and int maps
|
|
|
|
// Object types
|
|
|
|
exclude("it/unimi/dsi/fastutil/*/*Reference*")
|
|
|
|
exclude("it/unimi/dsi/fastutil/*/*Boolean*")
|
|
|
|
exclude("it/unimi/dsi/fastutil/*/*Byte*")
|
|
|
|
exclude("it/unimi/dsi/fastutil/*/*Short*")
|
|
|
|
exclude("it/unimi/dsi/fastutil/*/*Float*")
|
|
|
|
exclude("it/unimi/dsi/fastutil/*/*Double*")
|
|
|
|
exclude("it/unimi/dsi/fastutil/*/*Long*")
|
|
|
|
exclude("it/unimi/dsi/fastutil/*/*Char*")
|
|
|
|
// Map types
|
|
|
|
exclude("it/unimi/dsi/fastutil/*/*Custom*")
|
|
|
|
exclude("it/unimi/dsi/fastutil/*/*Tree*")
|
|
|
|
exclude("it/unimi/dsi/fastutil/*/*Heap*")
|
|
|
|
exclude("it/unimi/dsi/fastutil/*/*Queue*")
|
|
|
|
// Crossing fingers
|
|
|
|
exclude("it/unimi/dsi/fastutil/*/*Big*")
|
|
|
|
exclude("it/unimi/dsi/fastutil/*/*Synchronized*")
|
|
|
|
exclude("it/unimi/dsi/fastutil/*/*Unmodifiable*")
|
|
|
|
}
|
|
|
|
build {
|
|
|
|
dependsOn(shadowJar)
|
|
|
|
}
|
2023-12-22 17:45:40 +01:00
|
|
|
|
|
|
|
test {
|
|
|
|
useJUnitPlatform()
|
|
|
|
}
|
2023-10-03 03:46:28 +02:00
|
|
|
}
|