IntelliJ's "Rebuild Project" fails for a Gradle project when multi-module buildSrc
Hi,
I am running IntelliJ 2017.3.4 and have configured it to delegate IDE build/run actions to Gradle. IntelliJ is also configured to run tests using the Gradle Test Runner.
I have created a simple Gradle project that imports into IntelliJ perfectly and also builds OK from the command line. However, if I select "Build/Rebuild Project" from IntelliJ then IntelliJ fails at the "Calculate task graph" stage with the message:
"Project 'plugin' not found in root project 'example-project'."
having tried to execute this script from the /tmp directory:
//-- Additional script
projectsEvaluated {
rootProject.project(':').tasks.withType(AbstractCompile) {
outputs.upToDateWhen { false }
}
}
projectsEvaluated {
rootProject.project(':example:').tasks.withType(AbstractCompile) {
outputs.upToDateWhen { false }
}
}
projectsEvaluated {
rootProject.project(':plugin:').tasks.withType(AbstractCompile) {
outputs.upToDateWhen { false }
}
}
allprojects {
tasks.withType(JavaCompile) {
options.compilerArgs += ["-Xlint:deprecation"]
}}
//
The problem appears to be that it is mistaking the "plugin" sub-project within buildSrc for a module within the main project. I have not had any success with the 'idea' Gradle plugin. I have uploaded my example project to https://uploads.services.jetbrains.com/ with filename "breaker-360000100650.tar.xz". (It's only 896b long.)
Can anyone help please?
Thank you,
Chris Rankin
Please sign in to leave a comment.
Thanks for the report, I've submitted https://youtrack.jetbrains.com/issue/IDEA-187904, please follow it for updates. See https://intellij-support.jetbrains.com/hc/articles/207241135 if you are not familiar with YouTrack.