Skip to content

Commit

Permalink
Update to Java 16 in build.gradle (#7892)
Browse files Browse the repository at this point in the history
* Update to Java 16 in build.gradle

* Update guidelines-for-setting-up-a-local-workspace.md

* Update JDK also for fetchter tests and depdency updates
  • Loading branch information
koppor committed Jul 7, 2021
1 parent 482bed7 commit c2d783b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/check-outdated-dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Set up JDK
uses: actions/setup-java@v2
with:
java-version: 14
java-version: 16
distribution: 'adopt'
- name: Look for outdated dependencies
run: ./gradlew -q checkOutdatedDependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests-fetchers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- name: Set up JDK
uses: actions/setup-java@v2
with:
java-version: 14
java-version: 16
distribution: 'adopt'
- uses: actions/cache@v2
name: Restore gradle cache
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ group = "org.jabref"
version = project.findProperty('projVersion') ?: '100.0.0'

java {
sourceCompatibility = JavaVersion.VERSION_14
targetCompatibility = JavaVersion.VERSION_14
sourceCompatibility = JavaVersion.VERSION_16
targetCompatibility = JavaVersion.VERSION_16

// 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 Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ This section list the prerequisites you need to get started to develop JabRef. A

### Java Development Kit 16

A working Java \(Develoment Kit\) 16 installation with Java FX support is required. In the command line \(terminal in Linux, cmd in Windows\) run `javac -version` and make sure that the reported version is Java 16 \(e.g `javac 16`\). If `javac` is not found or a wrong version is reported, check your `PATH` environment variable, your `JAVA_HOME` environment variable or install the most recent JDK.
A working Java \(Develoment Kit\) 16 installation with Java FX support is required. In the command line \(terminal in Linux, cmd in Windows\) run `javac -version` and make sure that the reported version is Java 16 \(e.g., `javac 16`\). If `javac` is not found or a wrong version is reported, check your `PATH` environment variable, your `JAVA_HOME` environment variable or install the most recent JDK.

[JavaFX is not part of the default JDK any more](https://www.reddit.com/r/java/comments/82qm9x/javafx_will_be_removed_from_the_java_jdk_in_jdk_11/), it needs to be installed separately if not using a special JDK.

Expand Down Expand Up @@ -106,7 +106,7 @@ After that, you can open `jabref/build.gradle` as a project. It is crucial that

Ensure you have a Java 16 SDK configured by navigating to **File \| Project Structure \| Platform Settings \| SDKs**. If you don't have one, add a new Java JDK and point it to the location of a JDK 16. ![Project Settings](../.gitbook/assets/intellij-choose-jdk-adoptopenjdk-on-windows-project-settings.png)

Navigate to **File \| Project Structure \| Project** and ensure that the projects' SDK is Java 16 ![Use JDK 15 as project SDK](../.gitbook/assets/intellij-choose-jdk15-project-default.png)
Navigate to **File \| Project Structure \| Project** and ensure that the projects' SDK is Java 16 ![Use JDK 16 as project SDK](../.gitbook/assets/intellij-choose-jdk15-project-default.png)

Navigate to **File \| Settings \| Build, Execution, Deployment \| Build Tools \| Gradle** and select the "Project SDK" as the Gradle JVM at the bottom.

Expand Down Expand Up @@ -201,7 +201,7 @@ Finally, ensure that the checkstyle configuration file is in place:
4. Click "Browse" and choose `config/checkstyle/checkstyle.xml`
5. Click "Next" and "Finish"
6. Activate the CheckStyle configuration file by ticking it in the list
7. Ensure that the [latest CheckStyle version](https://checkstyle.org/releasenotes.html) is selected \(8.36 or higher\). 8.36 is required for Java 15.
7. Ensure that the [latest CheckStyle version](https://checkstyle.org/releasenotes.html) is selected \(8.36 or higher\). 8.43 is required for Java 16.
8. Set the "Scan Scope" to "Only Java sources \(including tests\)
9. Save settings by clicking "OK"
10. Your configuration should now look like this:
Expand Down

0 comments on commit c2d783b

Please sign in to comment.