Fix SandHook build
This commit is contained in:
parent
b13c9ba98d
commit
9c0a5d6abc
|
|
@ -24,7 +24,7 @@ allprojects {
|
||||||
templateLib64Path = templateRootPath + "/system/lib64/"
|
templateLib64Path = templateRootPath + "/system/lib64/"
|
||||||
templateEtcPath = templateRootPath + "/system/etc/"
|
templateEtcPath = templateRootPath + "/system/etc/"
|
||||||
hiddenApiStubJarFilePath = project(":hiddenapi-stubs").buildDir.absolutePath + "/libs/framework-stub.jar"
|
hiddenApiStubJarFilePath = project(":hiddenapi-stubs").buildDir.absolutePath + "/libs/framework-stub.jar"
|
||||||
zipPathMagiskReleasePath = project(":edxp-core").projectDir.path + "/build/tmp/release/magisk"
|
zipPathMagiskReleasePath = project(":edxp-core").projectDir.path + "/build/tmp/release/magisk/"
|
||||||
}
|
}
|
||||||
repositories {
|
repositories {
|
||||||
google()
|
google()
|
||||||
|
|
|
||||||
|
|
@ -124,11 +124,9 @@ afterEvaluate {
|
||||||
def authorList = property("${backendLowered}" + "_authors")
|
def authorList = property("${backendLowered}" + "_authors")
|
||||||
def magiskModuleId = property("${backendLowered}" + "_module_id")
|
def magiskModuleId = property("${backendLowered}" + "_module_id")
|
||||||
|
|
||||||
project.logger.lifecycle("delete file")
|
|
||||||
delete file(zipPathMagiskReleasePath)
|
delete file(zipPathMagiskReleasePath)
|
||||||
|
|
||||||
def prepareJarsTask = task("prepareJars${backendCapped}${variantCapped}") {
|
def prepareJarsTask = task("prepareJars${backendCapped}${variantCapped}") {
|
||||||
project.logger.lifecycle("prepareJarsTask")
|
|
||||||
dependsOn cleanTemplate
|
dependsOn cleanTemplate
|
||||||
dependsOn tasks.getByPath(":dexmaker:copyDex${variantCapped}")
|
dependsOn tasks.getByPath(":dexmaker:copyDex${variantCapped}")
|
||||||
dependsOn tasks.getByPath(":dalvikdx:copyDex${variantCapped}")
|
dependsOn tasks.getByPath(":dalvikdx:copyDex${variantCapped}")
|
||||||
|
|
|
||||||
|
|
@ -59,19 +59,21 @@ afterEvaluate {
|
||||||
def variantNameLowered = variant.name.toLowerCase()
|
def variantNameLowered = variant.name.toLowerCase()
|
||||||
def myTemplatePath = "${projectDir}/template_override/"
|
def myTemplatePath = "${projectDir}/template_override/"
|
||||||
|
|
||||||
task("copyDex${variantNameCapped}", type: Copy) {
|
task "copyDex${variantNameCapped}" {
|
||||||
dependsOn "assemble${variantNameCapped}"
|
dependsOn "assemble${variantNameCapped}"
|
||||||
dependsOn tasks.getByPath(":edxp-common:copyCommonProperties")
|
dependsOn tasks.getByPath(":edxp-common:copyCommonProperties")
|
||||||
dependsOn tasks.getByPath(":sandhook-hooklib:copySandHook${variantNameCapped}LibraryToMagiskTemplate")
|
dependsOn tasks.getByPath(":sandhook-hooklib:copySandHook${variantNameCapped}LibraryToMagiskTemplate")
|
||||||
def dexOutPath = variant.name.contains("release") ?
|
def dexOutPath = variant.name.contains("release") ?
|
||||||
"${buildDir}/intermediates/dex/${variantNameLowered}/minify${variantNameCapped}WithR8" :
|
"${buildDir}/intermediates/dex/${variantNameLowered}/minify${variantNameCapped}WithR8" :
|
||||||
"${buildDir}/intermediates/dex/${variantNameLowered}/mergeDex${variantNameCapped}"
|
"${buildDir}/intermediates/dex/${variantNameLowered}/mergeDex${variantNameCapped}"
|
||||||
from (dexOutPath){
|
doLast {
|
||||||
rename("classes.dex", "edxp.dex")
|
project.logger.lifecycle("copyDex${variantNameCapped}")
|
||||||
}
|
copy {
|
||||||
destinationDir file(zipPathMagiskReleasePath + "/system/framework/")
|
from(dexOutPath) {
|
||||||
outputs.upToDateWhen { false }
|
rename "classes.dex", "edxp.dex"
|
||||||
doLast {
|
}
|
||||||
|
into myTemplatePath + "system/framework/"
|
||||||
|
}
|
||||||
copy {
|
copy {
|
||||||
from file(myTemplatePath)
|
from file(myTemplatePath)
|
||||||
into file(zipPathMagiskReleasePath)
|
into file(zipPathMagiskReleasePath)
|
||||||
|
|
|
||||||
|
|
@ -57,17 +57,23 @@ afterEvaluate {
|
||||||
def variantNameCapped = variant.name.capitalize()
|
def variantNameCapped = variant.name.capitalize()
|
||||||
def variantNameLowered = variant.name.toLowerCase()
|
def variantNameLowered = variant.name.toLowerCase()
|
||||||
|
|
||||||
task("copyDex${variantNameCapped}", type: Copy) {
|
task "copyDex${variantNameCapped}" {
|
||||||
dependsOn "assemble${variantNameCapped}"
|
dependsOn "assemble${variantNameCapped}"
|
||||||
dependsOn tasks.getByPath(":edxp-common:copyCommonProperties")
|
dependsOn tasks.getByPath(":edxp-common:copyCommonProperties")
|
||||||
def dexOutPath = variant.name.contains("release") ?
|
def dexOutPath = variant.name.contains("release") ?
|
||||||
"${buildDir}/intermediates/dex/${variantNameLowered}/minify${variantNameCapped}WithR8" :
|
"${buildDir}/intermediates/dex/${variantNameLowered}/minify${variantNameCapped}WithR8" :
|
||||||
"${buildDir}/intermediates/dex/${variantNameLowered}/mergeDex${variantNameCapped}"
|
"${buildDir}/intermediates/dex/${variantNameLowered}/mergeDex${variantNameCapped}"
|
||||||
from (dexOutPath){
|
|
||||||
rename("classes.dex", "edxp.dex")
|
|
||||||
}
|
|
||||||
destinationDir file(templateRootPath + "system/framework/")
|
|
||||||
outputs.upToDateWhen { false }
|
outputs.upToDateWhen { false }
|
||||||
|
doLast {
|
||||||
|
project.logger.lifecycle("copyDex${variantNameCapped}")
|
||||||
|
copy {
|
||||||
|
from (dexOutPath){
|
||||||
|
rename("classes.dex", "edxp.dex")
|
||||||
|
}
|
||||||
|
into file(zipPathMagiskReleasePath + "/system/framework/")
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue