Skip to content

Commit

Permalink
Java 11-16 fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
hevav committed Dec 11, 2023
1 parent 698dd9a commit b43629e
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 9 deletions.
5 changes: 5 additions & 0 deletions api/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ plugins {
id("maven-publish")
}

compileJava() {
getOptions().getRelease().set(11)
getOptions().setEncoding("UTF-8")
}

dependencies() {
compileOnly("com.velocitypowered:velocity-api:$velocityVersion")
api("net.elytrium.commons:config:$elytriumCommonsVersion")
Expand Down
3 changes: 0 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ allprojects() {
compileJava() {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
getOptions().getRelease().set(11)

getOptions().setEncoding("UTF-8")
}

repositories() {
Expand Down
17 changes: 11 additions & 6 deletions plugin/build.gradle
Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
//file:noinspection GroovyAssignabilityCheck

buildscript {
dependencies {
buildscript() {
dependencies() {
classpath("commons-io:commons-io:2.6")
classpath("com.google.guava:guava:28.0-jre")
}
}

plugins {
plugins() {
id("java")
id("com.github.johnrengelman.shadow").version("7.1.2")
}

dependencies {
compileJava() {
getOptions().getRelease().set(11)
getOptions().setEncoding("UTF-8")
}

dependencies() {
implementation(project(":api"))
implementation("net.elytrium.commons:config:$elytriumCommonsVersion")
implementation("net.elytrium.commons:utils:$elytriumCommonsVersion")
Expand All @@ -38,7 +43,7 @@ dependencies {
annotationProcessor("com.github.bsideup.jabel:jabel-javac-plugin:1.0.0")
}

shadowJar {
shadowJar() {
getArchiveClassifier().set("")
setArchiveFileName("limboapi-${project.version}.jar")

Expand All @@ -52,7 +57,7 @@ shadowJar {
relocate("net.elytrium.commons.config", "net.elytrium.limboapi.thirdparty.commons.config")
}

license {
license() {
matching(includes: ["**/mcprotocollib/**"]) {
setHeader(getRootProject().file("HEADER_MCPROTOCOLLIB.txt"))
}
Expand Down

0 comments on commit b43629e

Please sign in to comment.