Errata for the Manning book "Gradle in Action"
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
README.asciidoc

README.asciidoc

Errata for "Gradle in Action"

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.

Page 38, section 2.4, second bullet point

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).

Page 46, section 2.6.4, last paragraph

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 running gradle 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 the gradle 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…​

Page 47, summary

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.

Page 56, text paragraph

"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."

Page 56, command line output

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

Page 102, first sentence (starting on page 103)

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).

Page 124, listing 5.9

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/'
    }
}

Page 155, first text paragraph

"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."

Page 161, figure 7.4

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.

Page 191, chapter 8

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.

Page 214, call-out box

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.

Page 215, second text paragraph

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 method extensions() 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 method getExtensions() that returns a container for registering extension models with a name.

Page 215, third text paragraph

At that point of time extension, values haven’t been populated.

This sentence shouldn’t have a comma.

Page 225, first code snippet

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()

Page 231, first console output

$ gradle clean dist
:init
:compile
:sourcesJar
:dist

should be

$ gradle clean dist
:clean
:init
:compile
:sourcesJar
:dist

Page 241, paragraph "Using the Maven2Gradle task"

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.

Page 294, figure 11.1

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.

Page 356, figure 13.26

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.

Page 357, step 2: integration 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.