electrolobzik
09/28/2020, 12:29 PMwilliam
09/28/2020, 12:44 PMactual
value in an expect class
which references a value not given yet? for example I want to achieve
val incoming: ReceiveChannel<Frame>
val incomingText: Flow<String> = incoming.consumeAsFlow().filter { it is Frame.Text }.map { (it as Frame.Text).payload }
where incomingText
is basically a convenience method to give to consumers of that class. the error here states Expected property cannot have an initializer
Mikołaj Kąkol
09/28/2020, 1:05 PMjs
lib to npm repository? any nice sample?coolcat
09/28/2020, 5:19 PMVkbookworm
09/28/2020, 6:59 PMcocoapods {
// Configure fields required by CocoaPods.
summary = "Kotlin Multiplatform Firebase login sample"
homepage = "<https://github.com/worstkiller/firebaseloginkmm>"
pod("FirebaseAuth")
frameworkName = "firebaseLoginSDK"
}
can anyone help ? 🙄
@Artyom Degtyarev [JB]Vinod Rai
09/29/2020, 6:55 AM-keepattributes *Annotation*, InnerClasses
-dontnote kotlinx.serialization.SerializationKt
-keep,includedescriptorclasses class com.yourcompany.yourpackage.**$$serializer { *; } # <-- change package name to your app's
-keepclassmembers class com.yourcompany.yourpackage.** { # <-- change package name to your app's
*** Companion;
}
-keepclasseswithmembers class com.yourcompany.yourpackage.** { # <-- change package name to your app's
kotlinx.serialization.KSerializer serializer(...);
}
The package name is changed,..getting exception in kotlinx.serialization 1.0.0-RC
Serializer for class 'e' is not found.
Mark the class as @Serializable or provide the serializer explicitly.
Data classes are in shared code.
Why progaurd configuration is not working with minify enabled. can anyone help what I am missing here?zeugederunity
09/29/2020, 8:50 AMMikołaj Kąkol
09/29/2020, 12:21 PMwatchosX64
architecture? That would enable developing app on ⌚ simulatorcoolcat
09/29/2020, 12:46 PMDiego
09/29/2020, 1:07 PM> Task :compileKotlinIosArm64 FAILED
w: skipping /Users/XXX/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlinx/kotlinx-coroutines-core-iosarm64/1.3.8/ab1f410af27e33b328b0e7b3b75875953822e9eb/kotlinx-coroutines-core.klib. The abi versions don't match. Expected '[17]', found '22'
w: The compiler versions don't match either. Expected '[]', found '1.3.71-release'
e: Could not find "/Users/XXX/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlinx/kotlinx-coroutines-core-iosarm64/1.3.8/ab1f410af27e33b328b0e7b3b75875953822e9eb/kotlinx-coroutines-core.klib" in [/Users/XXX/Documents/Development/kotlin-multiplatform-spike/common, /Users/XXX/.konan/klib, /Users/XXX/.konan/kotlin-native-macos-1.3.61/klib/common, /Users/XXX/.konan/kotlin-native-macos-1.3.61/klib/platform/ios_arm64].
Below my build.gradle file
import org.jetbrains.kotlin.gradle.tasks.*
plugins {
id 'org.jetbrains.kotlin.multiplatform' version '1.3.61'
}
repositories {
mavenCentral()
jcenter()
}
group 'com.kotlin.common'
version '0.0.1'
apply plugin: 'maven-publish'
kotlin {
jvm()
def iosFrameworkName = "KiplingCommon"
def iOSTargetConfig = {
binaries.framework {
baseName = "$iosFrameworkName"
}
}
iosX64("iosX64", iOSTargetConfig)
iosArm64("iosArm64", iOSTargetConfig)
sourceSets {
commonMain.dependencies {
implementation kotlin('stdlib-common')
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core-common:1.3.8"
}
commonTest.dependencies {
implementation kotlin('test-common')
implementation kotlin('test-annotations-common')
}
jvmMain.dependencies {
implementation kotlin('stdlib-jdk8')
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core-common:1.3.8"
}
jvmTest.dependencies {
implementation kotlin('test')
implementation kotlin('test-junit')
}
iosMain {
dependsOn(commonMain)
iosX64Main.dependsOn(it)
iosArm64Main.dependsOn(it)
dependencies {
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core-native:1.3.8"
}
}
iosTest {}
}
}
Any idea about why I receive that error and how to fix the problem. Thanks in advance!streetsofboston
09/29/2020, 2:35 PMchi
09/29/2020, 6:10 PMfaogustavo
09/29/2020, 6:57 PMfaogustavo
09/29/2020, 6:57 PMfaogustavo
09/29/2020, 6:58 PMJohn O'Reilly
09/29/2020, 7:12 PMcollects
values from some flow
source (e.g. db)KamilH
09/29/2020, 7:25 PMcocoapods
plugin with some basic configuration. Then I built a project next I used podBuildDependenciesIos
. Podspec files has been generated properly along framework. Then I added in my iOS project a pod with the library. pod install
was also successful. When I’m trying to import library in the project I can do it (XCode sees the name of the library), however when I’m trying to build a project I’m getting an error No such module 'MobileLibrary'
. What could be a problem?Marcin Bak
09/29/2020, 9:20 PMNew
-> Package
action to create a package (which is there for jvmMain).
Is there no packages concept in KMP or is it an issue with the IntelliJ?Prateek Grover
09/30/2020, 1:22 PMjanvladimirmostert
09/30/2020, 3:58 PMplugins {
val kotlinVersion = "1.4.10"
kotlin("multiplatform") version kotlinVersion
kotlin("plugin.serialization") version kotlinVersion
}
but it no longer compiles complaining that i'm redefining the Kotlin plugin
i guess this now needs to move to the
allprojects {
block in the root build.gradle.kts
i'm trying
allprojects {
plugins.apply(kotlin("multiplatform"))
}
but that's not compiling
any ideas?SrSouza
09/30/2020, 5:09 PMAaron Todd
09/30/2020, 5:37 PMByteArray
backed by native C memory without a copy in Kotlin/Native?Vikas Singh
09/30/2020, 8:00 PMArkadii Ivanov
09/30/2020, 8:05 PMatomicfu
? Is it OK to use it in a library as implementation details?KamilH
10/01/2020, 10:39 AMmain
function inside jvmMain
to test the library I’m working on, but when I’m trying to run main function it returns Error: Could not find or load main class MainKt
for following function in Main.kt
fun main() {
runBlocking {
userRepository.registerUser("")
}
}
Are there any additional steps I should make to be able to use this?faogustavo
10/01/2020, 10:39 AMdagomni
10/02/2020, 6:40 PMserebit
10/02/2020, 11:31 PMMichal Harakal
10/03/2020, 12:44 PMMichal Harakal
10/03/2020, 8:52 PMCannot create binary debugFramework: binary with such a name already exists
ios {
binaries {
framework {
export(project(":shared:core"))
export(project(":shared:domain"))
export(project(":shared:presentation"))
export(project(":shared:data"))
export(project(":shared:backend:dukecon"))
}
}
}
I can add a namePrefix to framework definition like this binaries.framework("DukeconSdk"),
but it actually creates second binary artifact in build
folder, one with prefix containing exported modules, but cocopad used the original one anyway. What I am missing? I would like to have only one framework containg exports ..