Skip to content

Commit 5d553c1

Browse files
committed
add a new --manifest-extra to append xml file at the end of the AndroidManifest.xml
1 parent fd2b8e4 commit 5d553c1

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/build.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,12 @@ def select(fn):
206206

207207
def make_package(args):
208208
version_code = 0
209-
manifest_extra = '<uses-feature android:glEsVersion="0x00020000" />'
209+
manifest_extra = ['<uses-feature android:glEsVersion="0x00020000" />']
210+
for filename in args.manifest_extra:
211+
with open(filename, "r") as fd:
212+
content = fd.read()
213+
manifest_extra.append(content)
214+
manifest_extra = '\n'.join(manifest_extra)
210215
url_scheme = 'kivy'
211216
default_icon = 'templates/kivy-icon.png'
212217
default_presplash = 'templates/kivy-presplash.jpg'
@@ -455,9 +460,11 @@ def make_package(args):
455460
'argument more than once to include multiple jars'))
456461
ap.add_argument('--meta-data', dest='meta_data', action='append',
457462
help='Custom key=value to add in application metadata')
458-
459463
ap.add_argument('--resource', dest='resource', action='append',
460464
help='Custom key=value to add in strings.xml resource file')
465+
ap.add_argument('--manifest-extra', dest='manifest_extra', action='append',
466+
help='Custom file to add at the end of the manifest')
467+
461468

462469
args = ap.parse_args()
463470

0 commit comments

Comments
 (0)