The book "Extending Android Builds: Pragmatic Gradle and AGP Skills with Kotlin" is now available

My latest book “Extending Android Builds: Pragmatic Gradle and AGP Skills with Kotlin,” is now available on Amazon.

The book goes beyond Gradle configuration, it delves into the development of Gradle plugins that integrate with the Android Gradle Plugin (AGP) and other essential build tools, such as AAPT2, Kotlin Symbol Processing (KSP), and Bytecode manipulators. By clicking the “Read Sample” button at the bottom left on the product page, you will find a detailed TOC and previews. You have the flexibility to choose between the Kindle version, Paperback (B&W), or Hardcover (full-color edition).

After reading this book, you will be able to:

  • Utilize the Kotlin language for both Gradle scripts and plugins.
  • Author Gradle plugins/tasks with confidence while effectively interacting with AGP APIs and Gradle raw APIs.
  • Monitor and modify various aspects of the Android build process, including resource files, source code, JVM bytecode, and even their combinations using AAPT2, Kotlin Symbol Processing (KSP), and multiple bytecode manipulators.
  • Ensure that the plugin is both robust and low-cost to maintain, following the simple test pyramid.
  • Adhere to the latest best practices in App architecture that align with many Gradle golden rules and offer extensibility for developers.
  • Reduce the build time of the Android application and enhance the efficiency of their existing CI/CD workflows.

Table of Contents:

  • Chapter 1, Concepts and Little Handmade: Provides insight into Gradle and Android Gradle Plugin basics, alongside manual Android app creation.
  • Chapter 2, Quick Start: Offers hands-on experience in structuring Gradle projects, understanding lifecycle, plugins, tasks, and creating a basic Gradle plugin for Slack notifications.
  • Chapter 3, The Key of Extending Android Builds: Focuses on mastering the new Android Gradle Plugin’s Variant and Artifact APIs for efficient and customizable builds.
  • Chapter 4, Diving into the Gradle Raw APIs: Explores advanced Gradle raw API features like lifecycle hooks, lazy properties, task orchestration, and caching mechanisms.
  • Chapter 5, Extension of Android Resources Build: Covers manipulation of Android resources through AGP Extensions, with insights into AAPT2 internals for optimized builds.
  • Chapter 6, Extension of Source Code Build: Discusses manipulating source code through AGP Extensions and understanding Kotlin Symbol Processing (KSP) for code generation.
  • Chapter 7, Extension of the JVM Bytecode Build: Explores JVM bytecode manipulation using AGP APIs and tools, including Aspect-oriented Programming (AOP) at the bytecode level.
  • Chapter 8, Improving the Build Experience: Focuses on optimizing build experiences through analysis, performance tuning, and conditional plugin application.

After years of quiet in the Gradle book market, this publication offers a fresh learning path for all Gradle and Android developers. It might be the first book to dissect the Android build system and its extending approaches, serving as the latest reference for anyone involved in Developer Productivity Engineering (DPE). Finally, I would like to express my gratitude to @Jendrik Johannes and all contributors, without support from the community, completing this book would have been impossible.

1 Like