Arjan van Wieringen
04/22/2022, 6:48 AMCaused by: java.lang.IllegalStateException: The Kotlin Gradle plugin was loaded multiple times in different subprojects, which is not supported and may break the build.
.
This is my `settings.gradle.kts`:
pluginManagement {
plugins {
kotlin("multiplatform") version "1.6.21" apply false
kotlin("js") version "1.6.21" apply false
kotlin("plugin.serialization") version "1.6.21" apply false
}
}
rootProject.name = "scribbles"
include("dom")
include("vdom")
include("web-workers")
include("examples:dom-demo")
include("examples:vdom-demo")
And this is my web-workers
gradle:
plugins {
kotlin("multiplatform")
kotlin("plugin.serialization") // <- when commenting out this line it works again
}
repositories {
mavenCentral()
}
kotlin {
/** targets **/
}
Here is the repository:
https://github.com/avwie/scribbles/tree/e1629ff6d3e4a322c590d92ba00b740b8f1cf6e6
Am I doing something wrong?Vivek Modi
04/22/2022, 9:53 AMGuilherme Delgado
04/22/2022, 2:35 PMdependencies {
implementation(project(":shared"))
implementation(compose.desktop.currentOs)
}
it gives me an error: “Packages cannot be imported” when I try to import a class. 🤷
IDE suggestion: Add dependency on module 'App.shared.commonMain'
Any idea?colintheshots
04/22/2022, 6:35 PM> Task :shared:linkPodDebugFrameworkIosX64 FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':shared:linkPodDebugFrameworkIosX64'.
> No extensions handle the extension type: kotlinx.metadata.klib.KlibModuleFragmentExtensionVisitor
Any ideas?James Black
04/23/2022, 3:50 AMThe 'java' plugin has been applied, but it is not compatible with the Android plugins.
In my shared build.gradle I have this. If I just use jvm() instead no issues, except it goes to androidMain not jvmMain.
kotlin {
android()
jvm {
withJava()
}
I have a sinking feeling it won't be resolved any time soon based on this issue:
https://youtrack.jetbrains.com/issue/KT-30878
Is the best bet to just have web and server have one KMM project and android/iOS and everything else have the other, or should servers just not be in the KMM project currently?eygraber
04/24/2022, 8:27 AMUri
implementation.
Check it out, I'd love to hear your feedback 😄eygraber
04/24/2022, 4:47 PMexplicitApi
for test source sets? (edit: looks like it's only an issue for androidTest
)Tobias
04/25/2022, 5:39 AMshared
framework from a KMM project in Xcode? It's neither listed under the Frameworks
folder neither nor Embedded Frameworks
in Xcode.diego-gomez-olvera
04/25/2022, 10:37 AMGopal S Akshintala
04/25/2022, 5:54 PMmoment.js
into my jar and this is what I have tried.
https://github.com/overfullstack/revoman-root/blob/master/src/jsMain/kotlin/Main.kt
But the final bundle generated doesn’t have the moment functions as expected. Am I doing it right?Matti MK
04/25/2022, 7:47 PMLucas Schiavini
04/26/2022, 12:41 AMDavid Hart
04/26/2022, 10:16 AMlilypuchi
04/26/2022, 11:36 AMdata
layer classes along with the dependencies (sqldelight) from :shared
to a new Multiplatform module :data
. But since then, iOS doesn’t build with the following error :
Undefined symbols for architecture arm64:
"_sqlite3_column_type", referenced from:
_co_touchlab_sqliter_sqlite3_sqlite3_column_type_wrapper108 in result.o
"_sqlite3_bind_parameter_index", referenced from:
_co_touchlab_sqliter_sqlite3_sqlite3_bind_parameter_index_wrapper84 in result.o
...
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':shared:linkDebugFrameworkIosArm64'.
> Compilation finished with errors
shared/build.gradle.kts
looked like this before creating :data
module.
val commonMain by getting {
dependencies {
implementation("com.squareup.sqldelight:runtime:$sqldelight")
implementation("com.squareup.sqldelight:coroutines-extensions:$sqldelight")
}
}
val androidMain by getting {
dependencies {
implementation("com.squareup.sqldelight:android-driver:$sqldelight")
}
}
val iosMain by creating {
dependencies {
implementation("com.squareup.sqldelight:native-driver:$sqldelight")
}
dependsOn(commonMain)
iosX64Main.dependsOn(this)
..
}
After creating :data
and moving these dependencies to data/build.gradle.kts
, I just added this in shared/build.gradle.kts
val commonMain by getting {
dependencies {
implementation(project(":data"))
}
}
I haven’t changed anything else. Am I missing out on anything here ? 🤔ribesg
04/26/2022, 11:41 AMpublishToMavenLocal
a lot while working (for example) only on iOS and only in the simulator, so I would benefit from this kind of featureLaxman Sahni
04/26/2022, 2:36 PMVivek Modi
04/26/2022, 3:37 PMAn Tran
04/27/2022, 10:39 AMString.format
function in web application? I saw that String in webapplication comes from kotlin-stdlib-js package, and it doesn’t have format function?Vivek Modi
04/27/2022, 8:28 PMAlexandre Brown
04/28/2022, 1:42 PMorg.kodein.mock.mockmp
, tests and mocking works but building the project fails The provided plugin com.google.devtools.ksp.KotlinSymbolProcessingComponentRegistrar is not compatible with this version of compiler
so I'm not sure if it's the best framework for now.
Any thoughts?David Corrado
04/28/2022, 8:57 PMpguardiola
04/28/2022, 10:16 PMIvan Đorđević
04/29/2022, 9:01 AMVladimir Malykhin
04/29/2022, 10:31 AMcom.android.tools.build:gradle:7.1.2
org.jetbrains.kotlin:kotlin-serialization:1.6.10
org.jetbrains.kotlinx:kotlinx-datetime:0.3.2
org.jetbrains.kotlinx:kotlinx-serialization-core:1.3.2
What could be the reason?Oleg Yukhnevich
04/29/2022, 11:37 AMByteArray
s or `String`s or via some lower level IO streams (like jvm InputStream/OutputStream or multiplatform ones like okio)?
What else should I know to make you happy? 🙂Bradleycorn
04/29/2022, 2:52 PMassembleXCFramework
task, I get an error:
the path does not point to a valid framework: /Users/my.user/dev/wager-utils/build/fat-framework/debug/wager_utils/iosSimulator/wager_utils.frameworkAnd in looking in the build folder, indeed that path is not correct. Specifically there is no
wager_utils
folder. Instead the folder is wager-utils
(dash instead of underscore … see screenshot below).
Any idea how that path gets generated, or how I can control it to fix this issue?Matt Nelson
04/30/2022, 11:30 AMsealed interface Key {
fun descriptor(address: Address): String
}
@JvmInline
value class Address(@JvmField val value: String)
Calling From Java:
public class SomeClass {
public void someFunction(Key key) {
// Key.descriptor accepts a String, not an Address
String descriptor = key.descriptor("");
Address address = new Address("someaddress");
// key.descriptor does not accept an Address and IDE shows error
String descriptor2 = key.descriptor(address);
}
}
Any Ideas?Paulo Cereda
04/30/2022, 12:42 PMProcessBuilder
or Runtime.exec
in the Java ecosystem)? Any suggestion is welcome! Thanks! Have a great weekend!Viktor Orlyk
05/01/2022, 1:49 PMthana
05/02/2022, 9:52 AMtestImplementation(platform("io.kotest:kotest-bom:$kotestVersion"))
inside the source set depdency declaration of a (kotlin) multiplatform project?thana
05/02/2022, 9:52 AMtestImplementation(platform("io.kotest:kotest-bom:$kotestVersion"))
inside the source set depdency declaration of a (kotlin) multiplatform project?ephemient
05/02/2022, 10:02 AMthana
05/02/2022, 10:43 AM