mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-11-24 10:35:26 +00:00
Make gradle.properties optional
This commit is contained in:
parent
bb39a524d0
commit
4e4ec73d94
8
build.py
8
build.py
@ -187,15 +187,17 @@ def load_config(args):
|
||||
|
||||
# Default values
|
||||
config["version"] = commit_hash
|
||||
config["versionCode"] = 1000000
|
||||
config["outdir"] = "out"
|
||||
|
||||
# Load prop files
|
||||
if op.exists(args.config):
|
||||
config.update(parse_props(args.config))
|
||||
|
||||
for key, value in parse_props("gradle.properties").items():
|
||||
if key.startswith("magisk."):
|
||||
config[key[7:]] = value
|
||||
if op.exists("gradle.properties"):
|
||||
for key, value in parse_props("gradle.properties").items():
|
||||
if key.startswith("magisk."):
|
||||
config[key[7:]] = value
|
||||
|
||||
try:
|
||||
config["versionCode"] = int(config["versionCode"])
|
||||
|
Loading…
Reference in New Issue
Block a user