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
target 'iosApp' do | |
# Comment the next line if you don't want to use dynamic frameworks | |
use_frameworks! | |
platform :ios, '13.5' | |
# Pods for iosApp | |
pod 'NBVCommon', :path => '../nbv-kmp' | |
end |
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
./gradlew publish // or publishToMavenLocal for dev purpose |
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
plugins { | |
// ... | |
`maven-publish` | |
} |
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
./gradlew podspec |
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
kotlin { | |
// ... | |
cocoapods { | |
// Configure fields required by CocoaPods. | |
summary = "This is my personal KMP module" | |
homepage = "Do not have one yet." | |
// The name of the produced framework can be changed. | |
// The name of the Gradle project is used here by default. | |
frameworkName = "NBVCommon" |
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
plugins { | |
// ... | |
kotlin("native.cocoapods") version "1.3.72" | |
} |
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
./gradlew build |
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
val packForXcode by tasks.creating(Sync::class) { | |
val mode = System.getenv("CONFIGURATION") ?: "DEBUG" | |
val framework = kotlin.targets | |
.getByName<org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget>("ios") | |
.binaries.getFramework(mode) | |
inputs.property("mode", mode) | |
dependsOn(framework.linkTask) | |
val targetDir = File(buildDir, "xcode-frameworks") |
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
val notLoggedInContainer = DI { | |
import(loginModule, allowOverride = true) | |
bind<AuthApi>(overrides = true) with singleton { AuthApiError() } | |
bind<TokenRepository>(overrides = true) with singleton { TokenRepositoryNotLoggedIn() } | |
bind() from provider { TestLoginView() } | |
} |
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
class LoginPresenterTest : DIAware { | |
override val di = DI { | |
import(loginModule, allowOverride = true) | |
bind<AuthApi>(overrides = true) with singleton { AuthApiSuccess() } | |
bind<TokenRepository>(overrides = true) with singleton { TokenRepositoryLoggedIn() } | |
bind() from provider { TestLoginView() } | |
} | |
@Test | |
fun test01_attachView() { |