Skip to content

Commit d55120c

Browse files
committed
Update Gradle, use Java 21, fix Javadoc issues
1 parent 8043026 commit d55120c

File tree

16 files changed

+52
-11
lines changed

16 files changed

+52
-11
lines changed

.github/workflows/gradle.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- name: Set up JDK
1818
uses: actions/setup-java@v4
1919
with:
20-
java-version: 17
20+
java-version: 21
2121
distribution: 'temurin'
2222

2323
- name: Setup Gradle

build-logic/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ dependencies {
1616
}
1717

1818
configure<JavaPluginExtension> {
19-
toolchain.languageVersion.set(JavaLanguageVersion.of(17))
19+
toolchain.languageVersion.set(JavaLanguageVersion.of(21))
2020
}
2121

2222
gradlePlugin {

build-logic/src/main/kotlin/org/enginehub/gradle/JvmPlugin.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class JvmPlugin : Plugin<Project> {
2121
mavenCentral()
2222
}
2323
configure<JavaPluginExtension> {
24-
toolchain.languageVersion.set(JavaLanguageVersion.of(17))
24+
toolchain.languageVersion.set(JavaLanguageVersion.of(21))
2525
withJavadocJar()
2626
withSourcesJar()
2727
}

common/src/main/java/org/enginehub/linbus/common/internal/AbstractIterator.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,12 @@ public abstract class AbstractIterator<T extends @Nullable Object> implements It
3535
private boolean end;
3636
private T next;
3737

38+
/**
39+
* Create a new iterator.
40+
*/
41+
public AbstractIterator() {
42+
}
43+
3844
/**
3945
* Compute the next item.
4046
*

format-snbt/src/main/java/org/enginehub/linbus/format/snbt/impl/Elusion.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
/**
2222
* Escape helpers.
2323
*/
24-
public class Elusion {
24+
public final class Elusion {
2525
/**
2626
* Is {@code c} a character than can be emitted without quotes?
2727
*
@@ -78,4 +78,7 @@ public static CharSequence escapeIfNeeded(String s) {
7878
builder.append(quoteChar);
7979
return builder;
8080
}
81+
82+
private Elusion() {
83+
}
8184
}

format-snbt/src/main/java/org/enginehub/linbus/format/snbt/impl/LinSnbtWriter.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,12 @@ record WritingArray() implements WriteState {
4747

4848
private final ArrayDeque<WriteState> stateStack = new ArrayDeque<>();
4949

50+
/**
51+
* Construct a new writer.
52+
*/
53+
public LinSnbtWriter() {
54+
}
55+
5056
/**
5157
* Write the tokens to the output.
5258
*

format-snbt/src/main/java/org/enginehub/linbus/format/snbt/impl/reader/SnbtToken.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,9 @@ public String toString() {
131131

132132
/**
133133
* String literal for arbitrary text.
134+
*
135+
* @param quoted if the text was quoted
136+
* @param content the content of the text
134137
*/
135138
record Text(boolean quoted, String content) implements SnbtToken {
136139
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#This file is generated by updateDaemonJvm
2+
toolchainVersion=21

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

gradlew

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)