Gradle build two projects (project with Name and a project lib)

Viewed 2025

today I have tried to create a Gradle Project in Eclipse. If the build process was finished the result was two seperate folders for no reason.

Gradle build a lib folder and a project folder. (Picture) I dont find any soultion. How can I force Gradle to build all in one like before?`

enter image description here

enter image description here

4 Answers

You have a build.gradle file in the lib folder, so it is probably interpreted as a gradle project itself. Maybe your main project has the lib folder registered as a sub-project? You can check the content of the settings.gradle file.

The build.gradle file should probably be in the JUnitTestTutorial folder, next to the settings.gradle. The settings.gradle should not include any project as it IS the project.

I had to move the build.gradle and the src folder from lib to my project, then delete lib. I also removed the include for lib from gradle.settings. Restart Eclipse and it sorted itself out, including dependencies.

What I did is I uninstalled Gradle and Eclipse, and I reinstalled the latest Eclipse and Gradle 6.8 and when creating the project, and I gave the JAVA_HOME path also.

Related