Big Chungus

    Big Chungus

    1 year ago
    I hope anyone from JB is here, as I've got a question. Are there any plans on supporting metadata-only libraries? The idea is to publish only commonMain output without any kotlin targets declared and being able to use it in any consumer project with arbitrary target set. Such artifact could only depend on other metadata-only libraries. EDIT: It'd be ideal to also allow dependencies on libraries with expect-actual for ALL kotlin targets (meaning metadata artifact from such dependencies covers all bases too, although I understand that this would be much harder to maintain) If not, it'd be nice to have an "exhaustive" gradle dsl target shortcut that registers all targets for the lib project.
    Javier

    Javier

    1 year ago
    I think that the last one is planned, about only metadata I know nothing
    Sebastian Sellmair [JB]

    Sebastian Sellmair [JB]

    1 year ago
    We are pretty aware of your proposed use case, but there are many non trivial things to consider here, which makes it hard to share anything right now!
    Big Chungus

    Big Chungus

    1 year ago
    Understandable, thanks for the clarification.
    russhwolf

    russhwolf

    1 year ago
    For a shortcut, you can do something like
    kotlin {
      presets.forEach { targetFromPreset(it) }
    }
    but it's a little more complicated because you can't have both Android and JvmWithJava, and you need to select which JS target to build (legacy, ir, or both)
    Messing around with that may start to give you a sense of why it's not so easy for JB to provide an API for this without some deeper consideration