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 kotlinx.coroutines.CoroutineDispatcher
import kotlinx.coroutines.CoroutineScope
import org.jetbrains.annotations.VisibleForTesting
import javax.inject.Singleton
@VisibleForTesting
@Module
@InstallIn(SingletonComponent::class)
object DataStoreModule {
@Provides
@Singleton
internal fun providesUserPreferencesDataStore(
fun providesUserPreferencesDataStore(
@ApplicationContext context: Context,
@Dispatcher(IO) ioDispatcher: CoroutineDispatcher,
@ApplicationScope scope: CoroutineScope,

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

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

Loading…
Cancel
Save