Add automatic JPMS modules to Gradle#184
Add automatic JPMS modules to Gradle#184mikomikotaishi wants to merge 2 commits intolavalink-devs:mainfrom
Conversation
|
@topi314 Hi, sorry to bother you again, but could this feature be considered? If not, are there any criteria for alternative solutions that would be acceptable? While I understand that you prefer not to work with JPMS, I believe this is a feasible solution to adding this as it does not require maintenance and does provide a benefit to the library in terms of quality-of-life usage. |
|
I currently have no time to look into this If anyone else wants to state their opinion on this they can do so |
|
It was @devoxin who originally told me what the problem with the previous PR was (that you guys didn't want to maintain JPMS files you had no experience with), but they haven't been active since November, but either way take your time as needed in investigating this |
|
I am aware |
|
What do you need to be able to allow this to be pulled in? |
|
I will add that JDA, which uses Java 8, does this too to support JPMS module-path: https://github.com/discord-jda/JDA/blob/master/build.gradle.kts#L372-L375 val jar by tasks.getting(Jar::class) {
archiveBaseName.set(project.name)
manifest.attributes("Implementation-Version" to project.version, "Automatic-Module-Name" to "net.dv8tion.jda")
} |
Followup to #164. Rather than an actual JPMS module, this creates a JPMS module automatically generated by Gradle (which will automatically export all packages but allow the library to be consumed through module-path rather than class-path). This improves compatibility and ease of use with projects using module-path as prior lavaplayer could not be marked
requiresinmodule-info.java.This shouldn't require any active maintenance as it's all handled by Gradle, and is thus an improvement to #164 as the maintainers won't have update anything manually, and there won't be any breaking changes as the module is build-system generated. I didn't understand @RealMangorage's suggestion at the time but indeed it was the simplest solution, so thanks for that.
I hope that this can be reconsidered, as the previous concern was that the maintainers did not want to maintain JPMS features, but this solution only updates the build system which provides a simpler means to accomplish this and I do not see any maintenance overhead.