mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-09-11 00:23:58 -04:00
Removed fdroid variant
* We have removed the F-Droid variant since we are not planning to publish the application on F-Droid until we have completely removed Object Box from our codebase.
This commit is contained in:
parent
76f8c35dd1
commit
073580701a
@ -1,5 +1,4 @@
|
|||||||
import plugin.KiwixConfigurationPlugin
|
import plugin.KiwixConfigurationPlugin
|
||||||
import plugin.fdroidImplementation
|
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
android
|
android
|
||||||
@ -75,13 +74,6 @@ android {
|
|||||||
initWith(getByName("debug"))
|
initWith(getByName("debug"))
|
||||||
setMatchingFallbacks("debug")
|
setMatchingFallbacks("debug")
|
||||||
}
|
}
|
||||||
create("fdroid") { // Configuration for F-Droid flavor
|
|
||||||
// dimension = "default"
|
|
||||||
initWith(getByName("release"))
|
|
||||||
matchingFallbacks += "release"
|
|
||||||
applicationIdSuffix = ".fdroid"
|
|
||||||
versionNameSuffix = "-fdroid"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bundle {
|
bundle {
|
||||||
@ -108,17 +100,6 @@ play {
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
androidTestImplementation(Libs.leakcanary_android_instrumentation)
|
androidTestImplementation(Libs.leakcanary_android_instrumentation)
|
||||||
|
|
||||||
fdroidImplementation(Libs.objectbox_kotlin) {
|
|
||||||
// Exclude specific packages or classes from ObjectBox library
|
|
||||||
exclude(group = "io.objectbox", module = "objectbox-kotlin")
|
|
||||||
}
|
|
||||||
fdroidImplementation(Libs.objectbox_rxjava) {
|
|
||||||
exclude(group = "io.objectbox", module = "objectbox-rxjava")
|
|
||||||
}
|
|
||||||
fdroidImplementation(Libs.objectbox_gradle_plugin) {
|
|
||||||
exclude(group = "io.objectbox", module = "objectbox-gradle-plugin")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
task("generateVersionCodeAndName") {
|
task("generateVersionCodeAndName") {
|
||||||
val file = File("VERSION_INFO")
|
val file = File("VERSION_INFO")
|
||||||
|
@ -42,14 +42,6 @@ internal fun DependencyHandlerScope.androidTestImplementation(
|
|||||||
(it as ModuleDependency?)?.let { moduleDependency -> dependencyFunc?.invoke(moduleDependency) }
|
(it as ModuleDependency?)?.let { moduleDependency -> dependencyFunc?.invoke(moduleDependency) }
|
||||||
}
|
}
|
||||||
|
|
||||||
fun DependencyHandlerScope.fdroidImplementation(
|
|
||||||
dependency: String,
|
|
||||||
dependencyFunc: (ModuleDependency.() -> Unit)? = null
|
|
||||||
) =
|
|
||||||
addDependency("fdroidImplementation", dependency).also {
|
|
||||||
(it as ModuleDependency?)?.let { moduleDependency -> dependencyFunc?.invoke(moduleDependency) }
|
|
||||||
}
|
|
||||||
|
|
||||||
internal fun DependencyHandlerScope.compileOnly(dependency: String) =
|
internal fun DependencyHandlerScope.compileOnly(dependency: String) =
|
||||||
addDependency("compileOnly", dependency)
|
addDependency("compileOnly", dependency)
|
||||||
|
|
||||||
|
@ -50,9 +50,6 @@ android {
|
|||||||
getByName("release") {
|
getByName("release") {
|
||||||
isMinifyEnabled = false
|
isMinifyEnabled = false
|
||||||
}
|
}
|
||||||
create("fdroid") {
|
|
||||||
initWith(getByName("release"))
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -24,7 +24,6 @@ import io.objectbox.kotlin.boxFor
|
|||||||
import kotlinx.coroutines.CoroutineScope
|
import kotlinx.coroutines.CoroutineScope
|
||||||
import kotlinx.coroutines.Dispatchers
|
import kotlinx.coroutines.Dispatchers
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
import org.kiwix.kiwixmobile.core.BuildConfig
|
|
||||||
import org.kiwix.kiwixmobile.core.CoreApp
|
import org.kiwix.kiwixmobile.core.CoreApp
|
||||||
import org.kiwix.kiwixmobile.core.dao.entities.RecentSearchEntity
|
import org.kiwix.kiwixmobile.core.dao.entities.RecentSearchEntity
|
||||||
import org.kiwix.kiwixmobile.core.data.KiwixRoomDatabase
|
import org.kiwix.kiwixmobile.core.data.KiwixRoomDatabase
|
||||||
@ -37,13 +36,10 @@ class ObjectBoxToRoomMigrator {
|
|||||||
@Inject lateinit var sharedPreferenceUtil: SharedPreferenceUtil
|
@Inject lateinit var sharedPreferenceUtil: SharedPreferenceUtil
|
||||||
|
|
||||||
fun migrateObjectBoxDataToRoom() {
|
fun migrateObjectBoxDataToRoom() {
|
||||||
// Migrate data for non-fdroid variant
|
|
||||||
if (BuildConfig.BUILD_TYPE != "fdroid") {
|
|
||||||
CoreApp.coreComponent.inject(this)
|
CoreApp.coreComponent.inject(this)
|
||||||
migrateRecentSearch(boxStore.boxFor())
|
migrateRecentSearch(boxStore.boxFor())
|
||||||
// TODO we will migrate here for other entities
|
// TODO we will migrate here for other entities
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
fun migrateRecentSearch(box: Box<RecentSearchEntity>) {
|
fun migrateRecentSearch(box: Box<RecentSearchEntity>) {
|
||||||
val searchRoomEntityList = box.all
|
val searchRoomEntityList = box.all
|
||||||
|
Loading…
x
Reference in New Issue
Block a user