kotlin-logging icon indicating copy to clipboard operation
kotlin-logging copied to clipboard

Possible to add a module-info.java for improved JPMS support?

Open RefuX opened this issue 1 year ago • 3 comments

I ran jdeps --generate-module-info . --module-path libs/ --multi-release 9 --ignore-missing-deps kotlin-logging-jvm-5.1.0.jar

and got META-INF\versions\9\module-info.java

module io.github.oshai.kotlinlogging {
    requires kotlinx.coroutines.core;

    requires transitive java.logging;
    requires transitive kotlin.stdlib;
    requires transitive org.slf4j;

    exports io.github.oshai.kotlinlogging;
    exports io.github.oshai.kotlinlogging.coroutines;
    exports io.github.oshai.kotlinlogging.internal;
    exports io.github.oshai.kotlinlogging.jul.internal;
    exports io.github.oshai.kotlinlogging.slf4j;
    exports io.github.oshai.kotlinlogging.slf4j.internal;
}

Of course I'm sure you'd want to tweak the file, but just to give you an example.

This would enable me to use your project, thanks for any help.

RefuX avatar Oct 17 '23 12:10 RefuX

Thank you for reporting an issue. See the wiki for documentation and slack for questions.

github-actions[bot] avatar Oct 17 '23 12:10 github-actions[bot]

Can you please create a pull request for it? I will review it and tweak what's needed.

oshai avatar Oct 18 '23 08:10 oshai

I don't think this is going to be possible until this issue is resolved in Kotlin-MPP.

EDIT: To elaborate, the issue linked above states that it's not currently possible to include Java resources in multiplatform projects that have an Android target. It might be possible to hack something together so that a module-info file gets shoved into the JAR file all the same, but it the modules file wouldn't be integrated in the project and would have to be updated manually.

severn-everett avatar Mar 29 '24 11:03 severn-everett