Skip to content

Instantly share code, notes, and snippets.

View sasssass's full-sized avatar

Ali Shobeyri sasssass

View GitHub Profile
@sasssass
sasssass / README.md
Created May 1, 2022 11:26 — forked from Farbklex/README.md
Android: Create a signed universal APK with all dynamic feature modules included with gradle wrapper via commandline

Android Studio doesn't automatically include dynamic feature modules when building signed release APKs. But universal APKs can be created via the bundletool and signed later.

The gradle wrapper has a task for this already. This makes creating universal APKs easier since APK creation and signing are executed with one command and no separate download of bundletool is required.

You can use packageReleaseUniversalApk with the name of your base application module (e.g.: app) to create a universal APK:

./gradlew :app:packageReleaseUniversalApk

This will however only create an unsigned APK unless you specify the signing informations in your gradle file or pass the information through the command line as shown below.