tasks.whenTaskAdded { task ->
if (task.name == 'assemble') {
task.dependsOn copyAssets
}
}
task copyAssets() {
println ("copyAssets")
delete "$project.buildDir/../../navigationView/src/main/assets/"
// variantDir's example: arp_na/debug
copy {
from "$project.buildDir/../../ARP/build/intermediates/assets/release/mapengine_config/"
into "$project.buildDir/../../navigationView/src/main/assets/mapengine_config/"
}
copy {
from "$project.buildDir/../../ARP/build/intermediates/assets/release/cn/mapengine_config/"
into "$project.buildDir/../../navigationView/src/main/assets/cn/mapengine_config/"
}
copy {
from "$project.buildDir/../../ARP/build/intermediates/assets/release/kr/mapengine_config/"
into "$project.buildDir/../../navigationView/src/main/assets/kr/mapengine_config/"
}
copy {
from "$project.buildDir/../../ARP/build/intermediates/assets/release/eu/mapengine_config/"
into "$project.buildDir/../../navigationView/src/main/assets/eu/mapengine_config/"
}
copy {
// use cluster es2_config for porch view
from "$project.buildDir/../../ARP/src/main/assets/CLUSTER/mapengine_config/config/es2_config.json"
into "$project.buildDir/../../navigationView/src/main/assets/mapengine_config/config/"
}
copy {
from "$project.buildDir/../../ARP/build/intermediates/assets/release/autosdk_config/config/traffic_config/"
into "$project.buildDir/../../navigationView/src/main/assets/traffic_config/"
}
copy {
from "$project.buildDir/../../ARP/build/intermediates/assets/release/fonts/"
into "$project.buildDir/../../navigationView/src/main/assets/fonts/"
}
copy {
from "$project.buildDir/../../ARP/build/intermediates/assets/release/autosdk_config/config/backend_config/"
into "$project.buildDir/../../navigationView/src/main/assets/backend_config/"
}
copy {
from "$project.buildDir/../../ARP/build/navigationViewAIDL/build/intermediates/bundles/release/classes.jar"
into "$project.buildDir/../../navigationView/libs"
include "**"
rename("classes.jar", "navigationViewAIDL.jar")
}
}
网友评论