https://kotlinlang.org logo
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
  • f

    felipecsl

    10/10/2018, 5:27 AM
    ah I guess its using
    project.name
    :yes: 1
    l
    • 2
    • 2
  • t

    tarek

    10/10/2018, 2:58 PM
    When I run the
    copyFramework
    task from the new MPP Mobile sample, I get the following error :
    Could not get unknown property 'configuration.build.dir' for task ':app:copyFramework' of type org.gradle.api.DefaultTask.
    Do you have any idea why it happens ?
    r
    • 2
    • 5
  • s

    Sergio Casero

    10/10/2018, 4:46 PM
    Hello guys! Maybe this is a noob question, but I'm getting a frustrating error. I'm starting to test the multiplatform but I'm getting this error when I try to build android with intelliJ
    Plugin with id 'com.android.application' not found.
    But if try with gradlew assembleDebug, it works, and also works the "run" task without any problems and the apk is correctly installed. Any idea? (I can share the build.gradle files if you need them 🙂 )
    d
    l
    • 3
    • 12
  • h

    hmole

    10/11/2018, 3:46 PM
    Can I depend on multiple components of a single multiplatform module from another module? I need android and jvm parts. They're separate sourcesets.
    l
    • 2
    • 7
  • h

    hallvard

    10/11/2018, 5:58 PM
    I'm coding a play!framework application, and use kotlin for a large portion of data classes and the like used both on the server and on the client. Compiling for two.platforms is now the easy part, yay! Can anyone point me to a play! example with kotlin multiplatform in it?
    j
    • 2
    • 5
  • c

    coletz

    10/12/2018, 9:33 AM
    Hi everyone! I'm following the official mpp tutorial (here https://kotlinlang.org/docs/tutorials/native/mpp-ios-android.html#creating-the-shared-module) using AS. I'm not getting this part:
    Let's start by creating the SharedCode project
    . Should I actually create a NEW project or just use the one I've created for android (following previous tutorial steps) and create a new module? In case, what type of project/module (phone & tablet module, android library, java library etc.)?
    l
    j
    l
    • 4
    • 11
  • a

    alec

    10/12/2018, 8:42 PM
    https://github.com/touchlab/DroidconKotlin
    👍 2
    c
    • 2
    • 4
  • c

    coletz

    10/12/2018, 8:59 PM
    oh ok, I've seen a strange commit - Attempt to port to new gradle plugin (failed) - and I thought it was broken
    k
    • 2
    • 1
  • h

    Hamza

    10/13/2018, 4:18 AM
    but wouldn’t it be possible to create the base 64 api with kotlin apis only and use that on all the others?
    e
    • 2
    • 12
  • c

    coletz

    10/13/2018, 12:30 PM
    Question time again! On the official mpp tutorial (https://kotlinlang.org/docs/tutorials/native/mpp-ios-android.html#creating-an-android-project) it's written to use gradle 4.10.2, while on the Droidcon app (https://github.com/touchlab/DroidconKotlin#note-on-gradle) it's written to use 4.7... What to do? 🤔
    o
    h
    k
    • 4
    • 4
  • h

    hmole

    10/13/2018, 4:17 PM
    I have an mpp module with
    1.3-rc146
    and gradle
    4.7
    . Can I use latest
    kotlinx.serialization
    with
    @Serializable
    and
    @Optional
    in common module and parse json with it in native? @sandwwraith
    t
    • 2
    • 4
  • c

    coletz

    10/13/2018, 6:30 PM
    Do I need to add something particular for ktor to work with ios besides
    io.ktor:ktor-client-ios:0.9.5
    ? Cause every other dependency works, while ktor isn't available
    o
    • 2
    • 1
  • r

    russhwolf

    10/13/2018, 6:44 PM
    Is there any ETA on https://youtrack.jetbrains.com/issue/KT-27535? It’s a blocker for updating multiplatform-settings to the new plugin. When I asked at KotlinConf someone on the team said probably in a 1.3.x patch release but I’d love to hear something more definitive. Alternatively, can I generate the correct module data manually? I can figure out how to publish the aar separately but I don’t know how to get other kotlin-multiplatform projects to consume it correctly.
    ➕ 2
    h
    • 2
    • 1
  • h

    hallvard

    10/15/2018, 7:22 AM
    Building for both jvm and js, do the
    actual
    implementations in js need to have the same package names as in jvm? I have some simple data classes, and accessing them in jvm is a matter of using an import statement in the top of the file and then going directly at them by name, but in the js file I have compiled, it seems I have to go the long way with
    com.company.project.dataclass
    names. Should I just define aliases right away when
    $(document).ready()
    ?
    g
    • 2
    • 5
  • s

    spand

    10/15/2018, 9:01 AM
    There is no
    runBlocking
    for js hence not in common either
    🏁 1
    l
    d
    • 3
    • 6
  • n

    Nikky

    10/15/2018, 8:19 PM
    this might even mark functions as entrypoints so kotlin-js dead code elemiination works
    l
    • 2
    • 2
  • c

    coletz

    10/15/2018, 10:33 PM
    damn I think this can be the issue (?)
    def iOSTarget = System.getenv('SDK_NAME')?.startsWith("iphoneos") \
                                  ? presets.iosArm64 : presets.iosX64
    Actually I'm not sure about why this is here, I just copy-pasted from other mpp projects/tutorials Edit: Yep that was the problem, now everything is working, thanks!
    r
    • 2
    • 1
  • h

    hmole

    10/16/2018, 12:04 PM
    Are there any examples of sharing code between
    commonTest
    and
    androidTest
    from another module?
    ➕ 1
    g
    • 2
    • 8
  • c

    coletz

    10/16/2018, 6:30 PM
    Is it possible to use swift's Codable from kotlin?
    o
    s
    +3
    • 6
    • 9
  • t

    tapchicoma

    10/17/2018, 11:28 AM
    Can someone share podspec that can be used by ios app to build and consume multiplatform framework?
    t
    • 2
    • 2
  • a

    agustibm

    10/18/2018, 7:10 AM
    Hi! One question. The Kotlin multiplatform is only business logic? In other words, is it possible import dependencies, for example okhttp?
    v
    c
    +3
    • 6
    • 19
  • d

    drofwarcs

    10/18/2018, 2:16 PM
    The current recommended way to run tests for MPP is to run gradle's
    check
    tasks which runs all the tests on the targeted platforms. Is there any way to run a single test, or run a single test on just one platform?
    t
    • 2
    • 2
  • l

    lawlorslaw

    10/18/2018, 3:13 PM
    Has anyone successfully set up a multiplatform project similar to the one in these docs? https://kotlinlang.org/docs/tutorials/native/mpp-ios-android.html#creating-ios-application is there any feedback/gotchas in doing something like this?
    t
    • 2
    • 1
  • j

    jw

    10/18/2018, 3:15 PM
    IDE is nearly unusable at this point (although RC4 should be much better)
    👍 1
    o
    l
    • 3
    • 3
  • c

    coletz

    10/19/2018, 9:52 AM
    has anyone ever tried to use
    kotlinx.serialization
    with a mpp project? Only the
    jsonparser
    part of course, since the whole serialization library is not available on k/n I tried and everything seems fine, gradle is not complaining, IDEA seems ok, but if I try to use anything from
    kotlinx.serialization.json.*
    I get a compile error
    Unresolved reference
    j
    m
    • 3
    • 8
  • p

    pajatopmr

    10/19/2018, 11:47 AM
    So I just joined the KMP wagon train. I have an Android app up and running and am moving to KMP. Apparently the IDE is still half-baked and 1.3.0-rc-190 is the version of choice for today. How does one learn what the correct version to use on any given day is?
    l
    t
    • 3
    • 2
  • p

    pajatopmr

    10/19/2018, 12:02 PM
    Next question for me is how to organize my source code repos. The initial setup from Intellij (EAP) seems to build a monolith project to contain all the top level code (common, Android and iOS) in a single place (minus libraries). I’m guessing this is important for Gradle. I suspect one way to use multiple repos is to use git sub-projects. Is there a better way?
    j
    • 2
    • 5
  • c

    coletz

    10/19/2018, 8:26 PM
    Yeah, I hadn't seen that it's available even for native. Official docs says that it's not available and one must use only jsonparser, then on jsonparser it says it's deprecated and one must use the whole kotlinx.serialization... Solved :)
    s
    • 2
    • 1
  • r

    robstoll

    10/21/2018, 6:52 PM
    I added some tests to a common module. Since then I get the following warning during build
    w: Module "..." is defined in more than one file
    . Everything runs as expected. Can I ignore this warning or should I change something?
    l
    • 2
    • 11
  • c

    coletz

    10/22/2018, 8:47 AM
    Anyone ever had this runtime error on iOS:
    kotlin.NotImplementedError: An operation is not implemented: Intrinsic to be implemented in compiler
    ?
    o
    h
    s
    • 4
    • 4
Powered by Linen
Title
c

coletz

10/22/2018, 8:47 AM
Anyone ever had this runtime error on iOS:
kotlin.NotImplementedError: An operation is not implemented: Intrinsic to be implemented in compiler
?
o

orangy

10/22/2018, 9:13 AM
@olonho #kotlin-native
h

hmole

10/22/2018, 9:17 AM
Are you using
kotlinx.serialization
?
c

coletz

10/22/2018, 9:22 AM
yes, just checked and the exception is thrown at JSON.parse
s

sandwwraith

10/22/2018, 9:25 AM
Obtaining serializer from KClass is not available on native due to the lack of reflection. Use .serializer() directly on serializable class, like here: https://github.com/Kotlin/kotlinx.serialization/blob/50047ce0683c068896e4a57b1a1d71fd28cab02d/docs/runtime_usage.md#obtaining-serializers
:tnx: 1
View count: 4