summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcyberta <cyberta@riseup.net>2019-11-26 03:33:50 +0100
committercyberta <cyberta@riseup.net>2019-11-26 03:33:50 +0100
commitdde51373bb08a7a13aca50259f533fbd85cef53d (patch)
tree9d8ab2bb4d4cd37f8382a1ff529c314151990cd5
parent66588f76e9b255466eaad2d34edfa87a66c2ff69 (diff)
remove unrelated abi specific assets in split apk builds
-rw-r--r--app/build.gradle20
1 files changed, 19 insertions, 1 deletions
diff --git a/app/build.gradle b/app/build.gradle
index 988b0a31..1a4e7632 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -60,7 +60,7 @@ android {
flavorDimensions "branding", "implementation", "abi"
productFlavors {
productFlavors.all {
- ext.appName = null;
+ ext.appName = null
ext.splitApk = false
}
production {
@@ -125,6 +125,7 @@ android {
dimension "abi"
ext {
abiVersionCode = 0
+ abiFilter = ""
}
}
@@ -135,6 +136,7 @@ android {
}
ext {
abiVersionCode = 1
+ abiFilter = "x86"
}
}
@@ -145,6 +147,7 @@ android {
}
ext {
abiVersionCode = 2
+ abiFilter = "armeabi-v7a"
}
}
@@ -155,6 +158,7 @@ android {
}
ext {
abiVersionCode = 3
+ abiFilter = "x86_64"
}
}
@@ -165,6 +169,7 @@ android {
}
ext {
abiVersionCode = 4
+ abiFilter = "arm64-v8a"
}
}
}
@@ -333,6 +338,19 @@ android.applicationVariants.all { variant ->
output.versionCodeOverride = android.defaultConfig.versionCode * 1000 + abiDimension.abiVersionCode
}
}
+
+ // remove unrelated abi specific assets
+ variant.mergeAssets.doLast {
+ // if not a fat build
+ if (abiDimension.abiVersionCode > 0) {
+ def filesToDelete = fileTree(dir: variant.mergeAssets.outputDir, excludes: ["*pie_openvpn.${abiDimension.abiFilter}",
+ 'urls/',
+ '*.url',
+ '*.json',
+ '*.pem'])
+ delete(filesToDelete)
+ }
+ }
}