gradle: Autogenerate profiles2.zip and add as asset
This commit is contained in:
parent
e8d8dcda4a
commit
bfe50a349b
2 changed files with 20 additions and 0 deletions
|
@ -16,6 +16,8 @@ android {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sourceSets.main.assets.srcDirs += new File(project.buildDir, 'assets')
|
||||||
|
|
||||||
if(project.hasProperty("RELEASE_STORE_FILE")) {
|
if(project.hasProperty("RELEASE_STORE_FILE")) {
|
||||||
signingConfigs {
|
signingConfigs {
|
||||||
// this uses a file ~/.gradle/gradle.properties
|
// this uses a file ~/.gradle/gradle.properties
|
||||||
|
@ -82,6 +84,9 @@ android {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
applicationVariants.all {
|
||||||
|
variant -> tasks["merge${variant.name.capitalize()}Assets"].dependsOn(generateProfilesZip)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
@ -94,3 +99,18 @@ dependencies {
|
||||||
implementation project(':brouter-util')
|
implementation project(':brouter-util')
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
task generateProfiles(type: Exec) {
|
||||||
|
commandLine = "../misc/scripts/generate_profile_variants.sh"
|
||||||
|
}
|
||||||
|
|
||||||
|
task generateProfilesZip(type: Zip) {
|
||||||
|
dependsOn generateProfiles
|
||||||
|
archiveFileName = "profiles2.zip"
|
||||||
|
from "../misc/profiles2"
|
||||||
|
exclude "all.brf"
|
||||||
|
exclude "car-traffic_analysis.brf"
|
||||||
|
exclude "car-vario.brf"
|
||||||
|
exclude "softaccess.brf"
|
||||||
|
destinationDirectory = layout.buildDirectory.dir('assets')
|
||||||
|
}
|
||||||
|
|
Binary file not shown.
Loading…
Reference in a new issue