-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/develop'
- Loading branch information
Showing
19 changed files
with
74 additions
and
73 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
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
9 changes: 2 additions & 7 deletions
9
android/src/main/java/com/github/mustafaozhan/ccc/android/di/PlatformModule.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,17 +1,12 @@ | ||
package com.github.mustafaozhan.ccc.android.di | ||
|
||
import android.content.Context | ||
import com.github.mustafaozhan.ad.AdManager | ||
import com.github.mustafaozhan.ad.AdManagerImpl | ||
import com.github.mustafaozhan.billing.BillingManager | ||
import com.github.mustafaozhan.billing.BillingManagerImpl | ||
import org.koin.dsl.module | ||
|
||
fun getPlatformModule(context: Context) = module { | ||
var platformModule = module { | ||
single<BillingManager> { BillingManagerImpl(get()) } | ||
single<AdManager> { | ||
AdManagerImpl().also { | ||
it.initMobileAds(context) | ||
} | ||
} | ||
single<AdManager> { AdManagerImpl(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
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
7 changes: 2 additions & 5 deletions
7
client/src/iosMain/kotlin/com/github/mustafaozhan/ccc/client/di/module/IOSModule.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,12 +1,9 @@ | ||
package com.github.mustafaozhan.ccc.client.di.module | ||
|
||
import com.github.mustafaozhan.ccc.common.di.nsUserDefaults | ||
import com.github.mustafaozhan.ccc.common.di.NativeDependencyWrapper | ||
import org.koin.dsl.module | ||
import platform.Foundation.NSUserDefaults | ||
|
||
fun getIOSModule(userDefaults: NSUserDefaults) = module { | ||
// https://github.com/InsertKoinIO/koin/issues/1016 | ||
// todo koin doesn't support to have it as single then use with get() for Objective-C classes | ||
// single { userDefaults } | ||
nsUserDefaults = userDefaults | ||
single { NativeDependencyWrapper(userDefaults) } | ||
} |
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
5 changes: 5 additions & 0 deletions
5
common/src/iosMain/kotlin/com/github/mustafaozhan/ccc/common/di/NativeDependencyWrapper.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,5 @@ | ||
package com.github.mustafaozhan.ccc.common.di | ||
|
||
import platform.Foundation.NSUserDefaults | ||
|
||
data class NativeDependencyWrapper(val userDefaults: NSUserDefaults) |