Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
M
Magisk
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Magisk
Commits
e139f4fc
Commit
e139f4fc
authored
Aug 06, 2018
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Small build script adjustments
parent
2fbfeacb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 deletions
+12
-12
build.py
build.py
+12
-12
No files found.
build.py
View file @
e139f4fc
...
...
@@ -49,6 +49,7 @@ cpu_count = multiprocessing.cpu_count()
gradlew
=
os
.
path
.
join
(
'.'
,
'gradlew.bat'
if
os
.
name
==
'nt'
else
'gradlew'
)
archs
=
[
'armeabi-v7a'
,
'x86'
]
keystore
=
'release-key.jks'
config
=
{}
def
mv
(
source
,
target
):
try
:
...
...
@@ -426,34 +427,33 @@ def cleanup(args):
execv
([
gradlew
,
'app:clean'
,
'snet:clean'
,
'utils:clean'
])
def
parse_config
():
c
=
{}
global
config
with
open
(
'config.prop'
,
'r'
)
as
f
:
for
line
in
[
l
.
strip
(
'
\t\r\n
'
)
for
l
in
f
]:
if
line
.
startswith
(
'#'
)
or
len
(
line
)
==
0
:
continue
prop
=
line
.
split
(
'='
)
c
[
prop
[
0
]
.
strip
(
'
\t\r\n
'
)]
=
prop
[
1
]
.
strip
(
'
\t\r\n
'
)
c
onfig
[
prop
[
0
]
.
strip
(
'
\t\r\n
'
)]
=
prop
[
1
]
.
strip
(
'
\t\r\n
'
)
if
'version'
not
in
c
or
'versionCode'
not
in
c
:
if
'version'
not
in
c
onfig
or
'versionCode'
not
in
config
:
error
(
'"version" and "versionCode" is required in "config.prop"'
)
try
:
c
[
'versionCode'
]
=
int
(
c
[
'versionCode'
])
c
onfig
[
'versionCode'
]
=
int
(
config
[
'versionCode'
])
except
ValueError
:
error
(
'"versionCode" is required to be an integer'
)
if
'prettyName'
not
in
c
:
c
[
'prettyName'
]
=
'false'
if
'prettyName'
not
in
c
onfig
:
c
onfig
[
'prettyName'
]
=
'false'
c
[
'prettyName'
]
=
c
[
'prettyName'
]
.
lower
()
==
'true'
c
onfig
[
'prettyName'
]
=
config
[
'prettyName'
]
.
lower
()
==
'true'
if
'outdir'
not
in
c
:
c
[
'outdir'
]
=
'out'
if
'outdir'
not
in
c
onfig
:
c
onfig
[
'outdir'
]
=
'out'
mkdir_p
(
c
[
'outdir'
])
return
c
mkdir_p
(
config
[
'outdir'
])
config
=
parse_config
()
parse_config
()
parser
=
argparse
.
ArgumentParser
(
description
=
'Magisk build script'
)
parser
.
add_argument
(
'-r'
,
'--release'
,
action
=
'store_true'
,
help
=
'compile Magisk for release'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment