|
| 1 | +plugins { |
| 2 | + id("java") |
| 3 | + id("eclipse") |
| 4 | + id("org.jetbrains.gradle.plugin.idea-ext") version "1.1.8" |
| 5 | + id("com.gradleup.shadow") version "9.3.0" |
| 6 | + id("xyz.jpenilla.run-velocity") version "2.3.1" |
| 7 | +} |
| 8 | + |
| 9 | +group = "dev.colbster937" |
| 10 | +version = "1.1.3" |
| 11 | +description = "A reimplementation of OriginBlacklist for EaglerXServer" |
| 12 | + |
| 13 | +val targetJavaVersion = 17 |
| 14 | + |
| 15 | +repositories { |
| 16 | + mavenCentral() |
| 17 | + maven("https://repo.papermc.io/repository/maven-public/") |
| 18 | + maven("https://oss.sonatype.org/content/groups/public/") |
| 19 | + maven("https://hub.spigotmc.org/nexus/content/repositories/public/") |
| 20 | + maven("https://repo.md-5.net/content/repositories/releases/") |
| 21 | + maven("https://repo.aikar.co/nexus/content/groups/aikar/") |
| 22 | + maven("https://repo.lax1dude.net/repository/releases/") |
| 23 | +} |
| 24 | + |
| 25 | +dependencies { |
| 26 | + compileOnly("com.velocitypowered:velocity-api:3.4.0-SNAPSHOT") |
| 27 | + annotationProcessor("com.velocitypowered:velocity-api:3.4.0-SNAPSHOT") |
| 28 | + compileOnly("org.bukkit:bukkit:1.8-R0.1-SNAPSHOT") |
| 29 | + compileOnly("net.md-5:bungeecord-api:1.8-SNAPSHOT") |
| 30 | + compileOnly("net.lax1dude.eaglercraft.backend:api-velocity:1.0.0") |
| 31 | + compileOnly("net.lax1dude.eaglercraft.backend:api-bungee:1.0.0") |
| 32 | + compileOnly("net.lax1dude.eaglercraft.backend:api-bukkit:1.0.0") |
| 33 | + implementation("org.yaml:snakeyaml:2.2") |
| 34 | + implementation("net.kyori:adventure-text-serializer-legacy:4.20.0") |
| 35 | + implementation("net.kyori:adventure-text-minimessage:4.20.0") |
| 36 | + implementation("com.github.seancfoley:ipaddress:5.3.4") |
| 37 | +} |
| 38 | + |
| 39 | +tasks { |
| 40 | + named<xyz.jpenilla.runvelocity.task.RunVelocity>("runVelocity") { |
| 41 | + velocityVersion("3.4.0-SNAPSHOT") |
| 42 | + } |
| 43 | +} |
| 44 | + |
| 45 | +java { |
| 46 | + toolchain.languageVersion.set(JavaLanguageVersion.of(targetJavaVersion)) |
| 47 | +} |
| 48 | + |
| 49 | +tasks.processResources { |
| 50 | + filesMatching(listOf("plugin.yml", "bungee.yml", "velocity-plugin.json", "Base.java")) { |
| 51 | + expand( |
| 52 | + mapOf( |
| 53 | + "version" to project.version, |
| 54 | + "description" to project.description |
| 55 | + ) |
| 56 | + ) |
| 57 | + } |
| 58 | +} |
| 59 | + |
| 60 | +tasks.shadowJar { |
| 61 | + relocate("org.yaml.snakeyaml", "dev.colbster937.shaded.snakeyaml") |
| 62 | + relocate("inet.ipaddr", "dev.colbster937.shaded.ipaddr") |
| 63 | + archiveVersion.set("") |
| 64 | + archiveClassifier.set("") |
| 65 | +} |
| 66 | + |
| 67 | +tasks.withType<JavaCompile>().configureEach { |
| 68 | + options.encoding = "UTF-8" |
| 69 | + options.release.set(targetJavaVersion) |
| 70 | +} |
0 commit comments