The following is the first few sections of a chapter from The Busy Coder's Guide to Android Development, plus headings for the remaining major sections, to give you an idea about the content of the chapter.


Manifest Merger Rules

When Android library projects were added as an option for app development, one problem became apparent: while libraries could contribute code and resources, they could not contribute manifest entries. Developers using libraries would sometimes have to add elements to their app manifest at the request of library authors, to add permissions, define components, and the like.

The Android Gradle Plugin has a robust set of rules for “manifest merger”. While the term “manifest merger” is still used, in reality, the Android Gradle Plugin synthesizes a manifest for your app from a variety of sources, including apps, libraries, and build.gradle files, also varying based upon build types and product flavors.

This chapter will help to explain a bit more about what is possible what the rules are for the manifest merger process.

Prerequisites

Understanding this chapter requires that you have read the chapters that introduce Gradle and cover basic Gradle/Android integration, including build variants.

Manifest Scenarios

The preview of this section was lost in the sofa cushions.

Pieces of Manifest Generation

The preview of this section left for Hollywood to appear in a reality TV show.

Examining the Merger Results

The preview of this section was traded for a bag of magic beans.

Viewing Merged Manifests in Android Studio

The preview of this section is sleeping in.

Merging Elements and Attributes

The preview of this section was abducted by space aliens.

Employing Placeholders

The preview of this section took that left turn at Albuquerque.