Gradle Effective Implementation Guide

A must-read for Java developers, this book will bring you bang up to date in the techniques of build automation using Gradle. A fully hands-on approach makes learning natural and entertaining.

Gradle Effective Implementation Guide

Hubert Klein Ikkink

1 customer reviews
A must-read for Java developers, this book will bring you bang up to date in the techniques of build automation using Gradle. A fully hands-on approach makes learning natural and entertaining.
Mapt Subscription
FREE
$29.99/m after trial
eBook
$18.90
RRP $26.99
Save 29%
Print + eBook
$44.99
RRP $44.99
What do I get with a Mapt Pro subscription?
  • Unlimited access to all Packt’s 5,000+ eBooks and Videos
  • Early Access content, Progress Tracking, and Assessments
  • 1 Free eBook or Video to download and keep every month after trial
What do I get with an eBook?
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with Print & eBook?
  • Get a paperback copy of the book delivered to you
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with a Video?
  • Download this Video course in MP4 format
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
$0.00
$18.90
$44.99
$29.99p/m after trial
RRP $26.99
RRP $44.99
Subscription
eBook
Print + eBook
Start 30 Day Trial
Subscribe and access every Packt eBook & Video.
 
  • 5,000+ eBooks & Videos
  • 50+ New titles a month
  • 1 Free eBook/Video to keep every month
Start Free Trial
 
Preview in Mapt

Book Details

ISBN 139781849518109
Paperback382 pages

Book Description

Gradle is the next generation in build automation. It uses convention-over-configuration to provide good defaults, but is also flexible enough to be usable in every situation you encounter in daily development. Build logic is described with a powerful DSL and empowers developers to create reusable and maintainable build logic.

"Gradle Effective Implementation Guide" is a great introduction and reference for using Gradle.  The Gradle build language is explained with hands on code and practical applications. You learn how to apply Gradle in your Java, Scala or Groovy projects, integrate with your favorite IDE and how to integrate with well-known continuous integration servers.

Start with the foundations and work your way through hands on examples to build your knowledge of Gradle to skyscraper heights. You will quickly learn the basics of Gradle, how to write tasks, work with files and how to use write build scripts using the Groovy DSL. Then as you develop you will be shown how to use Gradle for Java projects. Compile, package, test and deploy your applications with ease. When you’ve mastered the simple, move on to the sublime and integrate your code with continuous integration servers and IDEs. By the end of the "Gradle Effective Implementation Guide" you will be able to use Gradle in your daily development. Writing tasks, applying plugins and creating build logic will be second nature.

Table of Contents

Chapter 1: Starting with Gradle
Introducing Gradle
Getting started
Writing our first build script
Default Gradle tasks
Task name abbreviation
Executing multiple tasks
Command-line options
Understanding the Gradle user interface
Summary
Chapter 2: Creating Gradle Build Scripts
Writing a build script
Defining tasks
Build scripts are Groovy code
Defining dependencies between tasks
Setting default tasks
Organizing tasks
Adding tasks in other ways
Accessing tasks as project properties
Adding additional properties to tasks
Avoiding common pitfalls
Skipping tasks
Summary
Chapter 3: Working with Gradle Build Scripts
Working with files
Project properties
Using logging
Using the Gradle wrapper
Summary
Chapter 4: Using Gradle for Java Projects
Using plugins
Getting started
Using the Java plugin
Working with source sets
Working with properties
Creating documentation
Assembling archives
Summary
Chapter 5: Dependency Management
Dependency configuration
Repositories
Defining dependencies
Summary
Chapter 6: Testing, Building, and Publishing Artifacts
Testing
Running Java applications
Publishing artifacts
Packaging Java Enterprise Edition applications
Summary
Chapter 7: Multi-project Builds
Working with multi-project builds
Working with Java multi-project builds
Using the Jetty plugin
Summary
Chapter 8: Mixed Languages
Using the Groovy plugin
Using the Scala plugin
Summary
Chapter 9: Maintaining Code Quality
Using the Checkstyle plugin
Using the PMD plugin
Using the FindBugs plugin
Using the JDepend plugin
Using the CodeNarc plugin
Using the Sonar plugin
Summary
Chapter 10: Writing Custom Tasks and Plugins
Creating a custom task
Creating a task in the project source directory
Creating a task in a standalone project
Creating a custom plugin
Creating a plugin in the project source directory
Creating a plugin in a standalone project
Summary
Chapter 11: Using Gradle with Continuous Integration
Creating a sample project
Using Jenkins
Using JetBrains TeamCity
Using Atlassian Bamboo
Summary
Chapter 12: IDE Support
Using the Eclipse plugin
Using the IntelliJ IDEA plugin
Running Gradle in Eclipse
Running Gradle in IntelliJ IDEA
Summary

What You Will Learn

  • Create Gradle build scripts from clear examples
  • Write build logic with the Gradle build language
  • Compile, test and check your Java, Scala and Groovy applications
  • Write your own custom tasks and plugins
  • Use Gradle on continous integrations servers Jenkins, TeamCity and Bamboo
  • Integrate Gradle with Eclipse and IntelliJ IDEA

Authors

Table of Contents

Chapter 1: Starting with Gradle
Introducing Gradle
Getting started
Writing our first build script
Default Gradle tasks
Task name abbreviation
Executing multiple tasks
Command-line options
Understanding the Gradle user interface
Summary
Chapter 2: Creating Gradle Build Scripts
Writing a build script
Defining tasks
Build scripts are Groovy code
Defining dependencies between tasks
Setting default tasks
Organizing tasks
Adding tasks in other ways
Accessing tasks as project properties
Adding additional properties to tasks
Avoiding common pitfalls
Skipping tasks
Summary
Chapter 3: Working with Gradle Build Scripts
Working with files
Project properties
Using logging
Using the Gradle wrapper
Summary
Chapter 4: Using Gradle for Java Projects
Using plugins
Getting started
Using the Java plugin
Working with source sets
Working with properties
Creating documentation
Assembling archives
Summary
Chapter 5: Dependency Management
Dependency configuration
Repositories
Defining dependencies
Summary
Chapter 6: Testing, Building, and Publishing Artifacts
Testing
Running Java applications
Publishing artifacts
Packaging Java Enterprise Edition applications
Summary
Chapter 7: Multi-project Builds
Working with multi-project builds
Working with Java multi-project builds
Using the Jetty plugin
Summary
Chapter 8: Mixed Languages
Using the Groovy plugin
Using the Scala plugin
Summary
Chapter 9: Maintaining Code Quality
Using the Checkstyle plugin
Using the PMD plugin
Using the FindBugs plugin
Using the JDepend plugin
Using the CodeNarc plugin
Using the Sonar plugin
Summary
Chapter 10: Writing Custom Tasks and Plugins
Creating a custom task
Creating a task in the project source directory
Creating a task in a standalone project
Creating a custom plugin
Creating a plugin in the project source directory
Creating a plugin in a standalone project
Summary
Chapter 11: Using Gradle with Continuous Integration
Creating a sample project
Using Jenkins
Using JetBrains TeamCity
Using Atlassian Bamboo
Summary
Chapter 12: IDE Support
Using the Eclipse plugin
Using the IntelliJ IDEA plugin
Running Gradle in Eclipse
Running Gradle in IntelliJ IDEA
Summary

Book Details

ISBN 139781849518109
Paperback382 pages
Read More
From 1 reviews

Read More Reviews

Recommended for You

Mastering Web Application Development with AngularJS Book Cover
Mastering Web Application Development with AngularJS
$ 26.99
$ 5.40
Groovy 2 Cookbook Book Cover
Groovy 2 Cookbook
$ 29.99
$ 21.00
Groovy for Domain-Specific Languages Book Cover
Groovy for Domain-Specific Languages
$ 26.99
$ 18.90
Responsive Web Design with HTML5 and CSS3 Book Cover
Responsive Web Design with HTML5 and CSS3
$ 23.99
$ 4.80
3D Game Development with Microsoft Silverlight 3: Beginner's Guide Book Cover
3D Game Development with Microsoft Silverlight 3: Beginner's Guide
$ 29.99
$ 21.00
Apache Maven 3 Cookbook Book Cover
Apache Maven 3 Cookbook
$ 23.99
$ 16.80