mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-04-17 05:40:01 +00:00
gr
This commit is contained in:
@@ -15,17 +15,17 @@ Consider supporting our development by buying Iris on spigot! We work hard to ma
|
||||
|
||||
### Command Line Builds
|
||||
|
||||
1. Install [Java JDK 21](https://www.oracle.com/java/technologies/javase/jdk21-archive-downloads.html)
|
||||
1. Install [Java JDK 25](https://adoptium.net/temurin/releases/?version=25)
|
||||
2. Set the JDK installation path to `JAVA_HOME` as an environment variable.
|
||||
* Windows
|
||||
1. Start > Type `env` and press Enter
|
||||
2. Advanced > Environment Variables
|
||||
3. Under System Variables, click `New...`
|
||||
4. Variable Name: `JAVA_HOME`
|
||||
5. Variable Value: `C:\Program Files\Java\jdk-21.0.1` (verify this exists after installing java don't just copy
|
||||
5. Variable Value: `C:\Program Files\Java\jdk-25` (verify this exists after installing java don't just copy
|
||||
the example text)
|
||||
* MacOS
|
||||
1. Run `/usr/libexec/java_home -V` and look for Java 21
|
||||
1. Run `/usr/libexec/java_home -V` and look for Java 25
|
||||
2. Run `sudo nano ~/.zshenv`
|
||||
3. Add `export JAVA_HOME=$(/usr/libexec/java_home)` as a new line
|
||||
4. Use `CTRL + X`, then Press `Y`, Then `ENTER`
|
||||
|
||||
27
build.gradle
27
build.gradle
@@ -75,12 +75,22 @@ nmsBindings.each { key, value ->
|
||||
apply plugin: JavaPlugin
|
||||
|
||||
def nmsConfig = new Config()
|
||||
nmsConfig.jvm = 21
|
||||
nmsConfig.jvm = 25
|
||||
nmsConfig.version = value
|
||||
nmsConfig.type = Enum.valueOf(nmsTypeClass, 'DIRECT')
|
||||
extensions.extraProperties.set('nms', nmsConfig)
|
||||
plugins.apply(NMSBinding)
|
||||
|
||||
TaskProvider<Download> updateSpecialSource = tasks.register('updateSpecialSource', Download) {
|
||||
src('https://repo1.maven.org/maven2/net/md-5/SpecialSource/1.11.6/SpecialSource-1.11.6-shaded.jar')
|
||||
dest(layout.buildDirectory.file('tools/SpecialSource-1.11.4.jar'))
|
||||
overwrite(true)
|
||||
}
|
||||
|
||||
tasks.named('remap').configure {
|
||||
dependsOn(updateSpecialSource)
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compileOnly(project(':core'))
|
||||
compileOnly(volmLibCoordinate) {
|
||||
@@ -169,7 +179,7 @@ allprojects {
|
||||
|
||||
java {
|
||||
toolchain {
|
||||
languageVersion = JavaLanguageVersion.of(21)
|
||||
languageVersion = JavaLanguageVersion.of(25)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -200,6 +210,7 @@ allprojects {
|
||||
options.compilerArgs.add('-parameters')
|
||||
options.encoding = 'UTF-8'
|
||||
options.debugOptions.debugLevel = 'none'
|
||||
options.release.set(25)
|
||||
}
|
||||
|
||||
tasks.named('javadoc').configure {
|
||||
@@ -219,18 +230,18 @@ allprojects {
|
||||
}
|
||||
}
|
||||
|
||||
if (!JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_21)) {
|
||||
if (!JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_25)) {
|
||||
System.err.println()
|
||||
System.err.println('=========================================================================================================')
|
||||
System.err.println('You must run gradle on Java 21 or newer. You are using ' + JavaVersion.current())
|
||||
System.err.println('You must run gradle on Java 25 or newer. You are using ' + JavaVersion.current())
|
||||
System.err.println()
|
||||
System.err.println('=== For IDEs ===')
|
||||
System.err.println('1. Configure the project for Java 21 toolchain')
|
||||
System.err.println('2. Configure the bundled gradle to use Java 21+ in settings')
|
||||
System.err.println('1. Configure the project for Java 25 toolchain')
|
||||
System.err.println('2. Configure the bundled gradle to use Java 25+ in settings')
|
||||
System.err.println()
|
||||
System.err.println('=== For Command Line (gradlew) ===')
|
||||
System.err.println('1. Install JDK 21 from https://www.oracle.com/java/technologies/javase/jdk21-archive-downloads.html')
|
||||
System.err.println('2. Set JAVA_HOME environment variable to the new jdk installation folder such as C:\\Program Files\\Java\\jdk-21.0.4')
|
||||
System.err.println('1. Install JDK 25 from https://adoptium.net/temurin/releases/?version=25')
|
||||
System.err.println('2. Set JAVA_HOME environment variable to the new jdk installation folder such as C:\\Program Files\\Java\\jdk-25')
|
||||
System.err.println('3. Open a new command prompt window to get the new environment variables if need be.')
|
||||
System.err.println('=========================================================================================================')
|
||||
System.err.println()
|
||||
|
||||
@@ -6,7 +6,7 @@ plugins {
|
||||
|
||||
java {
|
||||
toolchain {
|
||||
languageVersion = JavaLanguageVersion.of(21)
|
||||
languageVersion = JavaLanguageVersion.of(25)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
public class Config {
|
||||
public int jvm = 21;
|
||||
public int jvm = 25;
|
||||
public NMSBinding.Type type = NMSBinding.Type.DIRECT;
|
||||
public String version;
|
||||
}
|
||||
|
||||
@@ -45,6 +45,8 @@ def lib = 'art.arcane.iris.util'
|
||||
String volmLibCoordinate = providers.gradleProperty('volmLibCoordinate')
|
||||
.orElse('com.github.VolmitSoftware:VolmLib:master-SNAPSHOT')
|
||||
.get()
|
||||
String sentryAuthToken = findProperty('sentry.auth.token') as String ?: System.getenv('SENTRY_AUTH_TOKEN')
|
||||
boolean hasSentryAuthToken = sentryAuthToken != null && !sentryAuthToken.isBlank()
|
||||
|
||||
/**
|
||||
* Dependencies.
|
||||
@@ -79,7 +81,7 @@ dependencies {
|
||||
compileOnly(libs.multiverseCore)
|
||||
|
||||
// Shaded
|
||||
implementation('de.crazydev22.slimjar.helper:spigot:2.1.5')
|
||||
implementation('de.crazydev22.slimjar.helper:spigot:2.1.9')
|
||||
implementation(volmLibCoordinate) {
|
||||
changing = true
|
||||
transitive = false
|
||||
@@ -123,14 +125,14 @@ dependencies {
|
||||
|
||||
java {
|
||||
toolchain {
|
||||
languageVersion = JavaLanguageVersion.of(21)
|
||||
languageVersion = JavaLanguageVersion.of(25)
|
||||
}
|
||||
}
|
||||
|
||||
kotlin {
|
||||
jvmToolchain(21)
|
||||
jvmToolchain(25)
|
||||
compilerOptions {
|
||||
jvmTarget.set(JvmTarget.JVM_21)
|
||||
jvmTarget.set(JvmTarget.fromTarget('25'))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -141,7 +143,7 @@ sentry {
|
||||
|
||||
org = 'sentry'
|
||||
projectName = 'iris'
|
||||
authToken = findProperty('sentry.auth.token') as String ?: System.getenv('SENTRY_AUTH_TOKEN')
|
||||
authToken = sentryAuthToken
|
||||
}
|
||||
|
||||
slimJar {
|
||||
@@ -271,6 +273,14 @@ tasks.named('generateSentryBundleIdJava').configure {
|
||||
dependsOn(generateTemplates)
|
||||
}
|
||||
|
||||
tasks.matching { Task task ->
|
||||
task.name.startsWith('sentry') || task.name.startsWith('generateSentry')
|
||||
}.configureEach {
|
||||
onlyIf {
|
||||
hasSentryAuthToken
|
||||
}
|
||||
}
|
||||
|
||||
rootProject.tasks.matching {
|
||||
it.name == 'prepareKotlinBuildScriptModel'
|
||||
}.configureEach {
|
||||
|
||||
@@ -156,19 +156,19 @@ public final class Tasks {
|
||||
|
||||
private static final Task JAVA = Task.of("java", () -> {
|
||||
int version = Iris.getJavaVersion();
|
||||
if (version == 21) {
|
||||
if (version == 25) {
|
||||
return withDiagnostics(Mode.STABLE);
|
||||
}
|
||||
|
||||
if (version > 21) {
|
||||
if (version > 25) {
|
||||
return withDiagnostics(Mode.STABLE,
|
||||
Diagnostic.Logger.INFO.create("Java Runtime"),
|
||||
Diagnostic.Logger.INFO.create("- Running Java " + version + ". Iris is tested primarily on Java 21."));
|
||||
Diagnostic.Logger.INFO.create("- Running Java " + version + ". Iris is tested primarily on Java 25."));
|
||||
}
|
||||
|
||||
return withDiagnostics(Mode.WARNING,
|
||||
Diagnostic.Logger.WARN.create("Unsupported Java version"),
|
||||
Diagnostic.Logger.WARN.create("- Java 21+ is recommended. Current runtime: Java " + version));
|
||||
Diagnostic.Logger.WARN.create("- Java 25+ is recommended. Current runtime: Java " + version));
|
||||
});
|
||||
|
||||
private static final List<Task> TASKS = List.of(
|
||||
|
||||
@@ -5,14 +5,14 @@
|
||||
[versions]
|
||||
# Plugins
|
||||
shadow = "9.0.0-rc1" # https://plugins.gradle.org/plugin/com.gradleup.shadow
|
||||
slimjar = "2.1.5" # https://plugins.gradle.org/plugin/de.crazydev22.slimjar
|
||||
slimjar = "2.1.9" # https://plugins.gradle.org/plugin/de.crazydev22.slimjar
|
||||
download = "5.6.0" # https://plugins.gradle.org/plugin/de.undercouch.download
|
||||
runPaper = "2.3.1" # https://plugins.gradle.org/plugin/xyz.jpenilla.run-paper
|
||||
sentryPlugin = "5.8.0" # https://github.com/getsentry/sentry-android-gradle-plugin
|
||||
grgit = "5.3.2" # https://github.com/ajoberstar/grgit
|
||||
|
||||
# Core Libraries
|
||||
lombok = "1.18.38"
|
||||
lombok = "1.18.44"
|
||||
spigot = "1.21.11-R0.1-SNAPSHOT" # https://hub.spigotmc.org/nexus/repository/snapshots/org/spigotmc/spigot-api/maven-metadata.xml
|
||||
log4j = "2.19.0" # https://central.sonatype.com/artifact/org.apache.logging.log4j/log4j-api
|
||||
adventure-api = "4.24.0" # https://github.com/KyoriPowered/adventure
|
||||
@@ -40,7 +40,7 @@ dom4j = "2.2.0" # https://central.sonatype.com/artifact/org.dom4j/dom4j
|
||||
jaxen = "2.0.0" # https://central.sonatype.com/artifact/jaxen/jaxen
|
||||
|
||||
# Kotlin Runtime
|
||||
kotlin = "2.2.0"
|
||||
kotlin = "2.3.0"
|
||||
kotlin-coroutines = "1.10.2"
|
||||
|
||||
# Third Party Integrations
|
||||
|
||||
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,6 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.2-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-9.1.0-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
||||
Reference in New Issue
Block a user