Intellij gradle 5.0 refresh/sync warning and root tasks missing

Steve Fitzsimons :

I get the following error after upgrading from gradle 4.10 to 5.0 in my current project

root project 'trunk': Unable to resolve all content root directories</b><eol>Details: org.gradle.api.InvalidUserDataException: The destinationDir property must be set. Please apply the base plugin or set it explicitly.</i>

Intellij no longer picks up the root tasks when using the refresh button in the gradle tool window. The tasks are there and work accordingly if run from command line. The gradle refresh also completes successfully when using intellij (bar the warning listed above). Is it possible to put the gradle refresh in intellij into debug mode to help narrow down where the issue is?

Has anyone came across this error before and managed to resolve it?

Nicolas Spycher :

I had the exact same problem. For me the solution was to apply the base plugin to the projects' root build file.

apply plugin: 'base'

Hope that helps.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=131782&siteId=1