Alexandre Bianchi
12/29/2023, 6:26 PMkotlin {
@OptIn(ExperimentalWasmDsl::class)
wasmJs {
moduleName = "composeApp"
browser {
commonWebpackConfig {
outputFileName = "composeApp.js"
}
}
binaries.executable()
}
androidTarget {
compilations.all {
kotlinOptions {
jvmTarget = "1.8"
}
}
}
jvm("desktop")
listOf(
iosX64(),
iosArm64(),
iosSimulatorArm64()
).forEach { iosTarget ->
iosTarget.binaries.framework {
baseName = "ComposeApp"
isStatic = true
}
}
sourceSets {
val desktopMain by getting
androidMain.dependencies {
implementation(libs.compose.ui.tooling.preview)
implementation(libs.androidx.activity.compose)
implementation(project.dependencies.platform(libs.firebase.bom))
}
commonMain.dependencies {
implementation(compose.runtime)
implementation(compose.foundation)
implementation(compose.material)
implementation(compose.ui)
@OptIn(ExperimentalComposeLibrary::class)
implementation(compose.components.resources)
implementation(libs.kotlinx.datetime)
implementation("dev.gitlive:firebase-firestore:1.10.4")
implementation("dev.gitlive:firebase-common:1.10.4")
implementation(libs.kotlinx.serialization.json)
}
desktopMain.dependencies {
implementation(compose.desktop.currentOs)
}
}
}
Could not resolve all dependencies for configuration ':composeApp:wasmJsCompileClasspath'.
> Could not resolve dev.gitlive:firebase-firestore:1.10.4.
Required by:
project :composeApp
> No matching variant of dev.gitlive:firebase-firestore:1.10.4 was found. The consumer was configured to find a library for use during 'kotlin-api', preferably optimized for non-jvm, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'wasm', attribute 'org.jetbrains.kotlin.wasm.target' with value 'js'...
Alexandre Bianchi
12/29/2023, 6:27 PMCould not resolve dev.gitlivefirebase firestore1.10.4.Required by: project :composeApp > No matching variant of dev.gitlivefirebase firestore1.10.4 was found. The consumer was configured to find a library for use during 'kotlin-api', preferably optimized for non-jvm, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'wasm', attribute 'org.jetbrains.kotlin.wasm.target' with value 'js' but: - Variant 'debugApiElements-published' capability dev.gitlivefirebase firestore1.10.4 declares a library for use during compile-time: - Incompatible because this component declares a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm' and the consumer needed a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'wasm' - Other compatible attributes: - Doesn't say anything about its target Java environment (preferred optimized for non-jvm) - Doesn't say anything about org.jetbrains.kotlin.wasm.target (required 'js') - Variant 'debugRuntimeElements-published' capability dev.gitlivefirebase firestore1.10.4 declares a library for use during runtime: - Incompatible because this component declares a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm' and the consumer needed a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'wasm' - Other compatible attributes: - Doesn't say anything about its target Java environment (preferred optimized for non-jvm) - Doesn't say anything about org.jetbrains.kotlin.wasm.target (required 'js') - Variant 'debugSourcesElements-published' capability dev.gitlivefirebase firestore1.10.4 declares a component for use during runtime: - Incompatible because this component declares documentation, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm' and the consumer needed a library, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'wasm' - Other compatible attributes: - Doesn't say anything about its target Java environment (preferred optimized for non-jvm) - Doesn't say anything about org.jetbrains.kotlin.wasm.target (required 'js') - Variant 'iosArm64ApiElements-published' capability dev.gitlivefirebase firestore1.10.4 declares a library for use during 'kotlin-api': - Incompatible because this component declares a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native' and the consumer needed a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'wasm' - Other compatible attributes: - Doesn't say anything about its target Java environment (preferred optimized for non-jvm) - Doesn't say anything about org.jetbrains.kotlin.wasm.target (required 'js') - Variant 'iosArm64MetadataElements-published' capability dev.gitlivefirebase firestore1.10.4 declares a library: - Incompatible because this component declares a component for use during 'kotlin-metadata', as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native' and the consumer needed a component for use during 'kotlin-api', as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'wasm' - Other compatible attributes: - Doesn't say anything about its target Java environment (preferred optimized for non-jvm) - Doesn't say anything about org.jetbrains.kotlin.wasm.target (required 'js') - Variant 'iosArm64SourcesElements-published' capability dev.gitlivefirebase firestore1.10.4: - Incompatible because this component declares documentation for use during 'kotlin-runtime', as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native' and the consumer needed a library for use during 'kotlin-api', as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'wasm' - Other compatible attributes: - Doesn't say anything about its target Java environment (preferred optimized for non-jvm) - Doesn't say anything about org.jetbrains.kotlin.wasm.target (required 'js') - Variant 'iosSimulatorArm64ApiElements-published' capability dev.gitlivefirebase firestore1.10.4 declares a library for use during 'kotlin-api': - Incompatible because this component declares a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native' and the consumer needed a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'wasm' - Other compatible attributes: - Doesn't say anything about its target Java environment (preferred optimized for non-jvm) - Doesn't say anything about org.jetbrains.kotlin.wasm.target (required 'js') - Variant 'iosSimulatorArm64MetadataElements-published' capability dev.gitlivefirebase firestore1.10.4 declares a library: - Incompatible because this component declares a component for use during 'kotlin-metadata', as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native' and the consumer needed a component for use during 'kotlin-api', as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'wasm' - Other compatible attributes: - Doesn't say anything about its target Java environment (preferred optimized for non-jvm) - Doesn't say anything about org.jetbrains.kotlin.wasm.target (required 'js') - Variant 'iosSimulatorArm64SourcesElements-published' capability dev.gitlivefirebase firestore1.10.4: - Incompatible because this component declares documentation for use during 'kotlin-runtime', as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native' and the consumer needed a library for use during 'kotlin-api', as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'wasm' - Other compatible attributes: - Doesn't say anything about its target Java environment (preferred optimized for non-jvm) - Doesn't say anything about org.jetbrains.kotlin.wasm.target (required 'js') - Variant 'iosX64ApiElements-published' capability dev.gitlivefirebase firestore1.10.4 declares a library for use during 'kotlin-api': - Incompatible because this component declares a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native' and the consumer needed a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'wasm' - Other compatible attributes: - Doesn't say anything about its target Java environment (preferred optimized for non-jvm) - Doesn't say anything about org.jetbrains.kotlin.wasm.target (required 'js') - Variant 'iosX64MetadataElements-published' capability dev.gitlivefirebase firestore1.10.4 declares a library: - Incompatible because this component declares a component for use during 'kotlin-metadata', as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native' and the consumer needed a component for use during 'kotlin-api', as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'wasm' - Other compatible attributes: - Doesn't say anything about its target Java environment (preferred optimized for non-jvm) - Doesn't say anything about org.jetbrains.kotlin.wasm.target (required 'js') - Variant 'iosX64SourcesElements-published' capability dev.gitlivefirebase firestore1.10.4: - Incompatible because this component declares documentation for use during 'kotlin-runtime', as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native' and the consumer needed a library for use during 'kotlin-api', as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'wasm' - Other compatible attributes: - Doesn't say anything about its target Java environment (preferred optimized for non-jvm) - Doesn't say anything about org.jetbrains.kotlin.wasm.target (required 'js') - Variant 'jsIrApiElements-published' capability dev.gitlivefirebase firestore1.10.4 declares a library for use during 'kotlin-api': - Incompatible because this component declares a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'js' and the consumer needed a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'wasm'
Chrimaeon
12/29/2023, 6:30 PMChrimaeon
12/29/2023, 6:31 PMAlexandre Bianchi
12/29/2023, 6:36 PMAlexandre Bianchi
12/29/2023, 6:36 PMAlexandre Bianchi
12/29/2023, 6:36 PMChrimaeon
12/29/2023, 6:36 PMAlexandre Bianchi
12/29/2023, 6:37 PMAlexandre Bianchi
12/29/2023, 6:38 PMAlexandre Bianchi
12/29/2023, 7:52 PMAlexandre Bianchi
12/29/2023, 7:53 PMChrimaeon
12/29/2023, 8:01 PMgetByName("jvmMain") {
kotlin.srcDir("src/androidMain/kotlin")
}
and there is not “Android Context” on plain JVM. So, no, you cannot use this “constructor” on jvm.Alexandre Bianchi
12/29/2023, 8:01 PMAlexandre Bianchi
12/29/2023, 8:02 PMChrimaeon
12/29/2023, 8:03 PMChrimaeon
12/29/2023, 8:04 PMAny
parameter is casted to Context
so it will not be possible to use it for JVM