Gradle Effective Implementations Guide - Second Edition

A comprehensive guide to get up and running with build automation using Gradle

Gradle Effective Implementations Guide - Second Edition

This ebook is included in a Mapt subscription
Hubert Klein Ikkink

A comprehensive guide to get up and running with build automation using Gradle
$0.00
$18.00
$44.99
$29.99p/m after trial
RRP $35.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 139781784394974
Paperback368 pages

Book Description

Gradle is a project automation tool that has a wide range of applications. The basic aim of Gradle is to automate a wide variety of tasks performed by software developers, including compiling computer source code to binary code, packaging binary codes, running tests, deploying applications to production systems, and creating documentation.

The book will start with the fundamentals of Gradle and introduce you to the tools that will be used in further chapters. You will learn to create and work with Gradle scripts and then see how to use Gradle to build your Java Projects. While building Java application, you will find out about other important topics such as dependency management, publishing artifacts, and integrating the application with other JVM languages such as Scala and Groovy.

By the end of this book, you will be able to use Gradle in your daily development. Writing tasks, applying plugins, and creating build logic will be your second nature.

Table of Contents

Chapter 1: Starting with Gradle
Declarative builds and convention over configuration
Getting started
Writing our first build script
Default Gradle tasks
Task name abbreviation
Executing multiple tasks
Command-line options
Understanding the Gradle graphical 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
Why plugins?
Getting started with the Java plugin
Working with source sets
Working with properties
Creating Javadoc documentation
Summary
Chapter 5: Dependency Management
Dependency configuration
Repositories
Defining dependencies
Summary
Chapter 6: Testing, Building, and Publishing Artifacts
Testing our projects
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
Summary
Chapter 10: Writing Custom Tasks and Plugins
Creating a custom task
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: Gradle in the Enterprise
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

  • Write your first Gradle Script
  • Write build logic with the Gradle build language
  • Explore the Java plugins supported by Gradle
  • Understand dependency management in Gradle
  • Package and publish your (web) application
  • Integrate Scala and Groovy with Gradle
  • Write your own custom tasks and plugins
  • Integrate Gradle with your IDE

Authors

Table of Contents

Chapter 1: Starting with Gradle
Declarative builds and convention over configuration
Getting started
Writing our first build script
Default Gradle tasks
Task name abbreviation
Executing multiple tasks
Command-line options
Understanding the Gradle graphical 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
Why plugins?
Getting started with the Java plugin
Working with source sets
Working with properties
Creating Javadoc documentation
Summary
Chapter 5: Dependency Management
Dependency configuration
Repositories
Defining dependencies
Summary
Chapter 6: Testing, Building, and Publishing Artifacts
Testing our projects
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
Summary
Chapter 10: Writing Custom Tasks and Plugins
Creating a custom task
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: Gradle in the Enterprise
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 139781784394974
Paperback368 pages
Read More

Read More Reviews