Split APK for ABIs and auto-increment version code.
diff --git a/app/build.gradle b/app/build.gradle
index cdac23c..616da0b 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -17,5 +17,24 @@
defaultConfig {
minSdkVersion 16
targetSdkVersion 25
+ versionName '1.11.0'
+ versionCode 10
+ }
+
+ splits {
+ abi {
+ enable true
+ universalApk true
+ }
+ }
+
+ // Increment version code for each ABI variant
+ def abiOffsets = [ 'armeabi':1, 'armeabi-v7a':2, 'arm64-v8a':3, 'x86':4, 'x86_64':5, 'mips':6, 'mips64':7, ]
+ applicationVariants.all { variant ->
+ variant.outputs.each { output ->
+ def offset = abiOffsets.get(output.getFilter(com.android.build.OutputFile.ABI))
+ if (offset != null)
+ output.versionCodeOverride = variant.versionCode + offset
+ }
}
}
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 2f43d7f..20f3ddf 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -2,8 +2,6 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.artifex.mupdf.demo"
android:installLocation="auto"
- android:versionCode="10"
- android:versionName="1.11 (git)"
>
<uses-sdk
android:minSdkVersion="16"