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
module-info not always compiled at the right time in mixed projects #107
Comments
Thanks for your report, Mike! Unfortunately, I'm unable to reproduce your problem on my own project, where I also have a Could you compare your |
Can I email you the project? |
Yes. You can find my e-mail address at https://tlinkowski.pl/ |
Thanks for your patience, Mike. I verified the problem on the project you sent me - this is indeed a bug in our plugin as well as a quirk of Gradle (which tries to build the root project as early as possible, it seems) Since we're not setting proper dependencies between I'll have to think about how to fix this. For now, I'm afraid you need to set these dependencies manually as a workaround:
def noisejava = project(":com.r3.noise.noisejava")
noisejava.afterEvaluate {
tasks.compileModuleInfoJava.dependsOn(noisejava.tasks.compileModuleInfoJava)
}
def container = project(":com.r3.noise.container")
container.afterEvaluate {
tasks.compileModuleInfoJava.dependsOn(container.tasks.compileModuleInfoJava)
} Let me know if that helps. PS. With the workaround, I get |
I have a project with mixed compilation, as I'm building a library I'd like to be usable on Java 8 as well.
It has two Gradle submodules and top level code at the root project, which depends on both the submodules.
Running
gradle clean build
fails because javac can't find the submodules when compiling module-info.java for the top level module. But if I rungradle com.r3.noise.noisejava:compileModuleInfoJava com.r3.noise.box:compileModuleInfoJava
to force the submodule tasks to run, then I can build just fine until next time I clean. So it seems there's a build dependency missing somewhere.I've attached the output of
gradle -i clean build
problem.log
The text was updated successfully, but these errors were encountered: