Skip to content

Commit 6f22bcd

Browse files
committed
Android: account for namespace = androidPackageName in runner script
If the build.gradle contains namespace = androidPackageName, the current script treats that androidPackageName as a valid value and just returns it, and that's wrong, so check it's not that and continue looking under the gradle.properties. Pick-to: 6.10 6.9 6.8 Change-Id: I0df692a91e9edb54df9a75f0ad254823d346b63a Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
1 parent ff08865 commit 6f22bcd

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

libexec/qt-android-runner.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,10 @@ def get_package_name(build_path):
103103
with open(gradle_file) as f:
104104
for line in f:
105105
if line.strip().startswith("namespace"):
106-
return line.split('=')[1].strip().strip('"')
106+
potentialPackageName = line.split('=')[1].strip().strip('"')
107+
if (potentialPackageName == "androidPackageName"):
108+
break;
109+
return potentialPackageName
107110

108111
properties_file = os.path.join(args.build_path, "gradle.properties")
109112
if os.path.isfile(properties_file):

0 commit comments

Comments
 (0)