move project to Java 21 and the 1.21 Paper API

This commit is contained in:
Jack
2024-07-23 23:04:32 -04:00
parent c4c5ca7558
commit d2796f7992
10 changed files with 28 additions and 26 deletions

View File

@@ -1,33 +1,33 @@
plugins {
id 'java'
id 'com.github.johnrengelman.shadow' version '8.1.1'
id 'io.github.goooler.shadow' version '8.1.8' // TODO: Temporarily using fork
}
group = 'io.github.Jack1424'
version = '1.4.0'
group = 'io.github.jack1424'
version = '2.0.0-DEV'
repositories {
mavenCentral()
maven {
name = 'papermc-repo'
url = 'https://repo.papermc.io/repository/maven-public/'
name = "papermc-repo"
url = "https://repo.papermc.io/repository/maven-public/"
}
maven {
name = 'sonatype'
url = 'https://oss.sonatype.org/content/groups/public/'
name = "sonatype"
url = "https://oss.sonatype.org/content/groups/public/"
}
}
dependencies {
compileOnly("io.papermc.paper:paper-api:1.21-R0.1-SNAPSHOT")
implementation("org.bstats:bstats-bukkit:3.0.2")
implementation("org.bukkit:bukkit:1.13-R0.1-SNAPSHOT")
}
shadowJar {
relocate('org.bstats', 'io.github.jack1424.realtimeweather')
}
def targetJavaVersion = 11
def targetJavaVersion = 21
java {
def javaVersion = JavaVersion.toVersion(targetJavaVersion)
sourceCompatibility = javaVersion
@@ -38,8 +38,10 @@ java {
}
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8'
if (targetJavaVersion >= 10 || JavaVersion.current().isJava10Compatible()) {
options.release = targetJavaVersion
options.release.set(targetJavaVersion)
}
}