Skip to content

Commit 1c92925

Browse files
committed
small changes
1 parent dde69e2 commit 1c92925

File tree

3 files changed

+8
-9
lines changed

3 files changed

+8
-9
lines changed

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"java.configuration.updateBuildConfiguration": "interactive"
3+
}

java6/build.gradle.kts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,11 @@ java {
1212
languageVersion.set(JavaLanguageVersion.of(11))
1313
}
1414

15-
targetCompatibility = JavaVersion.VERSION_1_6
16-
sourceCompatibility = JavaVersion.VERSION_1_6
17-
1815
withSourcesJar()
1916
}
2017

2118
tasks.withType<JavaCompile>().configureEach {
19+
options.release.set(6)
2220
options.compilerArgs = listOf("-Xlint:-options")
2321
}
2422

@@ -29,6 +27,8 @@ tasks.shadowJar {
2927
relocate(pack, "$prefix.$pack")
3028
}
3129

30+
minimize()
31+
3232
exclude("META-INF/LICENSE.txt")
3333
exclude("META-INF/NOTICE.txt")
3434
}

java6/src/main/java/io/papermc/paperclip/Main.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,9 @@
1212
import com.eclipsesource.json.Json;
1313
import com.eclipsesource.json.JsonObject;
1414

15-
import java.io.File;
1615
import java.io.IOException;
1716
import java.io.InputStreamReader;
1817
import java.lang.reflect.Method;
19-
import java.nio.charset.StandardCharsets;
20-
import java.nio.file.Files;
21-
import java.nio.file.Paths;
2218

2319
public final class Main {
2420

@@ -30,7 +26,7 @@ private static JsonObject readJsonFile() {
3026
InputStreamReader reader = null;
3127

3228
try {
33-
reader = new InputStreamReader(Main.class.getClassLoader().getResourceAsStream("version.json"), StandardCharsets.UTF_8);
29+
reader = new InputStreamReader(Main.class.getClassLoader().getResourceAsStream("version.json"), "UTF_8");
3430
object = Json.parse(reader).asObject();
3531
} catch (final IOException exc) {
3632
throw new RuntimeException("Failed to read version.json", exc);
@@ -52,7 +48,7 @@ public static void main(final String[] args) {
5248
final String minecraftVersion = VERSION.getString("name", "Unknown");
5349
if (getJavaVersion() < javaVersion) {
5450
System.err.printf("Minecraft %s requires running the server with Java %s or above. " +
55-
"Download Java %s (or above) from https://adoptium.net/%n", minecraftVersion, javaVersion, javaVersion);
51+
"Download Java %s (or above) from https://adoptium.net/", minecraftVersion, javaVersion, javaVersion);
5652
System.exit(1);
5753
}
5854

0 commit comments

Comments
 (0)