mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-12-23 00:17:42 +00:00
Better support for external config file
This commit is contained in:
parent
c0f45b6b1e
commit
2d7c1da741
@ -1,7 +1,8 @@
|
|||||||
apply plugin: 'com.android.application'
|
apply plugin: 'com.android.application'
|
||||||
|
|
||||||
def configProps = new Properties()
|
def configProps = new Properties()
|
||||||
configProps.load(new FileInputStream(rootProject.file('config.prop')))
|
def configPath = project.hasProperty('configPath') ? project.configPath : rootProject.file('config.prop')
|
||||||
|
configProps.load(new FileInputStream(configPath))
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion rootProject.ext.compileSdkVersion
|
compileSdkVersion rootProject.ext.compileSdkVersion
|
||||||
|
2
build.py
2
build.py
@ -226,7 +226,7 @@ def build_apk(args, flavor):
|
|||||||
|
|
||||||
buildType = 'Release' if args.release else 'Debug'
|
buildType = 'Release' if args.release else 'Debug'
|
||||||
|
|
||||||
proc = execv([gradlew, 'app:assemble' + flavor + buildType])
|
proc = execv([gradlew, 'app:assemble' + flavor + buildType, '-PconfigPath=' + os.path.abspath(args.config)])
|
||||||
if proc.returncode != 0:
|
if proc.returncode != 0:
|
||||||
error('Build Magisk Manager failed!')
|
error('Build Magisk Manager failed!')
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user