diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 28d48eb89de..f6392268f54 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -364,6 +364,8 @@ jobs: jbang: name: JBang runs-on: ubuntu-latest + # JBang scripts depend on main-SNAPSHOT; thus, we can only test fully when main is updated + if: github.ref == 'refs/heads/main' steps: - name: Checkout source uses: actions/checkout@v4 @@ -404,8 +406,8 @@ jobs: ref: fix-params - 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 --fresh .jbang/JabKitLauncher.java + - run: jbang build --fresh .jbang/JabSrvLauncher.java codecoverage: if: false diff --git a/.jbang/JabKitLauncher.java b/.jbang/JabKitLauncher.java index 2849fe4f8f9..47779eddba5 100644 --- a/.jbang/JabKitLauncher.java +++ b/.jbang/JabKitLauncher.java @@ -20,9 +20,15 @@ //SOURCES ../jabkit/src/main/java/org/jabref/JabKit.java //FILES tinylog.properties=../jabkit/src/main/resources/tinylog.properties -//REPOS mavencentral,mavencentralsnapshots=https://central.sonatype.com/repository/maven-snapshots/,s01oss=https://s01.oss.sonatype.org/content/repositories/snapshots/,oss=https://oss.sonatype.org/content/repositories,jitpack=https://jitpack.io,oss2=https://oss.sonatype.org/content/groups/public,ossrh=https://oss.sonatype.org/content/repositories/snapshots +//REPOS mavencentral,jitpack=https://jitpack.io + +// TODO: ASCII things won't work, but we accept for now to keep things going +//DEPS com.ibm.icu:icu4j:72.1 + +// disabled due to maven central issues +// DEPS org.jabref:jablib:6.+ +//DEPS com.github.jabref.jabref:jablib:main-SNAPSHOT -//DEPS org.jabref:jablib:6.+ //DEPS info.picocli:picocli:4.7.7 import org.jabref.JabKit; diff --git a/.jbang/JabSrvLauncher.java b/.jbang/JabSrvLauncher.java index a2d78a9dfb2..81091d6c2a9 100644 --- a/.jbang/JabSrvLauncher.java +++ b/.jbang/JabSrvLauncher.java @@ -13,6 +13,12 @@ //SOURCES ../jabsrv/src/main/java/org/jabref/http/dto/GsonFactory.java //SOURCES ../jabsrv/src/main/java/org/jabref/http/JabrefMediaType.java //SOURCES ../jabsrv/src/main/java/org/jabref/http/JabRefResourceLocator.java +//SOURCES ../jabsrv/src/main/java/org/jabref/http/server/cayw/CAYWResource.java +//SOURCES ../jabsrv/src/main/java/org/jabref/http/server/cayw/gui/CAYWEntry.java +//SOURCES ../jabsrv/src/main/java/org/jabref/http/server/cayw/gui/SearchDialog.java +//SOURCES ../jabsrv/src/main/java/org/jabref/http/server/cayw/gui/SearchField.java +//SOURCES ../jabsrv/src/main/java/org/jabref/http/server/cayw/gui/SearchResultContainer.java +//SOURCES ../jabsrv/src/main/java/org/jabref/http/server/cayw/gui/SelectedItemsContainer.java //SOURCES ../jabsrv/src/main/java/org/jabref/http/server/CORSFilter.java //SOURCES ../jabsrv/src/main/java/org/jabref/http/server/LibrariesResource.java //SOURCES ../jabsrv/src/main/java/org/jabref/http/server/LibraryResource.java @@ -21,9 +27,15 @@ //SOURCES ../jabsrv/src/main/java/org/jabref/http/server/Server.java //SOURCES ../jabsrv/src/main/java/org/jabref/http/server/services/FilesToServe.java -//REPOS mavencentral,mavencentralsnapshots=https://central.sonatype.com/repository/maven-snapshots/,s01oss=https://s01.oss.sonatype.org/content/repositories/snapshots/,oss=https://oss.sonatype.org/content/repositories,jitpack=https://jitpack.io,oss2=https://oss.sonatype.org/content/groups/public,ossrh=https://oss.sonatype.org/content/repositories/snapshots +//REPOS mavencentral,jitpack=https://jitpack.io + +// TODO: ASCII things won't work, but we accept for now to keep things going +//DEPS com.ibm.icu:icu4j:72.1 + +// disabled due to maven central issues +// DEPS org.jabref:jablib:6.+ +//DEPS com.github.jabref.jabref:jablib:main-SNAPSHOT -//DEPS org.jabref:jablib:6.+ //DEPS info.picocli:picocli:4.7.7 //DEPS org.jspecify:jspecify:1.0.0 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 06991eda36d..bd30fc51036 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,10 +39,6 @@ jvmDependencyConflicts.patch { module("com.konghq:unirest-modules-gson") { addApiDependency("com.konghq:unirest-java-core") } - module("com.github.tomtung:latex2unicode_2.13") { - removeDependency("com.lihaoyi:fastparse_2.13") - addApiDependency("com.lihaoyi:fastparse:2.3.3") - } module("de.rototor.jeuclid:jeuclid-core") { removeDependency("org.apache.xmlgraphics:batik-svg-dom") removeDependency("org.apache.xmlgraphics:batik-ext") @@ -112,7 +108,27 @@ extraJavaModuleInfo { } module("at.favre.lib:hkdf", "at.favre.lib.hkdf") module("com.github.javakeyring:java-keyring", "com.github.java.keyring") - module("com.github.tomtung:latex2unicode_2.13", "com.github.tomtung.latex2unicode") + + module("com.github.tomtung:latex2unicode_2.13", "com.github.tomtung.latex2unicode") { + exportAllPackages() + requireAllDefinedDependencies() + } + module("com.lihaoyi:fastparse_2.13", "com.lihaoyi.fastparse") { + exportAllPackages() + requireAllDefinedDependencies() + requires("scala.library") + } + module("com.lihaoyi:sourcecode_2.13", "com.lihaoyi.sourcecode") { + exportAllPackages() + requireAllDefinedDependencies() + requires("scala.library") + } + module("com.lihaoyi:geny_2.13", "com.lihaoyi.geny") { + exportAllPackages() + requireAllDefinedDependencies() + requires("scala.library") + } + module("com.googlecode.plist:dd-plist", "com.googlecode.dd.plist") module("com.h2database:h2-mvstore", "com.h2database.mvstore") module("com.ibm.icu:icu4j", "com.ibm.icu") @@ -123,9 +139,6 @@ extraJavaModuleInfo { uses("kong.unirest.core.json.JsonEngine") } module("com.konghq:unirest-modules-gson", "com.konghq.unirest.modules.gson") - module("com.lihaoyi:fastparse", "com.lihaoyi.fastparse") - module("com.lihaoyi:geny", "com.lihaoyi.geny") - module("com.lihaoyi:sourcecode", "com.lihaoyi.sourcecode") module("com.squareup.okhttp3:okhttp", "okhttp3") module("com.squareup.okhttp3:okhttp-sse", "okhttp3.sse") module("com.squareup.okio:okio", "okio") 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 7efc4bf82ae..d2eb78e60f5 100644 --- a/build-logic/src/main/kotlin/org.jabref.gradle.feature.compile.gradle.kts +++ b/build-logic/src/main/kotlin/org.jabref.gradle.feature.compile.gradle.kts @@ -6,6 +6,7 @@ java { toolchain { // If this is updated, also update // - build.gradle -> jacoco -> toolVersion (because JaCoCo does not support newest JDK out of the box. Check versions at https://www.jacoco.org/jacoco/trunk/doc/changes.html) + // - jitpack.yml // - .devcontainer/devcontainer.json#L34 and // - .moderne/moderne.yml // - .github/workflows/binaries*.yml diff --git a/jablib/build.gradle.kts b/jablib/build.gradle.kts index 347e6da5f34..29cae0b4da4 100644 --- a/jablib/build.gradle.kts +++ b/jablib/build.gradle.kts @@ -46,7 +46,7 @@ tasks.withType().configureEach val mockitoAgent = configurations.create("mockitoAgent") dependencies { - implementation(enforcedPlatform(project(":versions"))) + // api(platform(project(":versions"))) implementation("org.openjfx:javafx-base") @@ -526,6 +526,10 @@ mavenPublishing { } } +tasks.withType { + suppressedValidationErrors.add("dependencies-without-versions") +} + tasks.named("sourcesJar") { dependsOn( tasks.named("generateGrammarSource"), @@ -537,8 +541,13 @@ tasks.named("sourcesJar") { ) } -tasks.withType { - suppressedValidationErrors.add("enforced-platform") + +// Include the BOM in the generated POM ("inline" / "inlining") +// Source: https://github.com/gradle/gradle/issues/10861#issuecomment-3027387345 +publishing.publications.withType().configureEach { + versionMapping { + allVariants { fromResolutionResult() } + } } javaModuleTesting.whitebox(testing.suites["test"]) { diff --git a/jablib/lib/com/lihaoyi/fastparse/2.3.3/fastparse-2.3.3.jar b/jablib/lib/com/lihaoyi/fastparse/2.3.3/fastparse-2.3.3.jar deleted file mode 100644 index 2bcb25233f8..00000000000 Binary files a/jablib/lib/com/lihaoyi/fastparse/2.3.3/fastparse-2.3.3.jar and /dev/null differ 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 deleted file mode 100644 index 9ada0fa4a43..00000000000 --- a/jablib/lib/com/lihaoyi/fastparse/2.3.3/fastparse-2.3.3.pom +++ /dev/null @@ -1,23 +0,0 @@ - - 4.0.0 - com.lihaoyi - fastparse - 2.3.3 - - - - com.lihaoyi - sourcecode - 0.2.3 - - - com.lihaoyi - geny - 0.6.10 - - - org.scala-lang - scala-library - - - diff --git a/jablib/lib/com/lihaoyi/geny/0.6.10/geny-0.6.10.jar b/jablib/lib/com/lihaoyi/geny/0.6.10/geny-0.6.10.jar deleted file mode 100644 index 02846e358ae..00000000000 Binary files a/jablib/lib/com/lihaoyi/geny/0.6.10/geny-0.6.10.jar and /dev/null differ 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 deleted file mode 100644 index 39fa1cdd326..00000000000 --- a/jablib/lib/com/lihaoyi/geny/0.6.10/geny-0.6.10.pom +++ /dev/null @@ -1,6 +0,0 @@ - - 4.0.0 - com.lihaoyi - geny - 0.6.10 - diff --git a/jablib/lib/com/lihaoyi/sourcecode/0.2.3/sourcecode-0.2.3.jar b/jablib/lib/com/lihaoyi/sourcecode/0.2.3/sourcecode-0.2.3.jar deleted file mode 100644 index a0a649fca58..00000000000 Binary files a/jablib/lib/com/lihaoyi/sourcecode/0.2.3/sourcecode-0.2.3.jar and /dev/null differ 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 deleted file mode 100644 index 9a8aa7f9e5b..00000000000 --- a/jablib/lib/com/lihaoyi/sourcecode/0.2.3/sourcecode-0.2.3.pom +++ /dev/null @@ -1,6 +0,0 @@ - - 4.0.0 - com.lihaoyi - sourcecode - 0.2.3 - diff --git a/jitpack.yml b/jitpack.yml new file mode 100644 index 00000000000..f903657a565 --- /dev/null +++ b/jitpack.yml @@ -0,0 +1,9 @@ +jdk: + - openjdk24 +before_install: + - cd build-logic + - git clone https://github.com/koppor/java-module-packaging.git + - cd .. +install: + - ./gradlew :versions:publishToMavenLocal + - ./gradlew :jablib:publishToMavenLocal