aboutsummaryrefslogtreecommitdiff
path: root/spark-paper/build.gradle
diff options
context:
space:
mode:
Diffstat (limited to 'spark-paper/build.gradle')
-rw-r--r--spark-paper/build.gradle75
1 files changed, 75 insertions, 0 deletions
diff --git a/spark-paper/build.gradle b/spark-paper/build.gradle
new file mode 100644
index 0000000..be0aa0d
--- /dev/null
+++ b/spark-paper/build.gradle
@@ -0,0 +1,75 @@
+plugins {
+ id 'io.github.goooler.shadow' version '8.1.7'
+ id 'maven-publish'
+}
+
+tasks.withType(JavaCompile) {
+ // override, compile targeting J21
+ options.release = 21
+}
+
+tasks.jar {
+ archiveClassifier = 'original'
+}
+
+dependencies {
+ implementation project(':spark-common')
+ compileOnly 'io.papermc.paper:paper-api:1.21-R0.1-SNAPSHOT'
+}
+
+repositories {
+ maven { url "https://repo.papermc.io/repository/maven-public/" }
+}
+
+shadowJar {
+ archiveFileName = "spark-${project.pluginVersion}-paper.jar"
+ archiveClassifier = ''
+
+ dependencies {
+ exclude(dependency('net.kyori:^(?!adventure-text-feature-pagination).+$'))
+ exclude(dependency('net.bytebuddy:byte-buddy-agent'))
+ }
+
+ relocate 'net.kyori.adventure.text.feature.pagination', 'me.lucko.spark.paper.lib.adventure.pagination'
+ relocate 'com.google.protobuf', 'me.lucko.spark.paper.lib.protobuf'
+ relocate 'org.objectweb.asm', 'me.lucko.spark.paper.lib.asm'
+ relocate 'one.profiler', 'me.lucko.spark.paper.lib.asyncprofiler'
+ relocate 'me.lucko.bytesocks.client', 'me.lucko.spark.paper.lib.bytesocks'
+ relocate 'org.java_websocket', 'me.lucko.spark.paper.lib.bytesocks.ws'
+
+ // nest common classes beneath the paper package to avoid conflicts with spark-bukkit
+ relocate 'me.lucko.spark.common', 'me.lucko.spark.paper.common'
+ relocate 'me.lucko.spark.proto', 'me.lucko.spark.paper.proto'
+ relocate 'spark-native', 'spark-paper-native'
+
+ exclude 'module-info.class'
+ exclude 'META-INF/maven/**'
+ exclude 'META-INF/proguard/**'
+ exclude '**/*.proto'
+ exclude '**/*.proto.bin'
+ exclude '**/*.proto'
+ exclude '**/*.proto.bin'
+}
+
+artifacts {
+ archives shadowJar
+ shadow shadowJar
+}
+
+publishing {
+ //repositories {
+ // maven {
+ // url = 'https://oss.sonatype.org/content/repositories/snapshots'
+ // credentials {
+ // username = sonatypeUsername
+ // password = sonatypePassword
+ // }
+ // }
+ //}
+ publications {
+ shadow(MavenPublication) { publication ->
+ project.shadow.component(publication)
+ version = "${project.pluginVersion}-SNAPSHOT"
+ }
+ }
+}