Revert Gradle changes

This commit is contained in:
LoveSy 2020-12-13 14:02:21 +08:00 committed by kotori0
parent db76b1adcf
commit 3f769e51e8
2 changed files with 11 additions and 20 deletions

View File

@ -59,21 +59,18 @@ afterEvaluate {
def variantNameLowered = variant.name.toLowerCase()
def myTemplatePath = "${projectDir}/template_override/"
task "copyDex${variantNameCapped}" {
task("copyDex${variantNameCapped}", type: Copy) {
dependsOn "assemble${variantNameCapped}"
dependsOn tasks.getByPath(":edxp-common:copyCommonProperties")
dependsOn tasks.getByPath(":sandhook-hooklib:copySandHook${variantNameCapped}LibraryToMagiskTemplate")
def dexOutPath = variant.name.contains("release") ?
"${buildDir}/intermediates/dex/${variantNameLowered}/minify${variantNameCapped}WithR8" :
"${buildDir}/intermediates/dex/${variantNameLowered}/mergeDex${variantNameCapped}"
doLast {
project.logger.lifecycle("copyDex${variantNameCapped}")
copy {
from(dexOutPath) {
rename "classes.dex", "edxp.dex"
}
into myTemplatePath + "system/framework/"
}
from(dexOutPath) {
rename "classes.dex", "edxp.dex"
}
destinationDir file(zipPathMagiskReleasePath + "system/framework/")
doLast {
copy {
from file(myTemplatePath)
into file(zipPathMagiskReleasePath)

View File

@ -57,23 +57,17 @@ afterEvaluate {
def variantNameCapped = variant.name.capitalize()
def variantNameLowered = variant.name.toLowerCase()
task "copyDex${variantNameCapped}" {
task("copyDex${variantNameCapped}", type: Copy) {
dependsOn "assemble${variantNameCapped}"
dependsOn tasks.getByPath(":edxp-common:copyCommonProperties")
def dexOutPath = variant.name.contains("release") ?
"${buildDir}/intermediates/dex/${variantNameLowered}/minify${variantNameCapped}WithR8" :
"${buildDir}/intermediates/dex/${variantNameLowered}/mergeDex${variantNameCapped}"
outputs.upToDateWhen { false }
doLast {
project.logger.lifecycle("copyDex${variantNameCapped}")
copy {
from (dexOutPath){
rename("classes.dex", "edxp.dex")
}
into file(zipPathMagiskReleasePath + "/system/framework/")
}
from (dexOutPath){
rename("classes.dex", "edxp.dex")
}
destinationDir file(zipPathMagiskReleasePath + "system/framework/")
outputs.upToDateWhen { false }
}
}