What is the 'projectConfiguration' property and how do I fix the fact it is missing?

So I am trying to set up a root and sub-project for a implementation relying on an API sub-project, but I keep getting the following error when I refresh dependencies from what I think is me lacking some sort of property setting:

Warning:root project 'Guilds': Unable to resolve additional project configuration.
Details: groovy.lang.MissingPropertyException: Could not get unknown property 'projectConfiguration' for DefaultProjectDependency{dependencyProject='project ':guilds-api'', configuration='default'} of type org.gradle.api.internal.artifacts.dependencies.DefaultProjectDependency.

I tried reading the documentation and finding similar issues but nothing seemed to match. It seems I am supposed to apply some sort of property but I don’t remember having to do that before and I don’t see anything about it on the documentation.

Here is the build.gradle of my root project: https://gist.github.com/Meronat/a3d102272b949d1b02906099e6da7fdb

The settings.gradle of my root project:

rootProject.name = 'Guilds'
include 'guilds-api'

Finally, the build.gradle of my sub-project(The API): https://gist.github.com/Meronat/ce1f0fdf2ff074b4c9c2585848668780

I do not think this is a bug as I reproduced it with Gradle 2.14, 3.5, and the latest 4.0. Just rather something I am missing.

Edit: Due to this problem, the API source set(subproject) is not included in my root project.

Have you tried running Gradle with --stacktrace (-s)? Perhaps that will give you more to go on.

I can reproduce this issue with known good builds, but only via the Tooling API (IDEs) and with recent 4.0 nightly builds.

Does everything work fine at the command line? If so, did you specifically verify that 2.14 and 3.5 were actually picked up and used by the Tooling API?

I had the exact same problem when trying to refresh a Gradle project via Intellij IDEA Ultimate 2017.1 (built March-something). Upgrading to 2017.2 made it go away instantly, after hours of wasted time (Gradle version was 4.0.1 in both cases), so make of that what you will.

I know it’s not 100% relevant to the discussion but maybe it’ll help someone else down the line.

1 Like

I had the same issue with IDEA 2017.1 and Gradle 4. Some modules didin’t import correctly, IDEA ‘Gradle projects’ view didn’t show source sets, and ‘test’ source set wasn’t even added to intellij’s classpath, so running tests under intellij caused ‘empty test suite’ errors.

The only thing I could do was downgrading Gradle to 3.5

Hi,
I am facing the same issue with OPEN JDK 1, gradle 5.5.1.
I am using STS(Spring tool suite) 3.9.9 release version.

Could anyone please help me.

You can replace "projectConfiguration"with “findProjectConfiguration()”.

It works.