Thread
#multiplatform
    e

    Etienne

    10 months ago
    When I setup a multiplatform module with an android component, I find the intelli-sense for JS breaks. (And I've run into some issues combining it with JVM things as well).
    mbonnin

    mbonnin

    10 months ago
    I kinda gave up on IDE autocomplete + MPP + AGP. Filed this some time ago. Maybe things will get better with HMPP but the last comment on this issue isn't very encouraging
    When I need AGP, I put logic in the Gradle files to ignore it during sync like:
    if (System.getProperty("idea.sync.active") == null) {
       // Apply AGP here so that the IDE doesn't see it
    e

    Etienne

    10 months ago
    right. I got that impression too. I'm trying to find ways to sidestep issues, because broken intellisense makes for a painful dev experience.
    oh that's one good trick to know..
    mbonnin

    mbonnin

    10 months ago
    It's not great but it kinda does the job
    e

    Etienne

    10 months ago
    right now I'm trying to see if I can somewhat mitigate the issue by splitting things up in modules and merging them back together.. not sure it'll work
    mbonnin

    mbonnin

    10 months ago
    I also have this issue bookmarked: https://youtrack.jetbrains.com/issue/KTIJ-14471
    AFAIK, splitting things in modules doesn't help much... Maybe with included builds that could work...
    e

    Etienne

    10 months ago
    well.. I found that if AGP is not included in the multiplatform module, intellisense starts working, at least for a JS subcomponent..
    now I'm checking if 'actual' classes can be implemented in separate modules.. not sure that's possible
    mbonnin

    mbonnin

    10 months ago
    I think it's coming but not possible yet
    It was mentioned during one of the Kotlin event videos last week
    e

    Etienne

    10 months ago
    right.. well, if I can at least limit the damage to "actual" JS implementations, it's a bit better..
    what looks promising is having a
    jsLib
    module, having my
    shared
    js depend on it. With some judicious use of
    typealias
    , should end up with a
    shared
    module that mostly has
    common
    code.
    I really find it's the
    android
    gradle plugin messing things up. So, I'll also be trying a library module, with jvm/js/native configurations.
    need to test to be sure it'll be something iOS/Android will be able to use, but that also looks promising.
    2 possible workarounds. I'll let you know how well it went 🙂
    mbonnin

    mbonnin

    10 months ago
    Nice!!!