3
0
Mirror von https://github.com/Moulberry/AxiomPaperPlugin.git synchronisiert 2024-11-09 01:50:05 +01:00
AxiomPaperPlugin/build.gradle.kts

88 Zeilen
2.7 KiB
Plaintext

2021-07-08 14:30:01 +02:00
plugins {
2023-07-02 12:23:44 +02:00
`java-library`
alias(libs.plugins.paperweight.userdev)
alias(libs.plugins.run.paper) // Adds runServer and runMojangMappedServer tasks for testing
2023-07-02 12:23:44 +02:00
// Shades and relocates dependencies into our plugin jar. See https://imperceptiblethoughts.com/shadow/introduction/
alias(libs.plugins.shadow)
2021-07-08 14:30:01 +02:00
}
2023-09-06 04:34:53 +02:00
group = "com.moulberry.axiom"
version = "3.3.0"
2023-07-02 12:23:44 +02:00
description = "Serverside component for Axiom on Paper"
2021-07-08 14:30:01 +02:00
2021-11-18 01:55:32 +01:00
java {
2024-05-04 17:13:31 +02:00
// Configure the java toolchain. This allows gradle to auto-provision JDK 21 on systems that only have JDK 11 installed for example.
toolchain.languageVersion.set(JavaLanguageVersion.of(21))
2023-07-02 12:23:44 +02:00
}
repositories {
2023-09-06 07:31:10 +02:00
mavenCentral()
2024-05-03 13:23:31 +02:00
maven("https://repo.viaversion.com")
2023-07-02 12:23:44 +02:00
maven("https://s01.oss.sonatype.org/content/repositories/snapshots/")
maven("https://jitpack.io")
2023-09-06 07:31:10 +02:00
maven("https://repo.papermc.io/repository/maven-public/")
maven("https://maven.enginehub.org/repo/")
maven("https://maven.playpro.com")
2021-11-18 01:55:32 +01:00
}
2021-07-08 14:30:01 +02:00
dependencies {
paperweight.paperDevBundle(libs.versions.paper)
implementation(libs.reflection.remapper)
implementation(libs.cloud.paper)
2023-09-06 04:34:53 +02:00
// Zstd Compression Library
implementation(libs.zstd.jni)
2023-09-06 07:31:10 +02:00
2024-05-03 13:23:31 +02:00
// ViaVersion support
compileOnly(libs.viaversion.api)
2024-05-03 13:23:31 +02:00
2023-09-06 07:31:10 +02:00
// WorldGuard support
compileOnly(libs.worldguard.bukkit)
2023-09-06 07:31:10 +02:00
// PlotSquared support
implementation(platform(libs.bom.newest))
compileOnly(libs.plotsquared.core)
compileOnly(libs.plotsquared.bukkit) { isTransitive = false }
// CoreProtect support
compileOnly(libs.coreprotect)
2021-07-08 14:30:01 +02:00
}
tasks {
2023-07-02 12:23:44 +02:00
// Configure reobfJar to run when invoking the build task
assemble {
dependsOn(reobfJar)
}
compileJava {
options.encoding = Charsets.UTF_8.name() // We want UTF-8 for everything
// Set the release flag. This configures what version bytecode the compiler will emit, as well as what JDK APIs are usable.
// See https://openjdk.java.net/jeps/247 for more information.
2024-05-04 17:13:31 +02:00
options.release.set(21)
2023-07-02 12:23:44 +02:00
}
javadoc {
options.encoding = Charsets.UTF_8.name() // We want UTF-8 for everything
}
processResources {
filteringCharset = Charsets.UTF_8.name() // We want UTF-8 for everything
val props = mapOf(
"name" to project.name,
"version" to project.version,
"description" to project.description,
2024-06-26 20:45:25 +02:00
"apiVersion" to "1.21"
2023-07-02 12:23:44 +02:00
)
inputs.properties(props)
filesMatching("plugin.yml") {
expand(props)
}
}
shadowJar {
// helper function to relocate a package into our package
fun reloc(pkg: String) = relocate(pkg, "com.moulberry.axiom.dependency.$pkg")
reloc("xyz.jpenilla:reflection-remapper")
2023-04-20 17:42:59 +02:00
}
2021-07-08 14:30:01 +02:00
}