Move copy util_functions.sh from Python scripts to gradle

This commit is contained in:
topjohnwu 2020-07-17 00:44:51 -07:00
parent ef3f188a2c
commit f7abc03dac
2 changed files with 7 additions and 4 deletions

View File

@ -69,6 +69,13 @@ androidExtensions {
isExperimental = true isExperimental = true
} }
val copyUtils = tasks.register("copyUtils", Copy::class) {
from(rootProject.file("scripts/util_functions.sh"))
into("src/main/res/raw")
}
tasks["preBuild"]?.dependsOn(copyUtils)
dependencies { dependencies {
implementation(fileTree(mapOf("dir" to "libs", "include" to listOf("*.jar")))) implementation(fileTree(mapOf("dir" to "libs", "include" to listOf("*.jar"))))
implementation(project(":app:shared")) implementation(project(":app:shared"))

View File

@ -350,10 +350,6 @@ def build_apk(args, module):
def build_app(args): def build_app(args):
header('* Building Magisk Manager') header('* Building Magisk Manager')
source = op.join('scripts', 'util_functions.sh')
target = op.join('app', 'src', 'main',
'res', 'raw', 'util_functions.sh')
cp(source, target)
build_apk(args, 'app') build_apk(args, 'app')