This is a compiled list of improvements to the content of the published book "Gradle in Action". If you think a particular topic is not explained well enough or simply wrong, please post a message to the author online forum.
Windows: In the dialog environment variable, define the variable GRADLE_HOME and update your path settings (figure 2.9).
should be
Windows: In the Environment Variables dialog, define the variable GRADLE_HOME and update your path settings (figure 2.9).
The runtime behavior of the Gradle daemon can be explained in more detail. The following paragraph is more explicit about its use from the command line:
Subsequent invocations of the
gradle
command will now reuse the daemon process. Give it a shot and try runninggradle groupTherapy --daemon
. Wow, you got your startup and execution time down to about one second! Keep in mind…
should be
Give it a shot and try running
gradle groupTherapy --daemon
. Wow, you got your startup and execution time down to about one second! Subsequent invocations of thegradle
command will need to declare the--daemon
option explicitly. In practice you might want to configure the daemon with the help of a system properties to reuse an already started daemon process. For more information on the daemon’s configuration, check out the online documentation at http://www.gradle.org/docs/current/userguide/build_environment.html#sec:gradle_configuration_properties. Keep in mind…
We explored how running Gradle can be a huge timesaver if you have to continuously execute tasks, such as during test-driven development.
should be
We explored how running Gradle with the daemon can be a huge timesaver if you have to continuously execute tasks, such as during test-driven development.
"As you provide any unit tests in…, Gradle happily moves on."
should be
"As you didn’t provide any unit tests in…, Gradle happily moves on."
As the sample project doesn’t provide any unit tests, the reports
directory won’t exist after running a full build.
. ├── build │ ├── classes │ │ └── main │ │ └── com │ │ └── manning │ │ └── gia │ │ └── todo │ │ ├── ToDoApp.class │ │ ├── model │ │ │ └── ToDoItem.class │ │ ├── repository │ │ │ ├── InMemoryToDoRepository.class │ │ │ └── ToDoRepository.class │ │ └── utils │ │ ├── CommandLineInput.class │ │ ├── CommandLineInputHandler$1.class │ │ └── CommandLineInputHandler.class │ ├── dependency-cache │ ├── libs │ │ └── todo-app.jar │ └── tmp │ └── jar │ └── MANIFEST.MF ├── build.gradle └── src
Missing letter "d" in method name.
At the time of writing, you only need to implement one method:
graphPopulate(TaskExecutionGraph)
.
should be
At the time of writing, you only need to implement one method:
graphPopulated(TaskExecutionGraph)
.
The syntax for declaring a custom Maven repository was incorrect. There should be no comma and closing parenthesis.
repositories { mavenCentral() maven { name 'Custom Maven Repository' url 'http://repository-gradle-in-action.forge.cloudbees.com/release/' } }
"In fact, it’s a build script itself that’s executed during the evaluation phase of the build lifecycle."
should be
"In fact, it’s a build script itself that’s executed during the initialization phase of the build lifecycle."
The first two task names of the graph (light blue boxes) are incorrect. They should be called compileJava
and processResources
instead of compileTestJava
and processTestResources
.
The plugin implementation described in chapter 8 relies on RUN@Cloud for deploying and hosting a web application. Unfortunately, Cloudbees decided to decommission their service RUN@Cloud on December 31, 2014.
What does this mean for readers of this chapter?
-
You cannot create an account on RUN@Cloud anymore as described in section 8.1.
-
The business logic implemented by the plugin described in chapter 8 will not work as is.
-
The Gradle concepts explained in chapter 8 are still highly relevant for Gradle plugin development and are applicable outside of the context used to demonstrate deployment and web application management functionality.
If you want to follow along with the content and try to run the examples, I’d suggest you select a different PaaS provider with similar capabilities. I won’t give any suggestions here as they might get easily outdated as well. A Google should provide you with same valid proviers. If you don’t want to rely on an external provide, you could also rewrite the plugin such that it deploys the application to a local instance of Apache Tomcat by making calls to the Tomcat manager.
For more information on their characteristics, please see appendix B or the online documentation.
should be
For more information on their characteristics, please see the online documentation.
As shown in listing 8.12, you need to extend the backing
Project
of the build script that applied the CloudBees plugin. Extension-aware objects expose the methodextensions()
that returns a container for registering extension models with a name.
should be
As shown in listing 8.14, you need to extend the backing
Project
of the build script that applied the CloudBees plugin. Extension-aware objects expose the methodgetExtensions()
that returns a container for registering extension models with a name.
At that point of time extension, values haven’t been populated.
This sentence shouldn’t have a comma.
The class AntBuilder
is an abstract class and therefore cannot be instantiated. To create an instance of type AntBuilder
from a regular class, you will need to use Groovy’s AntBuilder
implementation. Gradle’s AntBuilder implementations aren’t part of the public API. Using internal Gradle classes is not a recommended practice as the class or package might change with a later version of Gradle.
def ant = new org.gradle.api.AntBuilder()
should be
def ant = new groovy.util.AntBuilder()
$ gradle clean dist :init :compile :sourcesJar :dist
should be
$ gradle clean dist :clean :init :compile :sourcesJar :dist
Create a new directory, create a
pom.xml
file, and copy the contents of listing 9.11 into it.
should be
Create a new directory, create a
pom.xml
file, and copy the contents of listing 9.10 into it.
The image doesn’t properly render the jshint
assignment. It should say all: ['src/main/webapp/js/app/*.js']
. The title Gruntfile.js
is partially cut off.
The image shows a different build number for each build step e.g. #11 todo-initial
, #4 todo-integ-tests
. However,
with the proper configuration each build step should use the build number defined by the initial step of the pipeline e.g. #11 todo-initial
, #11 todo-integ-tests
.
As the build step, you want to trigger the execution of your integration tests. Add a build step for invoking your Gradle script using the wrapper and enter the task
databaseIntegrationTest
.
should be
As the build step, you want to trigger the execution of your integration tests. Add a build step for invoking your Gradle script using the wrapper and enter the task
integrationTest
.