https://kotlinlang.org logo
Docs
Join the conversationJoin Slack
Channels
100daysofcode
100daysofkotlin
100daysofkotlin-2021
advent-of-code
aem
ai
alexa
algeria
algolialibraries
amsterdam
android
android-architecture
android-databinding
android-studio
androidgithubprojects
androidthings
androidx
androidx-xprocessing
anime
anko
announcements
apollo-kotlin
appintro
arabic
argentina
arkenv
arksemdevteam
armenia
arrow
arrow-contributors
arrow-meta
ass
atlanta
atm17
atrium
austin
australia
austria
awesome-kotlin
ballast
bangladesh
barcelona
bayarea
bazel
beepiz-libraries
belgium
berlin
big-data
books
boston
brazil
brikk
budapest
build
build-tools
bulgaria
bydgoszcz
cambodia
canada
carrat
carrat-dev
carrat-feed
chicago
chile
china
chucker
cincinnati-user-group
cli
clikt
cloudfoundry
cn
cobalt
code-coverage
codeforces
codemash-precompiler
codereview
codingame
codingconventions
coimbatore
collaborations
colombia
colorado
communities
competitive-programming
competitivecoding
compiler
compose
compose-android
compose-desktop
compose-hiring
compose-ios
compose-mp
compose-ui-showcase
compose-wear
compose-web
connect-audit-events
corda
cork
coroutines
couchbase
coursera
croatia
cryptography
cscenter-course-2016
cucumber-bdd
cyprus
czech
dagger
data2viz
databinding
datascience
dckotlin
debugging
decompose
decouple
denmark
deprecated
detekt
detekt-hint
dev-core
dfw
docs-revamped
dokka
domain-driven-design
doodle
dsl
dublin
dutch
eap
eclipse
ecuador
edinburgh
education
effective-kotlin
effectivekotlin
emacs
embedded-kotlin
estatik
event21-community-content
events
exposed
failgood
fb-internal-demo
feed
firebase
flow
fluid-libraries
forkhandles
forum
fosdem
fp-in-kotlin
framework-elide
freenode
french
fritz2
fuchsia
functional
funktionale
gamedev
ge-kotlin
general-advice
georgia
geospatial
german-lang
getting-started
github-workflows-kt
glance
godot-kotlin
google-io
gradle
graphic
graphkool
graphql
graphql-kotlin
graviton-browser
greece
grpc
gsoc
gui
hackathons
hacktoberfest
hamburg
hamkrest
helios
helsinki
hexagon
hibernate
hikari-cp
hire-me
hiring
hongkong
hoplite
http4k
hungary
hyderabad
image-processing
india
indonesia
inkremental
intellij
intellij-plugins
intellij-tricks
internships
introduce-yourself
io
ios
iran
israel
istanbulcoders
italian
jackson-kotlin
jadx
japanese
jasync-sql
java-to-kotlin-refactoring
javadevelopers
javafx
javalin
javascript
jdbi
jhipster-kotlin
jobsworldwide
jpa
jshdq
juul-libraries
jvm-ir-backend-feedback
jxadapter
k2-early-adopters
kaal
kafka
kakao
kalasim
kapt
karachi
karg
karlsruhe
kash_shell
kaskade
kbuild
kdbc
kgen-doc-tools
kgraphql
kinta
klaxon
klock
kloudformation
kmdc
kmm-español
kmongo
knbt
knote
koalaql
koans
kobalt
kobweb
kodein
kodex
kohesive
koin
koin-dev
komapper
kondor-json
kong
kontent
kontributors
korau
korean
korge
korim
korio
korlibs
korte
kotest
kotest-contributors
kotless
kotlick
kotlin-asia
kotlin-beam
kotlin-by-example
kotlin-csv
kotlin-data-storage
kotlin-foundation
kotlin-fuel
kotlin-in-action
kotlin-inject
kotlin-latam
kotlin-logging
kotlin-multiplatform-contest
kotlin-mumbai
kotlin-native
kotlin-pakistan
kotlin-plugin
kotlin-pune
kotlin-roadmap
kotlin-samples
kotlin-sap
kotlin-serbia
kotlin-spark
kotlin-szeged
kotlin-website
kotlinacademy
kotlinbot
kotlinconf
kotlindl
kotlinforbeginners
kotlingforbeginners
kotlinlondon
kotlinmad
kotlinprogrammers
kotlinsu
kotlintest
kotlintest-devs
kotlintlv
kotlinultimatechallenge
kotlinx-datetime
kotlinx-files
kotlinx-html
kotrix
kotson
kovenant
kprompt
kraph
krawler
kroto-plus
ksp
ktcc
ktfmt
ktlint
ktor
ktp
kubed
kug-leads
kug-torino
kvision
kweb
lambdaworld_cadiz
lanark
language-evolution
language-proposals
latvia
leakcanary
leedskotlinusergroup
lets-have-fun
libgdx
libkgd
library-development
linkeddata
lithuania
london
losangeles
lottie
love
lychee
macedonia
machinelearningbawas
madrid
malaysia
mathematics
meetkotlin
memes
meta
metro-detroit
mexico
miami
micronaut
minnesota
minutest
mirror
mockk
moko
moldova
monsterpuzzle
montreal
moonbean
morocco
motionlayout
mpapt
mu
multiplatform
mumbai
munich
mvikotlin
mvrx
myndocs-oauth2-server
naming
navigation-architecture-component
nepal
new-mexico
new-zealand
newname
nigeria
nodejs
norway
npm-publish
nyc
oceania
ohio-kotlin-users
oldenburg
oolong
opensource
orbit-mvi
osgi
otpisani
package-search
pakistan
panamá
pattern-matching
pbandk
pdx
peru
philippines
phoenix
pinoy
pocketgitclient
polish
popkorn
portugal
practical-functional-programming
proguard
prozis-android-backup
pyhsikal
python
python-contributors
quasar
random
re
react
reaktive
realm
realworldkotlin
reductor
reduks
redux
redux-kotlin
refactoring-to-kotlin
reflect
refreshversions
reports
result
rethink
revolver
rhein-main
rocksdb
romania
room
rpi-pico
rsocket
russian
russian_feed
russian-kotlinasfirst
rx
rxjava
san-diego
science
scotland
scrcast
scrimage
script
scripting
seattle
serialization
server
sg-user-group
singapore
skia-wasm-interop-temp
skrape-it
slovak
snake
sofl-user-group
southafrica
spacemacs
spain
spanish
speaking
spek
spin
splitties
spotify-mobius
spring
spring-security
squarelibraries
stackoverflow
stacks
stayhungrystayfoolish
stdlib
stlouis
strife-discord-lib
strikt
students
stuttgart
sudan
swagger-gradle-codegen
swarm
sweden
swing
swiss-user-group
switzerland
talking-kotlin
tallinn
tampa
teamcity
tegal
tempe
tensorflow
terminal
test
testing
testtestest
texas
tgbotapi
thailand
tornadofx
touchlab-tools
training
tricity-kotlin-user-group
trójmiasto
truth
tunisia
turkey
turkiye
twitter-feed
uae
udacityindia
uk
ukrainian
uniflow
unkonf
uruguay
utah
uuid
vancouver
vankotlin
vertx
videos
vienna
vietnam
vim
vkug
vuejs
web-mpp
webassembly
webrtc
wimix_sentry
wwdc
zircon
Powered by Linen
multiplatform
  • q

    Qracle

    07/11/2021, 12:42 AM
    does anyone know how to resolve this issue? i tried invalidating cache & restart and some suggestions from Google but no luck. Android Studio Arctic Fox | 2020.3.1 Beta 5 Build #AI-203.7717.56.2031.7479365, built on June 21, 2021 Runtime version: 11.0.10+0-b96-7281165 x86_64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. macOS 11.4 GC: G1 Young Generation, G1 Old Generation Memory: 2048M Cores: 12 Registry: external.system.auto.import.disabled=true, ide.balloon.shadow.size=0 Kotlin 1.5.10
    Untitled
    r
    1 reply · 2 participants
  • n

    Nacho Ruiz Martin

    07/11/2021, 9:01 AM
    Hey everyone! 👋 I’m starting the dev of a multiplatform app and I wanted to skip the server-side development by using any BaaS. At first, I thought of using Firebase, but I found that there isn’t an oficial pure Kotlin SDK. This one looks good but it doesn’t contain all features. Do any of you know of any BaaS that has a pure Kotlin SDK or has used the open source Firebase SDK? Thanks! 🙇
    s
    m
    4 replies · 3 participants
  • n

    Nikola Milovic

    07/12/2021, 6:40 AM
    Is previewing compose still not a thing for multiplatform? I have shared compose code and trying to preview it. It seems that
    androidMain
    supports preview annotation but I don't get the option to run it. The only option would be to preview directly in the Android App but the app doesn't and shouldn't depend on some stuff that is required for previewing (for stubbing the data).
    g
    3 replies · 2 participants
  • j

    Jonathan Sandusky

    07/12/2021, 6:36 PM
    I’m looking into the multiplatform and see it’s in
    alpha
    . Is there any timeline for
    beta
    and
    stable
    ?
    c
    1 reply · 2 participants
  • j

    Jonathan Sandusky

    07/12/2021, 7:49 PM
    Also I see “managing coroutines”. I’m not sure what that means. I know what coroutines are, but I don’t understand the meaning of managing them in multiplatform. So my main platforms would be Java/Kotlin and JavaScript. Will this convert any coroutines to async/await in JavaScript?
    c
    10 replies · 2 participants
  • d

    Dean Djermanović

    07/13/2021, 7:46 AM
    I have an issue when I try to provide Ktor’s
    HttpClient
    instance using Koin. Here’s my code:
    single {
            val buildVariant: BuildVariant = get()
            val httpClientEngine: HttpClientEngine = get()
            val kotlinxSerializer: KotlinxSerializer = get()
            val tokenRefresher: TokenRefresher = get()
    
            HttpClient(httpClientEngine) {
                install(JsonFeature) {
                    serializer = kotlinxSerializer
                }
    
                install(Logging) {
                    ...
                }
    
                install(HttpSend) {
                    intercept { clientCall, requestBuilder ->
                        ...
    
                        requestBuilder.takeFrom(clientCall.request)
    
                        val newAccessToken = tokenRefresher.refreshToken()
                        requestBuilder.setAuthorizationHeader(newAccessToken)
                        execute(requestBuilder)
                    }
                }
            }
        }
    The problem is in this line:
    val newAccessToken = tokenRefresher.refreshToken()
    I get
    kotlin.native.concurrent.InvalidMutabilityException: mutation attempt of frozen org.koin.core.scope.Scope
    Can someone please explain why do I get this exception if I’m not trying to modify
    tokenRefresher
    ?
    refreshToken
    is a suspending function, but for the debugging purposes, I made it a regular function which returns some string constant. The behavior is the same, I still get the same exception. I’m using Ktor version
    1.5.2
    j
    8 replies · 2 participants
  • t

    tylerwilson

    07/13/2021, 6:52 PM
    Trying to build shared KMM lib with EAP version of Ktor, getting this error:
    w: skipping /Users/home/.gradle/caches/modules-2/files-2.1/io.ktor/ktor-client-serialization-iosarm64/main-170/8edb8cd38df5e56e4d9bda9941b0588fb1b36305/ktor-client-serialization.klib. Incompatible abi version. The current default is '1.4.2', found '1.5.0'. The library produced by 1.5.20 compiler
    I am unsure exactly what the message is saying, and where it might be getting the 1.4.2 version from. All versions are set to 1.5.20.
    m
    3 replies · 2 participants
  • s

    Sourabh Rawat

    07/14/2021, 3:15 AM
    I have a mpp project with windows target. I am getting "Kotlin not configured" warning in IDEA when I am coding in common source set. How can I fix this? Do I just ignore this?
    c
    1 reply · 2 participants
  • s

    Sourabh Rawat

    07/14/2021, 3:24 AM
    Is there any mpp library for file io (create files, directories, etc)? https://github.com/Kotlin/kotlinx-io seems to be not in active development. Any alternatives?
    c
    e
    3 replies · 3 participants
  • e

    eirikb

    07/14/2021, 4:57 AM
    Is there any difference between a Kotlin/JVM library, and a MPP library with only JVM enabled? - beside build.gradle.kts and source folder
    c
    b
    +1
    11 replies · 4 participants
  • j

    John O'Reilly

    07/14/2021, 9:41 AM
    Has anyone setup their environment to use different Kotlin version when building for Android and building for iOS?
    ➕ 3
    h
    j
    +1
    7 replies · 4 participants
  • r

    Rak

    07/14/2021, 2:21 PM
    Hi, a bit of a high level question. My company has various products and we are looking to create a shared library to reuse across android/iOS. I could build one huge shared library that supports all of them but that seems wrong, or I could build 3 libraries but that seems a duplication of effort as all of them need some things (date formatting across the company has been standardised) 2 of them are very similar and have a large overlap. How best to approach this? I’m currently thinking a standard lib with global stuff and then ProductA/B lib with a dependency on the standard lib and Project C lib with a dependency on the standard lib
    m
    m
    +1
    27 replies · 4 participants
  • i

    itnoles

    07/14/2021, 5:50 PM
    I am trying to figure out how NSURLSessions work with Kotlinx Corountines. I managed got it to work with semaphore.
    1 reply · 1 participant
  • s

    Seth Madison

    07/14/2021, 6:33 PM
    I’m curious if anyone has investigated Brightscript interop. It seems like the concurrency model could make things tricky, but maybe it wouldn’t be insurmountable.
    1 reply · 1 participant
  • p

    PHondogo

    07/14/2021, 8:37 PM
    Hello! Is it possible to depend on jvm target. I have jvm code (with jvm external dependenies) and want to depend on it from jvm and android targets. And it is not good for me to make several gradle modules to achieve it.
    r
    1 reply · 2 participants
  • u

    ultraon

    07/15/2021, 11:50 AM
    Hey Kotliners! Does anybody know when
    native.cocoapods
    Gradle plugin will support
    universal-framework
    (fat binary) to distribute KMM library for independent iOS project? We want to use Cocoapods to wrap KMM iOS binaries and use it independently in iOS projects. As I understand at the moment it is impossible to distribute KMM project (only sources) with Cocoapds and connect it to some iOS project so Gradle and other KMM libraries can be delivered
    transparently
    and build the KMM sources during assembling iOS project. We don't want to make iOS engineers unhappy ;-)
    m
    9 replies · 2 participants
  • x

    xxfast

    07/15/2021, 2:56 PM
    Hi all - Not long ago i did a presentation in my company to introduce them to :kotlinnew: Multiplatform. I have a recorded version

    here▾

    , let me know what you guys think 🙂
    👍 9
    🔥 7
    👍🏼 1
    :kotlin-intensifies: 8
    m
    r
    +1
    5 replies · 4 participants
  • s

    Scott Kruse

    07/15/2021, 5:14 PM
    Has anyone tried out Apollo's multi platform client? curious about anyone's experiences. We currently have an existing GQL backend implementation that is fragmented across 4 apps (2 iOS, 2 Android) and ideally would like to consolidate implementations: https://www.apollographql.com/docs/android/essentials/get-started-multiplatform/
    b
    m
    12 replies · 3 participants
  • b

    Ben

    07/15/2021, 11:29 PM
    Hi there, does anyone have experience using mavenLocal() with kmm? I made a kmm library named
    multiplatform
    , and performed publishToMavenLocal. The jar files look to be in my local path .m2 path. So I'm not too sure why I'm getting this error when importing:
    - file:/C:/Users/bchadwi/.m2/repository/me/bchadwi/multiplatform-android/1.0.2/multiplatform-android-1.0.2.pom
         Required by:
             project :app > me.bchadwi:multiplatform:1.0.2
    Specifically, why gradle is looking for a
    multiplatform-android
    ?
    b
    r
    5 replies · 3 participants
  • b

    Bradford Canonigo

    07/16/2021, 4:53 AM
    I'm trying to publish my project to maven central, and I'm still stuck with the gpg issue. I can't sign my artifacts for some reason. Is there a simple way to do the signing?
    * What went wrong:
    Execution failed for task ':initializeSonatypeStagingRepository'.
    > Failed to create staging repository, server responded with status code 400
    r
    s
    +1
    9 replies · 4 participants
  • s

    Slackbot

    07/16/2021, 9:04 AM
    This message was deleted.
    s
    i
    2 replies · 3 participants
  • i

    iamthevoid

    07/16/2021, 2:26 PM
    How to correct run code on single thread in kmm? looks like
    runBlocking
    doesn’t work good with ios. I get tests
    passed
    on jvm, but on ios it fails and seems that code inside
    runBlocking
    never executes
    i
    2 replies · 2 participants
  • d

    Daniel Kunis [JB]

    07/16/2021, 4:04 PM
    Hi everyone! Is there anyone who is developing "thin clients" with KMM (by that we mean apps with mainly web-first business logic like networking, caching, media (e.g. videos) and state & navigation management) and is* *ready to share his experience with us? We would love to learn what difficulties you face during your work to make your life with KMM a bit easier! If you are ready to give a little interview - just hit a :kotlinnew: reaction and I'll gladly DM you
    :kotlinnew: 3
    c
    m
    3 replies · 3 participants
  • m

    Matthias Geisler

    07/17/2021, 9:40 AM
    Hey is there any convenient way to load fixtures/resources in common tests without turning those resources into strings? For example JSON files become very ugly to deal with. Any pointers?
    b
    a
    7 replies · 3 participants
  • j

    Javier

    07/17/2021, 12:13 PM
    I am having problems when I add
    kotlin.native.enableDependencyPropagation=false
    r
    13 replies · 2 participants
  • s

    Slackbot

    07/18/2021, 2:55 PM
    This message was deleted.
    k
    2 replies · 2 participants
  • a

    Andre Servidoni

    07/19/2021, 7:33 AM
    Good morning everyone, I’m facing issues while using modularization with kmm and iOS app, is there any one with some use case that I can check? I can’t make iOS see the another module inside the shared one Thanks in advance!
    m
    2 replies · 2 participants
  • k

    kevindmoore

    07/19/2021, 3:32 PM
    I'm trying to create a desktop-compose module for my kotlin multiplatform project but the compose module doesn't seem to see the shared project. I've included it in the gradle file but for some reason it can't see the files. Is there something that is preventing it?
    d
    1 reply · 2 participants
  • a

    Alberto

    07/19/2021, 9:43 PM
    hello, does anyone know what would be the right target for “armv7k” architecture when building for WatchOS on KMP? I’ve looked at the available targets https://kotlinlang.org/docs/mpp-dsl-reference.html#targets but don’t see “armv7" or not clear if it’s part of one of the “watchos*” ones
    a
    2 replies · 2 participants
  • j

    Javier

    07/20/2021, 8:05 AM
    Is it in the roadmap sharing several jvm and jvm/android source sets?
    b
    2 replies · 2 participants
Powered by Linen
Title
j

Javier

07/20/2021, 8:05 AM
Is it in the roadmap sharing several jvm and jvm/android source sets?
b

Big Chungus

07/20/2021, 8:23 AM
Yes, but I think it's been put on hold for now.
👍 1
j

Javier

07/20/2021, 8:55 AM
So not planned for 1.6 then
View count: 4