-
Notifications
You must be signed in to change notification settings - Fork 14
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
1 parent
a091fde
commit 6644448
Showing
16 changed files
with
72 additions
and
36 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
2 changes: 2 additions & 0 deletions
2
androidApp/src/main/java/com/example/helloworldkmp/android/GreetPresenter.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,9 @@ | ||
package com.example.helloworldkmp.android | ||
|
||
import com.example.helloworldkmp.Greeting | ||
import org.koin.core.annotation.Factory | ||
|
||
@Factory | ||
class GreetPresenter(val greeting: Greeting) { | ||
fun print() = greeting.greeting() | ||
} |
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
12 changes: 5 additions & 7 deletions
12
androidApp/src/main/java/com/example/helloworldkmp/android/di/AndroidModule.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,10 +1,8 @@ | ||
package com.example.helloworldkmp.android.di | ||
|
||
import com.example.helloworldkmp.android.GreetPresenter | ||
import org.koin.core.module.dsl.singleOf | ||
import org.koin.dsl.module | ||
import org.koin.core.annotation.ComponentScan | ||
import org.koin.core.annotation.Module | ||
|
||
|
||
val androidModule = module { | ||
singleOf(::GreetPresenter) | ||
} | ||
@Module | ||
@ComponentScan("com.example.helloworldkmp.android") | ||
class AndroidModule |
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
3 changes: 3 additions & 0 deletions
3
shared/src/commonMain/kotlin/com/example/helloworldkmp/Greeting.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
3 changes: 3 additions & 0 deletions
3
shared/src/commonMain/kotlin/com/example/helloworldkmp/Platform.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,5 +1,8 @@ | ||
package com.example.helloworldkmp | ||
|
||
import org.koin.core.annotation.Single | ||
|
||
@Single | ||
expect class Platform() { | ||
val name: String | ||
} |
10 changes: 9 additions & 1 deletion
10
shared/src/commonMain/kotlin/com/example/helloworldkmp/di/AppModule.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,3 +1,11 @@ | ||
package com.example.helloworldkmp.di | ||
|
||
fun appModule() = listOf(commonModule, platformModule) | ||
import org.koin.core.annotation.ComponentScan | ||
import org.koin.core.annotation.Module | ||
import org.koin.ksp.generated.module | ||
|
||
fun appModule() = listOf(AppModule().module) | ||
|
||
@Module | ||
@ComponentScan("com.example.helloworldkmp") | ||
class AppModule |
9 changes: 0 additions & 9 deletions
9
shared/src/commonMain/kotlin/com/example/helloworldkmp/di/CommonModule.kt
This file was deleted.
Oops, something went wrong.
9 changes: 0 additions & 9 deletions
9
shared/src/commonMain/kotlin/com/example/helloworldkmp/di/PlatformModule.kt
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
...otlin/com/example/helloworldkmp/Helper.kt → ...m/example/helloworldkmp/GreetingHelper.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