diff --git a/.github/dependabot.yml b/.github/dependabot.yml index f61ecd2c34e..3dc4095c936 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -2,13 +2,8 @@ version: 2 updates: - package-ecosystem: gradle directories: - - "/build-logic" # Build-related logic for gradle - - "/jabgui" # JabRef's GUI - - "/jabkit" # JabRef's CLI ("JabKit") - - "/jablib" # Core library - - "/jabsrv" # Server-related module - - "/jabsrv-cli" # CLI for the server - - "/test-support" # Module for test utilities + - "/build-logic" # versions of 3rd party gradle plugins + - "/versions" # versions of 3rd party dependencies of all JabRef modules schedule: interval: weekly labels: diff --git a/.github/workflows/binaries-ea.yml b/.github/workflows/binaries-ea.yml index 8935a5c781a..0087d8a6318 100644 --- a/.github/workflows/binaries-ea.yml +++ b/.github/workflows/binaries-ea.yml @@ -119,9 +119,8 @@ jobs: needs: [conditions] if: ${{ needs.conditions.outputs.should-build == 'true' }} env: - javafx: '25' - jdk_version: '25' - jdk: 'openjdk-25.0.0-ea+21' + jdk_version: '24' + jdk_distribution: 'openjdk-25.0.0-ea+27' strategy: fail-fast: false matrix: @@ -181,24 +180,34 @@ jobs: - name: Tell gradle to use JDK ${{ env.jdk_version }} (linux, Windows) if: ${{ !startsWith(matrix.os, 'macos') }} run: | - sed -i "s/JavaLanguageVersion.of(24)/JavaLanguageVersion.of(${{ env.jdk_version }})/" build-logic/src/main/kotlin/buildlogic.java-common-conventions.gradle.kts - sed -i "s#vendor = JvmVendorSpec.AMAZON##" build-logic/src/main/kotlin/buildlogic.java-common-conventions.gradle.kts - cat build-logic/src/main/kotlin/buildlogic.java-common-conventions.gradle.kts + # Update JavaLanguageVersion + sed -i "s/JavaLanguageVersion.of..../JavaLanguageVersion.of(${{ env.jdk_version }})/" build-logic/src/main/kotlin/org.jabref.gradle.feature.compile.gradle.kts + + # Update options.release + sed -i "s/options\.release = ../options.release = ${{ env.jdk_version }}/" build-logic/src/main/kotlin/org.jabref.gradle.feature.compile.gradle.kts + + # Use default vendor + # sed -i "s#vendor = JvmVendorSpec\..*##" build-logic/src/main/kotlin/org.jabref.gradle.feature.compile.gradle.kts + + cat build-logic/src/main/kotlin/org.jabref.gradle.feature.compile.gradle.kts - name: Tell gradle to use JDK ${{ env.jdk_version }} (macOS) if: ${{ startsWith(matrix.os, 'macos') }} run: | - sed -i '.bak' "s/JavaLanguageVersion.of(24)/JavaLanguageVersion.of(${{ env.jdk_version }})/" build-logic/src/main/kotlin/buildlogic.java-common-conventions.gradle.kts - sed -i '.bak' "s#vendor = JvmVendorSpec.AMAZON##" build-logic/src/main/kotlin/buildlogic.java-common-conventions.gradle.kts - cat build-logic/src/main/kotlin/buildlogic.java-common-conventions.gradle.kts + sed -i '.bak' "s/JavaLanguageVersion.of..../JavaLanguageVersion.of(${{ env.jdk_version }})/" build-logic/src/main/kotlin/org.jabref.gradle.feature.compile.gradle.kts + sed -i '.bak' "s/options\.release = ../options.release = ${{ env.jdk_version }}/" build-logic/src/main/kotlin/org.jabref.gradle.feature.compile.gradle.kts + # sed -i '.bak' "s#vendor = JvmVendorSpec\..*##" build-logic/src/main/kotlin/org.jabref.gradle.feature.compile.gradle.kts + cat build-logic/src/main/kotlin/org.jabref.gradle.feature.compile.gradle.kts # region setup-JDK - name: Setup JDK ${{ env.jdk_version }} (${{ env.jdk }}) for "java toolchain" of Gradle + if: false uses: jdx/mise-action@v2 with: mise_toml: | [tools] - java = { version = "${{ env.jdk }}", release_type = "ea" } + java = { version = "${{ env.jdk_distribution }}", release_type = "ea" } - name: Debug + if: false shell: bash run: | set -x @@ -206,12 +215,12 @@ jobs: echo $JAVA_HOME java --version - name: Make JDK known to gradle (Linux, macOS) - if: (matrix.os != 'windows-latest') + if: false && (matrix.os != 'windows-latest') shell: bash # Hint by https://github.com/gradle/gradle/issues/29355#issuecomment-2598556970 run: ln -s ~/.local/share/mise ~/.asdf - name: Make JDK known to gradle (Windows) - if: (matrix.os == 'windows-latest') + if: false && (matrix.os == 'windows-latest') shell: bash run: mv ~/AppData/Local/mise ~/.asdf - name: Setup JDK for gradle itself @@ -222,94 +231,27 @@ jobs: # endregion # region JavaFX - - name: Download and extract JavaFX ${{ env.javafx }} - if: (matrix.os != 'ubuntu-22.04-arm') + - name: 'Determine latest JavaFX version' + id: javafx shell: bash run: | set -e - set -x - mkdir javafx - cd javafx - curl --no-progress-meter https://jdk.java.net/javafx${{ env.javafx }}/ > javafx.html - - case "${{ matrix.os }}" in - "ubuntu-22.04") - OS="linux-x64" - EXTRACT="tar xzf *.tar.gz" - EXT="tar.gz" - ;; - "windows-latest") - OS="windows-x64" - EXTRACT="unzip -qq *.zip" - EXT="zip" - ;; - "macos-13") - OS="macos-x64" - EXTRACT="tar xzf *.tar.gz" - EXT="tar.gz" - ;; - "macos-14") - OS="macos-aarch64" - EXTRACT="tar xzf *.tar.gz" - EXT="tar.gz" - ;; - *) - echo "Unsupported OS" - exit 1 - ;; - esac - echo "OS set to $OS" - - URL_SDK=$(grep -o "https://download.java.net/java/.*/javafx.*${OS}_bin-sdk.${EXT}" javafx.html | head -n 1) - echo "Downloading $URL_SDK..." - curl -OJ --no-progress-meter $URL_SDK - $EXTRACT - rm *.$EXT - - URL_JMODS=$(grep -o "https://download.java.net/java/.*/javafx.*${OS}_bin-jmods.${EXT}" javafx.html | head -n 1) - echo "Downloading $URL_JMODS..." - curl -OJ --no-progress-meter $URL_JMODS - $EXTRACT - rm *.$EXT - - ls -la - - name: 'Set JavaFX ${{ env.javafx }} (linux, Windows)' + curl -s "https://search.maven.org/solrsearch/select?q=g:org.openjfx+AND+a:javafx&rows=10&core=gav" > /tmp/versions.json + jq '[.response.docs[] | select(.v | test(".*-ea\\+.*")) | select(.v | test("^17|^18|^19|^20|^21|^22|^23") | not) | {version: .v}] | group_by(.version | capture("^(?\\d+).*").major) | map(max_by(.version))' < /tmp/versions.json > /tmp/versions-latest.json + JAVAFX=$(jq -r '.[-1].version' /tmp/versions-latest.json) + echo "Using JavaFX ${JAVAFX}" + echo "version=${JAVAFX}" >> $GITHUB_OUTPUT + - name: 'Set JavaFX ${{ steps.javafx.output.version }} (linux, Windows)' if: ${{ !startsWith(matrix.os, 'macos') }} shell: bash run: | set -e - shopt -s globstar - for buildgradle in **/build.gradle.kts; do - sed -i '/javafx {/{n;s#version = ".*"#sdk = "../javafx/javafx-sdk-${{ env.javafx }}"#}' $buildgradle - sed -i "s#jlink {#jlink { addExtraModulePath(\"../javafx/javafx-jmods-${{ env.javafx }}\")#" $buildgradle - echo "==========" - echo $buidgradle - echo "==========" - cat $buildgradle - done - - name: 'Set JavaFX ${{ env.javafx }} (macOS)' + sed -i 's/val javafx = ".*/val javafx = "${{ steps.javafx.outputs.version }}"/' versions/build.gradle.kts + - name: 'Set JavaFX ${{ steps.javafx.output.version }} (macOS)' if: startsWith(matrix.os, 'macos') run: | set -e - find . -name 'build.gradle.kts' | while read -r buildgradle; do - sed -i '.bak' -e '/javafx {/{n' -e 's#version = ".*"#sdk = "../javafx/javafx-sdk-${{ env.javafx }}"#;}' $buildgradle - sed -i '.bak' -e "s#jlink {#jlink { addExtraModulePath(\"../javafx/javafx-jmods-${{ env.javafx }}\")#" $buildgradle - cat $buildgradle - done - - name: 'Set JavaFX ${{ env.javafx }} (linux-arm)' - if: (matrix.os == 'ubuntu-22.04-arm') - # No JavaFX EA build for ARM at https://jdk.java.net/javafx25/, therefore using Maven Central artifact - run: | - set -e - curl -s "https://search.maven.org/solrsearch/select?q=g:org.openjfx+AND+a:javafx&rows=10&core=gav" > /tmp/versions.json - jq '[.response.docs[] | select(.v | test(".*-ea\\+.*")) | select(.v | test("^17|^18|^19|^20|^21|^22") | not) | {version: .v}] | group_by(.version | capture("^(?\\d+).*").major) | map(max_by(.version))' < /tmp/versions.json > /tmp/versions-latest.json - JAVAFX=$(jq -r '.[-1].version' /tmp/versions-latest.json) - echo "Using JavaFX ${JAVAFX}" - shopt -s globstar - for buildgradle in **/build.gradle.kts; do - sed -i "/javafx {/{n;s#version = \".*\"#version = \"${JAVAFX}\"#}" $buildgradle - cat $buildgradle - done + sed -i '.bak' 's/val javafx = ".*/val javafx = "${{ steps.javafx.outputs.version }}"/' versions/build.gradle.kts # endregion - name: Setup Gradle diff --git a/.github/workflows/binaries.yml b/.github/workflows/binaries.yml index ded3d34e3a4..96a05c0d70b 100644 --- a/.github/workflows/binaries.yml +++ b/.github/workflows/binaries.yml @@ -192,7 +192,7 @@ jobs: uses: actions/setup-java@v4 with: java-version: '24' - distribution: 'liberica' + distribution: 'corretto' java-package: 'jdk' - name: Setup Gradle uses: gradle/actions/setup-gradle@v4 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 346f63642bb..3ff68ce43ea 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -209,6 +209,21 @@ jobs: with: java-version: 24.0.1 distribution: 'zulu' + - name: Generate JBang cache key + id: cache-key + shell: bash + run: | + echo "cache_key=jbang-$(date +%F)" >> $GITHUB_OUTPUT + - name: Use cache + uses: actions/cache@v4 + with: + lookup-only: true + path: ~/.jbang + key: ${{ steps.cache-key.outputs.cache_key }} + restore-keys: + jbang- + - name: Setup JBang + uses: jbangdev/setup-jbang@main - name: Setup Gradle uses: gradle/actions/setup-gradle@v4 - name: Run ${{ matrix.module }} tests diff --git a/.gitignore b/.gitignore index c94289d0f06..7150fdccf7a 100644 --- a/.gitignore +++ b/.gitignore @@ -562,7 +562,7 @@ gradle-app.setting ## !! KEEP THESE LINES !! # we really version .jar files - needs to be go after the www.gitignore.io-generated ones, because they ignore *.jar files -!/lib/*.jar +!/jablib/lib/**/*.jar # do not distribute Oracle's JDBC driver lib/ojdbc.jar diff --git a/build-logic/build.gradle.kts b/build-logic/build.gradle.kts index 6011e5b7791..88e4031609f 100644 --- a/build-logic/build.gradle.kts +++ b/build-logic/build.gradle.kts @@ -9,24 +9,11 @@ repositories { } dependencies { + implementation("com.adarshr:gradle-test-logger-plugin:4.0.0") + implementation("com.autonomousapps:dependency-analysis-gradle-plugin:2.18.0") + implementation("com.github.andygoossens:gradle-modernizer-plugin:1.11.0") implementation("org.gradlex:extra-java-module-info:1.12") implementation("org.gradlex:java-module-packaging:1.0.1") // required for platform-specific packaging of JavaFX dependencies implementation("org.gradlex:java-module-testing:1.7") - implementation("org.gradlex.jvm-dependency-conflict-resolution:org.gradlex.jvm-dependency-conflict-resolution.gradle.plugin:2.4") - - configurations - .matching { it.name.contains("downloadSources") } - .configureEach { - attributes { - attribute(Usage.USAGE_ATTRIBUTE, objects.named(Usage::class.java, Usage.JAVA_RUNTIME)) - attribute( - OperatingSystemFamily.OPERATING_SYSTEM_ATTRIBUTE, - objects.named(OperatingSystemFamily::class.java, DefaultNativePlatform.getCurrentOperatingSystem().name) - ) - attribute( - MachineArchitecture.ARCHITECTURE_ATTRIBUTE, - objects.named(MachineArchitecture::class.java, DefaultNativePlatform.getCurrentArchitecture().name) - ) - } - } + implementation("org.gradlex:jvm-dependency-conflict-resolution:2.4") } diff --git a/build-logic/src/main/kotlin/buildlogic.java-common-conventions.gradle.kts b/build-logic/src/main/kotlin/org.jabref.gradle.base.dependency-rules.gradle.kts similarity index 53% rename from build-logic/src/main/kotlin/buildlogic.java-common-conventions.gradle.kts rename to build-logic/src/main/kotlin/org.jabref.gradle.base.dependency-rules.gradle.kts index 9c9cc08c90b..440544fc04a 100644 --- a/build-logic/src/main/kotlin/buildlogic.java-common-conventions.gradle.kts +++ b/build-logic/src/main/kotlin/org.jabref.gradle.base.dependency-rules.gradle.kts @@ -1,85 +1,12 @@ -import org.gradle.internal.os.OperatingSystem - plugins { - java - - id("idea") - - // id("jacoco") - - id("project-report") - id("org.gradlex.extra-java-module-info") - id("org.gradlex.java-module-testing") id("org.gradlex.jvm-dependency-conflict-resolution") - id("org.gradlex.java-module-packaging") -} - -repositories { - mavenCentral() - maven { url = uri("https://s01.oss.sonatype.org/content/repositories/snapshots/") } - maven { url = uri("https://oss.sonatype.org/content/repositories/snapshots") } - maven { url = uri("https://jitpack.io") } - maven { url = uri("https://oss.sonatype.org/content/groups/public") } - - // Required for one.jpro.jproutils:tree-showing - maven { url = uri("https://sandec.jfrog.io/artifactory/repo") } -} - -dependencies { - constraints { - // Define dependency versions as constraints - // implementation("org.apache.commons:commons-text:1.12.0") - } -} - -val os = OperatingSystem.current() - -// the result name must equal the name of one of the targets below in javaModulePackaging -val osTarget = when { - os.isMacOsX -> { - val arch = System.getProperty("os.arch") - if (arch.contains("aarch")) "macos-14" else "macos-13" - } - os.isLinux -> { - val arch = System.getProperty("os.arch") - if (arch.contains("aarch")) "ubuntu-22.04-arm" else "ubuntu-22.04" - } - os.isWindows -> "windows-2022" - else -> error("Unsupported OS") } -// Source: https://github.com/jjohannes/java-module-system/blob/main/gradle/plugins/src/main/kotlin/targets.gradle.kts -// Configure variants for OS. target name can be any string, but should match the name used in GitHub actions. -javaModulePackaging { - target("ubuntu-22.04") { - operatingSystem = OperatingSystemFamily.LINUX - architecture = MachineArchitecture.X86_64 - packageTypes = listOf("deb") - } - target("ubuntu-22.04-arm") { - operatingSystem = OperatingSystemFamily.LINUX - architecture = MachineArchitecture.ARM64 - packageTypes = listOf("deb") - } - target("macos-13") { - operatingSystem = OperatingSystemFamily.MACOS - architecture = MachineArchitecture.X86_64 - packageTypes = listOf("dmg") - } - target("macos-14") { - operatingSystem = OperatingSystemFamily.MACOS - architecture = MachineArchitecture.ARM64 - packageTypes = listOf("dmg") - } - target("windows-2022") { - operatingSystem = OperatingSystemFamily.WINDOWS - architecture = MachineArchitecture.X86_64 - packageTypes = listOf("exe") +jvmDependencyConflicts { + consistentResolution { + platform(":versions") } - // The default target is the one determined above - logger.info("Using target: $osTarget") - primaryTarget(target(osTarget)) } // Tell gradle which jar to use for which platform @@ -101,6 +28,19 @@ jvmDependencyConflicts.patch { removeDependency("org.checkerframework:checker-qual") removeDependency("com.google.errorprone:error_prone_annotations") } + module("com.github.tomtung:latex2unicode_2.13") { + removeDependency("com.lihaoyi:fastparse_2.13") + addApiDependency("com.lihaoyi:fastparse:2.3.3") + } + module("de.rototor.jeuclid:jeuclid-core") { + removeDependency("org.apache.xmlgraphics:batik-svg-dom") + removeDependency("org.apache.xmlgraphics:batik-ext") + removeDependency("org.apache.xmlgraphics:xmlgraphics-commons") + } + module("org.wiremock:wiremock") { + // workaround for https://github.com/wiremock/wiremock/issues/2874 + addApiDependency("com.github.koppor:wiremock-slf4j-spi-shim") + } } extraJavaModuleInfo { @@ -206,52 +146,3 @@ extraJavaModuleInfo { mergeJar("com.github.koppor:wiremock-slf4j-shim") } } - -testing { - suites { - val test by getting(JvmTestSuite::class) { - useJUnitJupiter() - } - } -} - -java { - sourceCompatibility = JavaVersion.VERSION_24 - targetCompatibility = JavaVersion.VERSION_24 - 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) - // - .devcontainer/devcontainer.json#L34 and - // - .moderne/moderne.yml - // - .github/workflows/binaries*.yml - // - .github/workflows/tests*.yml - // - .github/workflows/update-gradle-wrapper.yml - // - docs/getting-into-the-code/guidelines-for-setting-up-a-local-workspace/intellij-12-build.md - // - .sdkmanrc - languageVersion = JavaLanguageVersion.of(24) - // See https://docs.gradle.org/current/javadoc/org/gradle/jvm/toolchain/JvmVendorSpec.html for a full list - // See https://docs.gradle.org/current/javadoc/org/gradle/jvm/toolchain/JvmVendorSpec.html for a full list - // Temurin does not ship jmods, thus we need to use another JDK -- see https://github.com/actions/setup-java/issues/804 - vendor = JvmVendorSpec.AMAZON - - } -} - -tasks.javadoc { - ( options as StandardJavadocDocletOptions).apply { - encoding = "UTF-8" - // version = false - // author = false - - addMultilineStringsOption("tag").setValue(listOf("apiNote", "implNote")) - - // We cross-link to (non-visible) tests; therefore: no reference check - addBooleanOption("Xdoclint:all,-reference", true) - - addMultilineStringsOption("-add-exports").value = listOf( - "javafx.controls/com.sun.javafx.scene.control=org.jabref", - "org.controlsfx.controls/impl.org.controlsfx.skin=org.jabref" - ) - - } -} diff --git a/build-logic/src/main/kotlin/org.jabref.gradle.base.repositories.gradle.kts b/build-logic/src/main/kotlin/org.jabref.gradle.base.repositories.gradle.kts new file mode 100644 index 00000000000..79a57f53ad6 --- /dev/null +++ b/build-logic/src/main/kotlin/org.jabref.gradle.base.repositories.gradle.kts @@ -0,0 +1,12 @@ +repositories { + mavenCentral() + maven { url = uri("https://s01.oss.sonatype.org/content/repositories/snapshots/") } + maven { url = uri("https://oss.sonatype.org/content/repositories/snapshots") } + maven { url = uri("https://jitpack.io") } + maven { url = uri("https://oss.sonatype.org/content/groups/public") } + + // Required for one.jpro.jproutils:tree-showing + maven { url = uri("https://sandec.jfrog.io/artifactory/repo") } + + maven { url = uri("file:${rootDir.absolutePath}/jablib/lib")} +} diff --git a/build-logic/src/main/kotlin/org.jabref.gradle.base.targets.gradle.kts b/build-logic/src/main/kotlin/org.jabref.gradle.base.targets.gradle.kts new file mode 100644 index 00000000000..fc2fcc3a232 --- /dev/null +++ b/build-logic/src/main/kotlin/org.jabref.gradle.base.targets.gradle.kts @@ -0,0 +1,54 @@ +import org.gradle.internal.os.OperatingSystem + +plugins { + id("org.gradlex.java-module-packaging") +} + +// TODO jjohannes: OS detection should be part of packaging plugin +// https://github.com/gradlex-org/java-module-packaging/issues/51 +// the result name must equal the name of one of the targets below in javaModulePackaging +val os = OperatingSystem.current() +val osTarget = when { + os.isMacOsX -> { + val osVersion = System.getProperty("os.version") + val arch = System.getProperty("os.arch") + if (arch.contains("aarch")) "macos-14" else "macos-13" + } + os.isLinux -> { + val arch = System.getProperty("os.arch") + if (arch.contains("aarch")) "ubuntu-22.04-arm" else "ubuntu-22.04" + } + os.isWindows -> "windows-2022" + else -> error("Unsupported OS") +} + +// Source: https://github.com/jjohannes/java-module-system/blob/main/gradle/plugins/src/main/kotlin/targets.gradle.kts +// Configure variants for OS. Target name can be any string, but should match the name used in GitHub actions. +javaModulePackaging { + target("ubuntu-22.04") { + operatingSystem = OperatingSystemFamily.LINUX + architecture = MachineArchitecture.X86_64 + packageTypes = listOf("deb") + } + target("ubuntu-22.04-arm") { + operatingSystem = OperatingSystemFamily.LINUX + architecture = MachineArchitecture.ARM64 + packageTypes = listOf("deb") + } + target("macos-13") { + operatingSystem = OperatingSystemFamily.MACOS + architecture = MachineArchitecture.X86_64 + packageTypes = listOf("dmg") + } + target("macos-14") { + operatingSystem = OperatingSystemFamily.MACOS + architecture = MachineArchitecture.ARM64 + packageTypes = listOf("dmg") + } + target("windows-2022") { + operatingSystem = OperatingSystemFamily.WINDOWS + architecture = MachineArchitecture.X86_64 + packageTypes = listOf("exe") + } + primaryTarget(target(osTarget)) +} diff --git a/build-logic/src/main/kotlin/org.jabref.gradle.check.checkstyle.gradle.kts b/build-logic/src/main/kotlin/org.jabref.gradle.check.checkstyle.gradle.kts new file mode 100644 index 00000000000..9f0d53b9164 --- /dev/null +++ b/build-logic/src/main/kotlin/org.jabref.gradle.check.checkstyle.gradle.kts @@ -0,0 +1,16 @@ +plugins { + id("checkstyle") +} + +checkstyle { + toolVersion = "10.23.0" + configFile = File(rootDir, "config/checkstyle/checkstyle.xml") +} + +tasks.withType().configureEach { + reports { + xml.required.set(false) + html.required.set(true) + } + source = fileTree("src") { include("**/*.java") } +} diff --git a/build-logic/src/main/kotlin/org.jabref.gradle.check.modernizer.gradle.kts b/build-logic/src/main/kotlin/org.jabref.gradle.check.modernizer.gradle.kts new file mode 100644 index 00000000000..5b1c0ac7c79 --- /dev/null +++ b/build-logic/src/main/kotlin/org.jabref.gradle.check.modernizer.gradle.kts @@ -0,0 +1,11 @@ +plugins { + id("com.github.andygoossens.modernizer") +} + +modernizer { + failOnViolations = true + includeTestClasses = true + exclusions = setOf( + "java/util/Optional.get:()Ljava/lang/Object;" + ) +} 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 new file mode 100644 index 00000000000..d1206efc88c --- /dev/null +++ b/build-logic/src/main/kotlin/org.jabref.gradle.feature.compile.gradle.kts @@ -0,0 +1,26 @@ +plugins { + id("java") +} + +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) + // - .devcontainer/devcontainer.json#L34 and + // - .moderne/moderne.yml + // - .github/workflows/binaries*.yml + // - .github/workflows/tests*.yml + // - .github/workflows/update-gradle-wrapper.yml + // - docs/getting-into-the-code/guidelines-for-setting-up-a-local-workspace/intellij-12-build.md + // - .sdkmanrc + languageVersion = JavaLanguageVersion.of(24) + // See https://docs.gradle.org/current/javadoc/org/gradle/jvm/toolchain/JvmVendorSpec.html for a full list + // Temurin does not ship jmods, thus we need to use another JDK -- see https://github.com/actions/setup-java/issues/804 + // We also need a JDK without JavaFX, because we patch JavaFX due to modularity issues + vendor = JvmVendorSpec.AMAZON + } +} + +tasks.withType().configureEach { + options.release = 24 +} diff --git a/build-logic/src/main/kotlin/org.jabref.gradle.feature.javadoc.gradle.kts b/build-logic/src/main/kotlin/org.jabref.gradle.feature.javadoc.gradle.kts new file mode 100644 index 00000000000..3361c121ac8 --- /dev/null +++ b/build-logic/src/main/kotlin/org.jabref.gradle.feature.javadoc.gradle.kts @@ -0,0 +1,22 @@ +plugins { + id("java") +} + +tasks.javadoc { + (options as StandardJavadocDocletOptions).apply { + encoding = "UTF-8" + // version = false + // author = false + + addMultilineStringsOption("tag").setValue(listOf("apiNote", "implNote")) + + // We cross-link to (non-visible) tests; therefore: no reference check + addBooleanOption("Xdoclint:all,-reference", true) + + addMultilineStringsOption("-add-exports").value = listOf( + "javafx.controls/com.sun.javafx.scene.control=org.jabref", + "org.controlsfx.controls/impl.org.controlsfx.skin=org.jabref" + ) + + } +} diff --git a/build-logic/src/main/kotlin/org.jabref.gradle.feature.test.gradle.kts b/build-logic/src/main/kotlin/org.jabref.gradle.feature.test.gradle.kts new file mode 100644 index 00000000000..f30830bbcf9 --- /dev/null +++ b/build-logic/src/main/kotlin/org.jabref.gradle.feature.test.gradle.kts @@ -0,0 +1,37 @@ +plugins { + id("java") + id("org.gradlex.java-module-testing") + // Hint from https://stackoverflow.com/a/46533151/873282 + id("com.adarshr.test-logger") +} + +testing { + @Suppress("UnstableApiUsage") + suites.named("test") { + useJUnitJupiter() + } +} + +tasks.withType().configureEach { + // Enable parallel tests (on desktop). + // See https://docs.gradle.org/8.1/userguide/performance.html#execute_tests_in_parallel for details. + if (!providers.environmentVariable("CI").isPresent) { + maxParallelForks = maxOf(Runtime.getRuntime().availableProcessors() - 1, 1) + } +} + +testlogger { + // See https://github.com/radarsh/gradle-test-logger-plugin#configuration for configuration options + + theme = com.adarshr.gradle.testlogger.theme.ThemeType.STANDARD + + showPassed = false + showSkipped = false + + showCauses = false + showStackTraces = false +} + +configurations.testCompileOnly { + extendsFrom(configurations.compileOnly.get()) +} diff --git a/build-logic/src/main/kotlin/org.jabref.gradle.module.gradle.kts b/build-logic/src/main/kotlin/org.jabref.gradle.module.gradle.kts new file mode 100644 index 00000000000..83216741b67 --- /dev/null +++ b/build-logic/src/main/kotlin/org.jabref.gradle.module.gradle.kts @@ -0,0 +1,12 @@ +plugins { + id("java") + id("project-report") + id("org.jabref.gradle.base.dependency-rules") + id("org.jabref.gradle.base.repositories") + id("org.jabref.gradle.base.targets") + id("org.jabref.gradle.feature.compile") + id("org.jabref.gradle.feature.javadoc") + id("org.jabref.gradle.feature.test") + id("org.jabref.gradle.check.checkstyle") + id("org.jabref.gradle.check.modernizer") +} diff --git a/build.gradle.kts b/build.gradle.kts index eff584cf166..ea15c6e1e26 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,14 +1,8 @@ plugins { - id("buildlogic.java-common-conventions") - - id("checkstyle") - - id("com.github.andygoossens.modernizer") version "1.11.0" + id("org.jabref.gradle.base.repositories") + id("org.jabref.gradle.feature.compile") // for openrewrite id("org.openrewrite.rewrite") version "7.6.1" - id("org.itsallcode.openfasttrace") version "3.0.1" - - id("com.adarshr.test-logger") version "4.0.0" } // OpenRewrite should rewrite all sources @@ -51,65 +45,6 @@ requirementTracing { // TODO: Short Tag Importer: https://github.com/itsallcode/openfasttrace-gradle#configuring-the-short-tag-importer } - -subprojects { - plugins.apply("checkstyle") - - plugins.apply("com.github.andygoossens.modernizer") - - // Hint from https://stackoverflow.com/a/46533151/873282 - plugins.apply("com.adarshr.test-logger") - - checkstyle { - toolVersion = "10.23.0" - configFile = rootProject.file("config/checkstyle/checkstyle.xml") - } - - tasks.withType().configureEach { - reports { - xml.required.set(false) - html.required.set(true) - } - source = fileTree("src") { include("**/*.java") } - } - - configurations.named("checkstyle") { - resolutionStrategy.capabilitiesResolution.withCapability("com.google.collections:google-collections") { - select("com.google.guava:guava:0") - } - } - - modernizer { - failOnViolations = true - includeTestClasses = true - exclusions = setOf( - "java/util/Optional.get:()Ljava/lang/Object;" - ) - } - - testlogger { - // See https://github.com/radarsh/gradle-test-logger-plugin#configuration for configuration options - - theme = com.adarshr.gradle.testlogger.theme.ThemeType.STANDARD - - showPassed = false - showSkipped = false - - showCauses = false - showStackTraces = false - } - - tasks.withType().configureEach { - reports.html.outputLocation.set(file("${reporting.baseDirectory}/${name}")) - - // Enable parallel tests (on desktop). - // See https://docs.gradle.org/8.1/userguide/performance.html#execute_tests_in_parallel for details. - if (!providers.environmentVariable("CI").isPresent) { - maxParallelForks = maxOf(Runtime.getRuntime().availableProcessors() - 1, 1) - } - } -} - // TODO: "run" should run the GUI, not all modules tasks.register("run") { group = "application" diff --git a/jabgui/build.gradle.kts b/jabgui/build.gradle.kts index 11f2cf15a90..e18d1137204 100644 --- a/jabgui/build.gradle.kts +++ b/jabgui/build.gradle.kts @@ -1,9 +1,8 @@ import org.gradle.internal.os.OperatingSystem plugins { - id("buildlogic.java-common-conventions") - - application + id("org.jabref.gradle.module") + id("application") // Do not activate; causes issues with the modularity plugin (no tests found etc) // id("com.redock.classpathtofile") version "0.1.0" @@ -14,142 +13,102 @@ plugins { group = "org.jabref" version = project.findProperty("projVersion") ?: "100.0.0" -val luceneVersion = "10.2.1" -val pdfbox = "3.0.5" - -val javafxVersion = "24.0.1" - dependencies { implementation(project(":jablib")) - implementation("org.openjfx:javafx-base:$javafxVersion") - implementation("org.openjfx:javafx-controls:$javafxVersion") - implementation("org.openjfx:javafx-fxml:$javafxVersion") - // implementation("org.openjfx:javafx-graphics:24.0.1") - implementation("org.openjfx:javafx-graphics:$javafxVersion") - implementation("org.openjfx:javafx-swing:$javafxVersion") - implementation("org.openjfx:javafx-web:$javafxVersion") - - implementation("org.slf4j:slf4j-api:2.0.17") - implementation("org.tinylog:tinylog-api:2.7.0") - implementation("org.tinylog:slf4j-tinylog:2.7.0") - implementation("org.tinylog:tinylog-impl:2.7.0") + implementation("org.openjfx:javafx-base") + implementation("org.openjfx:javafx-controls") + implementation("org.openjfx:javafx-fxml") + // implementation("org.openjfx:javafx-graphics") + implementation("org.openjfx:javafx-graphics") + implementation("org.openjfx:javafx-swing") + implementation("org.openjfx:javafx-web") + + implementation("org.slf4j:slf4j-api") + implementation("org.tinylog:tinylog-api") + implementation("org.tinylog:slf4j-tinylog") + implementation("org.tinylog:tinylog-impl") // route all requests to java.util.logging to SLF4J (which in turn routes to tinylog) - implementation("org.slf4j:jul-to-slf4j:2.0.17") + implementation("org.slf4j:jul-to-slf4j") // route all requests to log4j to SLF4J - implementation("org.apache.logging.log4j:log4j-to-slf4j:2.24.3") + implementation("org.apache.logging.log4j:log4j-to-slf4j") - implementation("org.jabref:afterburner.fx:2.0.0") { - exclude( group = "org.openjfx") - } - implementation("org.kordamp.ikonli:ikonli-javafx:12.4.0") - implementation("org.kordamp.ikonli:ikonli-materialdesign2-pack:12.4.0") + implementation("org.jabref:afterburner.fx") + implementation("org.kordamp.ikonli:ikonli-javafx") + implementation("org.kordamp.ikonli:ikonli-materialdesign2-pack") implementation("com.github.sialcasa.mvvmFX:mvvmfx-validation:f195849ca9") //jitpack - implementation("de.saxsys:mvvmfx:1.8.0") - implementation("org.fxmisc.flowless:flowless:0.7.4") - implementation("org.fxmisc.richtext:richtextfx:0.11.5") - implementation("com.dlsc.gemsfx:gemsfx:3.1.3") { - exclude(module = "javax.inject") // Split package, use only jakarta.inject - exclude(module = "commons-lang3") - exclude(group = "org.apache.commons.validator") - exclude(group = "org.apache.commons.commons-logging") - exclude(module = "kotlin-stdlib-jdk8") - exclude(group = "com.squareup.retrofit2") - exclude(group = "org.openjfx") - exclude(group = "org.apache.logging.log4j") - exclude(group = "tech.units") - } - implementation("com.dlsc.pdfviewfx:pdfviewfx:3.1.1") { - exclude(group = "org.openjfx") - exclude(module = "commons-lang3") - } + implementation("de.saxsys:mvvmfx") + implementation("org.fxmisc.flowless:flowless") + implementation("org.fxmisc.richtext:richtextfx") + implementation("com.dlsc.gemsfx:gemsfx") + implementation("com.dlsc.pdfviewfx:pdfviewfx") // Required by gemsfx - implementation("tech.units:indriya:2.2.3") + implementation("tech.units:indriya") // Required by gemsfx and langchain4j - implementation ("com.squareup.retrofit2:retrofit:3.0.0") { - exclude(group = "com.squareup.okhttp3") - } + implementation ("com.squareup.retrofit2:retrofit") - implementation("org.controlsfx:controlsfx:11.2.2") - implementation("org.jabref:easybind:2.2.1-SNAPSHOT") { - exclude(group = "org.openjfx") - } + implementation("org.controlsfx:controlsfx") + implementation("org.jabref:easybind") - implementation("org.apache.lucene:lucene-core:${luceneVersion}") - implementation("org.apache.lucene:lucene-queryparser:${luceneVersion}") - implementation("org.apache.lucene:lucene-queries:${luceneVersion}") - implementation("org.apache.lucene:lucene-analysis-common:${luceneVersion}") - implementation("org.apache.lucene:lucene-highlighter:${luceneVersion}") + implementation("org.apache.lucene:lucene-core") + implementation("org.apache.lucene:lucene-queryparser") + implementation("org.apache.lucene:lucene-queries") + implementation("org.apache.lucene:lucene-analysis-common") + implementation("org.apache.lucene:lucene-highlighter") - implementation("org.jsoup:jsoup:1.20.1") + implementation("org.jsoup:jsoup") // Because of GraalVM quirks, we need to ship that. See https://github.com/jspecify/jspecify/issues/389#issuecomment-1661130973 for details - implementation("org.jspecify:jspecify:1.0.0") + implementation("org.jspecify:jspecify") - implementation("com.google.guava:guava:33.4.8-jre") + implementation("com.google.guava:guava") - implementation("dev.langchain4j:langchain4j:1.0.1") + implementation("dev.langchain4j:langchain4j") - implementation("io.github.java-diff-utils:java-diff-utils:4.15") + implementation("io.github.java-diff-utils:java-diff-utils") - implementation("org.jooq:jool:0.9.15") + implementation("org.jooq:jool") - implementation("commons-io:commons-io:2.19.0") + implementation("commons-io:commons-io") - implementation ("org.apache.pdfbox:pdfbox:$pdfbox") { - exclude(group = "commons-logging") - } + implementation ("org.apache.pdfbox:pdfbox") - // implementation("net.java.dev.jna:jna:5.16.0") - implementation("net.java.dev.jna:jna-platform:5.17.0") + // implementation("net.java.dev.jna:jna") + implementation("net.java.dev.jna:jna-platform") - implementation("org.eclipse.jgit:org.eclipse.jgit:7.3.0.202506031305-r") + implementation("org.eclipse.jgit:org.eclipse.jgit") - implementation("com.konghq:unirest-java-core:4.4.7") + implementation("com.konghq:unirest-java-core") - implementation("org.apache.httpcomponents.client5:httpclient5:5.5") + implementation("org.apache.httpcomponents.client5:httpclient5") - implementation("com.vladsch.flexmark:flexmark-html2md-converter:0.64.8") + implementation("com.vladsch.flexmark:flexmark-html2md-converter") - implementation("io.github.adr:e-adr:2.0.0-SNAPSHOT") + implementation("io.github.adr:e-adr") - implementation("org.libreoffice:unoloader:24.8.4") - implementation("org.libreoffice:libreoffice:24.8.4") + implementation("org.libreoffice:unoloader") + implementation("org.libreoffice:libreoffice") - implementation("com.github.javakeyring:java-keyring:1.0.4") + implementation("com.github.javakeyring:java-keyring") - implementation("info.picocli:picocli:4.7.7") - annotationProcessor("info.picocli:picocli-codegen:4.7.7") + implementation("info.picocli:picocli") + annotationProcessor("info.picocli:picocli-codegen") - implementation("de.undercouch:citeproc-java:3.3.0") { - exclude(group = "org.antlr") - } + implementation("de.undercouch:citeproc-java") testImplementation(project(":test-support")) - testImplementation("io.github.classgraph:classgraph:4.8.179") - testImplementation("org.testfx:testfx-core:4.0.16-alpha") - testImplementation("org.testfx:testfx-junit5:4.0.16-alpha") + testImplementation("io.github.classgraph:classgraph") + testImplementation("org.testfx:testfx-core") + testImplementation("org.testfx:testfx-junit5") - testImplementation("org.mockito:mockito-core:5.18.0") { - exclude(group = "net.bytebuddy", module = "byte-buddy") - } - testImplementation("net.bytebuddy:byte-buddy:1.17.6") + testImplementation("org.mockito:mockito-core") + testImplementation("net.bytebuddy:byte-buddy") - testImplementation("org.wiremock:wiremock:3.13.0") - // Required by Wiremock - and our patching of Wiremock - testImplementation("com.github.jknack:handlebars:4.4.0") { - exclude(group = "org.mozilla", module = "rhino") - } - testImplementation("com.github.jknack:handlebars-helpers:4.4.0") { - exclude(group = "org.mozilla", module = "rhino") - exclude(group = "org.apache.commons", module = "commons-lang3") - } - testImplementation("com.github.koppor:wiremock-slf4j-shim:main-SNAPSHOT") - testImplementation("com.github.koppor:wiremock-slf4j-spi-shim:main-SNAPSHOT") + testImplementation("org.wiremock:wiremock") - testImplementation("com.github.javaparser:javaparser-symbol-solver-core:3.27.0") + testImplementation("com.github.javaparser:javaparser-symbol-solver-core") } application { diff --git a/jabkit/build.gradle.kts b/jabkit/build.gradle.kts index c22ed912405..e7a833c8a7c 100644 --- a/jabkit/build.gradle.kts +++ b/jabkit/build.gradle.kts @@ -1,7 +1,6 @@ plugins { - id("buildlogic.java-common-conventions") - - application + id("org.jabref.gradle.module") + id("application") id("org.beryx.jlink") version "3.1.1" } @@ -9,59 +8,50 @@ plugins { group = "org.jabref.jabkit" version = project.findProperty("projVersion") ?: "100.0.0" -val luceneVersion = "10.2.1" - -val javafxVersion = "24.0.1" dependencies { implementation(project(":jablib")) // FIXME: Injector needs to be removed, no JavaFX dependencies, etc. - implementation("org.jabref:afterburner.fx:2.0.0") { - exclude( group = "org.openjfx") - } + implementation("org.jabref:afterburner.fx") - implementation("org.openjfx:javafx-base:$javafxVersion") - implementation("org.openjfx:javafx-controls:$javafxVersion") - implementation("org.openjfx:javafx-fxml:$javafxVersion") + implementation("org.openjfx:javafx-base") + implementation("org.openjfx:javafx-controls") + implementation("org.openjfx:javafx-fxml") // implementation("org.openjfx:javafx-graphics:$javafxVersion") - implementation("info.picocli:picocli:4.7.7") - annotationProcessor("info.picocli:picocli-codegen:4.7.7") + implementation("info.picocli:picocli") + annotationProcessor("info.picocli:picocli-codegen") // Because of GraalVM quirks, we need to ship that. See https://github.com/jspecify/jspecify/issues/389#issuecomment-1661130973 for details - implementation("org.jspecify:jspecify:1.0.0") + implementation("org.jspecify:jspecify") - implementation("org.slf4j:slf4j-api:2.0.17") - // implementation("org.tinylog:tinylog-api:2.7.0") - implementation("org.tinylog:slf4j-tinylog:2.7.0") - implementation("org.tinylog:tinylog-impl:2.7.0") + implementation("org.slf4j:slf4j-api") + // implementation("org.tinylog:tinylog-api") + implementation("org.tinylog:slf4j-tinylog") + implementation("org.tinylog:tinylog-impl") // route all requests to java.util.logging to SLF4J (which in turn routes to tinylog) - implementation("org.slf4j:jul-to-slf4j:2.0.17") + implementation("org.slf4j:jul-to-slf4j") // route all requests to log4j to SLF4J - implementation("org.apache.logging.log4j:log4j-to-slf4j:2.24.3") + implementation("org.apache.logging.log4j:log4j-to-slf4j") - implementation("com.google.guava:guava:33.4.8-jre") + implementation("com.google.guava:guava") - implementation("org.slf4j:slf4j-api:2.0.17") + implementation("org.slf4j:slf4j-api") // route all requests to java.util.logging to SLF4J (which in turn routes to tinylog in the CLI and GUI) - implementation("org.slf4j:jul-to-slf4j:2.0.17") + implementation("org.slf4j:jul-to-slf4j") // route all requests to log4j to SLF4J - implementation("org.apache.logging.log4j:log4j-to-slf4j:2.24.3") + implementation("org.apache.logging.log4j:log4j-to-slf4j") - implementation("org.jabref:afterburner.fx:2.0.0") { - exclude( group = "org.openjfx") - } + implementation("org.jabref:afterburner.fx") - implementation("org.apache.lucene:lucene-queryparser:${luceneVersion}") + implementation("org.apache.lucene:lucene-queryparser") - implementation("io.github.adr:e-adr:2.0.0-SNAPSHOT") + implementation("io.github.adr:e-adr") testImplementation(project(":test-support")) - testImplementation("org.mockito:mockito-core:5.18.0") { - exclude(group = "net.bytebuddy", module = "byte-buddy") - } - testImplementation("net.bytebuddy:byte-buddy:1.17.6") + testImplementation("org.mockito:mockito-core") + testImplementation("net.bytebuddy:byte-buddy") } javaModuleTesting.whitebox(testing.suites["test"]) { diff --git a/jablib/build.gradle.kts b/jablib/build.gradle.kts index 88f1e360ebd..ac953ee912d 100644 --- a/jablib/build.gradle.kts +++ b/jablib/build.gradle.kts @@ -7,11 +7,8 @@ import java.net.URI import java.util.* plugins { - id("buildlogic.java-common-conventions") - - `java-library` - - id("idea") + id("org.jabref.gradle.module") + id("java-library") id("antlr") id("com.github.bjornvester.xjc") version "1.8.1" @@ -25,25 +22,35 @@ plugins { id("com.github.koppor.jbang-gradle-plugin") version "fix-7-SNAPSHOT" } -val pdfbox = "3.0.5" -val luceneVersion = "10.2.1" - var version: String = project.findProperty("projVersion")?.toString() ?: "0.1.0" if (project.findProperty("tagbuild")?.toString() != "true") { version += "-SNAPSHOT" } -val javafxVersion = "24.0.1" +configurations.antlr { + extendsFrom(configurations.internal.get()) +} -dependencies { - implementation(fileTree(mapOf("dir" to("lib"), "includes" to listOf("*.jar")))) +configurations { + // Treat the ANTLR compiler as a separate tool that should not end up on the compile/runtime + // classpath of our runtime. + // https://github.com/gradle/gradle/issues/820 + api { setExtendsFrom(extendsFrom.filterNot { it == antlr.get() }) } + // Get ANTLR version from 'hiero-dependency-versions' + antlr { extendsFrom(configurations["internal"]) } +} +tasks.withType().configureEach { + dependsOn(tasks.withType()) +} - implementation("org.openjfx:javafx-base:$javafxVersion") +dependencies { + implementation("org.openjfx:javafx-base") // Required by afterburner.fx - implementation("org.openjfx:javafx-controls:$javafxVersion") - implementation("org.openjfx:javafx-fxml:$javafxVersion") - implementation("org.openjfx:javafx-graphics:$javafxVersion") + implementation("org.openjfx:javafx-controls") + implementation("org.openjfx:javafx-fxml") + implementation("org.openjfx:javafx-graphics") + implementation("com.ibm.icu:icu4j") // Fix "error: module not found: javafx.controls" during compilation // implementation("org.openjfx:javafx-controls:$javafxVersion") @@ -51,172 +58,133 @@ dependencies { // We do not use [Version Catalogs](https://docs.gradle.org/current/userguide/version_catalogs.html#sec:dependency-bundles), because // exclusions are not supported - implementation("org.jabref:afterburner.fx:2.0.0") { - exclude( group = "org.openjfx") - } - implementation("org.jabref:easybind:2.2.1-SNAPSHOT") { - exclude(group = "org.openjfx") - } + implementation("org.jabref:afterburner.fx") + implementation("org.jabref:easybind") - implementation ("org.apache.pdfbox:pdfbox:$pdfbox") { - exclude(group = "commons-logging") - } - implementation ("org.apache.pdfbox:fontbox:$pdfbox") { - exclude(group = "commons-logging") - } - implementation ("org.apache.pdfbox:xmpbox:$pdfbox") { - exclude(group = "org.junit.jupiter") - exclude(group = "commons-logging") - } + implementation ("org.apache.pdfbox:pdfbox") + implementation ("org.apache.pdfbox:fontbox") + implementation ("org.apache.pdfbox:xmpbox") - implementation("org.apache.lucene:lucene-core:$luceneVersion") - implementation("org.apache.lucene:lucene-queryparser:$luceneVersion") - implementation("org.apache.lucene:lucene-queries:$luceneVersion") - implementation("org.apache.lucene:lucene-analysis-common:$luceneVersion") - implementation("org.apache.lucene:lucene-highlighter:$luceneVersion") + implementation("org.apache.lucene:lucene-core") + implementation("org.apache.lucene:lucene-queryparser") + implementation("org.apache.lucene:lucene-queries") + implementation("org.apache.lucene:lucene-analysis-common") + implementation("org.apache.lucene:lucene-highlighter") - implementation("org.apache.commons:commons-csv:1.14.0") - implementation("org.apache.commons:commons-lang3:3.17.0") - implementation("org.apache.commons:commons-text:1.13.1") - implementation("commons-logging:commons-logging:1.3.5") + implementation("org.apache.commons:commons-csv") + implementation("org.apache.commons:commons-lang3") + implementation("org.apache.commons:commons-text") + implementation("commons-logging:commons-logging") - implementation("com.h2database:h2-mvstore:2.3.232") + implementation("com.h2database:h2-mvstore") // required for reading write-protected PDFs - see https://github.com/JabRef/jabref/pull/942#issuecomment-209252635 - implementation("org.bouncycastle:bcprov-jdk18on:1.80") + implementation("org.bouncycastle:bcprov-jdk18on") // region: LibreOffice - implementation("org.libreoffice:unoloader:24.8.4") - implementation("org.libreoffice:libreoffice:24.8.4") + implementation("org.libreoffice:unoloader") + implementation("org.libreoffice:libreoffice") // Required for ID generation - implementation("io.github.thibaultmeyer:cuid:2.0.3") + implementation("io.github.thibaultmeyer:cuid") // endregion - implementation("io.github.java-diff-utils:java-diff-utils:4.15") - implementation("info.debatty:java-string-similarity:2.0.0") + implementation("io.github.java-diff-utils:java-diff-utils") + implementation("info.debatty:java-string-similarity") - implementation("com.github.javakeyring:java-keyring:1.0.4") + implementation("com.github.javakeyring:java-keyring") - implementation("org.eclipse.jgit:org.eclipse.jgit:7.3.0.202506031305-r") + implementation("org.eclipse.jgit:org.eclipse.jgit") - implementation("com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.19.0") - implementation("com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.19.0") + implementation("com.fasterxml.jackson.dataformat:jackson-dataformat-yaml") + implementation("com.fasterxml.jackson.datatype:jackson-datatype-jsr310") // required by XJC - implementation("jakarta.xml.bind:jakarta.xml.bind-api:4.0.2") + implementation("jakarta.xml.bind:jakarta.xml.bind-api") - implementation("com.fasterxml:aalto-xml:1.3.3") + implementation("com.fasterxml:aalto-xml") - implementation("org.postgresql:postgresql:42.7.5") + implementation("org.postgresql:postgresql") - antlr("org.antlr:antlr4:4.13.2") { - // JabRef ships its own variant of icu4j as binary jar - exclude(group = "com.ibm.icu") - } - implementation("org.antlr:antlr4-runtime:4.13.2") + antlr("org.antlr:antlr4") + implementation("org.antlr:antlr4-runtime") - implementation("com.google.guava:guava:33.4.8-jre") + implementation("com.google.guava:guava") - implementation("jakarta.annotation:jakarta.annotation-api:2.1.1") - implementation("jakarta.inject:jakarta.inject-api:2.0.1") + implementation("jakarta.annotation:jakarta.annotation-api") + implementation("jakarta.inject:jakarta.inject-api") // region HTTP clients - implementation("org.jsoup:jsoup:1.20.1") - implementation("com.konghq:unirest-java-core:4.4.7") - implementation("com.konghq:unirest-modules-gson:4.4.7") - implementation("org.apache.httpcomponents.client5:httpclient5:5.5") - implementation("jakarta.ws.rs:jakarta.ws.rs-api:4.0.0") + implementation("org.jsoup:jsoup") + implementation("com.konghq:unirest-java-core") + implementation("com.konghq:unirest-modules-gson") + implementation("org.apache.httpcomponents.client5:httpclient5") + implementation("jakarta.ws.rs:jakarta.ws.rs-api") // endregion - implementation("org.slf4j:slf4j-api:2.0.17") + implementation("org.slf4j:slf4j-api") // route all requests to java.util.logging to SLF4J (which in turn routes to tinylog in the CLI and GUI) - implementation("org.slf4j:jul-to-slf4j:2.0.17") + implementation("org.slf4j:jul-to-slf4j") // route all requests to log4j to SLF4J - implementation("org.apache.logging.log4j:log4j-to-slf4j:2.24.3") + implementation("org.apache.logging.log4j:log4j-to-slf4j") // required by org.jabref.generators (only) - implementation("org.tinylog:slf4j-tinylog:2.7.0") - implementation("org.tinylog:tinylog-api:2.7.0") - implementation("org.tinylog:tinylog-impl:2.7.0") + implementation("org.tinylog:slf4j-tinylog") + implementation("org.tinylog:tinylog-api") + implementation("org.tinylog:tinylog-impl") - implementation("de.undercouch:citeproc-java:3.3.0") { - exclude(group = "org.antlr") - } + implementation("de.undercouch:citeproc-java") - implementation("com.vladsch.flexmark:flexmark:0.64.8") - implementation("com.vladsch.flexmark:flexmark-html2md-converter:0.64.8") + implementation("com.vladsch.flexmark:flexmark") + implementation("com.vladsch.flexmark:flexmark-html2md-converter") - implementation("net.harawata:appdirs:1.4.0") + implementation("net.harawata:appdirs") - implementation("org.jooq:jool:0.9.15") + implementation("org.jooq:jool") // Because of GraalVM quirks, we need to ship that. See https://github.com/jspecify/jspecify/issues/389#issuecomment-1661130973 for details - implementation("org.jspecify:jspecify:1.0.0") + implementation("org.jspecify:jspecify") // parse plist files - implementation("com.googlecode.plist:dd-plist:1.28") + implementation("com.googlecode.plist:dd-plist") // Parse lnk files - implementation("com.github.vatbub:mslinks:1.0.6.2") + implementation("com.github.vatbub:mslinks") // YAML reading and writing - implementation("org.yaml:snakeyaml:2.4") + implementation("org.yaml:snakeyaml") // XJC related - implementation("org.glassfish.jaxb:jaxb-runtime:4.0.5") + implementation("org.glassfish.jaxb:jaxb-runtime") // region AI - implementation("dev.langchain4j:langchain4j:1.0.1") + implementation("dev.langchain4j:langchain4j") // Even though we use jvm-openai for LLM connection, we still need this package for tokenization. - implementation("dev.langchain4j:langchain4j-open-ai:1.0.1") { - exclude(group = "com.squareup.okhttp3") - exclude(group = "com.squareup.retrofit2", module = "retrofit") - exclude(group = "org.jetbrains.kotlin") - } - implementation("dev.langchain4j:langchain4j-mistral-ai:1.0.1-beta6") { - exclude(group = "com.squareup.okhttp3") - exclude(group = "com.squareup.retrofit2", module = "retrofit") - exclude(group = "org.jetbrains.kotlin") - } - implementation("dev.langchain4j:langchain4j-google-ai-gemini:1.0.1-beta6") { - exclude(group = "com.squareup.okhttp3") - exclude(group = "com.squareup.retrofit2", module = "retrofit") - } - implementation("dev.langchain4j:langchain4j-hugging-face:1.0.1-beta6") { - exclude(group = "com.squareup.okhttp3") - exclude(group = "com.squareup.retrofit2", module = "retrofit") - exclude(group = "org.jetbrains.kotlin") - } + implementation("dev.langchain4j:langchain4j-open-ai") + implementation("dev.langchain4j:langchain4j-mistral-ai") + implementation("dev.langchain4j:langchain4j-google-ai-gemini") + implementation("dev.langchain4j:langchain4j-hugging-face") - implementation("org.apache.velocity:velocity-engine-core:2.4.1") - implementation(platform("ai.djl:bom:0.33.0")) + implementation("org.apache.velocity:velocity-engine-core") implementation("ai.djl:api") implementation("ai.djl.huggingface:tokenizers") implementation("ai.djl.pytorch:pytorch-model-zoo") - implementation("io.github.stefanbratanov:jvm-openai:0.11.0") + implementation("io.github.stefanbratanov:jvm-openai") // openai depends on okhttp, which needs kotlin - see https://github.com/square/okhttp/issues/5299 for details - implementation("com.squareup.okhttp3:okhttp:4.12.0") { - exclude(group = "org.jetbrains.kotlin", module = "kotlin-stdlib-jdk8") - } + implementation("com.squareup.okhttp3:okhttp") // GemxFX also (transitively) depends on kotlin - implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:2.1.21") + implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8") // endregion - implementation("commons-io:commons-io:2.19.0") + implementation("commons-io:commons-io") - implementation("com.github.tomtung:latex2unicode_2.13:0.3.2") { - exclude(module = "fastparse_2.13") - } + implementation("com.github.tomtung:latex2unicode_2.13") - implementation ("de.rototor.snuggletex:snuggletex-jeuclid:1.3.0") { - exclude(group = "org.apache.xmlgraphics") - } + implementation("de.rototor.snuggletex:snuggletex-jeuclid") // Even if("compileOnly") is used, IntelliJ always adds to module-info.java. To avoid issues during committing, we use("implementation") instead of("compileOnly") - implementation("io.github.adr:e-adr:2.0.0-SNAPSHOT") + implementation("io.github.adr:e-adr") - implementation("io.zonky.test:embedded-postgres:2.1.0") - implementation(enforcedPlatform("io.zonky.test.postgres:embedded-postgres-binaries-bom:17.4.0")) + implementation("io.zonky.test:embedded-postgres") implementation("io.zonky.test.postgres:embedded-postgres-binaries-darwin-arm64v8") implementation("io.zonky.test.postgres:embedded-postgres-binaries-linux-arm64v8") @@ -225,40 +193,27 @@ dependencies { // loading of .fxml files in localization tests requires JabRef's GUI classes testImplementation(project(":jabgui")) - testImplementation("io.github.classgraph:classgraph:4.8.179") - testImplementation("org.junit.jupiter:junit-jupiter-api:5.12.2") - testImplementation("org.junit.jupiter:junit-jupiter:5.12.2") - testImplementation("org.junit.jupiter:junit-jupiter-params:5.12.2") - testImplementation("org.junit.platform:junit-platform-launcher:1.12.2") + testImplementation("io.github.classgraph:classgraph") + testImplementation("org.junit.jupiter:junit-jupiter-api") + testImplementation("org.junit.jupiter:junit-jupiter") + testImplementation("org.junit.jupiter:junit-jupiter-params") + testImplementation("org.junit.platform:junit-platform-launcher") - testImplementation("org.mockito:mockito-core:5.18.0") { - exclude(group = "net.bytebuddy", module = "byte-buddy") - } - testImplementation("net.bytebuddy:byte-buddy:1.17.6") + testImplementation("org.mockito:mockito-core") + testImplementation("net.bytebuddy:byte-buddy") - testImplementation("org.xmlunit:xmlunit-core:2.10.2") - testImplementation("org.xmlunit:xmlunit-matchers:2.10.2") - testRuntimeOnly("com.tngtech.archunit:archunit-junit5-engine:1.4.1") - testImplementation("com.tngtech.archunit:archunit-junit5-api:1.4.1") + testImplementation("org.xmlunit:xmlunit-core") + testImplementation("org.xmlunit:xmlunit-matchers") + testRuntimeOnly("com.tngtech.archunit:archunit-junit5-engine") + testImplementation("com.tngtech.archunit:archunit-junit5-api") - testImplementation("org.hamcrest:hamcrest-library:3.0") + testImplementation("org.hamcrest:hamcrest-library") - testImplementation("org.wiremock:wiremock:3.13.0") - // Required by Wiremock - and our patching of Wiremock - implementation("com.github.jknack:handlebars:4.3.1") { - exclude(group = "org.mozilla", module = "rhino") - } - implementation("com.github.jknack:handlebars-helpers:4.3.1") { - exclude(group = "org.mozilla", module = "rhino") - exclude(group = "org.apache.commons", module = "commons-lang3") - } - // no "test", because of https://github.com/gradlex-org/extra-java-module-info/issues/134#issuecomment-2956556651 - implementation("com.github.koppor:wiremock-slf4j-shim:main-SNAPSHOT") - testImplementation("com.github.koppor:wiremock-slf4j-spi-shim:main-SNAPSHOT") + testImplementation("org.wiremock:wiremock") // Required for LocalizationConsistencyTest - testImplementation("org.testfx:testfx-core:4.0.16-alpha") - testImplementation("org.testfx:testfx-junit5:4.0.16-alpha") + testImplementation("org.testfx:testfx-core") + testImplementation("org.testfx:testfx-junit5") } /* jacoco { diff --git a/jablib/lib/icu4j-src.jar b/jablib/lib/com/ibm/icu/icu4j/72.0.1/icu4j-72.0.1-sources.jar similarity index 100% rename from jablib/lib/icu4j-src.jar rename to jablib/lib/com/ibm/icu/icu4j/72.0.1/icu4j-72.0.1-sources.jar diff --git a/jablib/lib/icu4j.jar b/jablib/lib/com/ibm/icu/icu4j/72.0.1/icu4j-72.0.1.jar similarity index 100% rename from jablib/lib/icu4j.jar rename to jablib/lib/com/ibm/icu/icu4j/72.0.1/icu4j-72.0.1.jar diff --git a/jablib/lib/com/ibm/icu/icu4j/72.0.1/icu4j-72.0.1.pom b/jablib/lib/com/ibm/icu/icu4j/72.0.1/icu4j-72.0.1.pom new file mode 100644 index 00000000000..780071d49b2 --- /dev/null +++ b/jablib/lib/com/ibm/icu/icu4j/72.0.1/icu4j-72.0.1.pom @@ -0,0 +1,6 @@ + + 4.0.0 + com.ibm.icu + icu4j + 72.0.1 + diff --git a/jablib/lib/fastparse-2.3.3.jar b/jablib/lib/com/lihaoyi/fastparse/2.3.3/fastparse-2.3.3.jar similarity index 100% rename from jablib/lib/fastparse-2.3.3.jar rename to jablib/lib/com/lihaoyi/fastparse/2.3.3/fastparse-2.3.3.jar diff --git a/jablib/lib/com/lihaoyi/fastparse/2.3.3/fastparse-2.3.3.pom b/jablib/lib/com/lihaoyi/fastparse/2.3.3/fastparse-2.3.3.pom new file mode 100644 index 00000000000..9ada0fa4a43 --- /dev/null +++ b/jablib/lib/com/lihaoyi/fastparse/2.3.3/fastparse-2.3.3.pom @@ -0,0 +1,23 @@ + + 4.0.0 + com.lihaoyi + fastparse + 2.3.3 + + + + com.lihaoyi + sourcecode + 0.2.3 + + + com.lihaoyi + geny + 0.6.10 + + + org.scala-lang + scala-library + + + diff --git a/jablib/lib/geny-0.6.10.jar b/jablib/lib/com/lihaoyi/geny/0.6.10/geny-0.6.10.jar similarity index 100% rename from jablib/lib/geny-0.6.10.jar rename to jablib/lib/com/lihaoyi/geny/0.6.10/geny-0.6.10.jar diff --git a/jablib/lib/com/lihaoyi/geny/0.6.10/geny-0.6.10.pom b/jablib/lib/com/lihaoyi/geny/0.6.10/geny-0.6.10.pom new file mode 100644 index 00000000000..39fa1cdd326 --- /dev/null +++ b/jablib/lib/com/lihaoyi/geny/0.6.10/geny-0.6.10.pom @@ -0,0 +1,6 @@ + + 4.0.0 + com.lihaoyi + geny + 0.6.10 + diff --git a/jablib/lib/sourcecode-0.2.3.jar b/jablib/lib/com/lihaoyi/sourcecode/0.2.3/sourcecode-0.2.3.jar similarity index 100% rename from jablib/lib/sourcecode-0.2.3.jar rename to jablib/lib/com/lihaoyi/sourcecode/0.2.3/sourcecode-0.2.3.jar diff --git a/jablib/lib/com/lihaoyi/sourcecode/0.2.3/sourcecode-0.2.3.pom b/jablib/lib/com/lihaoyi/sourcecode/0.2.3/sourcecode-0.2.3.pom new file mode 100644 index 00000000000..9a8aa7f9e5b --- /dev/null +++ b/jablib/lib/com/lihaoyi/sourcecode/0.2.3/sourcecode-0.2.3.pom @@ -0,0 +1,6 @@ + + 4.0.0 + com.lihaoyi + sourcecode + 0.2.3 + diff --git a/jabsrv-cli/build.gradle.kts b/jabsrv-cli/build.gradle.kts index 8b1dfeeafd8..eb4390317c8 100644 --- a/jabsrv-cli/build.gradle.kts +++ b/jabsrv-cli/build.gradle.kts @@ -1,9 +1,8 @@ import org.gradle.api.tasks.testing.logging.TestExceptionFormat plugins { - id("buildlogic.java-common-conventions") - - application + id("org.jabref.gradle.module") + id("application") id("org.beryx.jlink") version "3.1.1" } @@ -33,72 +32,66 @@ dependencies { implementation("org.openjfx:javafx-fxml:${javafxVersion}") implementation ("org.openjfx:javafx-graphics:${javafxVersion}") - implementation("org.slf4j:slf4j-api:2.0.17") - implementation("org.tinylog:slf4j-tinylog:2.7.0") - implementation("org.tinylog:tinylog-impl:2.7.0") + implementation("org.slf4j:slf4j-api") + implementation("org.tinylog:slf4j-tinylog") + implementation("org.tinylog:tinylog-impl") // route all requests to java.util.logging to SLF4J (which in turn routes to tinylog) - implementation("org.slf4j:jul-to-slf4j:2.0.17") + implementation("org.slf4j:jul-to-slf4j") // route all requests to log4j to SLF4J - implementation("org.apache.logging.log4j:log4j-to-slf4j:2.24.3") - implementation("info.picocli:picocli:4.7.7") - annotationProcessor("info.picocli:picocli-codegen:4.7.7") + implementation("org.apache.logging.log4j:log4j-to-slf4j") + implementation("info.picocli:picocli") + annotationProcessor("info.picocli:picocli-codegen") // required because of "service implementation must be defined in the same module as the provides directive" - implementation("org.postgresql:postgresql:42.7.5") - implementation("org.bouncycastle:bcprov-jdk18on:1.80") - implementation("com.konghq:unirest-modules-gson:4.4.7") - implementation(platform("ai.djl:bom:0.33.0")) + implementation("org.postgresql:postgresql") + implementation("org.bouncycastle:bcprov-jdk18on") + implementation("com.konghq:unirest-modules-gson") implementation("ai.djl:api") implementation("ai.djl.huggingface:tokenizers") implementation("ai.djl.pytorch:pytorch-model-zoo") // Prevents errors at "createMergedModule" - // implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:2.1.20") + // implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8") // region copied from jabsrv // API - implementation("jakarta.ws.rs:jakarta.ws.rs-api:4.0.0") + implementation("jakarta.ws.rs:jakarta.ws.rs-api") // Implementation of the API - implementation("org.glassfish.jersey.core:jersey-server:3.1.10") + implementation("org.glassfish.jersey.core:jersey-server") // Injection framework - // implementation("org.glassfish.jersey.inject:jersey-hk2:3.1.10") - // implementation("org.glassfish.hk2:hk2-api:3.1.1") - // implementation("org.glassfish.hk2:hk2-utils:3.1.1") + // implementation("org.glassfish.jersey.inject:jersey-hk2") + // implementation("org.glassfish.hk2:hk2-api") + // implementation("org.glassfish.hk2:hk2-utils") // Just to avoid the compiler error " org.glassfish.hk2.extension.ServiceLocatorGenerator: module jabsrv.merged.module does not declare `uses`" - // implementation("org.glassfish.hk2:hk2-locator:3.1.1") + // implementation("org.glassfish.hk2:hk2-locator") - // testImplementation("org.glassfish.hk2:hk2-testing:3.0.4") - // implementation("org.glassfish.hk2:hk2-testing-jersey:3.0.4") - // testImplementation("org.glassfish.hk2:hk2-junitrunner:3.0.4") + // testImplementation("org.glassfish.hk2:hk2-testing") + // implementation("org.glassfish.hk2:hk2-testing-jersey") + // testImplementation("org.glassfish.hk2:hk2-junitrunner") // HTTP server - // implementation("org.glassfish.jersey.containers:jersey-container-netty-http:3.1.1") - implementation("org.glassfish.jersey.containers:jersey-container-grizzly2-http:3.1.10") - implementation("org.glassfish.grizzly:grizzly-http-server:4.0.2") - implementation("org.glassfish.grizzly:grizzly-framework:4.0.2") - testImplementation("org.glassfish.jersey.test-framework.providers:jersey-test-framework-provider-grizzly2:3.1.10") - implementation("jakarta.validation:jakarta.validation-api:3.1.1") - implementation("org.hibernate.validator:hibernate-validator:9.0.0.Final") + // implementation("org.glassfish.jersey.containers:jersey-container-netty-http") + implementation("org.glassfish.jersey.containers:jersey-container-grizzly2-http") + implementation("org.glassfish.grizzly:grizzly-http-server") + implementation("org.glassfish.grizzly:grizzly-framework") + testImplementation("org.glassfish.jersey.test-framework.providers:jersey-test-framework-provider-grizzly2") + implementation("jakarta.validation:jakarta.validation-api") + implementation("org.hibernate.validator:hibernate-validator") - implementation("com.konghq:unirest-modules-gson:4.4.7") + implementation("com.konghq:unirest-modules-gson") // Allow objects "magically" to be mapped to JSON using GSON - // implementation("org.glassfish.jersey.media:jersey-media-json-gson:3.1.1") - - implementation("com.google.guava:guava:33.4.8-jre") + // implementation("org.glassfish.jersey.media:jersey-media-json-gson") - implementation("org.jabref:afterburner.fx:2.0.0") { - exclude( group = "org.openjfx") - } + implementation("com.google.guava:guava") - implementation("net.harawata:appdirs:1.4.0") + implementation("org.jabref:afterburner.fx") + implementation("net.harawata:appdirs") - implementation("de.undercouch:citeproc-java:3.3.0") { - exclude(group = "org.antlr") - } + implementation("de.undercouch:citeproc-java") // endregion } diff --git a/jabsrv/build.gradle.kts b/jabsrv/build.gradle.kts index d65a17e8339..780b38f029c 100644 --- a/jabsrv/build.gradle.kts +++ b/jabsrv/build.gradle.kts @@ -1,75 +1,65 @@ import org.gradle.api.tasks.testing.logging.TestExceptionFormat plugins { - id("buildlogic.java-common-conventions") - - `java-library` + id("org.jabref.gradle.module") + id("java-library") } -val javafxVersion = "24.0.1" -val javafxPlatform: String by project.extra - dependencies { api(project(":jablib")) - implementation("org.slf4j:slf4j-api:2.0.17") + implementation("org.slf4j:slf4j-api") // API - implementation("jakarta.ws.rs:jakarta.ws.rs-api:4.0.0") + implementation("jakarta.ws.rs:jakarta.ws.rs-api") // Implementation of the API - implementation("org.glassfish.jersey.core:jersey-server:3.1.10") + implementation("org.glassfish.jersey.core:jersey-server") // Injection framework - implementation("org.glassfish.jersey.inject:jersey-hk2:3.1.10") - implementation("org.glassfish.hk2:hk2-api:3.1.1") - implementation("org.glassfish.hk2:hk2-utils:3.1.1") - implementation("org.glassfish.hk2:hk2-locator:3.1.1") + implementation("org.glassfish.jersey.inject:jersey-hk2") + implementation("org.glassfish.hk2:hk2-api") + implementation("org.glassfish.hk2:hk2-utils") + implementation("org.glassfish.hk2:hk2-locator") - // testImplementation("org.glassfish.hk2:hk2-testing:3.0.4") - // implementation("org.glassfish.hk2:hk2-testing-jersey:3.0.4") - // testImplementation("org.glassfish.hk2:hk2-junitrunner:3.0.4") + // testImplementation("org.glassfish.hk2:hk2-testing") + // implementation("org.glassfish.hk2:hk2-testing-jersey") + // testImplementation("org.glassfish.hk2:hk2-junitrunner") // HTTP server - // implementation("org.glassfish.jersey.containers:jersey-container-netty-http:3.1.1") - implementation("org.glassfish.jersey.containers:jersey-container-grizzly2-http:3.1.10") - implementation("org.glassfish.grizzly:grizzly-http-server:4.0.2") - implementation("org.glassfish.grizzly:grizzly-framework:4.0.2") - testImplementation("org.glassfish.jersey.test-framework.providers:jersey-test-framework-provider-grizzly2:3.1.10") - implementation("jakarta.validation:jakarta.validation-api:3.1.1") - implementation("org.hibernate.validator:hibernate-validator:9.0.0.Final") + // implementation("org.glassfish.jersey.containers:jersey-container-netty-http") + implementation("org.glassfish.jersey.containers:jersey-container-grizzly2-http") + implementation("org.glassfish.grizzly:grizzly-http-server") + implementation("org.glassfish.grizzly:grizzly-framework") + testImplementation("org.glassfish.jersey.test-framework.providers:jersey-test-framework-provider-grizzly2") + implementation("jakarta.validation:jakarta.validation-api") + implementation("org.hibernate.validator:hibernate-validator") - implementation("com.konghq:unirest-modules-gson:4.4.7") + implementation("com.konghq:unirest-modules-gson") // Allow objects "magically" to be mapped to JSON using GSON - // implementation("org.glassfish.jersey.media:jersey-media-json-gson:3.1.1") + // implementation("org.glassfish.jersey.media:jersey-media-json-gson") - implementation("com.google.guava:guava:33.4.8-jre") + implementation("com.google.guava:guava") - implementation("org.jabref:afterburner.fx:2.0.0") { - exclude( group = "org.openjfx") - } - implementation("org.openjfx:javafx-base:$javafxVersion") - implementation("org.openjfx:javafx-controls:$javafxVersion") - implementation("org.openjfx:javafx-fxml:$javafxVersion") + implementation("org.jabref:afterburner.fx") + implementation("org.openjfx:javafx-base") + implementation("org.openjfx:javafx-controls") + implementation("org.openjfx:javafx-fxml") - implementation("net.harawata:appdirs:1.4.0") + implementation("net.harawata:appdirs") - implementation("de.undercouch:citeproc-java:3.3.0") { - exclude(group = "org.antlr") - } + implementation("de.undercouch:citeproc-java") - testImplementation("org.mockito:mockito-core:5.18.0") { - exclude(group = "net.bytebuddy", module = "byte-buddy") - } - testImplementation("net.bytebuddy:byte-buddy:1.17.6") + testImplementation("org.mockito:mockito-core") + testImplementation("net.bytebuddy:byte-buddy") - testImplementation("org.tinylog:slf4j-tinylog:2.7.0") - testImplementation("org.tinylog:tinylog-impl:2.7.0") + testImplementation("org.tinylog:slf4j-tinylog") + testImplementation("org.tinylog:tinylog-impl") // route all requests to java.util.logging to SLF4J (which in turn routes to tinylog) - testImplementation("org.slf4j:jul-to-slf4j:2.0.17") + testImplementation("org.slf4j:jul-to-slf4j") // route all requests to log4j to SLF4J - testImplementation("org.apache.logging.log4j:log4j-to-slf4j:2.24.3") + testImplementation("org.apache.logging.log4j:log4j-to-slf4j") } diff --git a/settings.gradle.kts b/settings.gradle.kts index ef2af83f3f1..61d810ccdd9 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -26,7 +26,7 @@ plugins { rootProject.name = "JabRef" -include("jablib", "jabkit", "jabgui", "jabsrv", "jabsrv-cli", "test-support") +include("jablib", "jabkit", "jabgui", "jabsrv", "jabsrv-cli", "test-support", "versions") // https://github.com/gradlex-org/java-module-dependencies#plugin-dependency includeBuild(".") diff --git a/test-support/build.gradle.kts b/test-support/build.gradle.kts index e1b52579f96..d0296bc0bcb 100644 --- a/test-support/build.gradle.kts +++ b/test-support/build.gradle.kts @@ -1,32 +1,28 @@ plugins { - id("buildlogic.java-common-conventions") + id("org.jabref.gradle.module") + id("java-library") } -val javafxVersion = "24.0.1" -val javafxPlatform: String by project.extra - dependencies { implementation(project(":jablib")) - implementation("org.openjfx:javafx-base:$javafxVersion") - implementation("org.openjfx:javafx-controls:$javafxVersion") - implementation("org.openjfx:javafx-fxml:$javafxVersion") + implementation("org.openjfx:javafx-base") + implementation("org.openjfx:javafx-controls") + implementation("org.openjfx:javafx-fxml") - implementation("org.slf4j:slf4j-api:2.0.17") - implementation("org.tinylog:tinylog-api:2.7.0") - implementation("org.tinylog:slf4j-tinylog:2.7.0") - implementation("org.tinylog:tinylog-impl:2.7.0") + implementation("org.slf4j:slf4j-api") + implementation("org.tinylog:tinylog-api") + implementation("org.tinylog:slf4j-tinylog") + implementation("org.tinylog:tinylog-impl") // route all requests to java.util.logging to SLF4J (which in turn routes to tinylog) - implementation("org.slf4j:jul-to-slf4j:2.0.17") + implementation("org.slf4j:jul-to-slf4j") // route all requests to log4j to SLF4J - implementation("org.apache.logging.log4j:log4j-to-slf4j:2.24.3") + implementation("org.apache.logging.log4j:log4j-to-slf4j") - implementation("org.junit.jupiter:junit-jupiter-api:5.12.2") + implementation("org.junit.jupiter:junit-jupiter-api") - implementation("org.mockito:mockito-core:5.18.0") { - exclude(group = "net.bytebuddy", module = "byte-buddy") - } - implementation("net.bytebuddy:byte-buddy:1.17.6") + implementation("org.mockito:mockito-core") + implementation("net.bytebuddy:byte-buddy") - implementation("org.jspecify:jspecify:1.0.0") + implementation("org.jspecify:jspecify") } diff --git a/versions/build.gradle.kts b/versions/build.gradle.kts new file mode 100644 index 00000000000..2418d155f9e --- /dev/null +++ b/versions/build.gradle.kts @@ -0,0 +1,144 @@ +plugins { + id("java-platform") +} + +javaPlatform { + allowDependencies() +} + +val javafx = "24.0.1" +val lucene = "10.2.1" +val pdfbox = "3.0.5" + +dependencies { + api(platform("ai.djl:bom:0.33.0")) + api(enforcedPlatform("io.zonky.test.postgres:embedded-postgres-binaries-bom:17.4.0")) +} + +dependencies.constraints { + api("org.openjfx:javafx-base:$javafx") + api("org.openjfx:javafx-controls:$javafx") + api("org.openjfx:javafx-fxml:$javafx") + api("org.openjfx:javafx-graphics:${javafx}") + api("org.openjfx:javafx-swing:$javafx") + api("org.openjfx:javafx-web:$javafx") + + api("com.ibm.icu:icu4j:72.0.1!!") + + api("com.dlsc.gemsfx:gemsfx:3.1.3") + api("com.dlsc.pdfviewfx:pdfviewfx:3.1.1") + api("com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.19.0") + api("com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.19.0") + api("com.fasterxml:aalto-xml:1.3.3") + api("com.github.javakeyring:java-keyring:1.0.4") + api("com.github.javaparser:javaparser-symbol-solver-core:3.26.4") + api("com.github.jknack:handlebars-helpers:4.3.1") // Required by Wiremock - and our patching of Wiremock + api("com.github.jknack:handlebars:4.3.1") // Required by Wiremock - and our patching of Wiremock + api("com.github.koppor:wiremock-slf4j-shim:main-SNAPSHOT") + api("com.github.koppor:wiremock-slf4j-spi-shim:main-SNAPSHOT") + api("com.github.sialcasa.mvvmFX:mvvmfx-validation:f195849ca9") //jitpack + api("com.github.tomtung:latex2unicode_2.13:0.3.2") + api("com.github.vatbub:mslinks:1.0.6.2") + api("com.google.guava:guava:33.4.8-jre") + api("com.googlecode.plist:dd-plist:1.28") + api("com.h2database:h2-mvstore:2.3.232") + api("com.konghq:unirest-java-core:4.4.7") + api("com.konghq:unirest-modules-gson:4.4.7") + api("com.squareup.okhttp3:okhttp:4.12.0") + api("com.squareup.retrofit2:retrofit:3.0.0") + api("com.tngtech.archunit:archunit-junit5-api:1.4.1") + api("com.tngtech.archunit:archunit-junit5-engine:1.4.1") + api("com.vladsch.flexmark:flexmark-html2md-converter:0.64.8") + api("com.vladsch.flexmark:flexmark:0.64.8") + api("commons-cli:commons-cli:1.9.0") + api("commons-io:commons-io:2.19.0") + api("commons-logging:commons-logging:1.3.5") + api("de.rototor.snuggletex:snuggletex-jeuclid:1.3.0") + api("de.saxsys:mvvmfx:1.8.0") + api("de.undercouch:citeproc-java:3.3.0") + api("dev.langchain4j:langchain4j-google-ai-gemini:1.0.1-beta6") + api("dev.langchain4j:langchain4j-hugging-face:1.0.1-beta6") + api("dev.langchain4j:langchain4j-mistral-ai:1.0.1-beta6") + api("dev.langchain4j:langchain4j-open-ai:1.0.1") + api("dev.langchain4j:langchain4j:1.0.1") + api("info.debatty:java-string-similarity:2.0.0") + api("info.picocli:picocli-codegen:4.7.7") + api("info.picocli:picocli:4.7.7") + api("io.github.adr:e-adr:2.0.0-SNAPSHOT") + api("io.github.classgraph:classgraph:4.8.179") + api("io.github.java-diff-utils:java-diff-utils:4.15") + api("io.github.stefanbratanov:jvm-openai:0.11.0") + api("io.github.thibaultmeyer:cuid:2.0.3") + api("io.zonky.test.postgres:embedded-postgres-binaries-darwin-arm64v8") + api("io.zonky.test.postgres:embedded-postgres-binaries-linux-arm64v8") + api("io.zonky.test:embedded-postgres:2.1.0") + api("jakarta.annotation:jakarta.annotation-api:2.1.1") + api("jakarta.inject:jakarta.inject-api:2.0.1") + api("jakarta.validation:jakarta.validation-api:3.1.1") + api("jakarta.ws.rs:jakarta.ws.rs-api:4.0.0") + api("jakarta.xml.bind:jakarta.xml.bind-api:4.0.2") + api("net.bytebuddy:byte-buddy:1.17.5") + api("net.harawata:appdirs:1.4.0") + api("net.java.dev.jna:jna-platform:5.17.0") + api("org.antlr:antlr4-runtime:4.13.2") + api("org.antlr:antlr4:4.13.2") + api("org.apache.commons:commons-csv:1.14.0") + api("org.apache.commons:commons-lang3:3.17.0") + api("org.apache.commons:commons-text:1.13.1") + api("org.apache.httpcomponents.client5:httpclient5:5.5") + api("org.apache.logging.log4j:log4j-to-slf4j:2.24.3") + api("org.apache.lucene:lucene-analysis-common:$lucene") + api("org.apache.lucene:lucene-core:$lucene") + api("org.apache.lucene:lucene-highlighter:$lucene") + api("org.apache.lucene:lucene-queries:$lucene") + api("org.apache.lucene:lucene-queryparser:$lucene") + api("org.apache.pdfbox:fontbox:$pdfbox") + api("org.apache.pdfbox:pdfbox:$pdfbox") + api("org.apache.pdfbox:xmpbox:$pdfbox") + api("org.apache.velocity:velocity-engine-core:2.4.1") + api("org.bouncycastle:bcprov-jdk18on:1.80") + api("org.controlsfx:controlsfx:11.2.2") + api("org.eclipse.jgit:org.eclipse.jgit:7.3.0.202506031305-r") + api("org.fxmisc.flowless:flowless:0.7.4") + api("org.fxmisc.richtext:richtextfx:0.11.5") + api("org.glassfish.grizzly:grizzly-framework:4.0.2") + api("org.glassfish.grizzly:grizzly-http-server:4.0.2") + api("org.glassfish.hk2:hk2-api:3.1.1") + api("org.glassfish.hk2:hk2-locator:3.1.1") + api("org.glassfish.hk2:hk2-utils:3.1.1") + api("org.glassfish.jaxb:jaxb-runtime:4.0.5") + api("org.glassfish.jersey.containers:jersey-container-grizzly2-http:3.1.10") + api("org.glassfish.jersey.core:jersey-server:3.1.10") + api("org.glassfish.jersey.inject:jersey-hk2:3.1.10") + api("org.glassfish.jersey.test-framework.providers:jersey-test-framework-provider-grizzly2:3.1.10") + api("org.hamcrest:hamcrest-library:3.0") + api("org.hibernate.validator:hibernate-validator:9.0.0.Final") + api("org.jabref:afterburner.fx:2.0.0") + api("org.jabref:easybind:2.2.1-SNAPSHOT") + api("org.jetbrains.kotlin:kotlin-stdlib-jdk8:2.1.21") + api("org.jooq:jool:0.9.15") + api("org.jsoup:jsoup:1.20.1") + api("org.jspecify:jspecify:1.0.0") + api("org.junit.jupiter:junit-jupiter-api:5.12.2") + api("org.junit.jupiter:junit-jupiter-params:5.12.2") + api("org.junit.jupiter:junit-jupiter:5.12.2") + api("org.junit.platform:junit-platform-launcher:1.12.2") + api("org.kordamp.ikonli:ikonli-javafx:12.4.0") + api("org.kordamp.ikonli:ikonli-materialdesign2-pack:12.4.0") + api("org.libreoffice:libreoffice:24.8.4") + api("org.libreoffice:unoloader:24.8.4") + api("org.mockito:mockito-core:5.18.0") + api("org.postgresql:postgresql:42.7.5") + api("org.slf4j:jul-to-slf4j:2.0.17") + api("org.slf4j:slf4j-api:2.0.17") + api("org.testfx:testfx-core:4.0.16-alpha") + api("org.testfx:testfx-junit5:4.0.16-alpha") + api("org.tinylog:slf4j-tinylog:2.7.0") + api("org.tinylog:tinylog-api:2.7.0") + api("org.tinylog:tinylog-impl:2.7.0") + api("org.wiremock:wiremock:3.13.0") + api("org.xmlunit:xmlunit-core:2.10.2") + api("org.xmlunit:xmlunit-matchers:2.10.2") + api("org.yaml:snakeyaml:2.4") + api("tech.units:indriya:2.2.3") +}