build: move RemoteService to extension-runtime.

This commit is contained in:
oxy-macmini
2025-04-06 16:23:01 +08:00
parent 5ee02bac82
commit a663616c94
14 changed files with 51 additions and 56 deletions

View File

@ -1,30 +0,0 @@
package com.m3u.data
import com.google.auto.service.AutoService
import com.m3u.core.util.context.ContextUtils
import com.m3u.data.database.dao.ChannelDao
import com.m3u.data.database.dao.PlaylistDao
import com.m3u.extension.api.RemoteServiceDependencies
import dagger.hilt.InstallIn
import dagger.hilt.android.EntryPointAccessors
import dagger.hilt.components.SingletonComponent
@AutoService(RemoteServiceDependencies::class)
class RemoteServiceDependenciesImpl : RemoteServiceDependencies {
@dagger.hilt.EntryPoint
@InstallIn(SingletonComponent::class)
interface EntryPoint {
val playlistDao: PlaylistDao
val channelDao: ChannelDao
}
private val entryPoint: EntryPoint by lazy {
EntryPointAccessors.fromApplication(
ContextUtils.getContext(),
EntryPoint::class.java
)
}
override val playlistDao: Any = entryPoint.playlistDao
override val channelDao: Any = entryPoint.channelDao
}