Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add manifestPlaceholders feature #1212

Merged
merged 1 commit into from
Dec 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions buildozer/default.spec
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,12 @@ android.allow_backup = True
# (str) XML file for custom backup rules (see official auto backup documentation)
# android.backup_rules =

# (str) If you need to insert variables into your AndroidManifest.xml file,
# you can do so with the manifestPlaceholders property.
# This property takes a map of key-value pairs. (via a string)
# Usage example : android.manifest_placeholders = [myCustomUrl:\"org.kivy.customurl\"]
# android.manifest_placeholders = [:]

#
# Python for android (p4a) specific
#
Expand Down
6 changes: 6 additions & 0 deletions buildozer/targets/android.py
Original file line number Diff line number Diff line change
Expand Up @@ -897,6 +897,12 @@ def execute_build_package(self, build_cmd):
cmd.append('--depend')
cmd.append(gradle_dependency)

# support for manifestPlaceholders
manifest_placeholders = self.buildozer.config.getdefault('app', 'android.manifest_placeholders', '[:]')
if manifest_placeholders:
AndreMiras marked this conversation as resolved.
Show resolved Hide resolved
cmd.append('--manifest-placeholders')
cmd.append("{}".format(manifest_placeholders))

cmd.append('--arch')
cmd.append(self._arch)

Expand Down