I created a Java project and used Gradle to structure it with a source folder and a build folder with generated files.
Then I checked in the project using Git and checked it out on another computer. But on this second computer, I can’t run this Java project since my src/ folder is not selected as a Source folder. How can I do this? should I have done anything different on the project setup using Gradle?
My build.gradle just contains these lines:
apply plugin: 'eclipse'
apply plugin: 'java'
When I try to run my computer on my second computer I get this error message:
Selection does not contain a main type
but it runs well on my first computer.
By default, the Java plugin assumes that production sources are located under
src/main/java/. If they are located undersrc/, you’ll have to let Gradle know: