-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
targholi
committed
Nov 26, 2024
1 parent
2d49e4a
commit 79fdcf2
Showing
54 changed files
with
307 additions
and
279 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 26 additions & 3 deletions
29
app-watch/app/src/main/java/ir/composenews/ComposeNewsWearApplication.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,30 @@ | ||
package ir.composenews | ||
|
||
import android.app.Application | ||
import dagger.hilt.android.HiltAndroidApp | ||
import ir.composenews.data.di.repositoryModule | ||
import ir.composenews.marketdetail.marketDetailFeatureModule | ||
import ir.composenews.marketlist.marketListFeatureModule | ||
import org.koin.android.ext.koin.androidContext | ||
import org.koin.android.ext.koin.androidLogger | ||
import org.koin.core.context.GlobalContext.startKoin | ||
import org.koin.core.logger.Level | ||
|
||
@HiltAndroidApp | ||
class ComposeNewsWearApplication : Application() | ||
class ComposeNewsWearApplication : Application() { | ||
override fun onCreate() { | ||
super.onCreate() | ||
|
||
startKoin { | ||
androidContext(this@ComposeNewsWearApplication) | ||
androidLogger(Level.DEBUG) | ||
|
||
modules( | ||
listOf( | ||
mainViewModelModule, | ||
marketListFeatureModule, marketDetailFeatureModule, | ||
|
||
repositoryModule, | ||
) | ||
) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
app-watch/app/src/main/java/ir/composenews/mainViewModelModule.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package ir.composenews | ||
|
||
import org.koin.androidx.viewmodel.dsl.viewModel | ||
import org.koin.dsl.module | ||
|
||
val mainViewModelModule =module { | ||
viewModel { | ||
MainViewModel(get())} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 19 additions & 3 deletions
22
app/src/main/java/ir/composenews/ComposeNewsApplication.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,31 @@ | ||
package ir.composenews | ||
|
||
import android.app.Application | ||
import dagger.hilt.android.HiltAndroidApp | ||
import ir.composenews.data.di.repositoryModule | ||
import ir.composenews.marketdetail.marketDetailFeatureModule | ||
import ir.composenews.marketlist.marketListFeatureModule | ||
import ir.composenews.sync.Sync | ||
import org.koin.android.ext.koin.androidContext | ||
import org.koin.android.ext.koin.androidLogger | ||
import org.koin.core.context.startKoin | ||
import org.koin.core.logger.Level | ||
|
||
@HiltAndroidApp | ||
class ComposeNewsApplication : Application() { | ||
|
||
override fun onCreate() { | ||
super.onCreate() | ||
Sync.init(this) | ||
} | ||
|
||
startKoin { | ||
androidContext(this@ComposeNewsApplication) | ||
androidLogger(Level.DEBUG) | ||
|
||
modules( | ||
listOf( | ||
marketListFeatureModule, marketDetailFeatureModule, | ||
repositoryModule, | ||
) | ||
) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 0 additions & 29 deletions
29
build-logic/convention/src/main/kotlin/HiltConventionPlugin.kt
This file was deleted.
Oops, something went wrong.
24 changes: 24 additions & 0 deletions
24
build-logic/convention/src/main/kotlin/KoinConventionPlugin.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import ir.composenews.libs | ||
import org.gradle.api.Plugin | ||
import org.gradle.api.Project | ||
import org.gradle.kotlin.dsl.dependencies | ||
|
||
class KoinConventionPlugin : Plugin<Project> { | ||
override fun apply(target: Project) { | ||
target.run { | ||
applyDependencies() | ||
} | ||
} | ||
|
||
private fun Project.applyPlugins() { | ||
pluginManager.apply { | ||
// apply("org.jetbrains.kotlin.kapt") | ||
} | ||
} | ||
|
||
private fun Project.applyDependencies() { | ||
dependencies { | ||
"implementation"(libs.findBundle("koin").get()) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.