-
Notifications
You must be signed in to change notification settings - Fork 6
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
provide functionality to automatically "export" / "open" all packages #38
Comments
Thanks for the suggestion @hendrikebbers and for the detailed explanation on:
I have been seeing this as well and I wasn't totally sure why this is. In a project, we have been using the dependency-analysis-gradle-plugin to reveal missing implementation dependencies (which in combination with java-module-dependencies means missing I think this is a great proposal and I could use the feature as well. It's probably not too hard to add. The plugin looks inside the Jars already to add the I'll look into implementing this soon. Additional thought (see #40): |
@jjohannes thank you for your response. I'm not familiar with writing gradle plugins. Based on that I can not create such PR but I can test it once it is available. When I can help you with anything just let me know. |
This setting is not available for automatic modules. See #38
This feature is now on main and can be used as follows:
|
@hendrikebbers I just published 1.2 including the enhancement. Let me know if there are any issues. |
Sadly I needed to work on other topics the first weeks of the year but will find some time to look into it the next days. |
We have several dependencies in our project that does not provide any module support. By using your great plugin we can simply convert all that dependencies to be an automatic module:
automaticModule("com.goterl:lazysodium-java", "lazysodium.java")
We (sadly) still have several of that modules and all will be as automatic modules on the module path at compile time. Based on the definition of automatic modules (see overview at https://stackoverflow.com/questions/46741907/what-is-an-automatic-module) we have a limitation:
Based on that we do not get any error at gradle build time when we do not add all the
requires foo.bar
definitions in themodule-info.java
files of our modules. Only onerequires
statement is needed for all automatic modules.Example
At compile time we depend on the
foo
andbar
libs (import statements in our code). Since thefoo
andbar
libs have no module support we use your plugin to define them as automatic modules:Since we have import statements for both libs in our code you would assume that we need to add
requires
statements for both of them. But only anyone of the is needed and based on the definition of automatic modules both can be accessed.What we could to do solve the problem
We could use your api to define the dependency as a "real" module and add exports for all internal packages by hand:
Since this is a lot of work for all Jars it would be great to have a functionally that automatically add exports to all packages of a jar:
Would that be a possible / interesting new feature for the plugin?
The text was updated successfully, but these errors were encountered: