https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
t

trathschlag

05/07/2018, 9:20 AM
Hi, when I define two multiplatform projects like this:
Copy code
utils
    - common -> define Foo.class
    - jvm
    - js

app
    - common
    - server : utils-jvm -> use Foo.class
    - client : utils-js
And
app
includes
utils
as a composite build in gradle with
includeBuild
then IDEA marks any use of Foo.class in
app-server
as not found. Gradle builds everything perfectly fine, so is this a bug in IDEA?
I also found https://youtrack.jetbrains.com/issue/KT-23302. Is it the same problem?
r

robstoll

05/07/2018, 9:29 AM
have delegated run/build to gradle?
t

trathschlag

05/07/2018, 12:45 PM
Yes that was already enabled
Ok I found out that this only happens if app-server also has a dependency on app-common. If you don't have this dependency, IDEA seems to find the Foo.class.
r

robstoll

05/07/2018, 1:28 PM
good to know
t

trathschlag

05/07/2018, 2:42 PM
The problem seems to be introduced in the kotlin-gradle-plugin from 1.2.31 to 1.2.40
i

ilya.gorbunov

05/07/2018, 3:47 PM
@trathschlag I'm not sure we support composite gradle builds with multiplatform project yet. Please report your problem to the tracker so we could investigate it.
t

trathschlag

05/07/2018, 3:47 PM