* Add desktop release CI and support for Arch Linux packaging * Make Gradle wrapper executable in desktop-release workflow * Make Gradle wrapper executable in desktop-release workflow * Make Gradle wrapper executable in desktop-release workflow * Configure Gradle and update Java environment in desktop-release workflow * Update Java setup and AUR packaging in desktop release workflow * Update Java setup and AUR packaging in desktop release workflow * Add MSIX packaging support for Windows desktop distribution * Update AUR packaging metadata and validation * Use spine toc attribute for NCX resolution * crash fixes * Implement automatic discovery and injection of EPUB font face siblings * Enhance custom font support with family grouping and variable font handling * Optimize metadata loading and improve TTS highlighting * Add keyboard navigation support for EPUB reader * Refine PDF spread page sizing to respect aspect ratios * Implement responsive maximum height for reader popups and sheets * Handle TTS generation failures by skipping problematic chunks * Refactor PDF tile rendering logic and zoom indicator behavior * Prefer block and offset locators over page index in native vertical flow * Implement save and share actions for original book files * Add Estonian language support * Implement temporary viewing mode for external files * Implement direct opening for temporary external files without library persistence * fix failing tests * Import SharedFileCapabilities in DesktopLibraryUi * Improve native vertical reader progress, persistence, and image support * Center target in viewport for native vertical reader and support animated scrolling
79 lines
2.2 KiB
Kotlin
79 lines
2.2 KiB
Kotlin
import com.android.build.api.dsl.LibraryExtension
|
|
|
|
plugins {
|
|
alias(libs.plugins.kotlin.multiplatform)
|
|
alias(libs.plugins.android.library) apply false
|
|
alias(libs.plugins.kotlin.compose)
|
|
alias(libs.plugins.compose.multiplatform)
|
|
alias(libs.plugins.kotlin.serialization)
|
|
alias(libs.plugins.kover)
|
|
}
|
|
|
|
fun isDesktopOnlyBuild(): Boolean {
|
|
providers.gradleProperty("desktopOnly").orNull
|
|
?.let { return it.equals("true", ignoreCase = true) }
|
|
|
|
val requestedTasks = gradle.startParameter.taskNames
|
|
return requestedTasks.isNotEmpty() && requestedTasks.all { taskName ->
|
|
val normalized = taskName.removePrefix(":")
|
|
normalized.startsWith("desktopApp:")
|
|
}
|
|
}
|
|
|
|
val desktopOnlyBuild = isDesktopOnlyBuild()
|
|
|
|
if (!desktopOnlyBuild) {
|
|
apply(plugin = "com.android.library")
|
|
}
|
|
|
|
kotlin {
|
|
if (!desktopOnlyBuild) {
|
|
androidTarget()
|
|
}
|
|
jvm("desktop")
|
|
jvmToolchain(21)
|
|
|
|
sourceSets {
|
|
val commonMain by getting
|
|
val desktopMain by getting
|
|
val readerJvmMain by creating {
|
|
dependsOn(commonMain)
|
|
dependencies {
|
|
implementation("org.jsoup:jsoup:1.17.2")
|
|
}
|
|
}
|
|
if (!desktopOnlyBuild) {
|
|
val androidMain by getting
|
|
androidMain.dependsOn(readerJvmMain)
|
|
}
|
|
desktopMain.dependsOn(readerJvmMain)
|
|
|
|
commonMain.dependencies {
|
|
implementation(compose.foundation)
|
|
implementation(compose.material3)
|
|
implementation(compose.ui)
|
|
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.1")
|
|
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.7.3")
|
|
implementation("org.jetbrains.kotlinx:kotlinx-serialization-protobuf:1.7.3")
|
|
implementation("com.materialkolor:material-kolor:5.0.0-alpha07")
|
|
}
|
|
commonTest.dependencies {
|
|
implementation(kotlin("test"))
|
|
}
|
|
}
|
|
}
|
|
|
|
if (!desktopOnlyBuild) {
|
|
extensions.configure<LibraryExtension>("android") {
|
|
namespace = "com.aryan.reader.shared"
|
|
compileSdk = 36
|
|
|
|
defaultConfig {
|
|
minSdk = 26
|
|
}
|
|
|
|
buildFeatures {
|
|
buildConfig = true
|
|
}
|
|
}
|
|
}
|