Fix gradle to compile 1.17 nms with Java 16

This commit is contained in:
OmerBenGera 2021-06-11 22:16:18 +03:00
parent e9341f373e
commit ec7f9214ff
4 changed files with 25 additions and 3 deletions

View File

@ -1,7 +1,6 @@
plugins {
id 'java'
id 'maven'
id 'com.github.johnrengelman.shadow' version '6.1.0'
id 'com.github.johnrengelman.shadow' version '7.0.0'
id 'maven-publish'
}
@ -14,6 +13,11 @@ subprojects {
repositories {
maven { url 'https://repo.bg-software.com/repository/nms/' }
maven { url 'https://repo.bg-software.com/repository/common/' }
}
dependencies {
compileOnly 'com.bgsoftware.common.reflection:ReflectionUtils:latest'
}
shadowJar {
@ -30,6 +34,7 @@ repositories {
maven { url 'https://repo.bg-software.com/repository/nms/' }
maven { url 'https://repo.bg-software.com/repository/api/' }
maven { url 'https://repo.bg-software.com/repository/public-libs/' }
maven { url 'https://repo.bg-software.com/repository/common/' }
String mavenUsername = project.hasProperty('mavenUsername') ? project.mavenUsername : System.getenv('mavenUsername');
String mavenPassword = project.hasProperty('mavenPassword') ? project.mavenPassword : System.getenv('mavenPassword');
@ -50,6 +55,8 @@ dependencies {
implementation project(":API")
implementation fileTree("archive")
implementation 'com.bgsoftware.common.reflection:ReflectionUtils:latest'
// Spigot jars
compileOnly "org.spigotmc:v1_7_R3:latest"
compileOnly 'org.spigotmc:v1_16_R3-Tuinity:latest'

View File

@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.0-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

View File

@ -26,3 +26,5 @@ include 'v1_15_R1'
include 'v1_16_R1'
include 'v1_16_R2'
include 'v1_16_R3'
include 'v1_17_R1'

13
v1_17_R1/build.gradle Normal file
View File

@ -0,0 +1,13 @@
group 'v1_17_R1'
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(16))
}
}
dependencies {
compileOnly "org.spigotmc:v1_17_R1:latest"
compileOnly project(":API")
compileOnly parent
}