Vaibhav Jaiswal
04/15/2025, 9:15 AMcommonMain
@Module
@ComponentScan("com.medial.app.core")
internal expect class CorePlatformModule
@Module(includes = [CorePlatformModule::class])
@ComponentScan("com.medial.app.core")
class CoreModule {
@Single
fun connectivity() = Connectivity()
}
and these in the android and iOS SourceSet
@Module
@ComponentScan("com.medial.app.core")
internal actual class CorePlatformModule {
@Single
fun amplitude(context: Context) = Amplitude(
Configuration(
apiKey = AppConfig.AMPLITUDE_API_KEY,
context = context.applicationContext,
locationListening = true,
identifyBatchIntervalMillis = 0,
defaultTracking = DefaultTrackingOptions(
sessions = true,
deepLinks = true,
appLifecycles = true,
screenViews = false
)
)
)
}
@Module
@ComponentScan("com.medial.app.core")
internal actual class CorePlatformModule {
@Single
fun amplitude() = Amplitude.instance().apply {
initializeApiKey(AppConfig.AMPLITUDE_API_KEY)
defaultTracking = AMPDefaultTrackingOptions().apply {
sessions = true
deepLinks = true
appLifecycles = true
screenViews = true
}
}
}
Now when i try to run my app, i get this error
> Expect declaration module
doesn't match actual module
because parameter types are different
Does Anyone know, why this error is showing up ?