Somewhat of a compiler/gradle question: is there a...
# gradle
m
Somewhat of a compiler/gradle question: is there a generally accepted way to add “metadata” files to a
.klib
file? Similar to
META-INF/...
in the JVM world but for other platforms?
a
Could you describe what’s your use case?
m
This is for this issue. I’d like to embed GraphQL metadata in the published artifacts so that I don’t have to do a separate publication.
d
No, there is no support for resources in KLIBs. It's not yet implemented. https://youtrack.jetbrains.com/issue/KT-46753
m
I don’t need ressources per-say (like JVM resources), i.e. I “just” need a compile-time way to get that information. It’s not going to be used at runtime.
It’s fine if it’s “just” a path inside the zip file like
META-INF
and I could probably do this manually but then I’m not sure: • what path to use to be a good citizen and not clobber someone’s else data? • where to hook in the build process so that I can reuse the existing artifact and publication flow
d
I don’t need ressources per-say (like JVM resources), i.e. I “just” need a compile-time way to get that information. It’s not going to be used at runtime. (edited)
We see any data that is added to KLIBs and that was not supposed to be stored in KLIBs by design as resources.
👍 1
It’s fine if it’s “just” a path inside the zip file like
META-INF
and I could probably do this manually but then I’m not sure:
It's not guaranteed to be supported, sorry. I would suggest to consider storing your data outside of KLIBs.
👍 1
m
Gotcha, thanks!