Last active
May 8, 2020 15:22
-
-
Save Dirk-Sandberg/a2346014a77e86733956e618aff44dbe to your computer and use it in GitHub Desktop.
used by sign_and_deploy shell script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
ANDROID_TARGET_API = '28' | |
ARCH = sys.argv[1] | |
with open("buildozer.spec", "r") as f: | |
text = f.readlines() | |
for i, line in enumerate(text): | |
if 'android.api' in line: | |
# Set the minimum target API as required by Google | |
text[i] = 'android.api = ' + ANDROID_TARGET_API + "\n" | |
if 'android.arch' in line: | |
# Update the architecture to build | |
text[i] = 'android.arch = ' + ARCH + "\n" | |
with open("buildozer.spec", "w") as f: | |
# Save the edited buildozer.spec file | |
f.write(''.join(line for line in text)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment