Skip to content

Commit 9bd0ec0

Browse files
committed
Merge remote-tracking branch 'origin/main'
2 parents ad8c7d2 + 5395ec4 commit 9bd0ec0

File tree

2 files changed

+49
-3
lines changed

2 files changed

+49
-3
lines changed

build.gradle

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,17 @@ plugins {
44
id "net.kyori.blossom" version "1.3.1"
55
}
66

7+
sourceSets {
8+
java17compat
9+
}
10+
711
java.toolchain.languageVersion = JavaLanguageVersion.of(17)
8-
compileJava.sourceCompatibility = JavaVersion.VERSION_1_8
9-
compileJava.targetCompatibility = JavaVersion.VERSION_1_8
10-
compileJava.options.encoding = compileTestJava.options.encoding = javadoc.options.encoding = "UTF-8"
12+
[compileJava, compileTestJava, compileJava17compatJava].each {
13+
it.options.encoding = "UTF-8"
14+
it.sourceCompatibility = JavaVersion.VERSION_1_8
15+
it.targetCompatibility = JavaVersion.VERSION_1_8
16+
}
17+
javadoc.options.encoding = "UTF-8"
1118

1219
group = project.maven_group
1320
archivesBaseName = project.maven_name
@@ -50,6 +57,8 @@ repositories {
5057
}
5158

5259
dependencies {
60+
compileOnly sourceSets.java17compat.output
61+
5362
include "com.viaversion:viaversion:4.5.2-SNAPSHOT"
5463
include("com.viaversion:viabackwards-common:4.5.2-SNAPSHOT") {
5564
exclude group: "com.viaversion", module: "viaversion"
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
/*
2+
* This file is part of ViaProxy - https://github.com/RaphiMC/ViaProxy
3+
* Copyright (C) 2023 RK_01/RaphiMC and contributors
4+
*
5+
* This program is free software: you can redistribute it and/or modify
6+
* it under the terms of the GNU General Public License as published by
7+
* the Free Software Foundation, either version 3 of the License, or
8+
* (at your option) any later version.
9+
*
10+
* This program is distributed in the hope that it will be useful,
11+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
* GNU General Public License for more details.
14+
*
15+
* You should have received a copy of the GNU General Public License
16+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
17+
*/
18+
package java.lang;
19+
20+
/**
21+
* Dummy class to make IntelliJ able to access records in Java 8 code
22+
*/
23+
public abstract class Record {
24+
25+
protected Record() {
26+
}
27+
28+
@Override
29+
public abstract boolean equals(Object obj);
30+
31+
@Override
32+
public abstract int hashCode();
33+
34+
@Override
35+
public abstract String toString();
36+
37+
}

0 commit comments

Comments
 (0)