diff --git a/build.gradle b/build.gradle index a817b22e02b..066c08938b2 100644 --- a/build.gradle +++ b/build.gradle @@ -84,7 +84,6 @@ repositories { } configurations { - libreoffice antlr3 antlr4 // TODO: Remove the following workaround for split error messages such as @@ -117,14 +116,8 @@ dependencies { implementation 'commons-cli:commons-cli:1.4' - // For Java 9+ compatibility, we include a bundled version of the libreoffice libraries - // See https://bugs.documentfoundation.org/show_bug.cgi?id=117331#c8 for background information - // Use the task bundleLibreOffice to update the bundled jar - // DO NOT CHANGE THE libreoffice PREFIX - libreoffice 'org.libreoffice:juh:6.4.3' - libreoffice 'org.libreoffice:jurt:6.4.3' - libreoffice 'org.libreoffice:ridl:6.4.3' - libreoffice 'org.libreoffice:unoil:6.4.3' + implementation 'org.libreoffice:libreoffice:7.0.3' + implementation 'org.libreoffice:unoloader:7.0.3' implementation 'io.github.java-diff-utils:java-diff-utils:4.9' implementation 'info.debatty:java-string-similarity:2.0.0' @@ -767,13 +760,4 @@ task downloadDependencies { } } -task bundleLibreOffice(type: Jar) { - from configurations.libreoffice.collect { zipTree it } - manifest { - attributes 'Automatic-Module-Name': 'org.jabref.thirdparty.libreoffice' - } - - destinationDir = file('lib') - archiveName = 'libreoffice.jar' -} diff --git a/lib/libreoffice.jar b/lib/libreoffice.jar deleted file mode 100644 index 072f96ec432..00000000000 Binary files a/lib/libreoffice.jar and /dev/null differ diff --git a/src/main/java/module-info.java b/src/main/java/module-info.java index c080fccc99e..64504a259fe 100644 --- a/src/main/java/module-info.java +++ b/src/main/java/module-info.java @@ -47,7 +47,7 @@ requires applicationinsights.core; // Libre Office - requires org.jabref.thirdparty.libreoffice; + requires org.libreoffice.uno; // Other modules requires commons.logging; diff --git a/src/main/java/org/jabref/gui/openoffice/OOBibBase.java b/src/main/java/org/jabref/gui/openoffice/OOBibBase.java index 4a97139f0d0..145b8fe0d84 100644 --- a/src/main/java/org/jabref/gui/openoffice/OOBibBase.java +++ b/src/main/java/org/jabref/gui/openoffice/OOBibBase.java @@ -1267,7 +1267,7 @@ public BibDatabase generateDatabase(List databases) throws NoSuchElementException, WrappedTargetException { BibDatabase resultDatabase = new BibDatabase(); List cited = findCitedKeys(); - List entriesToInsert = new ArrayList(); + List entriesToInsert = new ArrayList<>(); // For each cited key for (String key : cited) {