Robert Jaros
10/03/2023, 11:32 AMorg.w3c.dom.Node
in a common
source set. It does compile in gradle, so I think it is correct, but the IntelliJ marks this as an error (Unresolved reference: org
). Is it a known issue? Can I somehow workaround this issue?mutableListOf()
or repeat()
)import androidx.compose.runtime.Composable
. How it is detected?Justin Salér
10/03/2023, 12:39 PMRobert Jaros
10/03/2023, 1:14 PMIlya Goncharov [JB]
10/03/2023, 2:16 PMcommon
source set is indeed common. It is common among all of possible targets, not targets inside this project.
So if you need source set for JS and wasm, now you can create separate directory and include it to JS source set and wasm source set.Robert Jaros
10/03/2023, 6:00 PMIlya Goncharov [JB]
10/03/2023, 6:04 PMRobert Jaros
10/03/2023, 6:27 PMandroidx.compose.runtime.*
in my common source set without IDE errors, but kotlinx.coroutines.*
doesn't work.commonMain
is displayed in my dependencies. But there is no commonMain
for coroutines nor stdlib.Ilya Goncharov [JB]
10/03/2023, 6:32 PMRobert Jaros
10/03/2023, 6:33 PMemptyList()
don't worklistOf()
, mutableListOf()
repeat()
list.forEach {}
list: MutableList<String>
and I can use list.removeAt()
but I can't use list.forEach {}
.gradle/kotlin/kotlinTransformedMetadataLibraries
directory. And this klib files are automatically added as dependencies to the commonMain
module in the IDE (I can see this in Project Structure dialog).metadataSources {
artifact()
}
or just forced kotlin version using:
implementation(kotlin("stdlib")) {
version {
strictly("1.9.20-Beta2")
}
}
somehow magically IDE creates a .gradle/kotlin/kotlinTransformedMetadataLibraries/org.jetbrains.kotlin-kotlin-stdlib-1.9.20-Beta2-commonMain-SsyL5g.klib
file as a commonMain
dependency and stdlib functions can be used without problems.kotlin-dom-api-compat
(which is always automatically selected as 1.9.30-dev-460
) or kotlinx-coroutines-core
.kotlinTransformedMetadataLibraries
directory. Should it be always created for all libraries?Ilya Goncharov [JB]
10/04/2023, 10:18 AMRobert Jaros
10/04/2023, 3:02 PM./gradlew build
because there will be errors. But I can do ./gradlew jsRun
or ./gradlew wasmJsRun
without problem.
And just like with the IDE, when you uncomment the section highlighted above, both IDEA and Gradle will start accepting stdlib extension functions.Ilya Goncharov [JB]
10/05/2023, 10:50 AMcompileCommonMainKotlinMetadata
.
Maybe problem is that coroutines library was built against not 1.9.20-Beta2, but 1.9.30-dev-…