Shop the new tech.book(store)
New! Introducing the tech.book(store), a hub for Software Developers and Architects, Networking Administrators, TPMs, and other technology professionals to find highly-rated and highly-relevant career resources. Shop books on programming and big data, or read this week's blog posts by authors and thought-leaders in the tech industry.
> Shop now
Build and test software written in Java and many other languages with Gradle, the open source project automation tool that’s getting a lot of attention. This concise introduction provides numerous code examples to help you explore Gradle, both as a build tool and as a complete solution for automating the compilation, test, and release process of simple and enterprise-level applications.
Discover how Gradle improves on the best ideas of Ant, Maven, and other build tools, with standards for developers who want them and lots of flexibility for those who prefer less structure.
Use Gradle with Groovy, Clojure, Scala, and languages beyond the JVM, such as Flex and C
Get started building a simple Java program using Gradle's command line tooling and a small build script
Learn how to configure and construct tasks, Gradle's fundamental unit of build activity
Take advantage of Gradle's integration with Ant
Use Gradle to integrate with or transition from Maven, and to build software more cleanly
Perform application unit and integration tests using JUnit, TestNG, Spock, and Geb
{"itemData":[{"priceBreaksMAP":null,"buyingPrice":22.49,"ASIN":"144930463X","isPreorder":0},{"priceBreaksMAP":null,"buyingPrice":36.39,"ASIN":"1449305350","isPreorder":0},{"priceBreaksMAP":null,"buyingPrice":21.33,"ASIN":"1449316387","isPreorder":0}],"shippingId":"144930463X::yCQKjRUOCRdsVg3g7XXRUtMznkkAIfqM%2BQYEgqFH4onVvYhBetCNFxKCCSAbw8lztWQA3K4Qyk81ctVbiug%2FRXMWq%2B2%2BdpNp7PNLIoCa6R01b1iL5I0yRw%3D%3D,1449305350::qXuorzMiwDZgBtieDAgASXGlKL9NfsUCXmA8dO6laPP65aN%2BvdFa0fn9eMGbaTg%2BqwIRUZelDCqZOZYfibdiE6ZF3PU1YhEHybpdkPpcZgoQ5yRTJEGIaw%3D%3D,1449316387::YQd9Fk%2B1OQtckV990bSBh%2FFiUS4j609gJo884DoXbBJflvVUHnuQTmmZl752MyC2t4eFmiw4Ujt625U%2BpwUJY5teXkdn%2BIIz5xBxeGmKZAbW093gvBX37Q%3D%3D","sprites":{"addToWishlist":["wl_one","wl_two","wl_three"],"addToCart":["s_addToCart","s_addBothToCart","s_add3ToCart"],"preorder":["s_preorderThis","s_preorderBoth","s_preorderAll3"]},"currenyCode":"USD","shippingDetails":{"xz":"availability","yz":"same","xy":"availability","xyz":"availability"},"tags":["x","y","z"],"strings":{"showDetails":"Show details","differentAvailabilityAll":"Some of these items ship sooner than the others.","addToWishlist":["add to wishlist","Add both to Wish List","Add all three to Wish List"],"shippingError":"An error occurred, please try again","differentAvailability":"One of these items ships sooner than the other.","preorder":["Pre-order this item","Pre-order both items","Pre-order all three items"],"addToCart":["Add to Cart","Add both to Cart","Add all three to Cart"],"showDetailsDefault":"Show availability and shipping details","priceLabel":["Price:","Price for both:","Price for all three:"],"hideDetailsDefault":"Hide availability and shipping details","hideDetails":"Hide details"}}
Tim is a full-stack generalist and passionate teacher who loves coding, presenting, and working with people. He is founder and principal software developer at the August Technology Group, a technology consulting firm focused on the JVM. He is a speaker internationally and on the No Fluff Just Stuff tour in the United States, co-presenter of the best-selling O'Reilly Git Master Class, and is co-president of the Denver Open Source User Group. He has recently been exploring build automation, non-relational data stores, and abstract ideas like how to make software architecture look more like an ant colony. He lives in Littleton, CO with the wife of his youth and their three children.
Matthew McCullough is an energetic 15-year veteran of enterprise software development, world-traveling open source educator, and co-founder of Ambient Ideas, LLC, a US consultancy. Matthew currently is a trainer for Gradleware, educator for GitHub.com, author of the Git Master Class series for O'Reilly, speaker on the No Fluff Just Stuff tour, author of three of the top 10 DZone RefCards, including the Git RefCard, and President of the Denver Open Source Users Group.
His current topics of research center around project automation, including: build tools (Gradle, Leiningen, Maven, Ant), distributed version control (Git, Mercurial), testing frameworks (Geb, Spock, JUnit, TestNG, Mockito), continuous integration (Jenkins, Hudson, Bamboo) and code quality metrics (Sonar, CodeNarc, PMD).
Matthew McCullough is an energetic 14 year veteran of enterprise software development, open source education, vice president of Training at GitHub, and co-founder of Ambient Ideas, LLC, a Denver consultancy. Matthew currently is a member of the JCP, reviewer for technology publishers including O'Reilly, author of the Presentation Patterns & Anti-Patterns book, multi-year speaker on the No Fluff Just Stuff tour, author of the DZone Maven, Git & Google App Engine RefCards. He channels his teaching energy through activities as President of the Denver Open Source Users Group.
Matthew loves technology, but has always had a parallel passion for teaching technical topics. He's struggled with the same challenges that any presenter would -- assembly of slides, hardware meltdowns, venue catastrophes, audience attentiveness, and acceptance to international venues he never thought would actually say yes. Matthew is excited to share these learning experiences and concrete solutions to the challenges in both story and recipe form in this book.
Matthew resides in Denver with his beautiful wife and daughter, who are active in nearly every outdoor activity Colorado offers. He writes frequently on software and presenting.
The book's synopsis is true to its contents. It does not over-promise and delivers exactly what it says it will. If you've never used Gradle before, this book will teach you the basics of building and testing.
I would recommend this book only to individuals who don't have any prior Ant / Maven / Gradle experience and prefer reading a book than reading the on-line documentation. For everyone else I'd recommend reading the on-line documentation thoroughly, downloading Gradle and becoming familiar with the samples that are packaged with the standard distribution.
In my case, I had already been using Gradle for a couple of months and had a solid understanding of the basics, so I was a bit disappointed to find most of my intermediate / advanced questions were not addressed. Gradle is capable of offering a lot more than building and testing but there's virtually nothing in this book addressing topics like configuration, deployment or integration testing.
I was also surprised to find that there's virtually no coverage of some of the more popular plug-ins such as war, ear, jetty, tomcat, cobertura, etc. The only plug-in that is covered extensively is the Maven plug-in - there's an entire chapter devoted to it. The testing chapter covers junit, testng, spock, easyb and geb -- albeit very very basic information is provided.
In short, chances are that if you're looking for a Gradle book you already know a the basics. You've done a little research and compared it to Ant, Maven and Buildr. You're past the hello world examples and are looking for something with a bit more depth. And if that's your case, then you're like me and will probably not benefit much from this book.
As others have written, this book doesn't approach the complexity of building software projects and competently building such projects is largely about managing complexity. While it may not be fair to judge the book for its simplistic treatment of the topic (after all it is *really short* and meant to be a sort of introductory volume), it is a tremendous shortcoming. For people with some passing familiarity with Gradle but who want to study it in-depth and apply it to real-world problems, this book doesn't provide much assistance.
But even as an introductory volume the book falls short: it assumes the reader has familiarity with current build tools (Maven and Ant with Ivy) and knows how to use them. For the reader who does meet these criteria, Gradle's own online documentation provides much more useful information about getting started than this book does. For the reader who has very little previous build tool experience, the book assumes too much to be useful. In this way it fails to provide a proper introduction to Gradle and should probably be avoided.
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 does cover the basics in the obvious ways:
Hello, Gradle! Gradle Tasks Ant and Gradle Maven and Gradle Testing with Gradle 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.