mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-12-21 23:47:39 +00:00
Move :stub to :app:stub
This commit is contained in:
parent
3e38b8fed1
commit
b168163ef0
0
stub/.gitignore → app/stub/.gitignore
vendored
0
stub/.gitignore → app/stub/.gitignore
vendored
20
build.py
20
build.py
@ -475,8 +475,10 @@ def build_apk(args, module):
|
||||
|
||||
build_type = build_type.lower()
|
||||
|
||||
apk = f"{module}-{build_type}.apk"
|
||||
source = Path(module, "build", "outputs", "apk", build_type, apk)
|
||||
paths = module.split(":")
|
||||
|
||||
apk = f"{paths[-1]}-{build_type}.apk"
|
||||
source = Path(*paths, "build", "outputs", "apk", build_type, apk)
|
||||
target = config["outdir"] / apk
|
||||
mv(source, target)
|
||||
header(f"Output: {target}")
|
||||
@ -484,7 +486,7 @@ def build_apk(args, module):
|
||||
|
||||
def build_app(args):
|
||||
header("* Building the Magisk app")
|
||||
build_apk(args, "app")
|
||||
build_apk(args, ":app")
|
||||
|
||||
# Stub building is directly integrated into the main app
|
||||
# build process. Copy the stub APK into output directory.
|
||||
@ -497,7 +499,7 @@ def build_app(args):
|
||||
|
||||
def build_stub(args):
|
||||
header("* Building the stub app")
|
||||
build_apk(args, "stub")
|
||||
build_apk(args, ":app:stub")
|
||||
|
||||
|
||||
def cleanup(args):
|
||||
@ -527,11 +529,15 @@ def cleanup(args):
|
||||
if "java" in args.target:
|
||||
header("* Cleaning java")
|
||||
execv(
|
||||
[gradlew, "app:clean", "app:core:clean", "app:shared:clean", "stub:clean"],
|
||||
[
|
||||
gradlew,
|
||||
":app:clean",
|
||||
":app:core:clean",
|
||||
":app:shared:clean",
|
||||
":app:stub:clean",
|
||||
],
|
||||
env=find_jdk(),
|
||||
)
|
||||
rm_rf(Path("app", "src", "debug"))
|
||||
rm_rf(Path("app", "src", "release"))
|
||||
|
||||
|
||||
def setup_ndk(args):
|
||||
|
@ -148,7 +148,7 @@ fun Project.setupCoreLib() {
|
||||
tasks.getByPath("merge${variantCapped}JniLibFolders").dependsOn(syncLibs)
|
||||
processJavaResourcesProvider.configure { dependsOn(syncResources) }
|
||||
|
||||
val stubTask = tasks.getByPath(":stub:comment$variantCapped")
|
||||
val stubTask = tasks.getByPath(":app:stub:comment$variantCapped")
|
||||
val stubApk = stubTask.outputs.files.asFileTree.filter {
|
||||
it.name.endsWith(".apk")
|
||||
}
|
||||
|
@ -8,4 +8,4 @@ dependencyResolutionManagement {
|
||||
}
|
||||
}
|
||||
rootProject.name = "Magisk"
|
||||
include(":app", ":app:core", ":app:shared", ":native", ":stub")
|
||||
include(":app", ":app:core", ":app:shared", ":app:stub", ":native")
|
||||
|
Loading…
x
Reference in New Issue
Block a user