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:
MohitMaliFtechiz 2023-06-05 16:19:37 +05:30 committed by Kelson
parent 76f8c35dd1
commit 073580701a
4 changed files with 3 additions and 37 deletions

View File

@ -1,5 +1,4 @@
import plugin.KiwixConfigurationPlugin
import plugin.fdroidImplementation
plugins {
android
@ -75,13 +74,6 @@ android {
initWith(getByName("debug"))
setMatchingFallbacks("debug")
}
create("fdroid") { // Configuration for F-Droid flavor
// dimension = "default"
initWith(getByName("release"))
matchingFallbacks += "release"
applicationIdSuffix = ".fdroid"
versionNameSuffix = "-fdroid"
}
}
bundle {
@ -108,17 +100,6 @@ play {
dependencies {
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") {
val file = File("VERSION_INFO")

View File

@ -42,14 +42,6 @@ internal fun DependencyHandlerScope.androidTestImplementation(
(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) =
addDependency("compileOnly", dependency)

View File

@ -50,9 +50,6 @@ android {
getByName("release") {
isMinifyEnabled = false
}
create("fdroid") {
initWith(getByName("release"))
}
}
}

View File

@ -24,7 +24,6 @@ import io.objectbox.kotlin.boxFor
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
import org.kiwix.kiwixmobile.core.BuildConfig
import org.kiwix.kiwixmobile.core.CoreApp
import org.kiwix.kiwixmobile.core.dao.entities.RecentSearchEntity
import org.kiwix.kiwixmobile.core.data.KiwixRoomDatabase
@ -37,12 +36,9 @@ class ObjectBoxToRoomMigrator {
@Inject lateinit var sharedPreferenceUtil: SharedPreferenceUtil
fun migrateObjectBoxDataToRoom() {
// Migrate data for non-fdroid variant
if (BuildConfig.BUILD_TYPE != "fdroid") {
CoreApp.coreComponent.inject(this)
migrateRecentSearch(boxStore.boxFor())
// TODO we will migrate here for other entities
}
CoreApp.coreComponent.inject(this)
migrateRecentSearch(boxStore.boxFor())
// TODO we will migrate here for other entities
}
fun migrateRecentSearch(box: Box<RecentSearchEntity>) {