chore(deps): drop unused epub4j native (#2303)
This commit is contained in:
@@ -94,56 +94,6 @@ fun pdfiumNativesClassifier(): String {
|
|||||||
return "natives-$osKey-$archKey"
|
return "natives-$osKey-$archKey"
|
||||||
}
|
}
|
||||||
|
|
||||||
fun epub4jNativesClassifier(): String {
|
|
||||||
// Support cross-compilation: check for explicit target overrides first
|
|
||||||
val targetPlatform = System.getenv("TARGETPLATFORM")
|
|
||||||
?: project.findProperty("targetPlatform")?.toString()
|
|
||||||
val targetArch = System.getenv("TARGETARCH")
|
|
||||||
?: project.findProperty("targetArch")?.toString()
|
|
||||||
|
|
||||||
val osName: String
|
|
||||||
val arch: String
|
|
||||||
|
|
||||||
if (targetPlatform != null) {
|
|
||||||
// Docker TARGETPLATFORM format: linux/amd64, linux/arm64
|
|
||||||
val parts = targetPlatform.split("/")
|
|
||||||
osName = parts.getOrElse(0) { "linux" }
|
|
||||||
arch = parts.getOrElse(1) { "amd64" }
|
|
||||||
} else {
|
|
||||||
osName = System.getProperty("os.name").lowercase()
|
|
||||||
arch = targetArch ?: System.getProperty("os.arch").lowercase()
|
|
||||||
}
|
|
||||||
|
|
||||||
val osKey = when {
|
|
||||||
"win" in osName -> "windows"
|
|
||||||
"mac" in osName || "darwin" in osName -> "macos"
|
|
||||||
"nux" in osName || "linux" in osName -> {
|
|
||||||
val libcOverride = (System.getenv("TARGETLIBC")
|
|
||||||
?: project.findProperty("targetLibc")?.toString())?.lowercase()
|
|
||||||
val isMusl = when (libcOverride) {
|
|
||||||
"musl" -> true
|
|
||||||
"gnu", "glibc" -> false
|
|
||||||
else -> if (targetPlatform != null) false else runCatching {
|
|
||||||
val libDir = File("/lib")
|
|
||||||
libDir.exists() && (libDir.listFiles()?.any { f -> f.name.startsWith("ld-musl-") } == true)
|
|
||||||
}.getOrElse {
|
|
||||||
runCatching { File("/proc/self/maps").readText().contains("musl") }.getOrDefault(false)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (isMusl) "linux-musl" else "linux"
|
|
||||||
}
|
|
||||||
else -> error("Unsupported OS: $osName")
|
|
||||||
}
|
|
||||||
|
|
||||||
val archKey = when (arch) {
|
|
||||||
"x86_64", "amd64" -> "x86_64"
|
|
||||||
"aarch64", "arm64" -> "aarch64"
|
|
||||||
else -> error("Unsupported architecture: $arch")
|
|
||||||
}
|
|
||||||
|
|
||||||
return "$osKey-$archKey"
|
|
||||||
}
|
|
||||||
|
|
||||||
configurations {
|
configurations {
|
||||||
compileOnly {
|
compileOnly {
|
||||||
extendsFrom(configurations.annotationProcessor.get())
|
extendsFrom(configurations.annotationProcessor.get())
|
||||||
@@ -187,14 +137,7 @@ dependencies {
|
|||||||
implementation("com.twelvemonkeys.imageio:imageio-bmp:3.14.0")
|
implementation("com.twelvemonkeys.imageio:imageio-bmp:3.14.0")
|
||||||
|
|
||||||
// epub4j-grimmory fork publishes as org.grimmory:epub4j-core
|
// epub4j-grimmory fork publishes as org.grimmory:epub4j-core
|
||||||
val epub4jCoords = if (useLocalLibs) "org.grimmory:epub4j-core:+" else "org.grimmory:epub4j-core:1.5.0"
|
implementation("org.grimmory:epub4j-core:1.5.0")
|
||||||
implementation(epub4jCoords)
|
|
||||||
|
|
||||||
// epub4j-native for native archive parsing
|
|
||||||
val epub4jNativeVersion = "1.5.0"
|
|
||||||
val epub4jNativeCoords = if (useLocalLibs) "org.grimmory:epub4j-native:+" else "org.grimmory:epub4j-native:$epub4jNativeVersion"
|
|
||||||
implementation(epub4jNativeCoords)
|
|
||||||
runtimeOnly("$epub4jNativeCoords:${epub4jNativesClassifier()}")
|
|
||||||
|
|
||||||
// --- Audio Metadata (Audiobook Support) ---
|
// --- Audio Metadata (Audiobook Support) ---
|
||||||
implementation("com.github.RouHim:jaudiotagger:2.0.27")
|
implementation("com.github.RouHim:jaudiotagger:2.0.27")
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ org.glassfish.jaxb:jaxb-core:4.0.9=productionRuntimeClasspath,runtimeClasspath,t
|
|||||||
org.glassfish.jaxb:jaxb-runtime:4.0.9=productionRuntimeClasspath,runtimeClasspath,testRuntimeClasspath
|
org.glassfish.jaxb:jaxb-runtime:4.0.9=productionRuntimeClasspath,runtimeClasspath,testRuntimeClasspath
|
||||||
org.glassfish.jaxb:txw2:4.0.9=productionRuntimeClasspath,runtimeClasspath,testRuntimeClasspath
|
org.glassfish.jaxb:txw2:4.0.9=productionRuntimeClasspath,runtimeClasspath,testRuntimeClasspath
|
||||||
org.grimmory:epub4j-core:1.5.0=compileClasspath,productionRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
org.grimmory:epub4j-core:1.5.0=compileClasspath,productionRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
org.grimmory:epub4j-native:1.5.0=compileClasspath,productionRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
org.grimmory:epub4j-native:1.5.0=productionRuntimeClasspath,runtimeClasspath,testRuntimeClasspath
|
||||||
org.grimmory:pdfium4j:1.2.0=compileClasspath,productionRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
org.grimmory:pdfium4j:1.2.0=compileClasspath,productionRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
org.hamcrest:hamcrest:3.0=testCompileClasspath,testRuntimeClasspath
|
org.hamcrest:hamcrest:3.0=testCompileClasspath,testRuntimeClasspath
|
||||||
org.hdrhistogram:HdrHistogram:2.2.2=productionRuntimeClasspath,runtimeClasspath,testRuntimeClasspath
|
org.hdrhistogram:HdrHistogram:2.2.2=productionRuntimeClasspath,runtimeClasspath,testRuntimeClasspath
|
||||||
|
|||||||
Reference in New Issue
Block a user