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

    Konstantin Petrukhnov

    08/23/2019, 1:21 PM
    Is there any multiplatform project template, that doesn't require android sdk in system?
    k
    k
    5 replies · 3 participants
  • k

    Kris Wong

    08/23/2019, 1:56 PM
    I notice IDEA no longer includes the gradle wrapper script for the Kotlin templates. is that built in now or something?
    k
    5 replies · 2 participants
  • n

    Nicholas Bilyk

    08/23/2019, 5:43 PM
    I'm kind of stuck on another Kotlin Gradle question. I am trying to create a Gradle configuration for a jvm classpath, but I'm getting an AmbiguousConfigurationSelectionException. In java this works:
    configurations.create("myConfig") {
    	dependencies.apply {
    		add(project.dependencies.create("com.example:foo:version"))
    	}
    }
    
    // In the task:
    getExecActionFactory().newJavaExecAction().apply {
    	classpath = project.configurations.getByName("myConfig")
    }
    But I don't know how to do the equivalent if the dependency is a kotlin multi-platform library. I get an exception such as:
    Caused by: org.gradle.internal.component.AmbiguousConfigurationSelectionException: Cannot choose between the following variants of com.example:foo:version:
      - js-api
      - js-runtime
      - jvm-api
      - jvm-runtime
      - metadata-api
    1 reply · 1 participant
  • j

    jw

    08/24/2019, 4:30 AM
    how can i depend on the JS or native output of a MPP module and embed it as a resource of a plain-'ol java module?
    b
    9 replies · 2 participants
  • k

    kpgalligan

    08/24/2019, 2:57 PM
    Anybody have these kinds of error after 1.3.50? Running into similar and hoping for a simple fix: https://stackoverflow.com/questions/57616418/build-errors-after-updating-to-kotlin-1-3-50
    h
    1 reply · 2 participants
  • k

    Konstantin Petrukhnov

    08/26/2019, 10:16 AM
    What do i need to do, to "import kotlin.system.measureTimeMillis" in commons module, so it don't complain about unresolved reference?
    t
    3 replies · 2 participants
  • m

    Mike Wolfson

    08/26/2019, 9:03 PM
    -.txt
    k
    4 replies · 2 participants
  • m

    Mike Wolfson

    08/26/2019, 9:29 PM
    This_is_the_build_gradle_kts_file__not_sure_where_I_need_to_add_any_particular_association_to_make_this_work___I_do_have_the_JVM_set_to__android___as_per_default_.txt
    :thread-please: 1
    k
    l
    12 replies · 3 participants
  • a

    ankushg

    08/26/2019, 11:12 PM
    Has anyone using 1.3.50 and the
    allTests
    task been able to get test results as JUnit-like XML files? I'm only getting the HTML report page in
    reports
    and
    binary
    in
    test-results
    when using JVM and the (new) built-in JS test setup, which makes CI a bit less easy to use
    s
    a
    2 replies · 3 participants
  • g

    galex

    08/27/2019, 4:08 AM
    Hello, trying to upodate my project to 1.3.50, I get the following errors:
    . The abi versions don't match. Expected '[14]', found '9'
    w: The compiler versions don't match either. Expected '[]', found '1.3-release-10826'
    I thought using the last version of each library would be OK:
    kotlin_version=1.3.50
    ktor_version=1.2.3
    kotlinx_serialization_version=0.12.0
    kotlinx_coroutines_version=1.3.0
    Any idea what the right versions should be?
    1 reply · 1 participant
  • k

    Konstantin Petrukhnov

    08/27/2019, 6:40 AM
    how can I solve "no podspec found" (when trying to cocoapods install/update) for ios build in MPP?
    1 reply · 1 participant
  • f

    Fail

    08/27/2019, 9:44 AM
    When work with android I have this error:
    Method threw 'java.lang.ClassNotFoundException' exception.
    java.lang.ClassNotFoundException: Didn't find class "kotlin.Exception" on path: DexPathList...
    What a solution? On
    try {
    
    } catch (e:Exception) {
    ...
    }
    d
    2 replies · 2 participants
  • r

    ribesg

    08/27/2019, 1:02 PM
    I have a class in my
    commonMain
    module and 2 extension functions in my
    androidMain
    and
    jvmMain
    modules which happen to have the same prototype. IntelliJ is complaining in the
    androidMain
    module when I use this extension that it doesn’t know which one to use because it’s defined twice. The problem doesn’t occur in
    jvmMain
    and everything compiles fine, it’s IntelliJ being lost I suppose
    j
    s
    4 replies · 3 participants
  • s

    spierce7

    08/27/2019, 8:53 PM
    Has anyone successfully pushed a multiplatform project to a maven repo in artifactory?
    d
    s
    +3
    25 replies · 6 participants
  • o

    Ola Gawell

    08/28/2019, 12:47 PM
    Is there any way to get a timestamp (like System.currentTimeMillis()) in a multiplatform project without using expect/actual?
    g
    p
    +2
    9 replies · 5 participants
  • r

    robstoll

    08/28/2019, 2:19 PM
    is there a MPP internationalization library? something like gettext maybe? If not, who would fancy to help implementing it as open source library?
    ✋ 1
    l
    a
    8 replies · 3 participants
  • k

    Kris Wong

    08/28/2019, 4:02 PM
    Any chance all these issues with IDEA will get cleaned up in the near future?
    l
    g
    +1
    7 replies · 4 participants
  • a

    ansman

    08/28/2019, 10:23 PM
    IntelliJ stopped recognizing my android modules in an MPP project. I tried invalidating caches, removing .idea and importing again
    d
    6 replies · 2 participants
  • r

    ribesg

    08/29/2019, 1:11 PM
    In a Gradle project with many modules, some MPP and some JVM only, how can I add a dependency in a JVM module to the JVM part of a MPP module? This produces an error:
    implementation(project(":path:to:mpp-module"))
    WARNING: Ignoring dependency of module 'mpp-module' on module 'jvm-module'. Java modules cannot depend on Android modules
    g
    l
    37 replies · 3 participants
  • k

    kpgalligan

    08/29/2019, 2:02 PM
    Anybody publishing a library as a cocoapod? Wondering if there are any obvious issues. I’m aware that you can’t include multiple. This is for a client that wants to distribute their library to developers for use in native apps. Most would just be importing the framework on iOS. If somebody wanted to use it as a multiplatform library, that would be available as well.
    b
    a
    28 replies · 3 participants
  • p

    Patrick Jackson

    08/29/2019, 3:54 PM
    Has anyone explored, or seen demos, of a MP project with a JS frontend? Here I mean the kotlinjs output would be imported into a js project, not a kotlinjs project. All the samples I have seen are using kotlinjs. This type of setup would be useful for integrating into existing JS projects
    ➕ 1
    g
    3 replies · 2 participants
  • s

    serebit

    08/29/2019, 6:07 PM
    What's the best option for controlling shared mutable state in common code? I have a cache that can be accessed and updated by multiple coroutines (on JVM, anyway). Actors are unavailable on native, so should I go with a Mutex approach, or make the cache an AtomicReference?
    a
    b
    +2
    38 replies · 5 participants
  • n

    Nicholas Bilyk

    08/29/2019, 9:40 PM
    Has anybody had any luck getting JS unit tests running in Ubuntu? If I run allTests, in windows 10 I get JVM and JS test results, but in Ubuntu I only get the JVM side. (Using 1.3.50)
    s
    c
    +1
    56 replies · 4 participants
  • k

    kpgalligan

    08/29/2019, 10:09 PM
    Starting
    freeze()
    issue thread. Continued from here: https://kotlinlang.slack.com/archives/C3PQML5NU/p1567102026052800 cc @Kris Wong @basher
    k
    b
    +1
    30 replies · 4 participants
  • l

    louiscad

    08/30/2019, 3:29 PM
    FYI, Android Studio 3.6 Canary 9 fixes a few bugs regarding multiplatform Android targets, and is compatible with Kotlin 1.3.50
    👍 6
    s
    1 reply · 2 participants
  • k

    kpgalligan

    09/01/2019, 2:07 PM
    Best place/tags to submit Intellij multiplatform issues? Currently running into an issue where renaming a file in the jvm source set renames it in common, but the purpose is to have different names to avoid name collisions in the JVM
    a
    g
    +1
    9 replies · 4 participants
  • l

    leandro

    09/01/2019, 5:51 PM
    Anyone writing multiplatform/common classes with Dagger’s
    @Inject
    on it? Since it’s a JVM-only type, so I tried to create my own
    Inject
    with
    @OptionalExpectation
    on it, but can’t seem to figure out the
    actual
    for it.
    d
    j
    3 replies · 3 participants
  • s

    saket

    09/01/2019, 7:17 PM
    @leandro I'm curious: are you building your dagger graph on Android for shared classes?
    l
    6 replies · 2 participants
  • s

    saket

    09/01/2019, 7:18 PM
    I was thinking about DI in shared code just today and was wondering what others are using
    b
    s
    +2
    8 replies · 5 participants
  • s

    saket

    09/01/2019, 8:15 PM
    Are there any benefits of using Badoo's reaktive over using expect/actual with RxJava and RxSwift?
    r
    b
    5 replies · 3 participants
Powered by Linen
Title
s

saket

09/01/2019, 8:15 PM
Are there any benefits of using Badoo's reaktive over using expect/actual with RxJava and RxSwift?
r

russhwolf

09/01/2019, 8:22 PM
The biggest benefit is that Reaktive already exists, so it saves you the work of designing and maintaining your own API. RxJava and RxSwift are not identical and I suspect it’ll be pretty difficult to create a clean expect/actual API on top of them.
b

basher

09/01/2019, 8:29 PM
RxSwift usage is going to be difficult, if not impossible, inside kotlin until Swift interop comes to native
s

saket

09/01/2019, 8:34 PM
Oh! I assumed they both align with the same reactive extensions standards. I looked into Reaktive, but I feel slightly uncomfortable that it re-implements all operators. RxJava and RxSwift are well battle tested whereas Reaktive is not.
b

basher

09/01/2019, 8:46 PM
It has nothing to do with the Rx standards. K/N has direct interop with Obj-C, not Swift. Going the other way, it annotates it's header to make the classes feel nice from Swift. But for direct interop, RxSwift isn't usable from Obj-C (90% sure on that), so K/N won't be able to see it (assuming you wanted to use it in Kotlin). You'd have to add some bridging somewhere (possibly Obj-C)
s

saket

09/01/2019, 10:12 PM
@basher I see. Thanks for explaining!
👍 1
View count: 2