Deprecated: Assigning the return value of new by reference is deprecated in /var/www/serverdude.dk/public_html/wp-settings.php on line 512

Deprecated: Assigning the return value of new by reference is deprecated in /var/www/serverdude.dk/public_html/wp-settings.php on line 527

Deprecated: Assigning the return value of new by reference is deprecated in /var/www/serverdude.dk/public_html/wp-settings.php on line 534

Deprecated: Assigning the return value of new by reference is deprecated in /var/www/serverdude.dk/public_html/wp-settings.php on line 570

Strict Standards: Declaration of Walker_Page::start_lvl() should be compatible with Walker::start_lvl(&$output) in /var/www/serverdude.dk/public_html/wp-includes/classes.php on line 1199

Strict Standards: Declaration of Walker_Page::end_lvl() should be compatible with Walker::end_lvl(&$output) in /var/www/serverdude.dk/public_html/wp-includes/classes.php on line 1199

Strict Standards: Declaration of Walker_Page::start_el() should be compatible with Walker::start_el(&$output) in /var/www/serverdude.dk/public_html/wp-includes/classes.php on line 1199

Strict Standards: Declaration of Walker_Page::end_el() should be compatible with Walker::end_el(&$output) in /var/www/serverdude.dk/public_html/wp-includes/classes.php on line 1199

Strict Standards: Declaration of Walker_PageDropdown::start_el() should be compatible with Walker::start_el(&$output) in /var/www/serverdude.dk/public_html/wp-includes/classes.php on line 1244

Strict Standards: Declaration of Walker_Category::start_lvl() should be compatible with Walker::start_lvl(&$output) in /var/www/serverdude.dk/public_html/wp-includes/classes.php on line 1391

Strict Standards: Declaration of Walker_Category::end_lvl() should be compatible with Walker::end_lvl(&$output) in /var/www/serverdude.dk/public_html/wp-includes/classes.php on line 1391

Strict Standards: Declaration of Walker_Category::start_el() should be compatible with Walker::start_el(&$output) in /var/www/serverdude.dk/public_html/wp-includes/classes.php on line 1391

Strict Standards: Declaration of Walker_Category::end_el() should be compatible with Walker::end_el(&$output) in /var/www/serverdude.dk/public_html/wp-includes/classes.php on line 1391

Strict Standards: Declaration of Walker_CategoryDropdown::start_el() should be compatible with Walker::start_el(&$output) in /var/www/serverdude.dk/public_html/wp-includes/classes.php on line 1442

Strict Standards: Redefining already defined constructor for class wpdb in /var/www/serverdude.dk/public_html/wp-includes/wp-db.php on line 306

Deprecated: Assigning the return value of new by reference is deprecated in /var/www/serverdude.dk/public_html/wp-includes/cache.php on line 103

Strict Standards: Redefining already defined constructor for class WP_Object_Cache in /var/www/serverdude.dk/public_html/wp-includes/cache.php on line 431

Deprecated: Assigning the return value of new by reference is deprecated in /var/www/serverdude.dk/public_html/wp-includes/query.php on line 61

Deprecated: Assigning the return value of new by reference is deprecated in /var/www/serverdude.dk/public_html/wp-includes/theme.php on line 1109

Strict Standards: Declaration of Walker_Comment::start_lvl() should be compatible with Walker::start_lvl(&$output) in /var/www/serverdude.dk/public_html/wp-includes/comment-template.php on line 1266

Strict Standards: Declaration of Walker_Comment::end_lvl() should be compatible with Walker::end_lvl(&$output) in /var/www/serverdude.dk/public_html/wp-includes/comment-template.php on line 1266

Strict Standards: Declaration of Walker_Comment::start_el() should be compatible with Walker::start_el(&$output) in /var/www/serverdude.dk/public_html/wp-includes/comment-template.php on line 1266

Strict Standards: Declaration of Walker_Comment::end_el() should be compatible with Walker::end_el(&$output) in /var/www/serverdude.dk/public_html/wp-includes/comment-template.php on line 1266

Strict Standards: Redefining already defined constructor for class WP_Dependencies in /var/www/serverdude.dk/public_html/wp-includes/class.wp-dependencies.php on line 31

Strict Standards: Redefining already defined constructor for class WP_Http in /var/www/serverdude.dk/public_html/wp-includes/http.php on line 61
Building and testing with Gradle « Serverdude
Deprecated: preg_replace() [function.preg-replace]: The /e modifier is deprecated, use preg_replace_callback instead in /var/www/serverdude.dk/public_html/wp-includes/kses.php on line 1002

Deprecated: preg_replace() [function.preg-replace]: The /e modifier is deprecated, use preg_replace_callback instead in /var/www/serverdude.dk/public_html/wp-includes/kses.php on line 1003

Building and testing with Gradle

Written by Tim Berglund and Matthew McCullogh published by O’Reilly, ISBN: 9781449304638

The only book out there on Gradle, and it is relatively new published July 2011. At 110 pages it is rather short, and doesn’t cover everything about Gradle - it’s not a ‘Complete guide to Gradle’, but the 6 chapters cover the basics in the obvious ways:

  1. Hello, Gradle!
  2. Gradle Tasks
  3. Ant and Gradle
  4. Maven and Gradle
  5. Testing with Gradle
  6. Multiproject Builds

The book does provide pointers for migrating from e.g. Maven to Gradle. As I’m not intimately familiar with neither Maven nor Gradle, I can’t really say if it is sufficient to jump from Ant directly into Gradle, or if a quick pit-stop in the Maven (3?) camp is beneficial.

There are a few kind of typos in the book, e.g. Example 1-5 the src directory seems to be a subdirectory of the build.gradle file, this is fixed in Example 1-6 though.

There’s also a minor issue with the doFirst() method - I’d suggest saying that this would prepend or prefix the closure to the existing block as opposed to saying appending to the beginning.

The book is more concise and better organized than the Gradle user guide which seems to do a halfbaked description, then referring to a later chapter.

Running some modified examples from the book - not from the github repository - I experienced a rather detrimental blow up when applying the plugins for Scala and Groovy. The compiler dependencies need to be added to the build file.

Being the only book on the subject it’s sad that it’s not a Complete Guide, but it does fulfill what the title promises, it’s just not enough. An okay read though.

One Response to “Building and testing with Gradle”

  1. Tim Berglund siger:

    Your Serverdudeness,

    Thanks for buying and reading the book. As for your conclusion that it’s just not enough, I am going to have to agree with you! That’s why Matthew and I are hard at work on the sequel, tentatively called Programming Gradle. There’s a lot more you’ll have to know to be a Gradle power user that just couldn’t fit into the first book, given the desire to keep it small. (This lets us favor electronic distribution—which the community is already doing—and lets us get a book out to the community faster, rather than making everyone wait for us to write a longer book.)

    I can’t thank you enough for publishing a review. Keep using Gradle, and email the user list or contact us if you have questions.

    Warmly,
    Tim