chore(deps): bump epub4j to 2.1.0 (#2696)
This commit is contained in:
@@ -19,8 +19,7 @@ import org.grimmory.pdfium4j.PdfiumLibrary;
|
||||
public final class NativeLibraries {
|
||||
|
||||
public enum Library {
|
||||
PDFIUM,
|
||||
EPUB4J_NATIVE
|
||||
PDFIUM
|
||||
}
|
||||
|
||||
private static final Map<Library, Probe> PROBES;
|
||||
@@ -37,21 +36,6 @@ public final class NativeLibraries {
|
||||
return true;
|
||||
}));
|
||||
|
||||
probes.put(Library.EPUB4J_NATIVE, new Probe("epub4j-native", () -> {
|
||||
Boolean clean = tryInvokeStaticBoolean(
|
||||
"org.grimmory.epub4j.native_parsing.EpubNativeLibrary"
|
||||
);
|
||||
if (clean != null) {
|
||||
return clean;
|
||||
}
|
||||
Class.forName(
|
||||
"org.grimmory.epub4j.native_parsing.PanamaConstants",
|
||||
true,
|
||||
NativeLibraries.class.getClassLoader()
|
||||
);
|
||||
return true;
|
||||
}));
|
||||
|
||||
PROBES = Collections.unmodifiableMap(probes);
|
||||
}
|
||||
|
||||
@@ -136,10 +120,6 @@ public final class NativeLibraries {
|
||||
return isAvailable(Library.PDFIUM);
|
||||
}
|
||||
|
||||
public boolean isEpubNativeAvailable() {
|
||||
return isAvailable(Library.EPUB4J_NATIVE);
|
||||
}
|
||||
|
||||
private record Probe(String name, CheckedBooleanSupplier fn) {}
|
||||
|
||||
@FunctionalInterface
|
||||
|
||||
@@ -17,10 +17,6 @@ public class NativeLibraryManager {
|
||||
return libs.isPdfiumAvailable();
|
||||
}
|
||||
|
||||
public boolean isEpubNativeAvailable() {
|
||||
return libs.isEpubNativeAvailable();
|
||||
}
|
||||
|
||||
public boolean isAvailable(NativeLibraries.Library library) {
|
||||
return libs.isAvailable(library);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user