Loading app-common/build.gradle.kts +3 −3 Original line number Diff line number Diff line Loading @@ -8,13 +8,10 @@ android { dependencies { api(projects.legacy.common) api(projects.legacy.ui.legacy) api(projects.feature.account.core) api(projects.feature.launcher) api(projects.feature.navigation.drawer.api) implementation(projects.legacy.core) Loading @@ -27,6 +24,9 @@ dependencies { implementation(projects.feature.account.setup) implementation(projects.feature.migration.provider) implementation(projects.feature.widget.messageList) implementation(projects.mail.protocols.imap) implementation(libs.androidx.work.runtime) } app-common/src/main/kotlin/net/thunderbird/app/common/AppCommonModule.kt +9 −0 Original line number Diff line number Diff line package net.thunderbird.app.common import com.fsck.k9.legacyCommonAppModules import com.fsck.k9.legacyCoreModules import com.fsck.k9.legacyUiModules import net.thunderbird.app.common.account.appCommonAccountModule import net.thunderbird.app.common.feature.appCommonFeatureModule import org.koin.core.module.Module import org.koin.dsl.module val appCommonModule: Module = module { includes(legacyCommonAppModules) includes(legacyCoreModules) includes(legacyUiModules) includes( appCommonAccountModule, appCommonFeatureModule, ) } legacy/common/src/main/java/com/fsck/k9/CommonApp.kt→app-common/src/main/kotlin/net/thunderbird/app/common/BaseApplication.kt +9 −4 Original line number Diff line number Diff line package com.fsck.k9 package net.thunderbird.app.common import android.app.Application import android.content.Context Loading @@ -6,8 +6,12 @@ import android.content.res.Configuration import android.content.res.Resources import app.k9mail.feature.widget.message.list.MessageListWidgetManager import app.k9mail.legacy.di.DI import com.fsck.k9.Core import com.fsck.k9.K9 import com.fsck.k9.MessagingListenerProvider import com.fsck.k9.controller.MessagingController import com.fsck.k9.job.WorkManagerConfigurationProvider import com.fsck.k9.logging.Timber import com.fsck.k9.notification.NotificationChannelManager import com.fsck.k9.ui.base.AppLanguageManager import com.fsck.k9.ui.base.extensions.currentLocale Loading @@ -21,10 +25,10 @@ import kotlinx.coroutines.flow.onEach import net.thunderbird.core.ui.theme.manager.ThemeManager import org.koin.android.ext.android.inject import org.koin.core.module.Module import timber.log.Timber import androidx.work.Configuration as WorkManagerConfiguration abstract class CommonApp : Application(), WorkManagerConfiguration.Provider { abstract class BaseApplication : Application(), WorkManagerConfiguration.Provider { private val messagingController: MessagingController by inject() private val messagingListenerProvider: MessagingListenerProvider by inject() private val themeManager: ThemeManager by inject() Loading @@ -38,10 +42,11 @@ abstract class CommonApp : Application(), WorkManagerConfiguration.Provider { override fun attachBaseContext(base: Context?) { Core.earlyInit() super.attachBaseContext(base) // Start Koin early so it is ready by the time content providers are initialized. DI.start(this, listOf(provideAppModule()) + coreModules + uiModules + commonAppModules) DI.start(this, listOf(provideAppModule())) } override fun onCreate() { Loading app-common/src/main/kotlin/net/thunderbird/app/common/account/AccountColorPicker.kt +1 −1 Original line number Diff line number Diff line Loading @@ -4,7 +4,7 @@ import android.content.res.Resources import app.k9mail.core.ui.legacy.theme2.common.R import app.k9mail.legacy.account.AccountManager class AccountColorPicker( internal class AccountColorPicker( private val accountManager: AccountManager, private val resources: Resources, ) { Loading app-common/src/main/kotlin/net/thunderbird/app/common/account/AccountCreator.kt +1 −1 Original line number Diff line number Diff line Loading @@ -27,7 +27,7 @@ import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.withContext // TODO Move to feature/account/setup class AccountCreator( internal class AccountCreator( private val accountColorPicker: AccountColorPicker, private val localFoldersCreator: SpecialLocalFoldersCreator, private val preferences: Preferences, Loading Loading
app-common/build.gradle.kts +3 −3 Original line number Diff line number Diff line Loading @@ -8,13 +8,10 @@ android { dependencies { api(projects.legacy.common) api(projects.legacy.ui.legacy) api(projects.feature.account.core) api(projects.feature.launcher) api(projects.feature.navigation.drawer.api) implementation(projects.legacy.core) Loading @@ -27,6 +24,9 @@ dependencies { implementation(projects.feature.account.setup) implementation(projects.feature.migration.provider) implementation(projects.feature.widget.messageList) implementation(projects.mail.protocols.imap) implementation(libs.androidx.work.runtime) }
app-common/src/main/kotlin/net/thunderbird/app/common/AppCommonModule.kt +9 −0 Original line number Diff line number Diff line package net.thunderbird.app.common import com.fsck.k9.legacyCommonAppModules import com.fsck.k9.legacyCoreModules import com.fsck.k9.legacyUiModules import net.thunderbird.app.common.account.appCommonAccountModule import net.thunderbird.app.common.feature.appCommonFeatureModule import org.koin.core.module.Module import org.koin.dsl.module val appCommonModule: Module = module { includes(legacyCommonAppModules) includes(legacyCoreModules) includes(legacyUiModules) includes( appCommonAccountModule, appCommonFeatureModule, ) }
legacy/common/src/main/java/com/fsck/k9/CommonApp.kt→app-common/src/main/kotlin/net/thunderbird/app/common/BaseApplication.kt +9 −4 Original line number Diff line number Diff line package com.fsck.k9 package net.thunderbird.app.common import android.app.Application import android.content.Context Loading @@ -6,8 +6,12 @@ import android.content.res.Configuration import android.content.res.Resources import app.k9mail.feature.widget.message.list.MessageListWidgetManager import app.k9mail.legacy.di.DI import com.fsck.k9.Core import com.fsck.k9.K9 import com.fsck.k9.MessagingListenerProvider import com.fsck.k9.controller.MessagingController import com.fsck.k9.job.WorkManagerConfigurationProvider import com.fsck.k9.logging.Timber import com.fsck.k9.notification.NotificationChannelManager import com.fsck.k9.ui.base.AppLanguageManager import com.fsck.k9.ui.base.extensions.currentLocale Loading @@ -21,10 +25,10 @@ import kotlinx.coroutines.flow.onEach import net.thunderbird.core.ui.theme.manager.ThemeManager import org.koin.android.ext.android.inject import org.koin.core.module.Module import timber.log.Timber import androidx.work.Configuration as WorkManagerConfiguration abstract class CommonApp : Application(), WorkManagerConfiguration.Provider { abstract class BaseApplication : Application(), WorkManagerConfiguration.Provider { private val messagingController: MessagingController by inject() private val messagingListenerProvider: MessagingListenerProvider by inject() private val themeManager: ThemeManager by inject() Loading @@ -38,10 +42,11 @@ abstract class CommonApp : Application(), WorkManagerConfiguration.Provider { override fun attachBaseContext(base: Context?) { Core.earlyInit() super.attachBaseContext(base) // Start Koin early so it is ready by the time content providers are initialized. DI.start(this, listOf(provideAppModule()) + coreModules + uiModules + commonAppModules) DI.start(this, listOf(provideAppModule())) } override fun onCreate() { Loading
app-common/src/main/kotlin/net/thunderbird/app/common/account/AccountColorPicker.kt +1 −1 Original line number Diff line number Diff line Loading @@ -4,7 +4,7 @@ import android.content.res.Resources import app.k9mail.core.ui.legacy.theme2.common.R import app.k9mail.legacy.account.AccountManager class AccountColorPicker( internal class AccountColorPicker( private val accountManager: AccountManager, private val resources: Resources, ) { Loading
app-common/src/main/kotlin/net/thunderbird/app/common/account/AccountCreator.kt +1 −1 Original line number Diff line number Diff line Loading @@ -27,7 +27,7 @@ import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.withContext // TODO Move to feature/account/setup class AccountCreator( internal class AccountCreator( private val accountColorPicker: AccountColorPicker, private val localFoldersCreator: SpecialLocalFoldersCreator, private val preferences: Preferences, Loading