chore(deps): bump epub4j and epub4j-native versions to 1.4.0 (#1090)
Co-authored-by: James Ward <james@notjam.es>
This commit is contained in:
@@ -68,13 +68,17 @@ fun pdfiumNativesClassifier(): String {
|
|||||||
"win" in osName -> "windows"
|
"win" in osName -> "windows"
|
||||||
"mac" in osName || "darwin" in osName -> "darwin"
|
"mac" in osName || "darwin" in osName -> "darwin"
|
||||||
"nux" in osName || "linux" in osName -> {
|
"nux" in osName || "linux" in osName -> {
|
||||||
val isMusl = try {
|
val libcOverride = (System.getenv("TARGETLIBC")
|
||||||
val libDir = File("/lib")
|
?: project.findProperty("targetLibc")?.toString())?.lowercase()
|
||||||
libDir.exists() && (libDir.listFiles()?.any { f -> f.name.startsWith("ld-musl-") } == true)
|
val isMusl = when (libcOverride) {
|
||||||
} catch (_: Exception) {
|
"musl" -> true
|
||||||
try {
|
"gnu", "glibc" -> false
|
||||||
File("/proc/self/maps").readText().contains("musl")
|
else -> if (targetPlatform != null) false else runCatching {
|
||||||
} catch (_: Exception) { false }
|
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"
|
if (isMusl) "linux-musl" else "linux"
|
||||||
}
|
}
|
||||||
@@ -90,6 +94,56 @@ 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())
|
||||||
@@ -133,12 +187,14 @@ dependencies {
|
|||||||
implementation("com.twelvemonkeys.imageio:imageio-bmp:3.13.1")
|
implementation("com.twelvemonkeys.imageio:imageio-bmp:3.13.1")
|
||||||
|
|
||||||
// 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.2.0"
|
val epub4jCoords = if (useLocalLibs) "org.grimmory:epub4j-core:+" else "org.grimmory:epub4j-core:1.4.0"
|
||||||
implementation(epub4jCoords)
|
implementation(epub4jCoords)
|
||||||
|
|
||||||
// epub4j-native for native archive parsing
|
// epub4j-native for native archive parsing
|
||||||
val epub4jNativeCoords = if (useLocalLibs) "org.grimmory:epub4j-native:+" else "org.grimmory:epub4j-native:1.2.0"
|
val epub4jNativeVersion = "1.4.0"
|
||||||
|
val epub4jNativeCoords = if (useLocalLibs) "org.grimmory:epub4j-native:+" else "org.grimmory:epub4j-native:$epub4jNativeVersion"
|
||||||
implementation(epub4jNativeCoords)
|
implementation(epub4jNativeCoords)
|
||||||
|
runtimeOnly("$epub4jNativeCoords:${epub4jNativesClassifier()}")
|
||||||
|
|
||||||
// --- Audio Metadata (Audiobook Support) ---
|
// --- Audio Metadata (Audiobook Support) ---
|
||||||
implementation("com.github.RouHim:jaudiotagger:2.0.19")
|
implementation("com.github.RouHim:jaudiotagger:2.0.19")
|
||||||
|
|||||||
@@ -82,8 +82,8 @@ org.freemarker:freemarker:2.3.34=compileClasspath,productionRuntimeClasspath,run
|
|||||||
org.glassfish.jaxb:jaxb-core:4.0.6=productionRuntimeClasspath,runtimeClasspath,testRuntimeClasspath
|
org.glassfish.jaxb:jaxb-core:4.0.6=productionRuntimeClasspath,runtimeClasspath,testRuntimeClasspath
|
||||||
org.glassfish.jaxb:jaxb-runtime:4.0.8=productionRuntimeClasspath,runtimeClasspath,testRuntimeClasspath
|
org.glassfish.jaxb:jaxb-runtime:4.0.8=productionRuntimeClasspath,runtimeClasspath,testRuntimeClasspath
|
||||||
org.glassfish.jaxb:txw2:4.0.6=productionRuntimeClasspath,runtimeClasspath,testRuntimeClasspath
|
org.glassfish.jaxb:txw2:4.0.6=productionRuntimeClasspath,runtimeClasspath,testRuntimeClasspath
|
||||||
org.grimmory:epub4j-core:1.2.0=compileClasspath,productionRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
org.grimmory:epub4j-core:1.4.0=compileClasspath,productionRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
org.grimmory:epub4j-native:1.2.0=compileClasspath,productionRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
org.grimmory:epub4j-native:1.4.0=compileClasspath,productionRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
org.grimmory:pdfium4j:0.16.0=compileClasspath,productionRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
org.grimmory:pdfium4j:0.16.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