Building Groovy projects
Let's first implement the QotdService
interface in Groovy. Also, we will write some unit tests to make sure that the functionality works as expected. To start the project, let's create the directory structure as follows:
qotd-groovy ├── build.gradle └── src ├── main │ ├── groovy │ │ └── com │ │ └── packtpub │ │ └── ge │ │ └── qotd │ │ └── GroovyQotdService.groovy │ └── java │ └── com │ └── packtpub │ └── ge │ └── qotd │ └── QotdService.java └── test └── groovy └── com └── packtpub └── ge └── qotd └── GroovyQotdServiceTest.groovy
The src/main/java
directory is the default directory for Java sources. Similarly, src/main/groovy
is used by default to compile Groovy source files...