Gradle not compiling the Java source code

Hello, I have a build.gradle file, contains one line: " apply plugin: ‘java’ ", in a directory which has two java files in it. When execute the gradle command, "gradle build’, the java files are not being compiled.

What may be the cause?

The default convention assumes that source files are in a subfolder of “src/main/java”.