Preface

Gradle is the next-generation build automation. Not only does Gradle use convention over configuration to provide good defaults, it is also adaptable for use 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.

We will see more about Gradle in this book. We will learn about Gradle's features with code samples throughout the book. We will learn how to write tasks, work with files, and write build scripts using the Groovy DSL. Next, we will learn how to use Gradle in projects to compile, package, test, check code quality and deploy applications. And finally, we will see how to integrate Gradle with continuous integration servers and development environments (IDEs).

After reading this book, we will know how to use Gradle in our daily development. We can write tasks, apply plugins, and write build logic using the Gradle build language.

What this book covers

Chapter 1, Starting with Gradle, introduces Gradle and explains how to install Gradle. We will write our first Gradle script and learn about the command-line and GUI features of Gradle.

Chapter 2, Creating Gradle Build Scripts, looks at tasks as part of the Gradle build scripts. We will see how we can define tasks and use task dependencies to describe build logic.

Chapter 3, Working with Gradle Build Scripts, covers more functionality that we can apply in Gradle scripts. We will learn how to work with files and directories, apply logging to our build scripts, and use properties to parameterize our build scripts.

Chapter 4, Using Gradle for Java Projects, is all about using the Java plugin for Gradle projects. Gradle offers several tasks and configuration conventions that make working with Java projects very easy. We will see how we can customize the configuration for projects that cannot follow the conventions.

Chapter 5, Dependency Management, covers the support for dependencies by Gradle. We will learn how to use configurations to organize dependencies. We will also see how we can use repositories with dependencies in our build scripts.

Chapter 6, Testing, Building, and Publishing Artifacts, is an introduction to Gradle support for running tests from the build script. We will learn how we can build several artifacts for a project and publish the artifacts to a repository so other developers can reuse our code.

Chapter 7, Multi-project Builds, covers Gradle's support for multi-project builds. With Gradle, we can easily configure multiple projects that are related to each other. We will also see how Gradle can automatically build related or dependent projects if necessary.

Chapter 8, Mixed Languages, is about the Scala and Groovy plugins that are included with Gradle, to work with projects that have Scala or Groovy code.

Chapter 9, Maintaining Code Quality, introduces Gradle's code quality plugins. We will see how we can use and configure the plugins to include code analysis in our build process.

Chapter 10, Writing Custom Tasks and Plugins, covers what we need to do to write our own custom tasks and plugins. We will see how we can decouple the definition and usage of a custom task and plugin into separate source files. We will also learn how we can reuse our custom tasks and plugins in other projects

Chapter 11, Using Gradle with Continuous Integration, is an introduction to the support of several continuous integration tools for Gradle. We will learn how we can configure a continuous integration server to automatically invoke our Gradle build scripts.

Chapter 12, IDE Support, looks at how Gradle can generate project files for Eclipse and IntelliJ IDEA. We will also see how the IDEs support Gradle from within the IDE to run (for example) tasks, and keep track of dependencies defined in Gradle scripts.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.113.55