sdeleuze
01/02/2023, 5:29 PMvnycall74
01/03/2023, 10:04 AMstartKoin
in the logic? Which do you prefer to put on the common package or each native package?Louis
01/03/2023, 1:56 PMCiaran Sloan
01/03/2023, 7:13 PMmkrussel
01/03/2023, 10:33 PMVolatile
annotation do anything on Kotlin native with the new memory model. The documentation for it says it makes the JVM backing field volatile.Robert Munro
01/04/2023, 8:04 PMandroidTest
- but when intellij tries to run my junit tests in androidTest
source folder - it tries to run them on the emulator - is that normal? I thought multiplatform instrumentation tests should be in androidAndoidTest
vnycall74
01/05/2023, 6:10 AMview model
for Kotlin Multiplatform(Desktop, Android
) projects?
In Android, the view model extends ViewModel (Android), but that's a natural thing to say, Desktop hasn't ViewModel. So I can't use the common view model.
Additionally, I think some things, but It looks not good...
A. Inject view model of each platform
Window(onCloseRequest = { // Do something }, title = "Test") {
val testViewModel by inject<TestViewModel>(TestViewModel::class.java)
TesetScreen(
user = testViewModel.user,
testState = testViewModel.testState.collecAsState().value,
testAction = testViewModel::testAction
)
DisposableEffect(Unit) {
onDispose {
testViewModel.onCleared()
}
}
}
B. Use use-case direct in the Composable Screen
Window(onCloseRequest = { // Do something }, title = "Test") {
val getUserUseCase by inject<GetUserUseCase>(GetUserUseCase::class.java)
val getTestState by inject<GetUserUseCase>(GetUserUseCase::class.java)
TesetScreen(
user = testViewModel.user,
testState = getTestState().collecAsState().value,
testAction = { doSomething() }
)
}
C. Don't use the view model...
What do you think about the above logic and how do you design architecture KMP?Reza Muttaqien
01/05/2023, 7:55 AMExecuting of 'pod install' failed with code 1 and message:
Analyzing dependencies
Downloading dependencies
Installing AWSAuthCore (2.29.1)
Installing AWSCognitoIdentityProvider (2.29.1)
Installing AWSCognitoIdentityProviderASF (2.29.1)
Installing AWSCore (2.29.1)
Installing AWSMobileClient (2.29.1)
Installing AWSPluginsCore (1.28.4)
Installing AmplifyPlugins (1.28.4)
[!] Unable to determine Swift version for the following pods:
`- AWSMobileClient
does not specify a Swift version and none of the targets (ios
) integrating it have the SWIFT_VERSION
attribute set. Please contact the author or set the SWIFT_VERSION
attribute in at least one of the targets that integrate this pod.`litrik
01/05/2023, 3:20 PMMark Vogel
01/05/2023, 4:25 PMcommonMain
module with any dependencies I must have the kotlin.internal.mpp.hierarchicalStructureByDefault=false
flag specified in my gradle.properties file.
This issue on YouTrack claims that the problem is fixed with IntelliJ 2022.3 and Kotlin 1.7.20 (if I'm reading it correctly), but with those versions it still is not fixed. Does this happen to anyone else? Am I doing something wrong with my project?
Here is a more in-depth explanation of the issueJavier Olan
01/05/2023, 5:56 PMdarkmoon_uk
01/06/2023, 1:20 AM1.8.0
dropped support for flavoured variants? 👉🧵martmists
01/06/2023, 2:51 PM0.34657359027997264
and 3465735902799727
should be practically equivalent.
I know in kotlin.test we have checkFloatsAreEqual, but without including kotlin.test it seems impossible to figure outRadoslaw Juszczyk
01/06/2023, 3:14 PMSealedToSwiftEnumFeature
but apart of generating sealed classes from my shared module it generates bunch of additional enums from ktor, kotlinx-serialization and kodein.
All the dependencies for these libraries are defined with implementation(...)
method, and non of its classes are part of the public interface of the module. They got added even when not defined in my shared module but in one of its dependencies which again are added with implementation(...)
and are NOT exported.
Is there any easy way to disable generation of these unwanted enums?clhols
04/06/2022, 9:43 AMJaqueline Steffenon
01/06/2023, 5:23 PMCould not determine the dependencies of task ':kotlinNodeJsSetup'.
Could not resolve all files for configuration ':detachedConfiguration1'.
> Could not find org.nodejs:node:14.17.0.
Searched in the following locations:
- <https://dl.google.com/dl/android/maven2/org/nodejs/node/14.17.0/node-14.17.0.pom>
- <https://repo.maven.apache.org/maven2/org/nodejs/node/14.17.0/node-14.17.0.pom>
- <https://maven.pkg.jetbrains.space/public/p/compose/dev/org/nodejs/node/14.17.0/node-14.17.0.pom>
- <https://nodejs.org/dist/v14.17.0/node-v14.17.0-darwin-arm64.tar.gz>
Required by:
project :
Possible solution:
- Declare repository providing the artifact, see the documentation at <https://docs.gradle.org/current/userguide/declaring_repositories.html>
Josh Eldridge
01/07/2023, 4:23 AM./gradlew connectedAndroidTest
? I'm getting an error/exception that is not particularly helpful, I'm wondering if something internal is failing? Posting the stacktrace in the thread.Racci
01/07/2023, 9:06 AMAleon Q
01/08/2023, 2:14 PMsources.jar
from being published in a kotlin multiplatform [androidJvm target] project? I have a requirement not to publish the source code with the artifacts on sonatype but I can not get the setup to skip publishing sources.jar. I would eventually like to replace the sources.jar with an empty-sources.jar (to satisfy maven central’s constraints), but I cant get to remove the sources.jar from being published to begin with.
Here is what I tried:
• I checked that I am not adding sources.jar artifact in publications closure.
• I created a task that finalizes the sourcesjar task to delete the generated sources.jar, but gradle smartly recognizes that some files are deleted and it re-creates the sources.jar.
• I also created a task that creates an empty-sources.jar which I then added to publications closure like so artifact(emptySourcesJar.get())
but I get an error saying : Invalid publication ‘androidRelease’: multiple artifacts with the identical extension and classifier (‘jar’, ‘sources’). which is really nice error messaging since that tells me that I can not have multiple sources.jars, but I tried this thinking it could replace the one automatically being generated by the multiplatform plugin.
• I tried searching the channel, stackoverflow for any similar discussions but couldnt find any (they were mostly looking to publish missing sources.jar)
I am using multiplatform version 1.7.21 and followed the guilde here to publish to maven central. The guile is well written and works like a charm, just that I need not to publish sources.jar.
It would be really cool if someone could point me in the right direction here.
ThanksBrendan Campbell-hartzell
01/09/2023, 10:53 PMJonathan Smith
01/10/2023, 2:13 PMbuild.gradle.kts
setup for building a Kotlin JS (multiplatform) app using Electron and React? Thanks!ian.shaun.thomas
01/10/2023, 10:22 PMdarkmoon_uk
01/10/2023, 11:15 PMInder singh
01/11/2023, 5:53 AMcocoapods-generate
gem , it is installed but still shows with kdoctor is it not installed.Brendan Campbell-hartzell
01/11/2023, 6:44 AMdependsOn
function, which makes it visible at compile time, but when I run the tests, using kotest, I'm getting a NPE the first time I reference a type from the commonMain code. Any way to link these together, or will I have to admit defeat and just make a separate gradle project just for the second test tree?
SOLVED (check thread)Slackbot
01/11/2023, 11:50 AMCLOVIS
01/11/2023, 1:05 PMHossein Amini
01/11/2023, 2:19 PMJaqueline Steffenon
01/11/2023, 1:16 PMJaqueline Steffenon
01/11/2023, 8:34 PM