Vivek Modi
05/17/2022, 4:33 PMsettings.gradle.kts
pluginManagement {
repositories {
google()
gradlePluginPortal()
mavenCentral()
}
resolutionStrategy {
eachPlugin {
if (requested.id.namespace == "com.android") {
useModule("com.android.tools.build:gradle:4.1.2"). // what is the use of 4.1.2 in here?
}
}
}
}
rootProject.name = "xyz"
I commented in my code. Can someone guide what is the use of 4.1.2 that piece of code?natario1
05/17/2022, 6:35 PMbrabo-hi
05/17/2022, 10:34 PMKMP-NativeCoroutines
on ios i am having the following error when accessing ant suspend of flow function
Uncaught Kotlin exception: kotlin.native.concurrent.InvalidMutabilityException: mutation attempt of frozen kotlinx.coroutines.StandaloneCoroutine
Paul Woitaschek
05/18/2022, 9:33 AMBrian Estrada
05/18/2022, 6:35 PMVivek Modi
05/19/2022, 8:27 AMxxfast
05/19/2022, 8:37 AMCould not resolve org.jetbrains.kotlin:kotlin-test:1.6.20.
Required by:
project :login > co.touchlab:kermit-koin:1.1.2 > co.touchlab:kermit-koin-jvm:1.1.2
project :login > co.touchlab:kermit-koin:1.1.2 > co.touchlab:kermit-koin-jvm:1.1.2 > org.jetbrains.kotlin:kotlin-test-junit:1.6.20
i dont get why there's a test dependency here 🤔Brian Estrada
05/19/2022, 10:04 AMkpgalligan
05/19/2022, 4:04 PMmbonnin
05/19/2022, 4:17 PMKotlinMetadataTarget
has a compilation for each "shared sourceSet" ?Michal Klimczak
05/19/2022, 4:45 PMandroidTest
not seeing any of my classes from commonMain
(and possibly other modules)
2. androidTest
and iosTest
reporting "Actual property 'xxx' has no corresponding expected declaration" and vice versa from commonTest
- "Expected property 'xxx' has no actual declaration in module X.shared.androidTest (test) for JVM"
This happens on kotlin 1.6.20 (but checked a bit older code with 1.5.31 and has the same problem), AS Chipmunk, M1 macbook.
I just confirmed the same issues with KaMPKit. Any hints?Trey
05/19/2022, 5:16 PMMichal Klimczak
05/19/2022, 5:17 PMiosX64Test
is not marked as a test gradle task and when I run it and the test step is SKIPPED. iosSimulatorArm64Test
is marked green (test) but fails with No value present
(whatever the hell that means ;)).
Funny thing is, with KampKit it's exactly the opposite - iosSimulatorArm64Test
is SKIPPED and iosX64Test
are run just fine. On M1 machine.Trey
05/19/2022, 8:18 PM> Direct local .aar file dependencies are not supported when building an AAR. The
resulting AAR would be broken because the classes and Android resources from any
local .aar file dependencies would not be packaged in the resulting AAR. Previous
versions of the Android Gradle Plugin produce broken AARs in this case too
(despite not throwing this error). The following direct local .aar file
dependencies of the :common project caused this error:
Mendess
05/19/2022, 9:16 PMRan
05/20/2022, 1:11 PMplugins {
kotlin("multiplatform") version "1.6.10"
id("maven-publish")
}
publishing {
publications.withType(MavenPublication::class) {
pom {
name.set("Kotlin Multiplatform BigDecimal")
description.set("Kotlin Multiplatform BigDecimal library")
}
}
repositories {
maven {
...
}
}
}
Then I run
./gradlew publishAllPublicationsToNexusSnapshotRepository
I checked my nexus and all targets library were uploaded.
Then in another KMP project, add the dependency
sourceSets {
val commonMain by getting {
dependencies {
implementation("com.calculation.multiplatform:MultiplatformBigDecimal:1.0.0-SNAPSHOT")
}
}
}
After synced project, I cannot build the project in any target.
Unresolved reference: multiplatform
I guess that there is no need to import every target library with gradle module metadata feature, but I don't know why it doesn't work.Vivek Modi
05/20/2022, 3:05 PMgetting/creating
. I know this property using delagate property. Can someone explain me what is use of creating
and getting
and when to use them. I am totally confused.
val androidMain by getting {
dependencies {
implementation("androidx.core:core-ktx:1.3.2")
}
}
val iosMain by creating {
dependsOn(commonMain)
iosX64Main.dependsOn(this)
iosArm64Main.dependsOn(this)
iosSimulatorArm64Main.dependsOn(this)
}
val iosMain by creating { dependsOn(commonMain) }
val iosX64Main by getting { dependsOn(iosMain) }
val iosArm64Main by getting { dependsOn(iosMain) }
Jan
05/21/2022, 12:08 PMkotlin("plugin.serialization") version Versions.KOTLIN
I get this error when reloading:
The 'java' plugin has been applied, but it is not compatible with the Android plugins.simon.vergauwen
05/22/2022, 12:09 PMVivek Modi
05/22/2022, 2:59 PMpod repo lint
it continue running and it not stoping. i am adding small video in thread. Please have a look. ThanksJan
05/22/2022, 6:53 PMAllen
05/22/2022, 7:29 PMJan
05/23/2022, 9:34 PMkotlin.mpp.enableGranularSourceSetsMetadata=true
in the gradle.properties
In does build perfectly fineAlejandro Moya
05/24/2022, 1:21 PMVivek Modi
05/24/2022, 3:06 PMmike.holler
05/24/2022, 4:47 PMAnaR
05/24/2022, 6:23 PMRodrigo Castrillón Restrepo
05/24/2022, 9:19 PMRacka N
05/25/2022, 9:54 AMtimkranen
05/25/2022, 2:02 PMcommonMain
into androidTest
so I can use mocking libraries, and just test business logic using Kotlin/JVM. Is this a reasonable approach? Anyone care to share their approach?