From b4e52f613522917c1ea8cbd721ca8c6c664d9914 Mon Sep 17 00:00:00 2001 From: topjohnwu Date: Sat, 23 Jan 2021 16:50:55 -0800 Subject: [PATCH] Better development workflow --- .run/fullApp.run.xml | 59 ++++++++++++++++++++++++++++++++++++++++++++ README.MD | 3 ++- app/build.gradle.kts | 5 ++-- 3 files changed, 64 insertions(+), 3 deletions(-) create mode 100644 .run/fullApp.run.xml diff --git a/.run/fullApp.run.xml b/.run/fullApp.run.xml new file mode 100644 index 000000000..d9386f549 --- /dev/null +++ b/.run/fullApp.run.xml @@ -0,0 +1,59 @@ + + + + + \ No newline at end of file diff --git a/README.MD b/README.MD index 12ebdcaa4..1b1fc629c 100644 --- a/README.MD +++ b/README.MD @@ -60,7 +60,8 @@ For Magisk Manager crashes, record and upload the logcat when the crash occurs. - Run `./build.py ndk` to let the script download and install NDK for you - To start building, run `build.py` to see your options. \ For each action, use `-h` to access help (e.g. `./build.py all -h`) -- To start development, open the project in Android Studio. Both app (Kotlin/Java) and native (C++/C) source code can be properly developed using the IDE, but *always* use `build.py` for building. +- To start development, open the project with Android Studio. The IDE can be used for both app (Kotlin/Java) and native (C++/C) sources. +- Select the "appFull" run/debug configuration to run Magisk Manager via Android Studio. The default "app" config will not work. - Optionally, set custom configs with `config.prop`. A sample `config.prop.sample` is provided. - To sign APKs and zips with your own private keys, set signing configs in `config.prop`. For more info, check [Google's Documentation](https://developer.android.com/studio/publish/app-signing.html#generate-key). diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 186bfe1e0..90db744f0 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -89,9 +89,10 @@ val syncLibs by tasks.registering(Sync::class) { rename { if (it == "magisk") "libmagisk64.so" else "lib$it.so" } } } - doFirst { + onlyIf { if (inputs.sourceFiles.files.size != 10) - throw StopExecutionException("Build binary files first") + throw StopExecutionException("Please build binaries first! (./build.py binary)") + true } }