Welcome to Gradle Beyond the Basics, the second book in the OâReilly Gradle series. This book picks up from its predecessor, Building and Testing with Gradle, and takes you further into the Gradle programming model. We offer the recipes, techniques, and syntax that make Gradle more than just free-form scripting, and place your build instead on the foundation of a strong domain model. The difference is, it is your domain model, not a generic one from some build tool that is ignorant of the specifics of your project.
Having introduced you to the basic elements of Gradle in the first book, we can begin to explore the toolâs capabilities a bit more deeply. We will cover four discrete areas of Gradle functionality: file operations, custom Gradle plug-ins, build lifecycle hooks, and dependency management. We assume that you are familiar with the basics of how to use Gradle, and with a keen respect of your time and interest, offer no further introduction to the mechanics of simple Gradle builds. If you are brand new to the topic, you should definitely read Building and Testing first.
The Gradle APIs are rich, the possibilities for DSLs matching your domain are abundant, and the path towards finally having a build system that conforms to your product is clear. Letâs move forward.
The following typographical conventions are used in this book:
- Italic
- Indicates new terms, URLs, email addresses, filenames, and file extensions.
-
Constant width
- Used for program listings, as well as within paragraphs to refer to program elements such as variable or function names, databases, data types, environment variables, statements, and keywords.
-
Constant width bold
- Shows commands or other text that should be typed literally by the user.
-
Constant width italic
- Shows text that should be replaced with user-supplied values or by values determined by context.
Tip
This icon signifies a tip, suggestion, or general note.
Warning
This icon indicates a warning or caution.
Note
Safari Books Online is an on-demand digital library that delivers expert content in both book and video form from the worldâs leading authors in technology and business.
Technology professionals, software developers, web designers, and business and creative professionals use Safari Books Online as their primary resource for research, problem solving, learning, and certification training.
Safari Books Online offers a range of product mixes and pricing programs for organizations, government agencies, and individuals. Subscribers have access to thousands of books, training videos, and prepublication manuscripts in one fully searchable database from publishers like OâReilly Media, Prentice Hall Professional, Addison-Wesley Professional, Microsoft Press, Sams, Que, Peachpit Press, Focal Press, Cisco Press, John Wiley & Sons, Syngress, Morgan Kaufmann, IBM Redbooks, Packt, Adobe Press, FT Press, Apress, Manning, New Riders, McGraw-Hill, Jones & Bartlett, Course Technology, and dozens more. For more information about Safari Books Online, please visit us online.
Please address comments and questions concerning this book to the publisher:
OâReilly Media, Inc. |
1005 Gravenstein Highway North |
Sebastopol, CA 95472 |
800-998-9938 (in the United States or Canada) |
707-829-0515 (international or local) |
707-829-0104 (fax) |
We have a web page for this book, where we list errata, examples, and any additional information. You can access this page at http://oreil.ly/gradle-btb.
To comment or ask technical questions about this book, send email to bookquestions@oreilly.com.
For more information about our books, courses, conferences, and news, see our website at http://www.oreilly.com.
Find us on Facebook: http://facebook.com/oreilly
Follow us on Twitter: http://twitter.com/oreillymedia
Watch us on YouTube: http://www.youtube.com/oreillymedia
I would like to extend my thanks to my team of excellent tech editors who contributed ably to the quality of this book: Jason Porter, Spencer Allain, Darin Pope, and Rod Hilton. Special thanks go to Luke Daley, who didnât just edit, but provided significant rewrites to the chapter on dependency management when the original version didnât quite capture the spirit of the subject matter. Luke was also a willing helper on the other end of a Skype chat window on more than one occasion when I had a technical question about some Gradle internal or other. He is a valued friend with whom I look forward to more collaboration in the future.
Additional thanks go to my friend, Matthew McCullough, for his early contributions to the chapter on Build Hooks. Matthew has a long history in the build tool space, and his insights into build metaprogramming were no small help in getting that chapter right.
Thanks of course to the longsuffering Hans Docktor, who waited perhaps a year longer than expected to get this book. It is likewise always a pleasure to work with him and to call him my friend.
I am obligated to acknowledge my editor, Meghan Blanchette, but in this case the obligation is one I receive willingly. If Meghan and I work together on another book, she may want to create some automation around the emails she sends to me asking if I am going to keep my latest deadline, so frequent are those checkups. I will still enjoy hearing from her.
I tend to write very early in the morning, so my wife, Kari, never actually saw me work on this volume. She did, however, experience more than one spate of her husband falling asleep at 9:00 pm for many days on end so he could wake up early the next day and write. My thanks, and her name in print, is the least I can offer.
To Hannah and Sarah: Proverbs 14:26.
Get Gradle Beyond the Basics now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.