Skip to content
This repository has been archived by the owner on Jun 19, 2021. It is now read-only.

Commit

Permalink
require java 11
Browse files Browse the repository at this point in the history
bump maven-compiler-plugin while I'm at it

fix Jenkinsfile

whoops

I don't think that's even necessary
  • Loading branch information
Titaniumtown committed Apr 23, 2021
1 parent 342e74b commit f01cf25
Show file tree
Hide file tree
Showing 12 changed files with 115 additions and 10 deletions.
6 changes: 6 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ pipeline {
options { timestamps() }
stages {
stage('Cleanup') {
tools {
jdk "OpenJDK 11"
}
steps {
scmSkip(deleteBuild: true, skipPattern:'.*\\[CI-SKIP\\].*')
sh 'git config --global gc.auto 0'
Expand All @@ -14,6 +17,9 @@ pipeline {
}
}
stage('Init project & submodules') {
tools {
jdk "OpenJDK 11"
}
steps {
withMaven(
maven: '3',
Expand Down
2 changes: 2 additions & 0 deletions PATCHES.md
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,8 @@ This is an overview over all patches that are currently used.
| server | Zombie horse naturally spawn | William Blake Galbreath | |
| server | add config for logging login location | Simon Gardling | |
| server | dont load chunks for physics | Aikar | |
| server | java 11 | Simon Gardling | |
| api | java 11 | Simon Gardling | |
| server | lithium DataTrackerMixin | JellySquid | tr7zw |
| server | lithium HashedList | JellySquid | |
| server | lithium MixinBox | JellySquid | |
Expand Down
6 changes: 3 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ subprojects {
}

java {
if(JavaVersion.VERSION_1_8 > JavaVersion.current()){
error("This build must be run with Java 8 or better")
if(JavaVersion.VERSION_11 > JavaVersion.current()){
error("This build must be run with Java 11 or later")
}
sourceCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.current()
withSourcesJar()
}
Expand Down
11 changes: 10 additions & 1 deletion patches/api/0001-Modify-POM.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Subject: [PATCH] Modify POM


diff --git a/pom.xml b/pom.xml
index 6c200882954adc4831307f3d6dfa3202571fb30b..1bf7c7d0a192f4b05611075537a4d718799190a1 100644
index 6c200882954adc4831307f3d6dfa3202571fb30b..fce4921f723e74eeb8db0d428647143b1c923c68 100644
--- a/pom.xml
+++ b/pom.xml
@@ -3,18 +3,18 @@
Expand Down Expand Up @@ -94,3 +94,12 @@ index 6c200882954adc4831307f3d6dfa3202571fb30b..1bf7c7d0a192f4b05611075537a4d718
</dependency>
</dependencies>

@@ -214,7 +227,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
- <version>3.2.3</version>
+ <version>3.2.4</version>
<executions>
<execution>
<phase>package</phase>
2 changes: 1 addition & 1 deletion patches/api/0003-Add-GameProfileLookupEvent.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Subject: [PATCH] Add GameProfileLookupEvent


diff --git a/pom.xml b/pom.xml
index 1bf7c7d0a192f4b05611075537a4d718799190a1..ce3676f8f8db8cff686d4cdf47b496d51e0af7df 100644
index fce4921f723e74eeb8db0d428647143b1c923c68..72348d16df2965a94ad4a0aaa805b4ceb2a7cfc9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -42,6 +42,10 @@
Expand Down
2 changes: 1 addition & 1 deletion patches/api/0005-Add-NBT-API-as-a-first-class-lib.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Subject: [PATCH] Add NBT API as a first-class lib


diff --git a/pom.xml b/pom.xml
index ce3676f8f8db8cff686d4cdf47b496d51e0af7df..4689aa0788afb7fe5b7c8d1a906373bef2744e91 100644
index 72348d16df2965a94ad4a0aaa805b4ceb2a7cfc9..2f38afd3850260933a8398165945162d4cb3ee72 100644
--- a/pom.xml
+++ b/pom.xml
@@ -46,6 +46,11 @@
Expand Down
21 changes: 21 additions & 0 deletions patches/api/0009-java-11.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Simon Gardling <titaniumtown@gmail.com>
Date: Fri, 23 Apr 2021 11:11:13 -0400
Subject: [PATCH] java 11


diff --git a/pom.xml b/pom.xml
index 2f38afd3850260933a8398165945162d4cb3ee72..c3ab38266cfa232969a5fe9a05c3bf0ca355ada9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -19,8 +19,8 @@

<properties>
<!-- <skipTests>true</skipTests> Paper - This [was] not going to end well -->
- <maven.compiler.source>1.8</maven.compiler.source>
- <maven.compiler.target>1.8</maven.compiler.target>
+ <maven.compiler.source>11</maven.compiler.source>
+ <maven.compiler.target>11</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

11 changes: 10 additions & 1 deletion patches/server/0001-Modify-POM.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Subject: [PATCH] Modify POM


diff --git a/pom.xml b/pom.xml
index 6fe8dad8df109531f2b38fbfcb58b6807dbb8cf0..48c53278ab9a02c614219e87fbe0a52f2c322e96 100644
index 6fe8dad8df109531f2b38fbfcb58b6807dbb8cf0..158eaf81874983f4a703e188b56ecc2a4af97469 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,11 +1,11 @@
Expand Down Expand Up @@ -142,3 +142,12 @@ index 6fe8dad8df109531f2b38fbfcb58b6807dbb8cf0..48c53278ab9a02c614219e87fbe0a52f
<scmDirectory>..</scmDirectory>
</configuration>
<executions>
@@ -261,7 +289,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
- <version>3.2.3</version>
+ <version>3.2.4</version>
<executions>
<execution>
<phase>package</phase>
2 changes: 1 addition & 1 deletion patches/server/0003-Utilities.patch
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Co-authored-by: Mykyta Komarnytskyy <nkomarn@hotmail.com>
Co-authored-by: Ivan Pekov <ivan@mrivanplays.com>

diff --git a/pom.xml b/pom.xml
index 48c53278ab9a02c614219e87fbe0a52f2c322e96..3a05118d764a6a934b4f834c3080e4ed20c227e9 100644
index 158eaf81874983f4a703e188b56ecc2a4af97469..a30e47622f2f8902877265e32a21a2ff9d48f50a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -197,6 +197,12 @@
Expand Down
2 changes: 1 addition & 1 deletion patches/server/0009-Add-NBT-API-as-a-first-class-lib.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Subject: [PATCH] Add NBT API as a first-class lib


diff --git a/pom.xml b/pom.xml
index 3a05118d764a6a934b4f834c3080e4ed20c227e9..d0259f18488e1ecf0276865e0ff7958726a40033 100644
index a30e47622f2f8902877265e32a21a2ff9d48f50a..c17ecfee739298ad4d0ecb0f9d8eb622468250ab 100644
--- a/pom.xml
+++ b/pom.xml
@@ -374,6 +374,10 @@
Expand Down
2 changes: 1 addition & 1 deletion patches/server/0071-C2ME-Port.patch
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Port of https://github.com/YatopiaMC/C2ME-fabric
Co-authored-by: Simon Gardling <titaniumtown@gmail.com>

diff --git a/pom.xml b/pom.xml
index d0259f18488e1ecf0276865e0ff7958726a40033..f0a73238612327d71cf78801df816823d80893a0 100644
index c17ecfee739298ad4d0ecb0f9d8eb622468250ab..b75799ab4c158203b3903428c6403c55b2322806 100644
--- a/pom.xml
+++ b/pom.xml
@@ -203,6 +203,12 @@
Expand Down
58 changes: 58 additions & 0 deletions patches/server/0076-java-11.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Simon Gardling <titaniumtown@gmail.com>
Date: Fri, 23 Apr 2021 11:11:20 -0400
Subject: [PATCH] java 11


diff --git a/pom.xml b/pom.xml
index b75799ab4c158203b3903428c6403c55b2322806..6ffc6c652dbac0cde12d77f290f378fa4c4b27d7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -14,8 +14,8 @@
<bt.name>git</bt.name>
<minecraft.version>1.16.5</minecraft.version>
<minecraft_version>1_16_R3</minecraft_version>
- <maven.compiler.source>1.8</maven.compiler.source>
- <maven.compiler.target>1.8</maven.compiler.target>
+ <maven.compiler.source>11</maven.compiler.source>
+ <maven.compiler.target>11</maven.compiler.target>
</properties>

<parent>
diff --git a/src/main/java/io/papermc/paper/util/PaperJvmChecker.java b/src/main/java/io/papermc/paper/util/PaperJvmChecker.java
index c6ea429819c07e7f4bc257cad73463a030767825..3fdca3afeefdb7f850934f9b1b5312f8979b50f3 100644
--- a/src/main/java/io/papermc/paper/util/PaperJvmChecker.java
+++ b/src/main/java/io/papermc/paper/util/PaperJvmChecker.java
@@ -28,21 +28,17 @@ public class PaperJvmChecker {
public static void checkJvm() {
if (getJvmVersion() < 11) {
final Logger logger = LogManager.getLogger();
- logger.warn("************************************************************");
- logger.warn("* WARNING - YOU ARE RUNNING AN OUTDATED VERSION OF JAVA.");
- logger.warn("* PAPER WILL STOP BEING COMPATIBLE WITH THIS VERSION OF");
- logger.warn("* JAVA WHEN MINECRAFT 1.17 IS RELEASED.");
- logger.warn("*");
- logger.warn("* Please update the version of Java you use to run Paper");
- logger.warn("* to at least Java 11. When Paper for Minecraft 1.17 is");
- logger.warn("* released support for versions of Java before 11 will");
- logger.warn("* be dropped.");
- logger.warn("*");
- logger.warn("* Current Java version: {}", System.getProperty("java.version"));
- logger.warn("*");
- logger.warn("* Check this forum post for more information: ");
- logger.warn("* https://papermc.io/java11");
- logger.warn("************************************************************");
+ // Yatopia start - require java 11+
+ // Note - no clue how someone would run a jar built for java 11 on a java version lower than 11, but doesn't hurt to update this warning I guess.
+ logger.fatal("************************************************************");
+ logger.fatal("* ERROR - YOU ARE RUNNING AN OUTDATED VERSION OF JAVA.");
+ logger.fatal("* YOU NEED TO BE RUNNING JAVA 11 OR HIGHER");
+ logger.fatal("* In order to achieve Yatopia's high performance,");
+ logger.fatal("* Yatopia uses features only found in Java 11 or higher.");
+ logger.fatal("* If you do not know how to install Java 11 or have any other questions,");
+ logger.fatal("* Join our discord server (https://discord.io/YatopiaMC) and ask for support in #yatopia-help");
+ logger.fatal("************************************************************");
+ // Yatopia end
}
}
}

0 comments on commit f01cf25

Please sign in to comment.