Gradle build .class files

Completely new here, have set up paths.
Trying to follow a spring tutorial at this address: https://spring.io/guides/gs/gradle/
It asks me to create two files, Greeter.java and HelloWorld.java in a path …\src\main\java\hello
So in the \hello directory I have 3 files Greeter.java, HelloWorld.java and build.gradle (which comprises of one line: "apply plugin: ‘java’ ").
When I enter ‘gradle build’ into cmd at this directory’s location, a directory build is created in the directory but this directory does not include reports or classes. I assume this means it is not compiling the .java files I have created. Is there something that I’m doing wrong?

I realize that there are likely hundreds of posts like this, I’ve read a few and they haven’t helped.

Your build.gradle should go in the root directory of your project. See the completed example here: https://github.com/spring-guides/gs-gradle/tree/master/complete

Hi Sheng-Long,

Did you ever find out why the reports and classes subdirectories weren’t created? I’m new to gradle and having the same problem using the tutorial at spring.io.

Thanks,
Jackie