万本电子书0元读

万本电子书0元读

顶部广告

Gradle for Android电子书

售       价:¥

21人正在读 | 0人评论 6.2

作       者:Kevin Pelgrims

出  版  社:Packt Publishing

出版时间:2015-07-17

字       数:86.6万

所属分类: 进口书 > 外文原版书 > 电脑/网络

温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印

为你推荐

  • 读书简介
  • 目录
  • 累计评论(0条)
  • 读书简介
  • 目录
  • 累计评论(0条)
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.
目录展开

Gradle for Android

Table of Contents

Gradle for Android

Credits

About the Author

About the Reviewers

www.PacktPub.com

Support files, eBooks, discount offers, and more

Why subscribe?

Free access for Packt account holders

Preface

What this book covers

What you need for this book

Who this book is for

Conventions

Reader feedback

Customer support

Downloading the example code

Errata

Piracy

Questions

1. Getting Started with Gradle and Android Studio

Android Studio

Staying up to date

Understanding Gradle basics

Projects and tasks

The build lifecycle

The build configuration file

The project structure

Creating a new project

Getting started with the Gradle Wrapper

Getting the Gradle Wrapper

Running basic build tasks

Migrating from Eclipse

Using the import wizard

Migrating manually

Keeping the old project structure

Converting to the new project structure

Migrating libraries

Summary

2. Basic Build Customization

Understanding the Gradle files

The settings file

The top-level build file

The module build file

Plugin

Android

Dependencies

Getting started with tasks

Base tasks

Android tasks

Inside Android Studio

Customizing the build

Manipulating manifest entries

Inside Android Studio

BuildConfig and resources

Project-wide settings

Project properties

Default tasks

Summary

3. Managing Dependencies

Repositories

Preconfigured repositories

Remote repositories

Local repositories

Local dependencies

File dependencies

Native libraries

Library projects

Creating and using library project modules

Using .aar files

Dependency concepts

Configurations

Semantic versioning

Dynamic versions

Inside Android Studio

Summary

4. Creating Build Variants

Build types

Creating build types

Source sets

Dependencies

Product flavors

Creating product flavors

Source sets

Multiflavor variants

Build variants

Tasks

Source sets

Resource and manifest merging

Creating build variants

Variant filters

Signing configurations

Summary

5. Managing Multimodule Builds

The anatomy of a multimodule build

The build lifecycle revisited

Module tasks

Adding modules to a project

Adding a Java library

Adding an Android library

Integrating Android Wear

Using Google App Engine

Analyzing the build file

Using the backend in an app

Custom tasks

Tips and best practices

Running module tasks from Android Studio

Speeding up multimodule builds

Module coupling

Summary

6. Running Tests

Unit tests

JUnit

Robolectric

Functional tests

Espresso

Test coverage

Jacoco

Summary

7. Creating Tasks and Plugins

Understanding Groovy

Introduction

Classes and members

Methods

Closures

Collections

Groovy in Gradle

Getting started with tasks

Defining tasks

Anatomy of a task

Using a task to simplify the release process

Hooking into the Android plugin

Automatically renaming APKs

Dynamically creating new tasks

Creating your own plugins

Creating a simple plugin

Distributing plugins

Using a custom plugin

Summary

8. Setting Up Continuous Integration

Jenkins

Setting up Jenkins

Configuring the build

TeamCity

Setting up TeamCity

Configuring the build

Travis CI

Configuring the build

Further automation

The SDK manager plugin

Running tests

Continuous deployment

Beta distribution

Summary

9. Advanced Build Customization

Reducing the APK file size

ProGuard

Shrinking resources

Automatic shrinking

Manual shrinking

Speeding up builds

Gradle properties

Android Studio

Profiling

Jack and Jill

Ignoring Lint

Using Ant from Gradle

Running Ant tasks from Gradle

Importing an entire Ant script

Properties

Advanced app deployment

Split APK

Summary

Index

累计评论(0条) 0个书友正在讨论这本书 发表评论

发表评论

发表评论,分享你的想法吧!

买过这本书的人还买过

读了这本书的人还在读

回顶部