Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
RefuX opened this issue Oct 17, 2023 · 3 comments
Open

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

RefuX opened this issue Oct 17, 2023 · 3 comments

Comments

@RefuX
Copy link

RefuX commented Oct 17, 2023

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.

@github-actions
Copy link

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

@oshai
Copy link
Owner

oshai commented Oct 18, 2023

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

@severn-everett
Copy link
Contributor

severn-everett commented Mar 29, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants