Provide Automatic-Module-Name for jvm target
See original GitHub issueFirst of all, I had a quick look to see if this was mentioned anywhere. My apologies in case I missed something.
Cikt works perfectly well as an automatic module. Gradle, however, insists on putting it on the classpath because it doesn’t have a module descriptor or automatic module name. This makes it inconvenient to use in modular JVM projects and while inconvenience is all it causes me, it could easily lead to other hard to identify issues in more complex projects.
I reckon a full module-info.java
is overkill here but an Automatic-Module-Name = clikt.jvm
in the jars manifest would make the experience a lot nicer. This way, the modules name stays consistent even if the jar changes names some time in the future and it’ll also (likely) shut up Gradle. It’s also good practice anyway.
My workaround right now is essentially that, transforming the artifact to add an automatic module name. (For reference: I simply went by this)
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (4 by maintainers)
Top GitHub Comments
Only reflective access to non public classes or members will cause issues. So
::class.simpleName
should be non problematic. I’m not entirely sure how things work if you try this on a non public class but I think that case would be pretty rare. And it’s not like you could do anything about it anyway. Glad I could help.Thanks for the info. The only reflection that Clikt does is
::class.simpleName
, which I don’t think would cause any access violations.