Thread
#multiplatform
    Elka

    Elka

    1 year ago
    Kotlin Native: Why are
    implementation
    dependencies specified in submodules are exported when
    transitiveExport = true
    ? Shouldn’t it only export dependencies marked with
    api
    ?
    c

    CLOVIS

    1 year ago
    Note: not an expert, I could be wrong Java doesn't have a concept of ‘static libraries', it only has ‘shared libraries'. That means that your jar only contains ‘references' to whatever library's jar you're using. Therefore, if that jar is not available at runtime, then your program can't run. The difference between implementation and API is whether or not developers that use your library see your dependencies in their auto-complete, etc. Essentially: • implementation: your dependencies appear in their runtime classpath • API: your dependencies appear in their runtime and compile-time classpath
    Elka

    Elka

    1 year ago
    I am talking about Kotlin Native not JVM. Edited the question*
    c

    CLOVIS

    1 year ago
    Ah sorry, no idea then 😕
    l

    Luigi Scarminio

    7 months ago
    @Elka, did you find the answer for that? I'm facing the same problem. When I look at the .pom generated for jvm, it is exported as runtime.
    <dependency>
    <groupId>com.embraer</groupId> <artifactId>ScapJava</artifactId> <version>3.4.1</version> <scope>runtime</scope> </dependency>
    Elka

    Elka

    6 months ago
    I had to disable transitiveExport and manually export the transitive ones, a bit ugly but works