The first step is to create the Kioto project. Create a directory called kioto. Go to that directory and execute the following command:
$ gradle init --type java-library
The output is something like the following:
Starting a Gradle Daemon (subsequent builds will be faster)
BUILD SUCCESSFUL in 3s
2 actionable tasks: 2 execute BUILD SUCCESSFUL
Gradle creates a default project in the directory, including two Java files called Library.java and LibraryTest.java; delete both files.
Your directory should be similar to the following:
- - build.gradle
- - gradle
- -- wrapper
- --- gradle-wrapper.jar
- --- gradle-vreapper.properties
- - gradlew
- - gradle.bat
- - settings.gradle
- - src
- -- main
- --- java
- ----- Library.java
- -- test
- --- java
- ----- LibraryTest.java
Modify the build.gradle file and replace it with Listing 4.2.
The following is the content of Listing 4.2, the Kioto Gradle build...