Skip to content
Book Cover of Extending Android Builds

1-2: Environment and Tools ​

1-2-1: Environment and Tools ​

The projects in this book are constructed using the following tools and environments, unless otherwise specified within the section:

  • Gradle 7.4.2
  • Android Gradle Plugin 7.2.2
  • Kotlin 1.6.21
  • Android build tools 30

To be noticed, Chapter 8 uses Gradle 8.0.2 and Android Gradle Plugin 8.0.0-rc01.

1-2-2: Companion Sample: Playground ​

This book is accompanied by a sample project, Playground. In software development, a "Playground" is often considered an environment or a testing module for beginners to explore new technologies. The Playground contains over 40 independent mini-projects and Gradle Plugins, including:

  • /manual-build: A project that explains the process of manually building an Android APK.
  • /build-lifecycle: A project that delineates the lifecycle of Gradle and AGP.
  • /slack: A set of focal projects within this book, including several Plugin modules, a Plugin configuration module, and an Android application module. It serves as a platform to intuitively debug various Plugins and configurations, facilitating a deeper understanding of Gradle's raw APIs.
  • /common-kts-script: A project that aids in understanding the common .kts (Kotlin Script).
  • /debug-tips: A project that uncovers debugging techniques for Gradle, AGP, and other Android-related build tools.
  • /groovy-to-kotlin-dsl: A sample project that demonstrates the conversion from Gradle Groovy DSL to Gradle Kotlin DSL.

In the succeeding Chapters on multiple case studies, there will also be a series of analyses of architectural design for open-source libraries. Please refer to the instructions at the outset of each section for more sample projects and library links. In Appendix A, you can also find reference material for per section.

1-2-3: Code Conventions ​

While the majority of the codebase in this book is written in Kotlin, some source code analyses or build scripts may contain Java and Groovy code. To emphasize the core structure of code snippets, some non-essential code has been omitted, including code deletion (represented by "..."), variable name shortening, and adding line breaks in method calls with multiple arguments. To enhance readability, a 2-space indentation is used instead of the default 4-space indentation.