Commit a0c3aae1 authored by Jakob Andersen's avatar Jakob Andersen Committed by GitHub

Read package ID and activity name from .apk for Gradle-based builds. (#8393)

The gradle build scripts can be configured to output different
application IDs for different build types, so we need to examine the
built .apk to figure out the name of the package and activity.

Fixes #8327
parent 7f9a53b1
...@@ -82,8 +82,9 @@ class AndroidApk extends ApplicationPackage { ...@@ -82,8 +82,9 @@ class AndroidApk extends ApplicationPackage {
String apkPath; String apkPath;
if (isProjectUsingGradle()) { if (isProjectUsingGradle()) {
manifestPath = gradleManifestPath; // Grab information from the .apk. The gradle build script might alter the
apkPath = gradleAppOut; // application Id, so we need to look at what was actually built.
return new AndroidApk.fromApk(gradleAppOut);
} else { } else {
manifestPath = fs.path.join('android', 'AndroidManifest.xml'); manifestPath = fs.path.join('android', 'AndroidManifest.xml');
apkPath = fs.path.join(getAndroidBuildDirectory(), 'app.apk'); apkPath = fs.path.join(getAndroidBuildDirectory(), 'app.apk');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment