Move internal modifier to the object to work around build errors

`error: cannot find symbol` on:

- `DataStoreModule.INSTANCE.providesUserPreferencesDataStore$datastore_demoDebug`
- `SyncModule.Companion.provideFirebaseMessaging$work_prodDebug()`
pull/1959/head
Simon Marquis 2 weeks ago
parent a752ca3fe4
commit a19fcd9e09

@ -33,15 +33,17 @@ import dagger.hilt.android.qualifiers.ApplicationContext
import dagger.hilt.components.SingletonComponent import dagger.hilt.components.SingletonComponent
import kotlinx.coroutines.CoroutineDispatcher import kotlinx.coroutines.CoroutineDispatcher
import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.CoroutineScope
import org.jetbrains.annotations.VisibleForTesting
import javax.inject.Singleton import javax.inject.Singleton
@VisibleForTesting
@Module @Module
@InstallIn(SingletonComponent::class) @InstallIn(SingletonComponent::class)
object DataStoreModule { object DataStoreModule {
@Provides @Provides
@Singleton @Singleton
internal fun providesUserPreferencesDataStore( fun providesUserPreferencesDataStore(
@ApplicationContext context: Context, @ApplicationContext context: Context,
@Dispatcher(IO) ioDispatcher: CoroutineDispatcher, @Dispatcher(IO) ioDispatcher: CoroutineDispatcher,
@ApplicationScope scope: CoroutineScope, @ApplicationScope scope: CoroutineScope,

@ -24,7 +24,9 @@ import dagger.Binds
import dagger.Module import dagger.Module
import dagger.hilt.InstallIn import dagger.hilt.InstallIn
import dagger.hilt.components.SingletonComponent import dagger.hilt.components.SingletonComponent
import org.jetbrains.annotations.VisibleForTesting
@VisibleForTesting
@Module @Module
@InstallIn(SingletonComponent::class) @InstallIn(SingletonComponent::class)
abstract class SyncModule { abstract class SyncModule {

@ -28,8 +28,10 @@ import dagger.Module
import dagger.Provides import dagger.Provides
import dagger.hilt.InstallIn import dagger.hilt.InstallIn
import dagger.hilt.components.SingletonComponent import dagger.hilt.components.SingletonComponent
import org.jetbrains.annotations.VisibleForTesting
import javax.inject.Singleton import javax.inject.Singleton
@VisibleForTesting
@Module @Module
@InstallIn(SingletonComponent::class) @InstallIn(SingletonComponent::class)
abstract class SyncModule { abstract class SyncModule {
@ -43,9 +45,9 @@ abstract class SyncModule {
syncSubscriber: FirebaseSyncSubscriber, syncSubscriber: FirebaseSyncSubscriber,
): SyncSubscriber ): SyncSubscriber
companion object { internal companion object {
@Provides @Provides
@Singleton @Singleton
internal fun provideFirebaseMessaging(): FirebaseMessaging = Firebase.messaging fun provideFirebaseMessaging(): FirebaseMessaging = Firebase.messaging
} }
} }

Loading…
Cancel
Save