kiwix-android/core/build.gradle.kts
MohitMaliFtechiz 2e63d70e6c Fixed: Downloading starts very slowly on Android 14+.
* Upgraded Fetch to 3.4.1.
* Upgraded Kotlin kotlin-stdlib from JDK7 to JDK8.
* Upgraded Kotlin version to 2.0.0 to support the latest Fetch library.
* Upgraded Dagger to 2.53.1.
* Upgraded ObjectBox to 4.0.3.
* Notification now shows "Pause" and "Resume" buttons instead of "pause" and "resume".
* Fixed: Notification buttons were not working on Android 13 and above.
* Fixed: Downloading was not working in the background. Added a foreground service for Fetch so that downloading will continue in the background.
2024-12-23 18:46:32 +05:30

71 lines
1.7 KiB
Plaintext

import plugin.KiwixConfigurationPlugin
buildscript {
repositories {
google()
mavenCentral()
maven { setUrl("https://jitpack.io") }
}
dependencies {
classpath(Libs.objectbox_gradle_plugin)
}
}
plugins {
`android-library`
}
plugins.apply(KiwixConfigurationPlugin::class)
apply(plugin = "io.objectbox")
android {
defaultConfig {
buildConfigField("long", "VERSION_CODE", "".getVersionCode().toString())
}
buildTypes {
getByName("release") {
isMinifyEnabled = false
}
}
}
fun shouldUseLocalVersion() = File(projectDir, "libs").exists()
dependencies {
// use jdk8 java.time backport, as long app < Build.VERSION_CODES.O
implementation(Libs.threetenabp)
// Get kiwixlib online if it is not populated locally
if (!shouldUseLocalVersion()) {
api(Libs.libkiwix)
} else {
implementation("com.getkeepsafe.relinker:relinker:1.4.5")
api(fileTree(mapOf("include" to "*.aar", "dir" to "libs")))
}
// Document File
implementation(Libs.select_folder_document_file)
// Square
implementation(Libs.converter_simplexml) {
exclude(group = "xpp3", module = "xpp3")
exclude(group = "stax", module = "stax-api")
exclude(group = "stax", module = "stax")
}
// Leak canary
debugImplementation(Libs.leakcanary_android)
implementation(Libs.android_arch_lifecycle_extensions)
implementation(Libs.objectbox_kotlin)
implementation(Libs.objectbox_rxjava)
implementation(Libs.webkit)
testImplementation(Libs.kotlinx_coroutines_test)
implementation(Libs.kotlinx_coroutines_android)
implementation(Libs.kotlinx_coroutines_rx3)
implementation(Libs.zxing)
api(Libs.fetch) {
// Todo: Will remove this when we add support for Android 15
exclude("androidx.core", "core-ktx")
}
}