AnaR
05/02/2022, 6:53 PMMohit Sharma
05/03/2022, 8:25 AMMendess
05/03/2022, 11:09 AMkotlin {
/* Targets configuration omitted.
* To find out how to configure the targets, please follow the link:
* <https://kotlinlang.org/docs/reference/building-mpp-with-gradle.html#setting-up-targets> */
jvm()
js(IR) {
browser {
testTask {
useKarma {
useFirefox()
}
}
}
}
sourceSets {
all {
languageSettings.apply {
optIn("kotlin.js.ExperimentalJsExport")
}
}
val commonMain by getting {
dependencies {
implementation(kotlin("stdlib-common"))
implementation("org.jetbrains.kotlinx:kotlinx-serialization-core:1.3.2")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.3.2")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.1")
}
}
val commonTest by getting {
dependencies {
implementation(kotlin("test"))
implementation(kotlin("test-common"))
implementation(kotlin("test-annotations-common"))
implementation(kotlin("test-annotations-common"))
}
}
val jvmMain by getting { }
val jvmTest by getting {
dependencies {
implementation(kotlin("test"))
implementation(kotlin("test-junit"))
implementation("org.junit.jupiter:junit-jupiter:5.8.2")
implementation("org.junit.jupiter:junit-jupiter-params:5.8.2")
implementation("io.mockk:mockk:1.12.3")
}
}
...
Vivek Modi
05/03/2022, 3:43 PMTrey
05/03/2022, 6:04 PMBradleycorn
05/03/2022, 10:39 PMbuild.gradle.kts
is posted in the 🧵 . Any Ideas? Google has been no help at all.julioromano
05/04/2022, 8:00 AM% ./gradlew :database:build
[...]
> Task :database:compileIosMainKotlinMetadata FAILED
w: Could not find "co.touchlab:sqliter-driver-cinterop-sqlite3"
Any idea why this happens and how to fix it (I know it’s just a warning but…)?
Happy to give more info if only I knew what could help (gradle files, other code…)Vivek Modi
05/04/2022, 2:00 PMfun initKoin(
appDeclaration: KoinAppDeclaration = {}
) = startKoin {
appDeclaration()
modules(cartModule)
}
fun iosKoin() = initKoin() {}
val cartModule = module {
single { httpClient() }
single { KtorCountryApi(get()) }
}
I have KtorCountryApi class
class KtorCountryApi(private val httpClient: HttpClient) : NetworkRoute() {
suspend fun getCountry(): ApiResponse<KtorCountriesResponse> {
/// api call
}
}
I am calling the iosKoin() in my .swift file in ios projectSlackbot
05/04/2022, 2:28 PMbrabo-hi
05/04/2022, 4:54 PMVivek Modi
05/04/2022, 9:43 PMasync/await kmm bridging support in swift is experimental and not recommended to be used in production currently though.
So what is the best approach? Any suggestions pleaseBen Lancaster
05/05/2022, 8:18 AMif
?Vivek Modi
05/05/2022, 12:59 PMcommainMain
interface ApplicationToken {
val accessToken: String
val refreshToken: String
}
iosMain
Platform.kt
lateinit var tokenProvider: ApplicationToken
HttpClient.kt
actual fun httpClient(config: HttpClientConfig<*>.() -> Unit) = HttpClient(Darwin) {
config(this)
engine {
configureRequest {
setAllowsCellularAccess(true)
}
}
install(Auth) {
bearer {
loadTokens {
BearerTokens(tokenProvider.accessToken, "")
}
}
}
}
Now when I am to access tokenProvider
in my swift code. It cannot find. I am adding image please have a look.Francis Mariano
05/05/2022, 1:25 PMWith old Native GC, variable in singleton without @ThreadLocal can't be changed after initialization
. Are there a new Native GC ????julioromano
05/05/2022, 5:54 PMiosMain
but not others. Are there more predefined ones?Vaios Tsitsonis
05/05/2022, 8:55 PM> Could not download kotlin-native-prebuilt-macos-x86_64-1.6.20.tar.gz (:kotlin-native-prebuilt-macos-x86_64:1.6.20)
> Could not get resource '<https://download.jetbrains.com/kotlin/native/builds/releases/1.6.20/macos-x86_64/kotlin-native-prebuilt-macos-x86_64-1.6.20.tar.gz>'.
> Read timed out
I can download the file manually. Is this an issue with the IDE? Can I do something with the downloaded file and import it manually?Paul Woitaschek
05/06/2022, 11:48 AMYou can try the Alpha version of the new Kotlin/Native memory manager in Kotlin 1.7.0-Beta. This EAP release brings performance improvements to the new memory manager that will improve the developer experience.How do performance improvements improve the developer experience? Is there any more information on that? This sounds like it’s only an improvement of build performance but no behavior change compared to 1.6?
mike.holler
05/06/2022, 4:06 PM> Task :initech-multiplatform-base:compileTestDevelopmentExecutableKotlinJs
w: duplicate library name: com.initech.cloudsdk:initech-multiplatform-base
Vivek Modi
05/06/2022, 4:42 PMflow
over normal list/muablelist
in Kmm project? What is the benefits in ios platform?mike.holler
05/06/2022, 5:44 PM--max-workers 2
but even that still does it. PC is quality -- 8 CPUs i7 processorTrey
05/06/2022, 9:39 PMeygraber
05/06/2022, 10:32 PMThe following Kotlin source sets were configured but not added to any Kotlin compilation:
* androidAndroidTestRelease
* androidTestFixtures
* androidTestFixturesDebug
* androidTestFixturesRelease
You can add a source set to a target's compilation by connecting it with the compilation's default source set using 'dependsOn'.
See <https://kotlinlang.org/docs/reference/building-mpp-with-gradle.html#connecting-source-sets>
What do I need to do to make that stop getting logged?Marko Novakovic
05/06/2022, 10:45 PMIllusion
05/09/2022, 1:48 AMVivek Modi
05/09/2022, 1:22 PMPaul Woitaschek
05/09/2022, 2:50 PMeygraber
05/10/2022, 3:48 AMvishal G
05/10/2022, 7:27 AMMatt Nelson
05/10/2022, 11:10 AMkotlin.mpp.enableCInteropCommonization=true
and when it should be used?
Should I be using this in the libraries that I publish? Can't find any solid documentation on what it does...Vivek Modi
05/10/2022, 11:45 AMVivek Modi
05/10/2022, 11:45 AMKonstantin Tskhovrebov
05/10/2022, 12:34 PMVivek Modi
05/10/2022, 12:34 PM