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

[JPMS 支持] 目前SDK缺少稳定模块名称, 在特殊境况下无法构建 (gradle) #18

Open
syrm-ll opened this issue Feb 18, 2023 · 0 comments

Comments

@syrm-ll
Copy link

syrm-ll commented Feb 18, 2023

gradle 构建报错

gradle 7.6 + JPMS 环境

image

原因就是 gradle 违反了自动模块解析规则, 拒绝解析依赖文件名的自动模块. 虽是构建工具的问题, 但是建议SDK支持下JPMS
简单点的就在 JDK 清单文件里添加 Automatic-Module-Name 即可
完整支持可以考虑用 https://openjdk.org/jeps/238#Classpath-and-modulepath 添加 module-info.java

如果现在不支持, gradle 无法使用, maven 会依赖文件名解析模块名
将来如果指定的模块名称和文件名解析的不一致又会导致一波报错~

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

1 participant