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

Add `Automatic-Module-Name` manifest entry

Open ascopes opened this issue 3 years ago • 1 comments

On Java 9 or above, in projects using JPMS modules, Maven will currently raise the following warning due to kotlin-logging not having the Automatic-Module-Name manifest entry:

[WARNING] *****************************************************************************************************************************************************
[WARNING] * Required filename-based automodules detected: [kotlin-logging-jvm-2.1.21.jar]. Please don't publish this project to a public artifact repository! *
[WARNING] *****************************************************************************************************************************************************

Would it be possible to push a release that has this MANIFEST entry set explicitly to avoid this issue? This reduces the likelihood of things breaking if build settings change between versions for those who are using Kotlin within a modular Java application.

I am not very savvy on Gradle, which is why I haven't put a PR up myself for this, but the Maven equivalent of this fix would be just specifying the following when producing the JAR:

<archive>
  <manifestEntries>
    <Automatic-Module-Name>io.github.microutils.kotlinlogging</Automatic-Module-Name>
  </manifestEntries>
</archive>

or similar.

Thanks

ascopes avatar Jan 22 '22 17:01 ascopes

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

github-actions[bot] avatar Jan 22 '22 17:01 github-actions[bot]

I found an explanation how to do that here: https://docs.gradle.org/current/userguide/java_library_plugin.html#sec:java_library_modular_auto

oshai avatar Oct 29 '22 17:10 oshai

Add in 3.0.3. please let me know if the issue is resolved.

oshai avatar Oct 29 '22 18:10 oshai

Looks to be good to go. Thanks :)

ascopes avatar Nov 19 '22 17:11 ascopes