I just started trying out gradle for java. The documentation for the java plugin says that the default source folder is src/main/java, which to my understanding should be in the following structure:
|-build.gradle
|-src
|-main
|-java
This is my groovy code for the build.gradle file.
And this is a picture of my file structure
Why is it that I have to specifically list out the full path including the src/main/java
in my jar.mainfile
attribute instead of just Backend.Main
? Shouldn't gradle automatically assume the source folder portion of the file path?
Edit: as the code is right now, I can build my jar file properly, but when I go to run it, I hit a ClassNotFoundException.