Clean template_override directory before build

This commit is contained in:
solohsu 2019-03-21 19:52:23 +08:00
parent e1ccb12eac
commit d546ecd81c
28 changed files with 57 additions and 7 deletions

View File

@ -18,7 +18,12 @@ buildscript {
allprojects {
ext {
templateRootPath = project(":edxp-core").projectDir.path + "/template_override/"
templateSystemPath = templateRootPath + "/system/"
templateSystemx86Path = templateRootPath + "/system_x86/"
templateFrameworkPath = templateRootPath + "/system/framework/"
templateLibPath = templateRootPath + "/system/lib/"
templateLib64Path = templateRootPath + "/system/lib64/"
templateEtcPath = templateRootPath + "/system/etc/"
}
repositories {
google()

View File

@ -3,5 +3,6 @@
/libs
/obj
/release
/template_override/system/framework/edxp.jar
/template_override/system
/template_override/system_x86
*.iml

View File

@ -59,6 +59,10 @@ task copyDexmakerJar {
}
}
task cleanTemplate(type: Delete) {
delete file(templateSystemPath), file(templateSystemx86Path)
}
afterEvaluate {
android.libraryVariants.all { variant ->
@ -72,7 +76,7 @@ afterEvaluate {
def backendLowered = backend.toLowerCase()
def zipTask = task("zip${backendCapped}${variantCapped}", type: Exec) {
dependsOn copyDalvikdxJar, copyDexmakerJar
dependsOn cleanTemplate, copyDalvikdxJar, copyDexmakerJar
dependsOn tasks.getByPath(":edxp-${backendLowered}:makeAndCopy${variantCapped}")
workingDir '..'
commandLine 'sh', 'build.sh', project.name,

View File

@ -1 +1,2 @@
/build
/template_override/system/framework/edxp.jar

View File

@ -54,10 +54,19 @@ afterEvaluate {
def variantNameCapped = variant.name.capitalize()
def variantNameLowered = variant.name.toLowerCase()
def myTemplatePath = "${projectDir}/template_override/"
task("makeAndCopy${variantNameCapped}", type: Jar, dependsOn: "assemble${variantNameCapped}") {
from "${buildDir}/intermediates/dex/${variantNameLowered}/mergeDex${variantNameCapped}/out/"
destinationDir file(templateFrameworkPath)
destinationDir file(myTemplatePath + "system/framework/")
baseName "edxp"
doLast {
copy {
from file(myTemplatePath)
into file(templateRootPath)
}
}
outputs.upToDateWhen { false }
}
}
}

View File

@ -0,0 +1,5 @@
version=90.0-sandhook-0.3.1.6-beta-SNAPSHOT
arch=arm64
minsdk=23
maxsdk=28
requires:fbe_aware=1

View File

@ -1 +1,2 @@
/build
/template_override/system/framework/edxp.jar

View File

@ -52,10 +52,19 @@ afterEvaluate {
def variantNameCapped = variant.name.capitalize()
def variantNameLowered = variant.name.toLowerCase()
def myTemplatePath = "${projectDir}/template_override/"
task("makeAndCopy${variantNameCapped}", type: Jar, dependsOn: "assemble${variantNameCapped}") {
from "${buildDir}/intermediates/dex/${variantNameLowered}/mergeDex${variantNameCapped}/out/"
destinationDir file(templateFrameworkPath)
destinationDir file(myTemplatePath + "system/framework/")
baseName "edxp"
doLast {
copy {
from file(myTemplatePath)
into file(templateRootPath)
}
}
outputs.upToDateWhen { false }
}
}
}

View File

@ -0,0 +1 @@
libwhale.edxp.so

View File

@ -1,4 +1,4 @@
version=90.0-0.3.1.6-beta-SNAPSHOT
version=90.0-0.3.1.6-whale-beta-SNAPSHOT
arch=arm64
minsdk=23
maxsdk=28

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1 +1,2 @@
/build
/template_override/system/framework/edxp.jar

View File

@ -53,10 +53,19 @@ afterEvaluate {
def variantNameCapped = variant.name.capitalize()
def variantNameLowered = variant.name.toLowerCase()
def myTemplatePath = "${projectDir}/template_override/"
task("makeAndCopy${variantNameCapped}", type: Jar, dependsOn: "assemble${variantNameCapped}") {
from "${buildDir}/intermediates/dex/${variantNameLowered}/mergeDex${variantNameCapped}/out/"
destinationDir file(templateFrameworkPath)
destinationDir file(myTemplatePath + "system/framework/")
baseName "edxp"
doLast {
copy {
from file(myTemplatePath)
into file(templateRootPath)
}
}
outputs.upToDateWhen { false }
}
}
}

View File

@ -0,0 +1,5 @@
version=90.0-yahfa-0.3.1.6-beta-SNAPSHOT
arch=arm64
minsdk=23
maxsdk=28
requires:fbe_aware=1

Binary file not shown.

Binary file not shown.

Binary file not shown.