The Modules

The “Modules” category lists all of the modules in your project and allows you to configure them. In many projects, there will simply be an app module and nothing else. In the book’s sample projects, there are more modules than normal:

Project Structure Dialog, Modules Category, Properties Tab
Project Structure Dialog, Modules Category, Properties Tab

The gray undersquiggle underneath the module names means that there is a suggestion for changes to the module’s configuration. We will explore those suggestions more later in the chapter.

Module Properties

There are three tabs in the “Modules” category. The first one is “Properties”, which allows you configure items from the selected module’s build.gradle file, such as:

Default Config

The “Default Config” tab lets you configure a variety of items that appear in the defaultConfig closure of the selected module’s build.gradle file:

Project Structure Dialog, Modules Category, Default Config Tab
Project Structure Dialog, Modules Category, Default Config Tab

Many of these are beyond the scope of this book. Some of the ones that we have covered are:

Signing Configs

In the chapter on signing your app, we saw how to use Android Studio to sign your APK. There is another option: configuring Gradle to sign your APK. This is mostly used in cases where the APK will be generated and signed automatically, such as via a build server.

The “Signing Configs” tab contains a form for you to teach Gradle how to sign your APK:

Project Structure Dialog, Modules Category, Signing Configs Tab
Project Structure Dialog, Modules Category, Signing Configs Tab

The details of how this works, and the resulting Gradle constructs, can be found in the Android SDK documentation.


Prev Table of Contents Next

This book is licensed under the Creative Commons Attribution-ShareAlike 4.0 International license.