Gradle for Android
暫譯: Android 的 Gradle 使用指南

Kevin Pelgrims

買這商品的人也買了...

商品描述

Automate the build process for your Android projects with Gradle

About This Book

  • Create custom Gradle tasks and plugins for your Android projects
  • Configure different build variants, each with their own dependencies and properties
  • Manage multi-module projects, and integrate modules interdependently

Who This Book Is For

If you are an experienced Android developer wanting to enhance your skills with the Gradle Android build system, then this book is for you. As a prerequisite, you will need some knowledge of the concepts of Android application development.

What You Will Learn

  • Build new Android apps and libraries using Android Studio and Gradle
  • Migrate projects from Eclipse to Android Studio and Gradle
  • Manage the local and remote dependencies of your projects
  • Create multiple build variants
  • Include multiple modules in a single project
  • Integrate tests into the build process
  • Create custom tasks and plugins for Android projects

In Detail

Gradle is an open source build automation system that introduces a Groovy-based domain-specific language (DSL) to configure projects. Using Gradle makes it easy for Android developers to manage dependencies and set up the entire build process.

This book begins by taking you through the basics of Gradle and how it works with Android Studio. Furthermore, you will learn how to add local and remote dependencies to your project. You will work with build variants, such as debug and release, paid and free, and even combinations of these things. The book will also help you set up unit and integration testing with different libraries and will show how Gradle and Android Studio can make running tests easier. Finally, you will be shown a number of tips and tricks on the advanced customization of your application's build process. By the end of this book, you will be able to customize the entire build process, and create your own tasks and plugins for your Gradle builds.

商品描述(中文翻譯)

**使用 Gradle 自動化您的 Android 專案建置過程**

## 本書介紹

- 為您的 Android 專案創建自定義 Gradle 任務和插件
- 配置不同的建置變體,每個變體都有其自己的依賴和屬性
- 管理多模組專案,並互相整合模組

## 本書適合誰

如果您是一位有經驗的 Android 開發者,想要提升您在 Gradle Android 建置系統方面的技能,那麼這本書適合您。作為前提,您需要對 Android 應用程式開發的概念有一定的了解。

## 您將學到什麼

- 使用 Android Studio 和 Gradle 建立新的 Android 應用程式和庫
- 將專案從 Eclipse 遷移到 Android Studio 和 Gradle
- 管理專案的本地和遠端依賴
- 創建多個建置變體
- 在單一專案中包含多個模組
- 將測試整合到建置過程中
- 為 Android 專案創建自定義任務和插件

## 詳細內容

Gradle 是一個開源的建置自動化系統,使用基於 Groovy 的領域特定語言 (DSL) 來配置專案。使用 Gradle 使 Android 開發者能夠輕鬆管理依賴並設置整個建置過程。

本書首先帶您了解 Gradle 的基本概念及其如何與 Android Studio 一起運作。此外,您將學習如何將本地和遠端依賴添加到您的專案中。您將處理建置變體,例如調試和發佈、付費和免費,甚至這些變體的組合。本書還將幫助您設置單元測試和整合測試,並展示 Gradle 和 Android Studio 如何使測試執行變得更簡單。最後,您將學到一些有關應用程式建置過程高級自定義的技巧和竅門。在本書結束時,您將能夠自定義整個建置過程,並為您的 Gradle 建置創建自己的任務和插件。