From df89e63fd1a43d21dc5ef7988b5ebb88e5ebc61c Mon Sep 17 00:00:00 2001 From: Jendrik Johannes Date: Sat, 7 Jun 2025 17:10:20 +0200 Subject: [PATCH 01/42] Move subproject configuration into convention plugins --- build-logic/build.gradle.kts | 33 ++++----- ...ldlogic.java-common-conventions.gradle.kts | 32 ++------- ....jabref.gradle.check.checkstyle.gradle.kts | 16 +++++ ....jabref.gradle.check.modernizer.gradle.kts | 11 +++ .../org.jabref.gradle.feature.test.gradle.kts | 34 ++++++++++ build.gradle.kts | 67 ------------------- test-support/build.gradle.kts | 1 - 7 files changed, 85 insertions(+), 109 deletions(-) create mode 100644 build-logic/src/main/kotlin/org.jabref.gradle.check.checkstyle.gradle.kts create mode 100644 build-logic/src/main/kotlin/org.jabref.gradle.check.modernizer.gradle.kts create mode 100644 build-logic/src/main/kotlin/org.jabref.gradle.feature.test.gradle.kts diff --git a/build-logic/build.gradle.kts b/build-logic/build.gradle.kts index 94da12ccf4e..32ccc17ac2e 100644 --- a/build-logic/build.gradle.kts +++ b/build-logic/build.gradle.kts @@ -9,24 +9,27 @@ repositories { } dependencies { + implementation("com.adarshr:gradle-test-logger-plugin:4.0.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.3") +} - 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) - ) - } +// TODO jjohannes: is this still needed and where should it go? +configurations + .named { it.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) + ) } -} + } diff --git a/build-logic/src/main/kotlin/buildlogic.java-common-conventions.gradle.kts b/build-logic/src/main/kotlin/buildlogic.java-common-conventions.gradle.kts index d34c5d79e77..b1ec3d65d98 100644 --- a/build-logic/src/main/kotlin/buildlogic.java-common-conventions.gradle.kts +++ b/build-logic/src/main/kotlin/buildlogic.java-common-conventions.gradle.kts @@ -1,18 +1,15 @@ import org.gradle.internal.os.OperatingSystem plugins { - java - - id("idea") - - // id("jacoco") - + id("java") id("project-report") - id("org.gradlex.extra-java-module-info") + id("org.gradlex.java-module-packaging") id("org.gradlex.java-module-testing") id("org.gradlex.jvm-dependency-conflict-resolution") - id("org.gradlex.java-module-packaging") + + id("org.jabref.gradle.check.checkstyle") + id("org.jabref.gradle.check.modernizer") } repositories { @@ -26,13 +23,6 @@ repositories { 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() val osTarget = when { @@ -160,17 +150,7 @@ extraJavaModuleInfo { } } -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) @@ -190,7 +170,7 @@ java { } tasks.javadoc { - ( options as StandardJavadocDocletOptions).apply { + (options as StandardJavadocDocletOptions).apply { encoding = "UTF-8" // version = false // author = false 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.test.gradle.kts b/build-logic/src/main/kotlin/org.jabref.gradle.feature.test.gradle.kts new file mode 100644 index 00000000000..455497d293c --- /dev/null +++ b/build-logic/src/main/kotlin/org.jabref.gradle.feature.test.gradle.kts @@ -0,0 +1,34 @@ +plugins { + id("java") + // Hint from https://stackoverflow.com/a/46533151/873282 + id("com.adarshr.test-logger") +} + +testing { + @Suppress("UnstableApiUsage") + suites.named("test") { + useJUnitJupiter() + } +} + +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) + } +} + +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 +} diff --git a/build.gradle.kts b/build.gradle.kts index b563571507f..91601901376 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,14 +1,6 @@ plugins { - id("buildlogic.java-common-conventions") - - id("checkstyle") - - id("com.github.andygoossens.modernizer") version "1.11.0" 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 @@ -50,65 +42,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/test-support/build.gradle.kts b/test-support/build.gradle.kts index 67c50592910..e378d5ef9e2 100644 --- a/test-support/build.gradle.kts +++ b/test-support/build.gradle.kts @@ -3,7 +3,6 @@ plugins { } val javafxVersion = "24.0.1" -val javafxPlatform: String by project.extra dependencies { implementation(project(":jablib")) From 38ccffc3bc3b6b57f81d34f5b97492077b3d962f Mon Sep 17 00:00:00 2001 From: Jendrik Johannes Date: Sat, 7 Jun 2025 17:23:33 +0200 Subject: [PATCH 02/42] Structure convention plugins --- ...ldlogic.java-common-conventions.gradle.kts | 97 +------------------ ...jabref.gradle.base.repositories.gradle.kts | 10 ++ .../org.jabref.gradle.base.targets.gradle.kts | 45 +++++++++ ...g.jabref.gradle.feature.compile.gradle.kts | 22 +++++ ...g.jabref.gradle.feature.javadoc.gradle.kts | 22 +++++ .../org.jabref.gradle.feature.test.gradle.kts | 1 + jabsrv/build.gradle.kts | 1 - 7 files changed, 105 insertions(+), 93 deletions(-) create mode 100644 build-logic/src/main/kotlin/org.jabref.gradle.base.repositories.gradle.kts create mode 100644 build-logic/src/main/kotlin/org.jabref.gradle.base.targets.gradle.kts create mode 100644 build-logic/src/main/kotlin/org.jabref.gradle.feature.compile.gradle.kts create mode 100644 build-logic/src/main/kotlin/org.jabref.gradle.feature.javadoc.gradle.kts diff --git a/build-logic/src/main/kotlin/buildlogic.java-common-conventions.gradle.kts b/build-logic/src/main/kotlin/buildlogic.java-common-conventions.gradle.kts index b1ec3d65d98..351c6e1e260 100644 --- a/build-logic/src/main/kotlin/buildlogic.java-common-conventions.gradle.kts +++ b/build-logic/src/main/kotlin/buildlogic.java-common-conventions.gradle.kts @@ -1,67 +1,18 @@ -import org.gradle.internal.os.OperatingSystem - plugins { id("java") id("project-report") id("org.gradlex.extra-java-module-info") - id("org.gradlex.java-module-packaging") - id("org.gradlex.java-module-testing") id("org.gradlex.jvm-dependency-conflict-resolution") + 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") } -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") } -} - -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 -> "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 -javaModulePackaging { - target("ubuntu-22.04") { - operatingSystem = OperatingSystemFamily.LINUX - architecture = MachineArchitecture.X86_64 - 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)) -} - // Tell gradle which jar to use for which platform // Source: https://github.com/jjohannes/java-module-system/blob/be19f6c088dca511b6d9a7487dacf0b715dbadc1/gradle/plugins/src/main/kotlin/metadata-patch.gradle.kts#L14-L22 jvmDependencyConflicts.patch { @@ -149,41 +100,3 @@ extraJavaModuleInfo { exports("com.sun.javafx.scene.control") } } - -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 - // 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.AZUL - } -} - -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..e55671912fb --- /dev/null +++ b/build-logic/src/main/kotlin/org.jabref.gradle.base.repositories.gradle.kts @@ -0,0 +1,10 @@ +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") } +} 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..0250c4d4aa9 --- /dev/null +++ b/build-logic/src/main/kotlin/org.jabref.gradle.base.targets.gradle.kts @@ -0,0 +1,45 @@ +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 +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 -> "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 +javaModulePackaging { + target("ubuntu-22.04") { + operatingSystem = OperatingSystemFamily.LINUX + architecture = MachineArchitecture.X86_64 + 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.feature.compile.gradle.kts b/build-logic/src/main/kotlin/org.jabref.gradle.feature.compile.gradle.kts new file mode 100644 index 00000000000..7e9ba28246a --- /dev/null +++ b/build-logic/src/main/kotlin/org.jabref.gradle.feature.compile.gradle.kts @@ -0,0 +1,22 @@ +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 + // 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.AZUL + } +} 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 index 455497d293c..a55354b5acd 100644 --- 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 @@ -1,5 +1,6 @@ plugins { id("java") + id("org.gradlex.java-module-testing") // Hint from https://stackoverflow.com/a/46533151/873282 id("com.adarshr.test-logger") } diff --git a/jabsrv/build.gradle.kts b/jabsrv/build.gradle.kts index 3766335e966..f3adb1b01a2 100644 --- a/jabsrv/build.gradle.kts +++ b/jabsrv/build.gradle.kts @@ -7,7 +7,6 @@ plugins { } val javafxVersion = "24.0.1" -val javafxPlatform: String by project.extra dependencies { api(project(":jablib")) From a3c598e0220c8f0c1810ee6cf38bfc199d8db5e2 Mon Sep 17 00:00:00 2001 From: Jendrik Johannes Date: Sat, 7 Jun 2025 17:44:54 +0200 Subject: [PATCH 03/42] Extract dependency-rules convention plugin --- ...ldlogic.java-common-conventions.gradle.kts | 92 +------------------ ...ef.gradle.base.dependency-rules.gradle.kts | 92 +++++++++++++++++++ .../org.jabref.gradle.feature.test.gradle.kts | 2 - 3 files changed, 93 insertions(+), 93 deletions(-) create mode 100644 build-logic/src/main/kotlin/org.jabref.gradle.base.dependency-rules.gradle.kts diff --git a/build-logic/src/main/kotlin/buildlogic.java-common-conventions.gradle.kts b/build-logic/src/main/kotlin/buildlogic.java-common-conventions.gradle.kts index 351c6e1e260..83216741b67 100644 --- a/build-logic/src/main/kotlin/buildlogic.java-common-conventions.gradle.kts +++ b/build-logic/src/main/kotlin/buildlogic.java-common-conventions.gradle.kts @@ -1,9 +1,7 @@ plugins { id("java") id("project-report") - id("org.gradlex.extra-java-module-info") - id("org.gradlex.jvm-dependency-conflict-resolution") - + 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") @@ -12,91 +10,3 @@ plugins { id("org.jabref.gradle.check.checkstyle") id("org.jabref.gradle.check.modernizer") } - -// Tell gradle which jar to use for which platform -// Source: https://github.com/jjohannes/java-module-system/blob/be19f6c088dca511b6d9a7487dacf0b715dbadc1/gradle/plugins/src/main/kotlin/metadata-patch.gradle.kts#L14-L22 -jvmDependencyConflicts.patch { - listOf("base", "controls", "fxml", "graphics", "swing", "web", "media").forEach { jfxModule -> - module("org.openjfx:javafx-$jfxModule") { - addTargetPlatformVariant("", "none", "none") // matches the empty Jars: to get better errors - addTargetPlatformVariant("linux", OperatingSystemFamily.LINUX, MachineArchitecture.X86_64) - addTargetPlatformVariant("linux-aarch64", OperatingSystemFamily.LINUX, MachineArchitecture.ARM64) - addTargetPlatformVariant("mac", OperatingSystemFamily.MACOS, MachineArchitecture.X86_64) - addTargetPlatformVariant("mac-aarch64", OperatingSystemFamily.MACOS, MachineArchitecture.ARM64) - addTargetPlatformVariant("win", OperatingSystemFamily.WINDOWS, MachineArchitecture.X86_64) - } - } - // Source: https://github.com/jjohannes/java-module-system/blob/be19f6c088dca511b6d9a7487dacf0b715dbadc1/gradle/plugins/src/main/kotlin/metadata-patch.gradle.kts#L9 - module("com.google.guava:guava") { - removeDependency("com.google.code.findbugs:jsr305") - removeDependency("org.checkerframework:checker-qual") - removeDependency("com.google.errorprone:error_prone_annotations") - } -} - -extraJavaModuleInfo { - failOnMissingModuleInfo = false - failOnAutomaticModules = false - // skipLocalJars = true - deriveAutomaticModuleNamesFromFileNames = true - - module("org.openjfx:javafx-base", "javafx.base") { - overrideModuleName() - patchRealModule() - // jabgui requires at least "javafx.collections" - exportAllPackages() - } - - // required for testing of jablib - module("org.openjfx:javafx-fxml", "javafx.fxml") { - patchRealModule() - exportAllPackages() - - requiresTransitive("javafx.base") - requiresTransitive("javafx.graphics") - requiresTransitive("java.desktop") - } - - // required for testing - module("org.openjfx:javafx-graphics", "javafx.graphics") { - patchRealModule() - exportAllPackages() - - requiresTransitive("javafx.base") - requiresTransitive("java.desktop") - requiresTransitive("jdk.unsupported") - } - - module("org.controlsfx:controlsfx", "org.controlsfx.controls") { - patchRealModule() - - exports("impl.org.controlsfx.skin") - exports("org.controlsfx.control") - exports("org.controlsfx.control.action") - exports("org.controlsfx.control.decoration") - exports("org.controlsfx.control.table") - exports("org.controlsfx.control.textfield") - exports("org.controlsfx.dialog") - exports("org.controlsfx.validation") - exports("org.controlsfx.validation.decoration") - - requires("javafx.base") - requires("javafx.controls") - requires("javafx.graphics") - } - - module("org.openjfx:javafx-controls", "javafx.controls") { - patchRealModule() - - requiresTransitive("javafx.base"); - requiresTransitive("javafx.graphics"); - - exports("javafx.scene.chart") - exports("javafx.scene.control") - exports("javafx.scene.control.cell") - exports("javafx.scene.control.skin") - - // PATCH REASON: - exports("com.sun.javafx.scene.control") - } -} diff --git a/build-logic/src/main/kotlin/org.jabref.gradle.base.dependency-rules.gradle.kts b/build-logic/src/main/kotlin/org.jabref.gradle.base.dependency-rules.gradle.kts new file mode 100644 index 00000000000..d5e4c25bd9f --- /dev/null +++ b/build-logic/src/main/kotlin/org.jabref.gradle.base.dependency-rules.gradle.kts @@ -0,0 +1,92 @@ +plugins { + id("org.gradlex.extra-java-module-info") + id("org.gradlex.jvm-dependency-conflict-resolution") +} + +// Tell gradle which jar to use for which platform +// Source: https://github.com/jjohannes/java-module-system/blob/be19f6c088dca511b6d9a7487dacf0b715dbadc1/gradle/plugins/src/main/kotlin/metadata-patch.gradle.kts#L14-L22 +jvmDependencyConflicts.patch { + listOf("base", "controls", "fxml", "graphics", "swing", "web", "media").forEach { jfxModule -> + module("org.openjfx:javafx-$jfxModule") { + addTargetPlatformVariant("", "none", "none") // matches the empty Jars: to get better errors + addTargetPlatformVariant("linux", OperatingSystemFamily.LINUX, MachineArchitecture.X86_64) + addTargetPlatformVariant("linux-aarch64", OperatingSystemFamily.LINUX, MachineArchitecture.ARM64) + addTargetPlatformVariant("mac", OperatingSystemFamily.MACOS, MachineArchitecture.X86_64) + addTargetPlatformVariant("mac-aarch64", OperatingSystemFamily.MACOS, MachineArchitecture.ARM64) + addTargetPlatformVariant("win", OperatingSystemFamily.WINDOWS, MachineArchitecture.X86_64) + } + } + // Source: https://github.com/jjohannes/java-module-system/blob/be19f6c088dca511b6d9a7487dacf0b715dbadc1/gradle/plugins/src/main/kotlin/metadata-patch.gradle.kts#L9 + module("com.google.guava:guava") { + removeDependency("com.google.code.findbugs:jsr305") + removeDependency("org.checkerframework:checker-qual") + removeDependency("com.google.errorprone:error_prone_annotations") + } +} + +extraJavaModuleInfo { + failOnMissingModuleInfo = false + failOnAutomaticModules = false + // skipLocalJars = true + deriveAutomaticModuleNamesFromFileNames = true + + module("org.openjfx:javafx-base", "javafx.base") { + overrideModuleName() + patchRealModule() + // jabgui requires at least "javafx.collections" + exportAllPackages() + } + + // required for testing of jablib + module("org.openjfx:javafx-fxml", "javafx.fxml") { + patchRealModule() + exportAllPackages() + + requiresTransitive("javafx.base") + requiresTransitive("javafx.graphics") + requiresTransitive("java.desktop") + } + + // required for testing + module("org.openjfx:javafx-graphics", "javafx.graphics") { + patchRealModule() + exportAllPackages() + + requiresTransitive("javafx.base") + requiresTransitive("java.desktop") + requiresTransitive("jdk.unsupported") + } + + module("org.controlsfx:controlsfx", "org.controlsfx.controls") { + patchRealModule() + + exports("impl.org.controlsfx.skin") + exports("org.controlsfx.control") + exports("org.controlsfx.control.action") + exports("org.controlsfx.control.decoration") + exports("org.controlsfx.control.table") + exports("org.controlsfx.control.textfield") + exports("org.controlsfx.dialog") + exports("org.controlsfx.validation") + exports("org.controlsfx.validation.decoration") + + requires("javafx.base") + requires("javafx.controls") + requires("javafx.graphics") + } + + module("org.openjfx:javafx-controls", "javafx.controls") { + patchRealModule() + + requiresTransitive("javafx.base"); + requiresTransitive("javafx.graphics"); + + exports("javafx.scene.chart") + exports("javafx.scene.control") + exports("javafx.scene.control.cell") + exports("javafx.scene.control.skin") + + // PATCH REASON: + exports("com.sun.javafx.scene.control") + } +} 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 index a55354b5acd..1b40de5a289 100644 --- 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 @@ -13,8 +13,6 @@ testing { } 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) { From 837a02c0c6c215b784e28b808069d4b8eca85774 Mon Sep 17 00:00:00 2001 From: Jendrik Johannes Date: Sat, 7 Jun 2025 18:32:42 +0200 Subject: [PATCH 04/42] Rename: org.jabref.gradle.module --- ...nventions.gradle.kts => org.jabref.gradle.module.gradle.kts} | 0 jabgui/build.gradle.kts | 2 +- jabkit/build.gradle.kts | 2 +- jablib/build.gradle.kts | 2 +- jabsrv-cli/build.gradle.kts | 2 +- jabsrv/build.gradle.kts | 2 +- test-support/build.gradle.kts | 2 +- 7 files changed, 6 insertions(+), 6 deletions(-) rename build-logic/src/main/kotlin/{buildlogic.java-common-conventions.gradle.kts => org.jabref.gradle.module.gradle.kts} (100%) diff --git a/build-logic/src/main/kotlin/buildlogic.java-common-conventions.gradle.kts b/build-logic/src/main/kotlin/org.jabref.gradle.module.gradle.kts similarity index 100% rename from build-logic/src/main/kotlin/buildlogic.java-common-conventions.gradle.kts rename to build-logic/src/main/kotlin/org.jabref.gradle.module.gradle.kts diff --git a/jabgui/build.gradle.kts b/jabgui/build.gradle.kts index 9f4edb3b1d6..bf028903efe 100644 --- a/jabgui/build.gradle.kts +++ b/jabgui/build.gradle.kts @@ -1,7 +1,7 @@ import org.gradle.internal.os.OperatingSystem plugins { - id("buildlogic.java-common-conventions") + id("org.jabref.gradle.module") application diff --git a/jabkit/build.gradle.kts b/jabkit/build.gradle.kts index 5a581dc5a9b..e5dbb69a908 100644 --- a/jabkit/build.gradle.kts +++ b/jabkit/build.gradle.kts @@ -1,5 +1,5 @@ plugins { - id("buildlogic.java-common-conventions") + id("org.jabref.gradle.module") application diff --git a/jablib/build.gradle.kts b/jablib/build.gradle.kts index 4581f58e23f..3fbefa8fdb7 100644 --- a/jablib/build.gradle.kts +++ b/jablib/build.gradle.kts @@ -5,7 +5,7 @@ import org.gradle.api.tasks.testing.logging.TestExceptionFormat import java.util.* plugins { - id("buildlogic.java-common-conventions") + id("org.jabref.gradle.module") `java-library` diff --git a/jabsrv-cli/build.gradle.kts b/jabsrv-cli/build.gradle.kts index 8b1dfeeafd8..d09dc459ea9 100644 --- a/jabsrv-cli/build.gradle.kts +++ b/jabsrv-cli/build.gradle.kts @@ -1,7 +1,7 @@ import org.gradle.api.tasks.testing.logging.TestExceptionFormat plugins { - id("buildlogic.java-common-conventions") + id("org.jabref.gradle.module") application diff --git a/jabsrv/build.gradle.kts b/jabsrv/build.gradle.kts index f3adb1b01a2..73fed162cb7 100644 --- a/jabsrv/build.gradle.kts +++ b/jabsrv/build.gradle.kts @@ -1,7 +1,7 @@ import org.gradle.api.tasks.testing.logging.TestExceptionFormat plugins { - id("buildlogic.java-common-conventions") + id("org.jabref.gradle.module") `java-library` } diff --git a/test-support/build.gradle.kts b/test-support/build.gradle.kts index e378d5ef9e2..efd2d1ceceb 100644 --- a/test-support/build.gradle.kts +++ b/test-support/build.gradle.kts @@ -1,5 +1,5 @@ plugins { - id("buildlogic.java-common-conventions") + id("org.jabref.gradle.module") } val javafxVersion = "24.0.1" From fd6ec7c396968443697a37bd69fa04dc0b60ed16 Mon Sep 17 00:00:00 2001 From: Jendrik Johannes Date: Sat, 7 Jun 2025 19:21:02 +0200 Subject: [PATCH 05/42] Centralise version in platform --- .github/dependabot.yml | 9 +- .github/workflows/binaries-ea.yml | 1 + ...ef.gradle.base.dependency-rules.gradle.kts | 6 + jabgui/build.gradle.kts | 126 ++++++------ jabkit/build.gradle.kts | 64 +++--- jablib/build.gradle.kts | 190 +++++++++--------- jabsrv-cli/build.gradle.kts | 80 ++++---- jabsrv/build.gradle.kts | 75 ++++--- settings.gradle.kts | 2 +- test-support/build.gradle.kts | 28 +-- versions/build.gradle.kts | 138 +++++++++++++ 11 files changed, 420 insertions(+), 299 deletions(-) create mode 100644 versions/build.gradle.kts 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 f48fcda7369..a45171a5e62 100644 --- a/.github/workflows/binaries-ea.yml +++ b/.github/workflows/binaries-ea.yml @@ -174,6 +174,7 @@ jobs: - name: Tell gradle to use JDK ${{ env.jdk_version }} (linux, Windows) if: ${{ !startsWith(matrix.os, 'macos') }} + # TODO UPDATE THIS! 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.AZUL##" build-logic/src/main/kotlin/buildlogic.java-common-conventions.gradle.kts diff --git a/build-logic/src/main/kotlin/org.jabref.gradle.base.dependency-rules.gradle.kts b/build-logic/src/main/kotlin/org.jabref.gradle.base.dependency-rules.gradle.kts index d5e4c25bd9f..d62a10033f1 100644 --- a/build-logic/src/main/kotlin/org.jabref.gradle.base.dependency-rules.gradle.kts +++ b/build-logic/src/main/kotlin/org.jabref.gradle.base.dependency-rules.gradle.kts @@ -3,6 +3,12 @@ plugins { id("org.gradlex.jvm-dependency-conflict-resolution") } +jvmDependencyConflicts { + consistentResolution { + platform(":versions") + } +} + // Tell gradle which jar to use for which platform // Source: https://github.com/jjohannes/java-module-system/blob/be19f6c088dca511b6d9a7487dacf0b715dbadc1/gradle/plugins/src/main/kotlin/metadata-patch.gradle.kts#L14-L22 jvmDependencyConflicts.patch { diff --git a/jabgui/build.gradle.kts b/jabgui/build.gradle.kts index bf028903efe..efc3d2ac4ab 100644 --- a/jabgui/build.gradle.kts +++ b/jabgui/build.gradle.kts @@ -2,8 +2,7 @@ import org.gradle.internal.os.OperatingSystem plugins { id("org.jabref.gradle.module") - - application + id ("application") // Do not activate; causes issues with the modularity plugin (no tests found etc) // id("com.redock.classpathtofile") version "0.1.0" @@ -14,41 +13,36 @@ 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") { + implementation("org.jabref:afterburner.fx") { 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.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.1") { + implementation("de.saxsys:mvvmfx") + implementation("org.fxmisc.flowless:flowless") + implementation("org.fxmisc.richtext:richtextfx") + implementation("com.dlsc.gemsfx:gemsfx") { exclude(module = "javax.inject") // Split package, use only jakarta.inject exclude(module = "commons-lang3") exclude(group = "org.apache.commons.validator") @@ -59,88 +53,88 @@ dependencies { exclude(group = "org.apache.logging.log4j") exclude(group = "tech.units") } - implementation("com.dlsc.pdfviewfx:pdfviewfx:3.1.1") { + implementation("com.dlsc.pdfviewfx:pdfviewfx") { exclude(group = "org.openjfx") exclude(module = "commons-lang3") } // 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") { + implementation ("com.squareup.retrofit2:retrofit") { exclude(group = "com.squareup.okhttp3") } - implementation("org.controlsfx:controlsfx:11.2.2") - implementation("org.jabref:easybind:2.2.1-SNAPSHOT") { + implementation("org.controlsfx:controlsfx") + implementation("org.jabref:easybind") { exclude(group = "org.openjfx") } - 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") { + implementation ("org.apache.pdfbox:pdfbox") { exclude(group = "commons-logging") } - // 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.2.1.202505142326-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") { + implementation("de.undercouch:citeproc-java") { exclude(group = "org.antlr") } 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") { + testImplementation("org.mockito:mockito-core") { exclude(group = "net.bytebuddy", module = "byte-buddy") } - testImplementation("net.bytebuddy:byte-buddy:1.17.5") + testImplementation("net.bytebuddy:byte-buddy") // recommended by https://github.com/wiremock/wiremock/issues/2149#issuecomment-1835775954 - testImplementation("org.wiremock:wiremock-standalone:3.12.1") + testImplementation("org.wiremock:wiremock-standalone") - testImplementation("com.github.javaparser:javaparser-symbol-solver-core:3.26.4") + testImplementation("com.github.javaparser:javaparser-symbol-solver-core") } application { diff --git a/jabkit/build.gradle.kts b/jabkit/build.gradle.kts index e5dbb69a908..f44ad031340 100644 --- a/jabkit/build.gradle.kts +++ b/jabkit/build.gradle.kts @@ -1,7 +1,6 @@ plugins { id("org.jabref.gradle.module") - - application + id("application") id("org.beryx.jlink") version "3.1.1" } @@ -9,61 +8,58 @@ 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") { + exclude( group = "org.openjfx") // TODO jjohannes: remove exclude } - 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") { + exclude( group = "org.openjfx") // TODO jjohannes: remove exclude } - implementation("commons-cli:commons-cli:1.9.0") + implementation("commons-cli:commons-cli") - 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("org.mockito:mockito-core") { + exclude(group = "net.bytebuddy", module = "byte-buddy") // TODO jjohannes: remove exclude } - testImplementation("net.bytebuddy:byte-buddy:1.17.5") + testImplementation("net.bytebuddy:byte-buddy") } javaModuleTesting.whitebox(testing.suites["test"]) { @@ -85,11 +81,11 @@ application { // Also passed to launcher (https://badass-jlink-plugin.beryx.org/releases/latest/#launcher) applicationDefaultJvmArgs = listOf( // Enable JEP 450: Compact Object Headers - "-XX:+UnlockExperimentalVMOptions", "-XX:+UseCompactObjectHeaders", + "-XXUnlockExperimentalVMOptions", "-XXUseCompactObjectHeaders", // Default garbage collector is sufficient for CLI APP - // "-XX:+UseZGC", "-XX:+ZUncommit", - // "-XX:+UseStringDeduplication", + // "-XXUseZGC", "-XXZUncommit", + // "-XXUseStringDeduplication", "--enable-native-access=com.sun.jna,javafx.graphics,org.apache.lucene.core" ) diff --git a/jablib/build.gradle.kts b/jablib/build.gradle.kts index 3fbefa8fdb7..13b810ccba8 100644 --- a/jablib/build.gradle.kts +++ b/jablib/build.gradle.kts @@ -6,10 +6,7 @@ import java.util.* plugins { id("org.jabref.gradle.module") - - `java-library` - - id("idea") + id("java-library") id("antlr") id("com.github.bjornvester.xjc") version "1.8.1" @@ -19,25 +16,24 @@ plugins { id("com.vanniktech.maven.publish") version "0.32.0" } -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")))) - implementation("org.openjfx:javafx-base:$javafxVersion") + 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") // Fix "error: module not found: javafx.controls" during compilation // implementation("org.openjfx:javafx-controls:$javafxVersion") @@ -45,172 +41,172 @@ 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") { + implementation("org.jabref:afterburner.fx") { exclude( group = "org.openjfx") } - implementation("org.jabref:easybind:2.2.1-SNAPSHOT") { + implementation("org.jabref:easybind") { exclude(group = "org.openjfx") } - implementation ("org.apache.pdfbox:pdfbox:$pdfbox") { + implementation ("org.apache.pdfbox:pdfbox") { exclude(group = "commons-logging") } - implementation ("org.apache.pdfbox:fontbox:$pdfbox") { + implementation ("org.apache.pdfbox:fontbox") { exclude(group = "commons-logging") } - implementation ("org.apache.pdfbox:xmpbox:$pdfbox") { + implementation ("org.apache.pdfbox:xmpbox") { exclude(group = "org.junit.jupiter") exclude(group = "commons-logging") } - 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.2.1.202505142326-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") { + antlr("org.antlr:antlr4") { // JabRef ships its own variant of icu4j as binary jar exclude(group = "com.ibm.icu") } - implementation("org.antlr:antlr4-runtime:4.13.2") + 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") { + implementation("de.undercouch:citeproc-java") { exclude(group = "org.antlr") } - 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") { + implementation("dev.langchain4j:langchain4j-open-ai") { 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") { + implementation("dev.langchain4j:langchain4j-mistral-ai") { 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") { + implementation("dev.langchain4j:langchain4j-google-ai-gemini") { exclude(group = "com.squareup.okhttp3") exclude(group = "com.squareup.retrofit2", module = "retrofit") } - implementation("dev.langchain4j:langchain4j-hugging-face:1.0.1-beta6") { + implementation("dev.langchain4j:langchain4j-hugging-face") { exclude(group = "com.squareup.okhttp3") exclude(group = "com.squareup.retrofit2", module = "retrofit") exclude(group = "org.jetbrains.kotlin") } - 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(platform("ai.djl:bom")) 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") { + implementation("com.squareup.okhttp3:okhttp") { exclude(group = "org.jetbrains.kotlin", module = "kotlin-stdlib-jdk8") } // 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") { + implementation("com.github.tomtung:latex2unicode_2.13") { exclude(module = "fastparse_2.13") } - implementation ("de.rototor.snuggletex:snuggletex-jeuclid:1.3.0") { + implementation ("de.rototor.snuggletex:snuggletex-jeuclid") { exclude(group = "org.apache.xmlgraphics") } // 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(enforcedPlatform("io.zonky.test.postgres:embedded-postgres-binaries-bom")) implementation("io.zonky.test.postgres:embedded-postgres-binaries-darwin-arm64v8") implementation("io.zonky.test.postgres:embedded-postgres-binaries-linux-arm64v8") @@ -219,30 +215,30 @@ 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") { + testImplementation("org.mockito:mockito-core") { exclude(group = "net.bytebuddy", module = "byte-buddy") } - testImplementation("net.bytebuddy:byte-buddy:1.17.5") + testImplementation("net.bytebuddy:byte-buddy") - testImplementation("org.xmlunit:xmlunit-core:2.10.1") - 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") // recommended by https://github.com/wiremock/wiremock/issues/2149#issuecomment-1835775954 - testImplementation("org.wiremock:wiremock-standalone:3.12.1") + testImplementation("org.wiremock:wiremock-standalone") // 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/jabsrv-cli/build.gradle.kts b/jabsrv-cli/build.gradle.kts index d09dc459ea9..b5d2c87c1a7 100644 --- a/jabsrv-cli/build.gradle.kts +++ b/jabsrv-cli/build.gradle.kts @@ -2,8 +2,7 @@ import org.gradle.api.tasks.testing.logging.TestExceptionFormat plugins { id("org.jabref.gradle.module") - - application + id("application") id("org.beryx.jlink") version "3.1.1" } @@ -14,10 +13,10 @@ application{ applicationDefaultJvmArgs = listOf( // Enable JEP 450: Compact Object Headers - "-XX:+UnlockExperimentalVMOptions", "-XX:+UseCompactObjectHeaders", + "-XXUnlockExperimentalVMOptions", "-XXUseCompactObjectHeaders", - "-XX:+UseZGC", "-XX:+ZUncommit", - "-XX:+UseStringDeduplication", + "-XXUseZGC", "-XXZUncommit", + "-XXUseStringDeduplication", "--enable-native-access=com.sun.jna,org.apache.lucene.core" ) @@ -33,71 +32,70 @@ 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("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.jabref:afterburner.fx") { + exclude( group = "org.openjfx") // TODO jjohannes: remove exclude } - 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") { + exclude(group = "org.antlr") // TODO jjohannes: remove exclude } // endregion diff --git a/jabsrv/build.gradle.kts b/jabsrv/build.gradle.kts index 73fed162cb7..f3283c9d9c9 100644 --- a/jabsrv/build.gradle.kts +++ b/jabsrv/build.gradle.kts @@ -2,73 +2,70 @@ import org.gradle.api.tasks.testing.logging.TestExceptionFormat plugins { id("org.jabref.gradle.module") - - `java-library` + id("java-library") } -val javafxVersion = "24.0.1" - 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.jabref:afterburner.fx") { + exclude( group = "org.openjfx") // TODO jjohannes: remove exclude } - 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("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") { + exclude(group = "org.antlr") // TODO jjohannes: remove exclude } - testImplementation("org.mockito:mockito-core:5.18.0") { - exclude(group = "net.bytebuddy", module = "byte-buddy") + testImplementation("org.mockito:mockito-core") { + exclude(group = "net.bytebuddy", module = "byte-buddy") // TODO jjohannes: remove exclude } - testImplementation("net.bytebuddy:byte-buddy:1.17.5") + 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 e0e189e6a4b..1f9c6dab0d7 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -8,7 +8,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 efd2d1ceceb..60d98740a79 100644 --- a/test-support/build.gradle.kts +++ b/test-support/build.gradle.kts @@ -7,25 +7,25 @@ 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-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("org.mockito:mockito-core") { + exclude(group = "net.bytebuddy", module = "byte-buddy") // TODO jjohannes: remove exclude } - implementation("net.bytebuddy:byte-buddy:1.17.5") + 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..83ecbacb09e --- /dev/null +++ b/versions/build.gradle.kts @@ -0,0 +1,138 @@ +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.dlsc.gemsfx:gemsfx:3.1.1") + 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.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.2.1.202505142326-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-standalone:3.12.1") + api("org.xmlunit:xmlunit-core:2.10.1") + api("org.xmlunit:xmlunit-matchers:2.10.2") + api("org.yaml:snakeyaml:2.4") + api("tech.units:indriya:2.2.3") +} From 4bbff58802fb0784428583eb944332382e028872 Mon Sep 17 00:00:00 2001 From: Jendrik Johannes Date: Sun, 8 Jun 2025 12:30:34 +0200 Subject: [PATCH 06/42] Remove excludes that have no effect --- .../org.jabref.gradle.feature.test.gradle.kts | 4 ++++ jabgui/build.gradle.kts | 18 ++++-------------- jabkit/build.gradle.kts | 12 +++--------- jablib/build.gradle.kts | 16 ++++------------ jabsrv-cli/build.gradle.kts | 9 ++------- jabsrv/build.gradle.kts | 12 +++--------- test-support/build.gradle.kts | 4 +--- 7 files changed, 21 insertions(+), 54 deletions(-) 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 index 1b40de5a289..f30830bbcf9 100644 --- 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 @@ -31,3 +31,7 @@ testlogger { showCauses = false showStackTraces = false } + +configurations.testCompileOnly { + extendsFrom(configurations.compileOnly.get()) +} diff --git a/jabgui/build.gradle.kts b/jabgui/build.gradle.kts index efc3d2ac4ab..428758ba3b2 100644 --- a/jabgui/build.gradle.kts +++ b/jabgui/build.gradle.kts @@ -33,9 +33,7 @@ dependencies { // route all requests to log4j to SLF4J implementation("org.apache.logging.log4j:log4j-to-slf4j") - implementation("org.jabref:afterburner.fx") { - exclude( group = "org.openjfx") - } + 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 @@ -49,12 +47,10 @@ dependencies { 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") { - exclude(group = "org.openjfx") exclude(module = "commons-lang3") } @@ -66,9 +62,7 @@ dependencies { } implementation("org.controlsfx:controlsfx") - implementation("org.jabref:easybind") { - exclude(group = "org.openjfx") - } + implementation("org.jabref:easybind") implementation("org.apache.lucene:lucene-core") implementation("org.apache.lucene:lucene-queryparser") @@ -116,9 +110,7 @@ dependencies { implementation("info.picocli:picocli") annotationProcessor("info.picocli:picocli-codegen") - implementation("de.undercouch:citeproc-java") { - exclude(group = "org.antlr") - } + implementation("de.undercouch:citeproc-java") testImplementation(project(":test-support")) @@ -126,9 +118,7 @@ dependencies { testImplementation("org.testfx:testfx-core") testImplementation("org.testfx:testfx-junit5") - testImplementation("org.mockito:mockito-core") { - exclude(group = "net.bytebuddy", module = "byte-buddy") - } + testImplementation("org.mockito:mockito-core") testImplementation("net.bytebuddy:byte-buddy") // recommended by https://github.com/wiremock/wiremock/issues/2149#issuecomment-1835775954 diff --git a/jabkit/build.gradle.kts b/jabkit/build.gradle.kts index f44ad031340..ce17dc601e9 100644 --- a/jabkit/build.gradle.kts +++ b/jabkit/build.gradle.kts @@ -13,9 +13,7 @@ dependencies { implementation(project(":jablib")) // FIXME: Injector needs to be removed, no JavaFX dependencies, etc. - implementation("org.jabref:afterburner.fx") { - exclude( group = "org.openjfx") // TODO jjohannes: remove exclude - } + implementation("org.jabref:afterburner.fx") implementation("org.openjfx:javafx-base") implementation("org.openjfx:javafx-controls") @@ -45,9 +43,7 @@ dependencies { // route all requests to log4j to SLF4J implementation("org.apache.logging.log4j:log4j-to-slf4j") - implementation("org.jabref:afterburner.fx") { - exclude( group = "org.openjfx") // TODO jjohannes: remove exclude - } + implementation("org.jabref:afterburner.fx") implementation("commons-cli:commons-cli") @@ -56,9 +52,7 @@ dependencies { implementation("io.github.adr:e-adr") testImplementation(project(":test-support")) - testImplementation("org.mockito:mockito-core") { - exclude(group = "net.bytebuddy", module = "byte-buddy") // TODO jjohannes: remove exclude - } + testImplementation("org.mockito:mockito-core") testImplementation("net.bytebuddy:byte-buddy") } diff --git a/jablib/build.gradle.kts b/jablib/build.gradle.kts index 13b810ccba8..d25414d9c52 100644 --- a/jablib/build.gradle.kts +++ b/jablib/build.gradle.kts @@ -41,12 +41,8 @@ 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") { - exclude( group = "org.openjfx") - } - implementation("org.jabref:easybind") { - exclude(group = "org.openjfx") - } + implementation("org.jabref:afterburner.fx") + implementation("org.jabref:easybind") implementation ("org.apache.pdfbox:pdfbox") { exclude(group = "commons-logging") @@ -129,9 +125,7 @@ dependencies { implementation("org.tinylog:tinylog-api") implementation("org.tinylog:tinylog-impl") - implementation("de.undercouch:citeproc-java") { - exclude(group = "org.antlr") - } + implementation("de.undercouch:citeproc-java") implementation("com.vladsch.flexmark:flexmark") implementation("com.vladsch.flexmark:flexmark-html2md-converter") @@ -221,9 +215,7 @@ dependencies { testImplementation("org.junit.jupiter:junit-jupiter-params") testImplementation("org.junit.platform:junit-platform-launcher") - testImplementation("org.mockito:mockito-core") { - exclude(group = "net.bytebuddy", module = "byte-buddy") - } + testImplementation("org.mockito:mockito-core") testImplementation("net.bytebuddy:byte-buddy") testImplementation("org.xmlunit:xmlunit-core") diff --git a/jabsrv-cli/build.gradle.kts b/jabsrv-cli/build.gradle.kts index b5d2c87c1a7..9e28f657256 100644 --- a/jabsrv-cli/build.gradle.kts +++ b/jabsrv-cli/build.gradle.kts @@ -88,15 +88,10 @@ dependencies { implementation("com.google.guava:guava") - implementation("org.jabref:afterburner.fx") { - exclude( group = "org.openjfx") // TODO jjohannes: remove exclude - } - + implementation("org.jabref:afterburner.fx") implementation("net.harawata:appdirs") - implementation("de.undercouch:citeproc-java") { - exclude(group = "org.antlr") // TODO jjohannes: remove exclude - } + implementation("de.undercouch:citeproc-java") // endregion } diff --git a/jabsrv/build.gradle.kts b/jabsrv/build.gradle.kts index f3283c9d9c9..780b38f029c 100644 --- a/jabsrv/build.gradle.kts +++ b/jabsrv/build.gradle.kts @@ -42,22 +42,16 @@ dependencies { implementation("com.google.guava:guava") - implementation("org.jabref:afterburner.fx") { - exclude( group = "org.openjfx") // TODO jjohannes: remove exclude - } + implementation("org.jabref:afterburner.fx") implementation("org.openjfx:javafx-base") implementation("org.openjfx:javafx-controls") implementation("org.openjfx:javafx-fxml") implementation("net.harawata:appdirs") - implementation("de.undercouch:citeproc-java") { - exclude(group = "org.antlr") // TODO jjohannes: remove exclude - } + implementation("de.undercouch:citeproc-java") - testImplementation("org.mockito:mockito-core") { - exclude(group = "net.bytebuddy", module = "byte-buddy") // TODO jjohannes: remove exclude - } + testImplementation("org.mockito:mockito-core") testImplementation("net.bytebuddy:byte-buddy") testImplementation("org.tinylog:slf4j-tinylog") diff --git a/test-support/build.gradle.kts b/test-support/build.gradle.kts index 60d98740a79..1c7dd5245b1 100644 --- a/test-support/build.gradle.kts +++ b/test-support/build.gradle.kts @@ -22,9 +22,7 @@ dependencies { implementation("org.junit.jupiter:junit-jupiter-api") - implementation("org.mockito:mockito-core") { - exclude(group = "net.bytebuddy", module = "byte-buddy") // TODO jjohannes: remove exclude - } + implementation("org.mockito:mockito-core") implementation("net.bytebuddy:byte-buddy") implementation("org.jspecify:jspecify") From 1e933c1b513745b1edd76930a4491e8510ce6a75 Mon Sep 17 00:00:00 2001 From: Jendrik Johannes Date: Sun, 8 Jun 2025 16:18:13 +0200 Subject: [PATCH 07/42] Remove excludes that have no effect (2) --- jabgui/build.gradle.kts | 18 +++--------------- jablib/build.gradle.kts | 40 ++++++++-------------------------------- 2 files changed, 11 insertions(+), 47 deletions(-) diff --git a/jabgui/build.gradle.kts b/jabgui/build.gradle.kts index 428758ba3b2..bc942599c1e 100644 --- a/jabgui/build.gradle.kts +++ b/jabgui/build.gradle.kts @@ -42,24 +42,14 @@ dependencies { implementation("org.fxmisc.richtext:richtextfx") implementation("com.dlsc.gemsfx:gemsfx") { 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.apache.logging.log4j") - exclude(group = "tech.units") - } - implementation("com.dlsc.pdfviewfx:pdfviewfx") { - exclude(module = "commons-lang3") } + implementation("com.dlsc.pdfviewfx:pdfviewfx") // Required by gemsfx implementation("tech.units:indriya") // Required by gemsfx and langchain4j - implementation ("com.squareup.retrofit2:retrofit") { - exclude(group = "com.squareup.okhttp3") - } + implementation ("com.squareup.retrofit2:retrofit") implementation("org.controlsfx:controlsfx") implementation("org.jabref:easybind") @@ -85,9 +75,7 @@ dependencies { implementation("commons-io:commons-io") - implementation ("org.apache.pdfbox:pdfbox") { - exclude(group = "commons-logging") - } + implementation ("org.apache.pdfbox:pdfbox") // implementation("net.java.dev.jna:jna") implementation("net.java.dev.jna:jna-platform") diff --git a/jablib/build.gradle.kts b/jablib/build.gradle.kts index d25414d9c52..f70b76e0344 100644 --- a/jablib/build.gradle.kts +++ b/jablib/build.gradle.kts @@ -44,16 +44,9 @@ dependencies { implementation("org.jabref:afterburner.fx") implementation("org.jabref:easybind") - implementation ("org.apache.pdfbox:pdfbox") { - exclude(group = "commons-logging") - } - implementation ("org.apache.pdfbox:fontbox") { - exclude(group = "commons-logging") - } - implementation ("org.apache.pdfbox:xmpbox") { - 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") implementation("org.apache.lucene:lucene-queryparser") @@ -152,25 +145,10 @@ dependencies { // region AI 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") { - exclude(group = "com.squareup.okhttp3") - exclude(group = "com.squareup.retrofit2", module = "retrofit") - exclude(group = "org.jetbrains.kotlin") - } - implementation("dev.langchain4j:langchain4j-mistral-ai") { - exclude(group = "com.squareup.okhttp3") - exclude(group = "com.squareup.retrofit2", module = "retrofit") - exclude(group = "org.jetbrains.kotlin") - } - implementation("dev.langchain4j:langchain4j-google-ai-gemini") { - exclude(group = "com.squareup.okhttp3") - exclude(group = "com.squareup.retrofit2", module = "retrofit") - } - implementation("dev.langchain4j:langchain4j-hugging-face") { - 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") implementation(platform("ai.djl:bom")) @@ -179,9 +157,7 @@ dependencies { implementation("ai.djl.pytorch:pytorch-model-zoo") 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") { - 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") // endregion From 790f1fe394c6083811acd03990eb60435a0cb2a4 Mon Sep 17 00:00:00 2001 From: Jendrik Johannes Date: Sun, 8 Jun 2025 16:20:53 +0200 Subject: [PATCH 08/42] Remove excludes that have no effect (3) --- jabgui/build.gradle.kts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/jabgui/build.gradle.kts b/jabgui/build.gradle.kts index bc942599c1e..fdbec138d3b 100644 --- a/jabgui/build.gradle.kts +++ b/jabgui/build.gradle.kts @@ -40,10 +40,7 @@ dependencies { implementation("de.saxsys:mvvmfx") implementation("org.fxmisc.flowless:flowless") implementation("org.fxmisc.richtext:richtextfx") - implementation("com.dlsc.gemsfx:gemsfx") { - exclude(module = "javax.inject") // Split package, use only jakarta.inject - exclude(group = "org.apache.logging.log4j") - } + implementation("com.dlsc.gemsfx:gemsfx") implementation("com.dlsc.pdfviewfx:pdfviewfx") // Required by gemsfx From 5c7f6c7fe845307ac91a79e2fa3bcd2c97164067 Mon Sep 17 00:00:00 2001 From: Jendrik Johannes Date: Sun, 8 Jun 2025 16:28:23 +0200 Subject: [PATCH 09/42] excludes -> metadata rules --- .../org.jabref.gradle.base.dependency-rules.gradle.kts | 8 ++++++++ jablib/build.gradle.kts | 8 ++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/build-logic/src/main/kotlin/org.jabref.gradle.base.dependency-rules.gradle.kts b/build-logic/src/main/kotlin/org.jabref.gradle.base.dependency-rules.gradle.kts index d62a10033f1..52fff57ea14 100644 --- a/build-logic/src/main/kotlin/org.jabref.gradle.base.dependency-rules.gradle.kts +++ b/build-logic/src/main/kotlin/org.jabref.gradle.base.dependency-rules.gradle.kts @@ -28,6 +28,14 @@ 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") + } + 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") + } } extraJavaModuleInfo { diff --git a/jablib/build.gradle.kts b/jablib/build.gradle.kts index f70b76e0344..d175808eaca 100644 --- a/jablib/build.gradle.kts +++ b/jablib/build.gradle.kts @@ -164,13 +164,9 @@ dependencies { implementation("commons-io:commons-io") - implementation("com.github.tomtung:latex2unicode_2.13") { - exclude(module = "fastparse_2.13") - } + implementation("com.github.tomtung:latex2unicode_2.13") - implementation ("de.rototor.snuggletex:snuggletex-jeuclid") { - 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") From ae14fa1928785b4129712c27432b93f00b347973 Mon Sep 17 00:00:00 2001 From: Jendrik Johannes Date: Sun, 8 Jun 2025 16:30:06 +0200 Subject: [PATCH 10/42] Remove duplicated 'platform' dependencies --- jablib/build.gradle.kts | 2 -- 1 file changed, 2 deletions(-) diff --git a/jablib/build.gradle.kts b/jablib/build.gradle.kts index d175808eaca..f6e27c5b897 100644 --- a/jablib/build.gradle.kts +++ b/jablib/build.gradle.kts @@ -151,7 +151,6 @@ dependencies { implementation("dev.langchain4j:langchain4j-hugging-face") implementation("org.apache.velocity:velocity-engine-core") - implementation(platform("ai.djl:bom")) implementation("ai.djl:api") implementation("ai.djl.huggingface:tokenizers") implementation("ai.djl.pytorch:pytorch-model-zoo") @@ -172,7 +171,6 @@ dependencies { implementation("io.github.adr:e-adr") implementation("io.zonky.test:embedded-postgres") - implementation(enforcedPlatform("io.zonky.test.postgres:embedded-postgres-binaries-bom")) implementation("io.zonky.test.postgres:embedded-postgres-binaries-darwin-arm64v8") implementation("io.zonky.test.postgres:embedded-postgres-binaries-linux-arm64v8") From 6de5cf42a202b13a0987594cd442562c30d3b9a1 Mon Sep 17 00:00:00 2001 From: Jendrik Johannes Date: Sun, 8 Jun 2025 16:58:31 +0200 Subject: [PATCH 11/42] Register 'jablib/lib' as maven repository --- .gitignore | 2 +- ...ef.gradle.base.dependency-rules.gradle.kts | 3 +++ ...jabref.gradle.base.repositories.gradle.kts | 2 ++ jablib/build.gradle.kts | 7 +------ .../icu4j/72.0.1/icu4j-72.0.1-sources.jar} | Bin .../ibm/icu/icu4j/72.0.1/icu4j-72.0.1.jar} | Bin .../com/ibm/icu/icu4j/72.0.1/icu4j-72.0.1.pom | 6 ++++++ .../fastparse/2.3.3}/fastparse-2.3.3.jar | Bin .../fastparse/2.3.3/fastparse-2.3.3.pom | 19 ++++++++++++++++++ .../lihaoyi/geny/0.6.10}/geny-0.6.10.jar | Bin .../com/lihaoyi/geny/0.6.10/geny-0.6.10.pom | 6 ++++++ .../sourcecode/0.2.3}/sourcecode-0.2.3.jar | Bin .../sourcecode/0.2.3/sourcecode-0.2.3.pom | 6 ++++++ versions/build.gradle.kts | 2 ++ 14 files changed, 46 insertions(+), 7 deletions(-) rename jablib/lib/{icu4j-src.jar => com/ibm/icu/icu4j/72.0.1/icu4j-72.0.1-sources.jar} (100%) rename jablib/lib/{icu4j.jar => com/ibm/icu/icu4j/72.0.1/icu4j-72.0.1.jar} (100%) create mode 100644 jablib/lib/com/ibm/icu/icu4j/72.0.1/icu4j-72.0.1.pom rename jablib/lib/{ => com/lihaoyi/fastparse/2.3.3}/fastparse-2.3.3.jar (100%) create mode 100644 jablib/lib/com/lihaoyi/fastparse/2.3.3/fastparse-2.3.3.pom rename jablib/lib/{ => com/lihaoyi/geny/0.6.10}/geny-0.6.10.jar (100%) create mode 100644 jablib/lib/com/lihaoyi/geny/0.6.10/geny-0.6.10.pom rename jablib/lib/{ => com/lihaoyi/sourcecode/0.2.3}/sourcecode-0.2.3.jar (100%) create mode 100644 jablib/lib/com/lihaoyi/sourcecode/0.2.3/sourcecode-0.2.3.pom 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/src/main/kotlin/org.jabref.gradle.base.dependency-rules.gradle.kts b/build-logic/src/main/kotlin/org.jabref.gradle.base.dependency-rules.gradle.kts index 52fff57ea14..52efb6fc45a 100644 --- a/build-logic/src/main/kotlin/org.jabref.gradle.base.dependency-rules.gradle.kts +++ b/build-logic/src/main/kotlin/org.jabref.gradle.base.dependency-rules.gradle.kts @@ -1,3 +1,5 @@ +import org.gradle.kotlin.dsl.accessors.runtime.addDependencyTo + plugins { id("org.gradlex.extra-java-module-info") id("org.gradlex.jvm-dependency-conflict-resolution") @@ -30,6 +32,7 @@ jvmDependencyConflicts.patch { } 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") 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 index e55671912fb..79a57f53ad6 100644 --- 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 @@ -7,4 +7,6 @@ repositories { // 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/jablib/build.gradle.kts b/jablib/build.gradle.kts index f6e27c5b897..80cd5b078b1 100644 --- a/jablib/build.gradle.kts +++ b/jablib/build.gradle.kts @@ -26,8 +26,6 @@ configurations.antlr { } dependencies { - implementation(fileTree(mapOf("dir" to("lib"), "includes" to listOf("*.jar")))) - implementation("org.openjfx:javafx-base") // Required by afterburner.fx @@ -88,10 +86,7 @@ dependencies { implementation("org.postgresql:postgresql") - antlr("org.antlr:antlr4") { - // JabRef ships its own variant of icu4j as binary jar - exclude(group = "com.ibm.icu") - } + antlr("org.antlr:antlr4") implementation("org.antlr:antlr4-runtime") implementation("com.google.guava:guava") 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..d8889e5eb10 --- /dev/null +++ b/jablib/lib/com/lihaoyi/fastparse/2.3.3/fastparse-2.3.3.pom @@ -0,0 +1,19 @@ + + 4.0.0 + com.lihaoyi + fastparse + 2.3.3 + + + + com.lihaoyi + sourcecode + 0.2.3 + + + com.lihaoyi + geny + 0.6.10 + + + 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/versions/build.gradle.kts b/versions/build.gradle.kts index 83ecbacb09e..256118ff119 100644 --- a/versions/build.gradle.kts +++ b/versions/build.gradle.kts @@ -23,6 +23,8 @@ dependencies.constraints { 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.1") api("com.dlsc.pdfviewfx:pdfviewfx:3.1.1") api("com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.19.0") From 68fcf7869d566f2bf52fa0fedfebbc478508ad5c Mon Sep 17 00:00:00 2001 From: Jendrik Johannes Date: Fri, 13 Jun 2025 10:52:59 +0200 Subject: [PATCH 12/42] Add dependency analysis plugin --- jablib/build.gradle.kts | 3 +++ test-support/build.gradle.kts | 3 +-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/jablib/build.gradle.kts b/jablib/build.gradle.kts index 80cd5b078b1..d43dedeb678 100644 --- a/jablib/build.gradle.kts +++ b/jablib/build.gradle.kts @@ -24,6 +24,9 @@ if (project.findProperty("tagbuild")?.toString() != "true") { configurations.antlr { extendsFrom(configurations.internal.get()) } +tasks.withType().configureEach { + dependsOn(tasks.withType()) +} dependencies { implementation("org.openjfx:javafx-base") diff --git a/test-support/build.gradle.kts b/test-support/build.gradle.kts index 1c7dd5245b1..d0296bc0bcb 100644 --- a/test-support/build.gradle.kts +++ b/test-support/build.gradle.kts @@ -1,9 +1,8 @@ plugins { id("org.jabref.gradle.module") + id("java-library") } -val javafxVersion = "24.0.1" - dependencies { implementation(project(":jablib")) From 1ff4ff6eedff8bc224503841d857c8cfa89dd888 Mon Sep 17 00:00:00 2001 From: Jendrik Johannes Date: Fri, 13 Jun 2025 11:48:37 +0200 Subject: [PATCH 13/42] Move versions of 'versions/build.gradle.kt' --- build-logic/build.gradle.kts | 3 ++- jabgui/build.gradle.kts | 12 +----------- jablib/build.gradle.kts | 13 +------------ versions/build.gradle.kts | 6 +++++- 4 files changed, 9 insertions(+), 25 deletions(-) diff --git a/build-logic/build.gradle.kts b/build-logic/build.gradle.kts index 7246ffefb4a..5c6ea7fd74f 100644 --- a/build-logic/build.gradle.kts +++ b/build-logic/build.gradle.kts @@ -10,11 +10,12 @@ 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") + implementation("org.gradlex:jvm-dependency-conflict-resolution:2.4") } // TODO jjohannes: is this still needed and where should it go? diff --git a/jabgui/build.gradle.kts b/jabgui/build.gradle.kts index 4bb37d01c8f..7c158c74ede 100644 --- a/jabgui/build.gradle.kts +++ b/jabgui/build.gradle.kts @@ -106,17 +106,7 @@ dependencies { 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.3.1") { - exclude(group = "org.mozilla", module = "rhino") - } - testImplementation("com.github.jknack:handlebars-helpers:4.3.1") { - 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") } diff --git a/jablib/build.gradle.kts b/jablib/build.gradle.kts index 28cf746c60b..3e56c9a54fc 100644 --- a/jablib/build.gradle.kts +++ b/jablib/build.gradle.kts @@ -193,18 +193,7 @@ dependencies { 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") diff --git a/versions/build.gradle.kts b/versions/build.gradle.kts index b70b50bf3a5..2418d155f9e 100644 --- a/versions/build.gradle.kts +++ b/versions/build.gradle.kts @@ -32,6 +32,10 @@ dependencies.constraints { 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") @@ -132,7 +136,7 @@ dependencies.constraints { 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-standalone:3.12.1") + 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") From d142c9b7f276c756f688657067acf4e266297051 Mon Sep 17 00:00:00 2001 From: Jendrik Johannes Date: Fri, 13 Jun 2025 12:20:18 +0200 Subject: [PATCH 14/42] Update file names in GH Actions --- .github/workflows/binaries-ea.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/binaries-ea.yml b/.github/workflows/binaries-ea.yml index a45171a5e62..ecf5ea6699e 100644 --- a/.github/workflows/binaries-ea.yml +++ b/.github/workflows/binaries-ea.yml @@ -176,15 +176,15 @@ jobs: if: ${{ !startsWith(matrix.os, 'macos') }} # TODO UPDATE THIS! 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.AZUL##" 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 "s/JavaLanguageVersion.of(24)/JavaLanguageVersion.of(${{ env.jdk_version }})/" build-logic/src/main/kotlin/org.jabref.gradle.feature.compile.gradle.kts + sed -i "s#vendor = JvmVendorSpec.AZUL##" 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.AZUL##" 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(24)/JavaLanguageVersion.of(${{ env.jdk_version }})/" build-logic/src/main/kotlin/org.jabref.gradle.feature.compile.gradle.kts + sed -i '.bak' "s#vendor = JvmVendorSpec.AZUL##" 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 From 3a18312570f6abd2d85b9ca16a5f6084a44d4aaf Mon Sep 17 00:00:00 2001 From: Jendrik Johannes Date: Fri, 13 Jun 2025 12:50:33 +0200 Subject: [PATCH 15/42] Restore setting the 'release' flag to 24 --- .../main/kotlin/org.jabref.gradle.feature.compile.gradle.kts | 4 ++++ 1 file changed, 4 insertions(+) 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 7e9ba28246a..f3827f06751 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 @@ -20,3 +20,7 @@ java { vendor = JvmVendorSpec.AZUL } } + +tasks.withType().configureEach { + options.release = 24 +} From ab73c3a7894329b0e5c3019b6b86e97ca0698f68 Mon Sep 17 00:00:00 2001 From: Jendrik Johannes Date: Fri, 13 Jun 2025 13:24:56 +0200 Subject: [PATCH 16/42] Add missing patch dependency --- .../kotlin/org.jabref.gradle.base.dependency-rules.gradle.kts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build-logic/src/main/kotlin/org.jabref.gradle.base.dependency-rules.gradle.kts b/build-logic/src/main/kotlin/org.jabref.gradle.base.dependency-rules.gradle.kts index 93ab164ef5b..ddf76c7e211 100644 --- a/build-logic/src/main/kotlin/org.jabref.gradle.base.dependency-rules.gradle.kts +++ b/build-logic/src/main/kotlin/org.jabref.gradle.base.dependency-rules.gradle.kts @@ -39,6 +39,10 @@ jvmDependencyConflicts.patch { 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 { From a74b53ed6bb1d19c2e9c401467c17ed6b6f0e401 Mon Sep 17 00:00:00 2001 From: Jendrik Johannes Date: Fri, 13 Jun 2025 13:31:39 +0200 Subject: [PATCH 17/42] Add repositories to root (for OpenRewrite) --- build.gradle.kts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build.gradle.kts b/build.gradle.kts index 91601901376..e9885ec52ed 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,4 +1,6 @@ plugins { + 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" } From dbfce2af5fdb325a6e160264173b6bbe4b788ad6 Mon Sep 17 00:00:00 2001 From: Jendrik Johannes Date: Fri, 13 Jun 2025 21:32:45 +0200 Subject: [PATCH 18/42] Add missing dependencies --- .../org.jabref.gradle.base.dependency-rules.gradle.kts | 2 -- jablib/build.gradle.kts | 10 ++++++++++ .../com/lihaoyi/fastparse/2.3.3/fastparse-2.3.3.pom | 4 ++++ 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/build-logic/src/main/kotlin/org.jabref.gradle.base.dependency-rules.gradle.kts b/build-logic/src/main/kotlin/org.jabref.gradle.base.dependency-rules.gradle.kts index ddf76c7e211..440544fc04a 100644 --- a/build-logic/src/main/kotlin/org.jabref.gradle.base.dependency-rules.gradle.kts +++ b/build-logic/src/main/kotlin/org.jabref.gradle.base.dependency-rules.gradle.kts @@ -1,5 +1,3 @@ -import org.gradle.kotlin.dsl.accessors.runtime.addDependencyTo - plugins { id("org.gradlex.extra-java-module-info") id("org.gradlex.jvm-dependency-conflict-resolution") diff --git a/jablib/build.gradle.kts b/jablib/build.gradle.kts index 3e56c9a54fc..bc765fbbd69 100644 --- a/jablib/build.gradle.kts +++ b/jablib/build.gradle.kts @@ -24,6 +24,15 @@ if (project.findProperty("tagbuild")?.toString() != "true") { configurations.antlr { extendsFrom(configurations.internal.get()) } + +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()) } @@ -35,6 +44,7 @@ dependencies { 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") 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 index d8889e5eb10..9ada0fa4a43 100644 --- 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 @@ -15,5 +15,9 @@ geny 0.6.10 + + org.scala-lang + scala-library + From 60ef9f34140ab8a8db8b56445eb3ca621148b370 Mon Sep 17 00:00:00 2001 From: Oliver Kopp Date: Sun, 15 Jun 2025 23:38:07 +0200 Subject: [PATCH 19/42] Port arm64 changes --- .../org.jabref.gradle.base.targets.gradle.kts | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) 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 index 0250c4d4aa9..fc2fcc3a232 100644 --- 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 @@ -6,6 +6,7 @@ plugins { // 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 -> { @@ -13,19 +14,27 @@ val osTarget = when { val arch = System.getProperty("os.arch") if (arch.contains("aarch")) "macos-14" else "macos-13" } - os.isLinux -> "ubuntu-22.04" + 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 +// 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 From 92aede83447be2dbfab326d8bf3b5ef66d355df7 Mon Sep 17 00:00:00 2001 From: Oliver Kopp Date: Sat, 7 Jun 2025 23:48:29 +0200 Subject: [PATCH 20/42] Try to really use JavaFX EA --- .github/workflows/binaries-ea.yml | 85 ++++++------------------------- 1 file changed, 15 insertions(+), 70 deletions(-) diff --git a/.github/workflows/binaries-ea.yml b/.github/workflows/binaries-ea.yml index 603fba19534..8e81c1ef062 100644 --- a/.github/workflows/binaries-ea.yml +++ b/.github/workflows/binaries-ea.yml @@ -121,9 +121,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: 'openjdk-25.0.0-ea+27' strategy: fail-fast: false matrix: @@ -225,92 +224,38 @@ 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 + sed -i '/val javafxVersion = ".*/val javafxVersion = "${{ steps.javafx.output.version }}"' $buildgradle echo "==========" echo $buidgradle echo "==========" cat $buildgradle done - - name: 'Set JavaFX ${{ env.javafx }} (macOS)' + - 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 + sed -i '.bak' -e '/val javafxVersion = ".*/val javafxVersion = "${{ steps.javafx.output.version }}"' $buildgradle + echo "==========" + echo $buidgradle + echo "==========" cat $buildgradle done # endregion From 7400111653491fa69fb0ff41eaf9cd26c84f86b1 Mon Sep 17 00:00:00 2001 From: Oliver Kopp Date: Mon, 16 Jun 2025 16:26:50 +0200 Subject: [PATCH 21/42] Use AMAZON JDK --- .../main/kotlin/org.jabref.gradle.feature.compile.gradle.kts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 f3827f06751..d1206efc88c 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 @@ -15,9 +15,9 @@ java { // - .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.AZUL + // We also need a JDK without JavaFX, because we patch JavaFX due to modularity issues + vendor = JvmVendorSpec.AMAZON } } From f0f25d942072f0e71def05c9aff1461b29e2d6ce Mon Sep 17 00:00:00 2001 From: Oliver Kopp Date: Mon, 16 Jun 2025 16:30:01 +0200 Subject: [PATCH 22/42] Try to fix JDK version update --- .github/workflows/binaries-ea.yml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/binaries-ea.yml b/.github/workflows/binaries-ea.yml index 8e81c1ef062..cb1de8845db 100644 --- a/.github/workflows/binaries-ea.yml +++ b/.github/workflows/binaries-ea.yml @@ -183,14 +183,22 @@ jobs: if: ${{ !startsWith(matrix.os, 'macos') }} # TODO UPDATE THIS! run: | - sed -i "s/JavaLanguageVersion.of(24)/JavaLanguageVersion.of(${{ env.jdk_version }})/" build-logic/src/main/kotlin/org.jabref.gradle.feature.compile.gradle.kts - sed -i "s#vendor = JvmVendorSpec.AMAZON##" build-logic/src/main/kotlin/org.jabref.gradle.feature.compile.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/org.jabref.gradle.feature.compile.gradle.kts - sed -i '.bak' "s#vendor = JvmVendorSpec.AMAZON##" build-logic/src/main/kotlin/org.jabref.gradle.feature.compile.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 From d9d5f962619ac6567e00fbd322468cb336fbc43a Mon Sep 17 00:00:00 2001 From: Oliver Kopp Date: Mon, 16 Jun 2025 16:34:13 +0200 Subject: [PATCH 23/42] Update path for javafx version update --- .github/workflows/binaries-ea.yml | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/.github/workflows/binaries-ea.yml b/.github/workflows/binaries-ea.yml index cb1de8845db..f3ea9584287 100644 --- a/.github/workflows/binaries-ea.yml +++ b/.github/workflows/binaries-ea.yml @@ -247,25 +247,12 @@ jobs: shell: bash run: | set -e - shopt -s globstar - for buildgradle in **/build.gradle.kts; do - sed -i '/val javafxVersion = ".*/val javafxVersion = "${{ steps.javafx.output.version }}"' $buildgradle - echo "==========" - echo $buidgradle - echo "==========" - cat $buildgradle - done + sed -i '/val javafx = ".*/val javafx = "${{ steps.javafx.output.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 '/val javafxVersion = ".*/val javafxVersion = "${{ steps.javafx.output.version }}"' $buildgradle - echo "==========" - echo $buidgradle - echo "==========" - cat $buildgradle - done + sed -i '.bak' '/val javafx = ".*/val javafx = "${{ steps.javafx.output.version }}"' versions/build.gradle.kts # endregion - name: Setup Gradle From 214556dfed8a155c2a14a58ffce6aebb938c2e4d Mon Sep 17 00:00:00 2001 From: Oliver Kopp Date: Mon, 16 Jun 2025 16:42:27 +0200 Subject: [PATCH 24/42] Fix typo --- .github/workflows/binaries-ea.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/binaries-ea.yml b/.github/workflows/binaries-ea.yml index f3ea9584287..563dc1d0217 100644 --- a/.github/workflows/binaries-ea.yml +++ b/.github/workflows/binaries-ea.yml @@ -247,12 +247,12 @@ jobs: shell: bash run: | set -e - sed -i '/val javafx = ".*/val javafx = "${{ steps.javafx.output.version }}"' versions/build.gradle.kts + sed -i '/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 - sed -i '.bak' '/val javafx = ".*/val javafx = "${{ steps.javafx.output.version }}"' versions/build.gradle.kts + sed -i '.bak' '/val javafx = ".*/val javafx = "${{ steps.javafx.outputs.version }}"' versions/build.gradle.kts # endregion - name: Setup Gradle From 718b2260376be40548f992770698c8697b449fae Mon Sep 17 00:00:00 2001 From: Oliver Kopp Date: Mon, 16 Jun 2025 16:47:09 +0200 Subject: [PATCH 25/42] Try to fix sed expression --- .github/workflows/binaries-ea.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/binaries-ea.yml b/.github/workflows/binaries-ea.yml index 563dc1d0217..fe3fb4a11f0 100644 --- a/.github/workflows/binaries-ea.yml +++ b/.github/workflows/binaries-ea.yml @@ -247,12 +247,12 @@ jobs: shell: bash run: | set -e - sed -i '/val javafx = ".*/val javafx = "${{ steps.javafx.outputs.version }}"' versions/build.gradle.kts + 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 - sed -i '.bak' '/val javafx = ".*/val javafx = "${{ steps.javafx.outputs.version }}"' versions/build.gradle.kts + sed -i '.bak' 's/val javafx = ".*/val javafx = "${{ steps.javafx.outputs.version }}"/' versions/build.gradle.kts # endregion - name: Setup Gradle From 63a24830799df9037966c810572051ce38ed2a74 Mon Sep 17 00:00:00 2001 From: Oliver Kopp Date: Mon, 16 Jun 2025 16:53:56 +0200 Subject: [PATCH 26/42] Some debug --- .github/workflows/binaries-ea.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/binaries-ea.yml b/.github/workflows/binaries-ea.yml index fe3fb4a11f0..42e6055214e 100644 --- a/.github/workflows/binaries-ea.yml +++ b/.github/workflows/binaries-ea.yml @@ -260,7 +260,7 @@ jobs: - name: Prepare merged jars and modules dir # prepareModulesDir is executing a build, which should run through even if no upload to builds.jabref.org is made if: (startsWith(matrix.os, 'macos')) || (needs.conditions.outputs.upload-to-builds-jabref-org == 'false') - run: ./gradlew -i -PprojVersion="${{ steps.gitversion.outputs.AssemblySemVer }}" -PprojVersionInfo="${{ steps.gitversion.outputs.InformationalVersion }}" :jabgui:prepareModulesDir + run: ./gradlew -i --stacktrace -PprojVersion="${{ steps.gitversion.outputs.AssemblySemVer }}" -PprojVersionInfo="${{ steps.gitversion.outputs.InformationalVersion }}" :jabgui:prepareModulesDir - name: Setup macOS key chain if: (startsWith(matrix.os, 'macos')) && (needs.conditions.outputs.secretspresent == 'true') uses: slidoapp/import-codesign-certs@1923310662e8682dd05b76b612b53301f431cd5d From 71e4d845e4d5349a5c00e287aacd7ed38677bf08 Mon Sep 17 00:00:00 2001 From: Oliver Kopp Date: Mon, 16 Jun 2025 23:38:11 +0200 Subject: [PATCH 27/42] Use amazon instead of liberica --- .github/workflows/binaries.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/binaries.yml b/.github/workflows/binaries.yml index ded3d34e3a4..c4432972ae7 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: 'amazon' java-package: 'jdk' - name: Setup Gradle uses: gradle/actions/setup-gradle@v4 From 4328dc37559fd914b3ef872cd6033f531fe56f78 Mon Sep 17 00:00:00 2001 From: Oliver Kopp Date: Mon, 16 Jun 2025 23:38:24 +0200 Subject: [PATCH 28/42] Disable JDK25 b/c unsupported --- .github/workflows/binaries-ea.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/binaries-ea.yml b/.github/workflows/binaries-ea.yml index 6c336f81acd..93ffa2288c5 100644 --- a/.github/workflows/binaries-ea.yml +++ b/.github/workflows/binaries-ea.yml @@ -119,8 +119,8 @@ jobs: needs: [conditions] if: ${{ needs.conditions.outputs.should-build == 'true' }} env: - jdk_version: '25' - jdk: 'openjdk-25.0.0-ea+27' + jdk_version: '24' + jdk_distribution: 'openjdk-25.0.0-ea+27' strategy: fail-fast: false matrix: @@ -201,12 +201,14 @@ jobs: # 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 @@ -214,12 +216,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 From 4f284fb1a00193861e07b5af7a4b42683ee8beb1 Mon Sep 17 00:00:00 2001 From: Oliver Kopp Date: Mon, 16 Jun 2025 23:42:50 +0200 Subject: [PATCH 29/42] Fix distribution name --- .github/workflows/binaries.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/binaries.yml b/.github/workflows/binaries.yml index c4432972ae7..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: 'amazon' + distribution: 'corretto' java-package: 'jdk' - name: Setup Gradle uses: gradle/actions/setup-gradle@v4 From 2a06bc03ed8978b1d5c72c5b66fe3aa7b7e4c243 Mon Sep 17 00:00:00 2001 From: Oliver Kopp Date: Mon, 16 Jun 2025 23:47:23 +0200 Subject: [PATCH 30/42] Remove "downloadSources" --- build-logic/build.gradle.kts | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/build-logic/build.gradle.kts b/build-logic/build.gradle.kts index 5c6ea7fd74f..88e4031609f 100644 --- a/build-logic/build.gradle.kts +++ b/build-logic/build.gradle.kts @@ -17,20 +17,3 @@ dependencies { implementation("org.gradlex:java-module-testing:1.7") implementation("org.gradlex:jvm-dependency-conflict-resolution:2.4") } - -// TODO jjohannes: is this still needed and where should it go? -configurations - .named { it.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) - ) - } - } From 4c528bb59c354af5d863937c74856995b5d5d050 Mon Sep 17 00:00:00 2001 From: Oliver Kopp Date: Mon, 16 Jun 2025 23:48:23 +0200 Subject: [PATCH 31/42] Fix space --- jabgui/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jabgui/build.gradle.kts b/jabgui/build.gradle.kts index dd109a84b2f..e18d1137204 100644 --- a/jabgui/build.gradle.kts +++ b/jabgui/build.gradle.kts @@ -2,7 +2,7 @@ import org.gradle.internal.os.OperatingSystem plugins { id("org.jabref.gradle.module") - id ("application") + id("application") // Do not activate; causes issues with the modularity plugin (no tests found etc) // id("com.redock.classpathtofile") version "0.1.0" From b94c3052ac9ad85695bb63526bc36a9002b67df6 Mon Sep 17 00:00:00 2001 From: Oliver Kopp Date: Tue, 17 Jun 2025 00:01:31 +0200 Subject: [PATCH 32/42] Add JBang install to tests --- .github/workflows/tests.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) 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 From 8002bf336a94ff00dd1f8c9454cf6a23787e5954 Mon Sep 17 00:00:00 2001 From: Oliver Kopp Date: Tue, 17 Jun 2025 00:03:39 +0200 Subject: [PATCH 33/42] Increase log level for gradle --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 3ff68ce43ea..33878237033 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -227,7 +227,7 @@ jobs: - name: Setup Gradle uses: gradle/actions/setup-gradle@v4 - name: Run ${{ matrix.module }} tests - run: xvfb-run --auto-servernum ./gradlew :${{ matrix.module }}:check -x checkstyleJmh -x checkstyleMain -x checkstyleTest -x modernizer + run: xvfb-run --auto-servernum ./gradlew :${{ matrix.module }}:check -i -x checkstyleJmh -x checkstyleMain -x checkstyleTest -x modernizer env: CI: "true" - name: Prepare format failed test results From 248f94d4689e7a7a4445476f257d0a03aadfb2dc Mon Sep 17 00:00:00 2001 From: Oliver Kopp Date: Tue, 17 Jun 2025 00:06:30 +0200 Subject: [PATCH 34/42] Add some debug --- .github/workflows/tests.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 33878237033..3ce5ca567ce 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -226,6 +226,9 @@ jobs: uses: jbangdev/setup-jbang@main - name: Setup Gradle uses: gradle/actions/setup-gradle@v4 + - name: Debug + shell: bash + run: find . -name "*.mv" - name: Run ${{ matrix.module }} tests run: xvfb-run --auto-servernum ./gradlew :${{ matrix.module }}:check -i -x checkstyleJmh -x checkstyleMain -x checkstyleTest -x modernizer env: From 736f99785a0e429e9c6d85e0659a5565f629c341 Mon Sep 17 00:00:00 2001 From: Oliver Kopp Date: Tue, 17 Jun 2025 00:14:19 +0200 Subject: [PATCH 35/42] Verbose JBang check --- .github/workflows/tests.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 3ce5ca567ce..20543faab42 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -338,10 +338,10 @@ jobs: with: submodules: 'false' show-progress: 'false' - - run: jbang build .jbang/CheckoutPR.java - - run: jbang build .jbang/CloneJabRef.java - - run: jbang build .jbang/JabKitLauncher.java - - run: jbang build .jbang/JabSrvLauncher.java + - run: jbang build --verbose .jbang/CheckoutPR.java + - run: jbang build --verbose .jbang/CloneJabRef.java + - run: jbang build --verbose .jbang/JabKitLauncher.java + - run: jbang build --verbose .jbang/JabSrvLauncher.java codecoverage: if: false From 1425b3c00abeea1ded994e3d503673088a635751 Mon Sep 17 00:00:00 2001 From: Oliver Kopp Date: Tue, 17 Jun 2025 00:32:28 +0200 Subject: [PATCH 36/42] Fix vendor of JDK --- .github/workflows/binaries-ea.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/binaries-ea.yml b/.github/workflows/binaries-ea.yml index 93ffa2288c5..4636a5847b3 100644 --- a/.github/workflows/binaries-ea.yml +++ b/.github/workflows/binaries-ea.yml @@ -188,7 +188,7 @@ jobs: 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 + # 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) @@ -196,7 +196,7 @@ jobs: run: | 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 + # 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 From f49e81b073b2ea7f47bc0e7548f708a3a61de779 Mon Sep 17 00:00:00 2001 From: Oliver Kopp Date: Tue, 17 Jun 2025 00:34:28 +0200 Subject: [PATCH 37/42] Refine debug --- .github/workflows/tests.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 20543faab42..e5be463d082 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -226,13 +226,14 @@ jobs: uses: jbangdev/setup-jbang@main - name: Setup Gradle uses: gradle/actions/setup-gradle@v4 - - name: Debug - shell: bash - run: find . -name "*.mv" - name: Run ${{ matrix.module }} tests run: xvfb-run --auto-servernum ./gradlew :${{ matrix.module }}:check -i -x checkstyleJmh -x checkstyleMain -x checkstyleTest -x modernizer env: CI: "true" + - name: Debug + if: failure() + shell: bash + run: find . -name "*.mv" - name: Prepare format failed test results if: failure() uses: awalsh128/cache-apt-pkgs-action@latest From 1c43aec6e686cc9d9e05c35cb2637c1b0b18ded2 Mon Sep 17 00:00:00 2001 From: Oliver Kopp Date: Tue, 17 Jun 2025 00:38:54 +0200 Subject: [PATCH 38/42] Force refresh of SNAPSHOT plugin --- jablib/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jablib/build.gradle.kts b/jablib/build.gradle.kts index ac953ee912d..a461d53761e 100644 --- a/jablib/build.gradle.kts +++ b/jablib/build.gradle.kts @@ -19,7 +19,7 @@ plugins { // id("dev.jbang") version "0.2.0" // Workaround for https://github.com/jbangdev/jbang-gradle-plugin/issues/7 - id("com.github.koppor.jbang-gradle-plugin") version "fix-7-SNAPSHOT" + id("com.github.koppor.jbang-gradle-plugin") version "fix-7-fresh-SNAPSHOT" } var version: String = project.findProperty("projVersion")?.toString() ?: "0.1.0" From 9ee9772edb2bc4a994e2e5c3f38ef58edcc50242 Mon Sep 17 00:00:00 2001 From: Oliver Kopp Date: Tue, 17 Jun 2025 00:59:14 +0200 Subject: [PATCH 39/42] Remove debug output --- .github/workflows/binaries-ea.yml | 2 +- .github/workflows/tests.yml | 14 +++++--------- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/.github/workflows/binaries-ea.yml b/.github/workflows/binaries-ea.yml index 4636a5847b3..a49689d42bd 100644 --- a/.github/workflows/binaries-ea.yml +++ b/.github/workflows/binaries-ea.yml @@ -260,7 +260,7 @@ jobs: - name: Prepare merged jars and modules dir # prepareModulesDir is executing a build, which should run through even if no upload to builds.jabref.org is made if: (startsWith(matrix.os, 'macos')) || (needs.conditions.outputs.upload-to-builds-jabref-org == 'false') - run: ./gradlew -i --stacktrace -PprojVersion="${{ steps.gitversion.outputs.AssemblySemVer }}" -PprojVersionInfo="${{ steps.gitversion.outputs.InformationalVersion }}" :jabgui:prepareModulesDir + run: ./gradlew -i -PprojVersion="${{ steps.gitversion.outputs.AssemblySemVer }}" -PprojVersionInfo="${{ steps.gitversion.outputs.InformationalVersion }}" :jabgui:prepareModulesDir - name: Setup macOS key chain if: (startsWith(matrix.os, 'macos')) && (needs.conditions.outputs.secretspresent == 'true') uses: slidoapp/import-codesign-certs@1923310662e8682dd05b76b612b53301f431cd5d diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e5be463d082..3ff68ce43ea 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -227,13 +227,9 @@ jobs: - name: Setup Gradle uses: gradle/actions/setup-gradle@v4 - name: Run ${{ matrix.module }} tests - run: xvfb-run --auto-servernum ./gradlew :${{ matrix.module }}:check -i -x checkstyleJmh -x checkstyleMain -x checkstyleTest -x modernizer + run: xvfb-run --auto-servernum ./gradlew :${{ matrix.module }}:check -x checkstyleJmh -x checkstyleMain -x checkstyleTest -x modernizer env: CI: "true" - - name: Debug - if: failure() - shell: bash - run: find . -name "*.mv" - name: Prepare format failed test results if: failure() uses: awalsh128/cache-apt-pkgs-action@latest @@ -339,10 +335,10 @@ jobs: with: submodules: 'false' show-progress: 'false' - - run: jbang build --verbose .jbang/CheckoutPR.java - - run: jbang build --verbose .jbang/CloneJabRef.java - - run: jbang build --verbose .jbang/JabKitLauncher.java - - run: jbang build --verbose .jbang/JabSrvLauncher.java + - run: jbang build .jbang/CheckoutPR.java + - run: jbang build .jbang/CloneJabRef.java + - run: jbang build .jbang/JabKitLauncher.java + - run: jbang build .jbang/JabSrvLauncher.java codecoverage: if: false From abeba808f5c31f1c02810ec543c3993b3652622e Mon Sep 17 00:00:00 2001 From: Oliver Kopp Date: Tue, 17 Jun 2025 00:59:55 +0200 Subject: [PATCH 40/42] Remove TODO --- .github/workflows/binaries-ea.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/binaries-ea.yml b/.github/workflows/binaries-ea.yml index a49689d42bd..0087d8a6318 100644 --- a/.github/workflows/binaries-ea.yml +++ b/.github/workflows/binaries-ea.yml @@ -179,7 +179,6 @@ jobs: - name: Tell gradle to use JDK ${{ env.jdk_version }} (linux, Windows) if: ${{ !startsWith(matrix.os, 'macos') }} - # TODO UPDATE THIS! run: | # Update JavaLanguageVersion sed -i "s/JavaLanguageVersion.of..../JavaLanguageVersion.of(${{ env.jdk_version }})/" build-logic/src/main/kotlin/org.jabref.gradle.feature.compile.gradle.kts From ce5f5930c2ed28d4b94df122ece4cdb8c33a86ce Mon Sep 17 00:00:00 2001 From: Oliver Kopp Date: Tue, 17 Jun 2025 01:04:48 +0200 Subject: [PATCH 41/42] Use long form for JVM switches --- jabkit/build.gradle.kts | 6 +++--- jabsrv-cli/build.gradle.kts | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/jabkit/build.gradle.kts b/jabkit/build.gradle.kts index 54eb02f4d4d..e7a833c8a7c 100644 --- a/jabkit/build.gradle.kts +++ b/jabkit/build.gradle.kts @@ -73,11 +73,11 @@ application { // Also passed to launcher (https://badass-jlink-plugin.beryx.org/releases/latest/#launcher) applicationDefaultJvmArgs = listOf( // Enable JEP 450: Compact Object Headers - "-XXUnlockExperimentalVMOptions", "-XXUseCompactObjectHeaders", + "-XX:+UnlockExperimentalVMOptions", "-XX:+UseCompactObjectHeaders", // Default garbage collector is sufficient for CLI APP - // "-XXUseZGC", "-XXZUncommit", - // "-XXUseStringDeduplication", + // "-XX:+UseZGC", "-XX:+ZUncommit", + // "-XX:+UseStringDeduplication", "--enable-native-access=com.sun.jna,javafx.graphics,org.apache.lucene.core" ) diff --git a/jabsrv-cli/build.gradle.kts b/jabsrv-cli/build.gradle.kts index 9e28f657256..eb4390317c8 100644 --- a/jabsrv-cli/build.gradle.kts +++ b/jabsrv-cli/build.gradle.kts @@ -13,10 +13,10 @@ application{ applicationDefaultJvmArgs = listOf( // Enable JEP 450: Compact Object Headers - "-XXUnlockExperimentalVMOptions", "-XXUseCompactObjectHeaders", + "-XX:+UnlockExperimentalVMOptions", "-XX:+UseCompactObjectHeaders", - "-XXUseZGC", "-XXZUncommit", - "-XXUseStringDeduplication", + "-XX:+UseZGC", "-XX:+ZUncommit", + "-XX:+UseStringDeduplication", "--enable-native-access=com.sun.jna,org.apache.lucene.core" ) From a578fc52b1b95439da036a8820181600f7e9d8dc Mon Sep 17 00:00:00 2001 From: Oliver Kopp Date: Tue, 17 Jun 2025 01:09:09 +0200 Subject: [PATCH 42/42] Use fix-7-SNAPSHOT again --- jablib/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jablib/build.gradle.kts b/jablib/build.gradle.kts index a461d53761e..ac953ee912d 100644 --- a/jablib/build.gradle.kts +++ b/jablib/build.gradle.kts @@ -19,7 +19,7 @@ plugins { // id("dev.jbang") version "0.2.0" // Workaround for https://github.com/jbangdev/jbang-gradle-plugin/issues/7 - id("com.github.koppor.jbang-gradle-plugin") version "fix-7-fresh-SNAPSHOT" + id("com.github.koppor.jbang-gradle-plugin") version "fix-7-SNAPSHOT" } var version: String = project.findProperty("projVersion")?.toString() ?: "0.1.0"