diff --git a/.run/fullApp.run.xml b/.run/fullApp.run.xml
deleted file mode 100644
index 3d690efa7..000000000
--- a/.run/fullApp.run.xml
+++ /dev/null
@@ -1,59 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/README.MD b/README.MD
index 1b1fc629c..85d6b1da9 100644
--- a/README.MD
+++ b/README.MD
@@ -61,7 +61,6 @@ For Magisk Manager crashes, record and upload the logcat when the crash occurs.
- 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 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 98a0b3e1d..e526c396d 100644
--- a/app/build.gradle.kts
+++ b/app/build.gradle.kts
@@ -25,6 +25,7 @@ android {
multiDexEnabled = true
versionName = Config.version
versionCode = Config.versionCode
+ ndk.abiFilters("armeabi-v7a", "arm64-v8a", "x86", "x86_64")
javaCompileOptions.annotationProcessorOptions.arguments(
mapOf("room.incremental" to "true")
diff --git a/buildSrc/src/main/java/BuildSource.kt b/buildSrc/src/main/java/BuildSource.kt
index 3ba97711d..b7c4327a6 100644
--- a/buildSrc/src/main/java/BuildSource.kt
+++ b/buildSrc/src/main/java/BuildSource.kt
@@ -1,4 +1,4 @@
-import org.eclipse.jgit.api.Git
+
import org.eclipse.jgit.internal.storage.file.FileRepository
import org.gradle.api.Plugin
import org.gradle.api.Project
@@ -7,8 +7,7 @@ import java.io.File
import java.util.*
private val props = Properties()
-private lateinit var commitHash: String
-private var commitCount = 0
+private var commitHash = ""
object Config {
operator fun get(key: String): String? {
@@ -24,16 +23,18 @@ object Config {
}
class MagiskPlugin : Plugin {
- override fun apply(project: Project) {
- project.rootProject.file("gradle.properties").inputStream().use { props.load(it) }
- val configPath: String? by project
- val config = configPath?.let { File(it) } ?: project.rootProject.file("config.prop")
+ override fun apply(project: Project) = project.applyPlugin()
+
+ private fun Project.applyPlugin() {
+ props.clear()
+ rootProject.file("gradle.properties").inputStream().use { props.load(it) }
+ val configPath: String? by this
+ val config = configPath?.let { File(it) } ?: rootProject.file("config.prop")
if (config.exists())
config.inputStream().use { props.load(it) }
- val repo = FileRepository(project.rootProject.file(".git"))
+ val repo = FileRepository(rootProject.file(".git"))
val refId = repo.refDatabase.exactRef("HEAD").objectId
commitHash = repo.newObjectReader().abbreviate(refId, 8).name()
- commitCount = Git(repo).log().add(refId).call().count()
}
}