Structuring large project fails with IDEA

Hi

I’m trying the https://docs.gradle.org/release-nightly/samples/sample_structuring_software_projects.html
with the groovy flavor.

From the command line, everything’s OK
From the latest Intellij IDEA, I got an error when clicking on the build task from the gradle panel (on the right)

Could not find method dependencyResolutionManagement() for arguments [settings_brt6v3eq9l4puz7zk2yck6bo1$_run_closure1@6d67dce9] on settings ‘server-application’ of type org.gradle.initialization.DefaultSettings.

I checked the intellij gradle settings, I’m using the gradle wrapper properties and everything is delegated to gradle

What am I missing please ?

thank you

PS: the kotlin-dsl version fails too.

Update 14.12.2020 : that’s because when double-clicking the task, Intellig create a Run Configuration whose Gradle Projet is server-application:app and task bootRun
When using Run Anything, the Run Configuration is configured with the root projet samplexxxxxx and Task is :server-application:app:bootRun

I’m having the same issue and frankly I don’t think that the workaround you put in your update is good enough. I would like to run tests by using the play button feature in idea and that is currently not working due to this issue.

Somehow the configuration of the gradle project is different when run by idea than when running it on the command line, because there tests run just fine.
Any new ideas?

Update: updating intellij idea fixed it.

you were faster tan me :slight_smile:
Yes gradle announced that IDE support will come back a bit after
I’m glad to hear that idea is now up-to-date (bravo !)

Unfortunately there are other flaky issues around composit builds in intellij, where building with gradle via cli works fine, but the build (hammer) button in intellij breaks on missing plugins (which are part of the included build).

Directly running build commands through intellij works fine, but I guess that is basically the same thing as directly running on CLI