Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepare Update Java JDK from 21 to 22 #12134

Merged
merged 11 commits into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@
// Install java.
// See https://github.com/devcontainers/features/tree/main/src/java#options for details.
"ghcr.io/devcontainers/features/java:1": {
"version": "21.0.1-librca",
"version": "23.0.1-tem",
"installGradle": false,
"jdkDistro": "librca"
"jdkDistro": "Temurin"
}
}
}
2 changes: 1 addition & 1 deletion .github/workflows/deployment-jdk-ea.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest, buildjet-8vcpu-ubuntu-2204-arm]
jdk: [22]
jdk: [23]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't EA become 24 then?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not supported by the current workflow. I can re-add this, but takes 30 to 60 min again - need to switch to Oracle action etc.

javafx: [24]
include:
- os: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .gitpod.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ FROM gitpod/workspace-full
# All available versions can be listed using sdk ls java
# More information about SDKMAN available at https://github.com/sdkman/sdkman-cli#sdkman-cli
RUN bash -c ". /home/gitpod/.sdkman/bin/sdkman-init.sh \
&& sdk install java 21-open"
&& sdk install java 23-open"
1 change: 1 addition & 0 deletions .vscode/ltex.dictionary.en-US.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ JabDrive
JabRef
OpenFastTrace
OpenRewrite
Temurin
7 changes: 4 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ group = "org.jabref"
version = project.findProperty('projVersion') ?: '100.0.0'

java {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
sourceCompatibility = JavaVersion.VERSION_23
targetCompatibility = JavaVersion.VERSION_23

// Workaround needed for Eclipse, probably because of https://github.com/gradle/gradle/issues/16922
// Should be removed as soon as Gradle 7.0.1 is released ( https://github.com/gradle/gradle/issues/16922#issuecomment-828217060 )
Expand All @@ -57,7 +57,8 @@ java {
// - .gitpod.Dockerfile
// - .devcontainer/devcontainer.json#L34 and
// - .github/workflows/deployment-jdk-ea.yml#L53
languageVersion = JavaLanguageVersion.of(21)
// - docs/getting-into-the-code/guidelines-for-setting-up-a-local-workspace/intellij-12-build.md
languageVersion = JavaLanguageVersion.of(23)
// See https://docs.gradle.org/current/javadoc/org/gradle/jvm/toolchain/JvmVendorSpec.html for a full list
// vendor = JvmVendorSpec.AMAZON
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,22 @@ nav_order: 12

# Step 2: Set up the build system: JDK and Gradle

## Ensure that JDK 21 is available to IntelliJ
## Ensure that JDK 23 is available to IntelliJ

Ensure you have a Java 21 SDK configured by navigating to **File > Project Structure... > Platform Settings > SDKs**.<br>
Ensure you have a Java 23 SDK configured by navigating to **File > Project Structure... > Platform Settings > SDKs**.<br>
**Note:** In some MacBooks, `Project Structure` can be found at the "IntelliJ" button of the app menu instead of at "File".

{% figure caption:"JDKs 11, 14, and 15 shown in available SDKs. JDK 21 is missing." %}
![Plattform Settings - SDKs](intellij-choose-jdk-adoptopenjdk-on-windows-project-settings.png)
{% endfigure %}

If there is another JDK than JDK 21 selected, click on the plus button and choose "Download JDK..."
If there is another JDK than JDK 23 selected, click on the plus button and choose "Download JDK..."

{% figure caption:"Download JDK..." %}
![Plattform Settings - SDKs - plus button - Download JDK...](guidelines-select-download-jdk.png)
{% endfigure %}

Select JDK version 21 and then Eclipse Temurin.
Select JDK version 23 and then Eclipse Temurin.

{% figure caption:"Example for JDK 21 - Choose Eclipse Temurin" %}
![Download Eclipse Temurin](guidelines-intellij-select-jdk-eclipse-temurin.png)
Expand All @@ -33,7 +33,7 @@ After clicking "Download", IntelliJ installs Eclipse Temurin:
![IntelliJ installs Eclipse Temurin](guidelines-intellij-installs-temurin.png)
{% endfigure %}

Navigate to **Project Settings > Project** and ensure that the projects' SDK is Java 21.
Navigate to **Project Settings > Project** and ensure that the projects' SDK is Java 23.

{% figure caption:"Project SDK is pinned to the downloaded SDK (showing JDK 21 as example)" %}
![Project SDK is JDK 21](guidelines-intellij-project-settings-jdk.png)
Expand All @@ -44,7 +44,7 @@ Click "OK" to store the changes.
## Ensure correct JDK setting for Gradle

Navigate to **File > Settings... > Build, Execution, Deployment > Build Tools > Gradle** and select the "Project SDK" as the Gradle JVM at the bottom.
If that does not exist, just select JDK 21.
If that does not exist, just select JDK 23.

{% figure caption:"Gradle JVM is project SDK (showing "Projekt SDK temurin-21" as example)" %}
![Gradle JVM is project SDK](guidelines-intellij-settings-gradle-gradlejvm-is-projectjvm.png)
Expand Down Expand Up @@ -128,7 +128,7 @@ After that a new entry called "jabref \[run]" appears in the run configurations.
Now you can also select "jabref \[run]" and either run or debug the application from within IntelliJ.

{: .note }
You can run any other development task in a similar way.
You can run any other development task similarly.

## Using IntelliJ's internal build system for tests

Expand Down
Loading