Project 'xxx' not found in root project 'yyy'

Hi Team,

Task executing of an Add-on project in composite project will fail . Following is the exception message:

 Executing ':addon-addon:help'...
FAILURE: Build failed with an exception.
* What went wrong:
Project 'addon-addon' not found in root project 'compoistetest-all'.

And I created a sample project for reproducing the issue.
compoistetest.zip (238.7 KB)

Ray

Hi Ray,

Gradle requires to reference the included build not by its name but by the name of its directory as used in the includeBuild directive.

So when running from the command line the following will work:

./gradlew :addon:addon:classes

To run the same from the Gradle tool window in IDE, you have to rename the add-on’s root project to addon in compoistetest/addon/settings.gradle:

rootProject.name = 'addon'

include 'addon'
include 'addon-starter'
...

We will think how to change the structure and naming of the nested projects in a composite project: Naming of add-on projects in a composite project is not compatible with Gradle task execution · Issue #1492 · jmix-framework/jmix · GitHub

1 Like

Hi Konstantin,

Thanks for your replication.
includeBuild supports for setting project name. We can also modify the ompoistetest/settings.gradle file like following:

includeBuild('../addon'){
    name  name+"-addon"
}

Thank you very much.

Regards,
Ray

1 Like