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
  • k

    kpgalligan

    10/22/2018, 2:03 PM
    Is there a good sample to look at for JS and multiplatform? I have KotlinJS in multiplatform library code but have no idea how to actually run tests. Library seems to build fine and publish, but no tests ever run for the JS portion.
    r
    r
    +3
    • 6
    • 14
  • j

    jdemeulenaere

    10/22/2018, 9:03 PM
    Anyone working on a multiplatform compile-time DI compiler plugin ? i.e. Dagger but multiplatform
    a
    u
    • 3
    • 3
  • o

    orangy

    10/22/2018, 9:36 PM
    Not as far as I know, but compiler plugin is something I wouldn’t invest in right now. Just because we will break API.
    j
    • 2
    • 2
  • j

    jw

    10/22/2018, 9:38 PM
    that specific use-case is on my radar and might be my pet project over the holidays. was thinking of using Android Lint's UAST infrastructure to do it at the source layer with source generation and a Gradle plugin to start with. It could be moved to a compiler plugin later.
    🔥 4
    j
    • 2
    • 2
  • g

    gildor

    10/23/2018, 9:47 AM
    This is not “compile-time” and many would argue about statement that “Koin is DI”
    ➕ 2
    m
    • 2
    • 2
  • s

    Sergio Casero

    10/23/2018, 8:40 PM
    Hello guys! Here you can find another mpp project🙂 https://github.com/sergiocasero/votlin-app We use ktor for backend, react, android and ios for clients. It's more or less like kotlinconf app (the app is for voting talks for other event, here in Spain 🙂 ), but we use MVP (sharing presenters) and we're also sharing the Remote Data Source (currently serializing with serializationx because ktor-client-json feature is not available for all platforms yet). Thanks to @marcinmoskala and @wiyarmir repos, they are really really helpfull! The project is still WIP, suggestions, PRs and (why not) ragging are welcome!
    👍 8
    👏 6
    :kotlin: 6
    t
    d
    • 3
    • 5
  • c

    coletz

    10/24/2018, 7:28 AM
    Is it possible to use kapt on a mpp?
    g
    • 2
    • 2
  • h

    Hamza

    10/25/2018, 7:47 AM
    hey, has anyone able to get junit 5 to work with a multiplatform project? I am using JUnit5 on the JVM to run the tests, and i have
    use gradle runner
    selected in my IDEA preferences. Whenever I try to run the tests though, I get the [included] error. [stacktrace mode enabled] When i try running
    gradle jvmTest
    though, it succeeds without any problems.
    -.txt
    l
    e
    • 3
    • 7
  • c

    coletz

    10/25/2018, 10:35 AM
    Is it normal that I can't use cocoapods on iOS in a mpp? I tried some pods just for testing purpose but I always get
    ld: framework not found _podname_
    (I'm using the xcworkspace)
    t
    v
    • 3
    • 4
  • k

    kpgalligan

    10/25/2018, 10:34 PM
    I've tried the config used for ios but I get errors about not finding actuals. However, they should be available. I don't have ndk hooked up anywhere, so maybe thinking the cause isn't what the error is saying.
    m
    l
    • 3
    • 4
  • h

    Hamza

    10/26/2018, 10:09 AM
    How can I compile Kotlin-JavaScript to JavaScript files in a multiplatform project? There is only one gradle file
    g
    j
    • 3
    • 41
  • f

    fabianterhorst

    10/29/2018, 4:12 PM
    will there soon be an dokka update to support mpp?
    l
    • 2
    • 1
  • a

    alex.hart

    10/29/2018, 5:24 PM
    Does Kotlin Multiplatform support native generic type parameters? Or are they stripped?
    r
    r
    g
    • 4
    • 7
  • a

    ankushg

    10/29/2018, 6:13 PM
    Hey friends, I'm trying out New MPP with 1.3.0 stable, and running into some weird issues when trying to run a test in the IDE. Whenever I try running a specific test (from my
    commonTest
    sources) using the Play button in the gutter, I get
    Error:(1, 18) Kotlin: [my-module_jvmMain] Declaration annotated with '@OptionalExpectation' can only be used in common module sources
    . Tests run perfectly fine with
    ./gradlew :my-module:jvmTest
    though! I have a couple methods annotated with
    JsName
    and
    JvmStatic
    , but they very clearly are in the common module sources. I'm using a standard
    fromPreset(presets.jvm, 'jvm')
    target. Do I need to explicitly call
    useExperimentalAnnotation
    or
    enableLanguageFeature
    to use annotations marked as
    @OptionalExpectation
    ? Or is this an IDE issue? If it's an IDE issue, is there a ticket I should be following?
    o
    u
    • 3
    • 3
  • a

    ankushg

    10/29/2018, 6:31 PM
    Another multiplatform related bug/question: I've defined a file
    utils/TimeUtils.kt
    in my
    commonMain
    source set, with a top-level
    expect fun getCurrentTime(): Long
    declaration. I've also defined a file
    TimeUtils.kt
    in my
    jvmMain
    source set, in the same
    utils
    package, with an
    actual fun getCurrentTime(): Long = System.currentTimeMillis()
    . Attempting to build this project is giving me an error:
    Duplicate JVM class name 'utils/TimeUtilsKt' generated from: package-fragment utils, package-fragment utils
    Is this supposed to be allowed? Using
    @file:JvmMultifileClass
    doesn't fix the issue either... Do the files just have to be named differently altogether?
    i
    • 2
    • 2
  • k

    kpgalligan

    10/29/2018, 7:07 PM
    Are there any sample libraries publishing with the new plugin dsl and an Android aar? I have jvm and native publishing with gradle 4.7, and am able to publish with the older "platform" plugin, but not clear on how it would work with the newer dsl.
    r
    • 2
    • 4
  • t

    tarek

    10/29/2018, 7:32 PM
    I guess the anwser is "Not yet". But just to be sure: Is there any way to do parametrized multiplatform tests ?
    l
    • 2
    • 2
  • l

    lawlorslaw

    10/29/2018, 8:43 PM
    Does this mean the multiplatform project is closer to building out an Android and iOS app? Or are we still a ways to go?
    k
    • 2
    • 1
  • s

    Sergio Casero

    10/30/2018, 6:55 AM
    Hi guys! Is there any tutorial/article explaining how to develop mpp libs?
    o
    s
    • 3
    • 4
  • s

    Sergio Casero

    10/30/2018, 1:14 PM
    Hi guys, just an architecture question, why is better to have only 1 module with all the targets?? In my opinion, is better to have 1 module per platform, no?
    g
    • 2
    • 5
  • j

    Joris PZ

    10/30/2018, 3:50 PM
    Hi all, I created a brand new MPP project in IDEA. My
    jvmMain
    modules uses logback for logging, which works fine. However, IDEA is not copying
    src/jvmMain/resources/logback.xml
    to the build folder, and so my config is not picked up at runtime. When I manually copy
    logback.xml
    to
    build/classes/kotlin/jvm/main
    before running my main method, the config is picked up by logback. Anyone have any idea where I should look for a solution? I haven't used Gradle before, so I have no idea if I need to configure something on that side?
    src/jvmMain/resources/
    is part of the classpath, so it seems more like an IDEA issue?
    h
    • 2
    • 2
  • a

    ankushg

    10/30/2018, 9:51 PM
    It seems that
    sort
    isn't necessarily always stable. Despite anecdotally being stable in JVM, its unstable in certain JS environments and the docs don't make any guarantees about stability. Does anyone know of a multiplatform-friendly way to do stable sorts? https://youtrack.jetbrains.com/issue/KT-12473
    o
    • 2
    • 1
  • e

    Erling Fjelstad

    10/31/2018, 12:15 PM
    Hello. I just started a multiplatform project through IntelliJ's Kotlin(Mobile Android/iOS) project. I got it to compile and build on Android. However, I'm unable to access iOS specific domain information (such as UiDevice) in a kotlin file under the iosMain folder. Does anyone know what I have to do?
    o
    o
    • 3
    • 5
  • q

    qlitzler

    10/31/2018, 3:30 PM
    Hello, I am building a multiplatform library using Kotlin. The library should be usable by Kotlin user on the JVM (obviously), but also by Java developers. Because of this requirement, I need to setup a java unit test suite to be able to test how the library syntax will look like from Java. I am having troubling setting up a simple java test folder with a Junit dependency. My gradle file looks like this at the moment. Can someone point me towards the right direction ?
    -.groovy
    i
    • 2
    • 3
  • r

    russhwolf

    11/01/2018, 5:15 AM
    https://twitter.com/RussHWolf/status/1057862981726420992
    👍 7
    • 1
    • 1
  • e

    Erling Fjelstad

    11/01/2018, 9:03 AM
    Hello! I'm trying to set up a multiplatform (Android and iOS) project. I'm able to write Kotlin multiplatform code for JVM and for iOS. Now I'm trying to get iOS utilize the Common project. According to the documentation I should link the xcode-frameworks with Xcode, however I cannot find it under my Common/build folder. Does someone know what do to?
    o
    • 2
    • 1
  • g

    gaetan

    11/01/2018, 6:34 PM
    @russhwolf the main problem of the new kotlin MPP is its lack of documentation. https://youtrack.jetbrains.com/issue/KT-27967
    r
    h
    n
    • 4
    • 6
  • h

    hmole

    11/01/2018, 7:59 PM
    Any examples of publishing
    aar
    with mew mpp? Is it even possible?
    r
    • 2
    • 2
  • b

    Brian

    11/02/2018, 9:39 AM
    Hey! I'm trying to access types and methods of the stdlib (specifically:
    Sequence
    ) from Swift. It seems, that the generated framework headers only include definitions for my code but misses a lot from the stdlib. So there actually is the compiled
    KotlinSequence
    accessible but all the factory and extension functions are not -- which renders it pretty useless. Is there a way, to make some or all types and methods available in a compiled native xcode framework? Any hints are much appreciated! See also my question on stackoverflow: https://stackoverflow.com/questions/53103956/access-kotlin-standard-library-from-swift
    s
    • 2
    • 5
  • p

    patjackson52

    11/02/2018, 1:31 PM
    Anyone have trouble jumping to common module kotlin code from an Android module? Project compiles fine, but AS has trouble finding the source for the common kotlin code from the android module.
    l
    • 2
    • 1
Powered by Linen
Title
p

patjackson52

11/02/2018, 1:31 PM
Anyone have trouble jumping to common module kotlin code from an Android module? Project compiles fine, but AS has trouble finding the source for the common kotlin code from the android module.
l

louiscad

11/02/2018, 1:47 PM
Last time I tried, it worked only after compilation in Android Studio 3.2, and didn't work at all in 3.3
View count: 2