diff --git a/.gitignore b/.gitignore index d3fb40a59db..b1185748fca 100644 --- a/.gitignore +++ b/.gitignore @@ -16,7 +16,7 @@ jablib/src/main/resources/csl-locales javafx/ -# genreated by gg.cmd +# generated by gg.cmd m2 gg.cmd diff --git a/build-logic/src/main/kotlin/org.jabref.gradle.feature.compile.gradle.kts b/build-logic/src/main/kotlin/org.jabref.gradle.feature.compile.gradle.kts index 12bf831596e..5e399bffdc9 100644 --- a/build-logic/src/main/kotlin/org.jabref.gradle.feature.compile.gradle.kts +++ b/build-logic/src/main/kotlin/org.jabref.gradle.feature.compile.gradle.kts @@ -6,6 +6,7 @@ java { toolchain { // If this is updated, also update // - build.gradle -> jacoco -> toolVersion (because JaCoCo does not support newest JDK out of the box. Check versions at https://www.jacoco.org/jacoco/trunk/doc/changes.html) + // - docs/getting-into-the-code/guidelines-for-setting-up-a-local-workspace/intellij-11-code-into-ide.md -> java version provided to `gg.cmd` // - jitpack.yml // - .devcontainer/devcontainer.json#L34 - there, also check if the gradleVersion matches the one of gradle/wrapper/gradle-wrapper.properties // - .moderne/moderne.yml diff --git a/docs/getting-into-the-code/guidelines-for-setting-up-a-local-workspace/intellij-11-code-into-ide.md b/docs/getting-into-the-code/guidelines-for-setting-up-a-local-workspace/intellij-11-code-into-ide.md index 93a540b8b82..6668f367e84 100644 --- a/docs/getting-into-the-code/guidelines-for-setting-up-a-local-workspace/intellij-11-code-into-ide.md +++ b/docs/getting-into-the-code/guidelines-for-setting-up-a-local-workspace/intellij-11-code-into-ide.md @@ -6,6 +6,39 @@ nav_order: 11 # Step 1: Get the code into IntelliJ +## Pre-condition: Gradle caches filled + +On Linux, with IntelliJ IDEA 2025.2.4 (Ultimate Edition), there are issues with importing. +The workaround is to run JabRef once from the command line. + +- Linux: Execute `./gradlew :jabgui:run` +- Windows (Powershell): Execute `.\gradlew :jabgui:run` + +In case Gradle does not find a JDK, use [`gg.cmd`](https://github.com/eirikb/gg) as follows: + +1. Download +2. Move the file to your JabRef project directory +3. Run the GUI + + - Windows: `.\gg.cmd gradle:java@24 jabgui:compileJava` + - Linux: `sh -x ./gg.cmd gradle:java@24 jabgui:compileJava` + +4. Wait until the command execution completes. + On an Intel(R) Core(TM) i5-1350 (16 GB RAM), it takes more than 15 minutes. + +The command line may appear to hang at `:jablib:processResources`, you still need to keep waiting. +However, in parallel, you can continue setting up IntelliJ below, because the initial Gradle setup succeeded. + +{: .note } +> Background +> +> The above is a workaround for following error: +> +> ```text +> Could not apply requested plugin [id: 'org.jabref.gradle.module'] as it does not provide a plugin with id 'org.jabref.gradle.module'. This is caused by an incorrect plugin implementation. Please contact the plugin author(s). +> > Plugin with id 'org.jabref.gradle.module' not found. +> ``` + ## IntelliJ Startup Start IntelliJ IDEA. @@ -59,7 +92,7 @@ Allow also access for both cases and click "Allow access". ## Wait for IntelliJ IDEA to import the gradle project -IntelliJ shows "Importing 'jabref' Gradle Project" at the lower right corner. +IntelliJ shows "Importing 'jabref' Gradle Project" in the lower right corner. This will take several minutes. Wait until this disappears. @@ -71,9 +104,9 @@ Wait until this disappears. You can disregard notifications -* offering to reopen the project in a container -* announcing the project JDK -* suggesting that you install the plugin WireMock +- offering to reopen the project in a container +- announcing the project JDK +- suggesting that you install the plugin WireMock ## IntelliJ IDEA may report low memory