Creating a sample project
Before we can see the support for Gradle in the several continuous integration servers, we must have a sample project. We are going to create a very simple Java project with a test class and add it to a Git repository, in this section.
We already created a Java project earlier. We are going to re-use the code in this chapter for our sample project. We want to have a test in our project, so that we can see how the continuous integration tools can handle test results. Finally, we want to have more than one artifact for our project; we want to have a JAR file with the compiled classes, source code, and Javadoc generated documentation.
We first create a build.gradle
file in a directory, with the following contents:
// We create a Java project so we need the Java plugin apply plugin: 'java' // Set base name for archives. archivesBaseName = 'gradle-sample' // Version of the project. version = '1.0' // Definine Maven central repository for downloading // dependencies....