Kaydet (Commit) 66518ead authored tarafından Christian Lohmaier's avatar Christian Lohmaier

use extractNativeLibs="false" for less disk usage and faster installation

no need to extract the (huge) nativve lib to the device's filesystem on
newer android versions (Marshmallow and later) - can access the .so from
within the apk if it is uncompressed.
While the standalone apk will be larger, the delta-update mechanism of
playstore can be more efficient, so you get:
* faster installation (since the file doesn't need to be extracted)
* less disk usage on device (for same reason)
* smaller delta-updates for playstore

drawbacks
* larger standalone apk
* on older android version more storage needed (the increased size of
the standalone apk), as those will still extract the native-lib

Unfortunately uncompressed it exceeds the current maximum size for
single apk files in playstore (100MB), so cannot use for release-builds

also revive installLocation attribute to allow installation on external
storage and move from manifestPlaceholders from defaultConfig to release
buildType (as otherwise gradle complains about having "Multiple entries
with same key")

Change-Id: Id07ac9c144886bb89abaf7b5b4bc7bd548f27247
üst e1910021
......@@ -12,7 +12,9 @@
<application
android:name=".LibreOfficeApplication"
android:allowBackup="true"
android:extractNativeLibs="${extractNativeLibs}"
android:icon="@mipmap/ic_launcher"
android:installLocation="${installLocation}"
android:label="@string/app_name"
android:theme="@style/LibreOfficeTheme"
android:debuggable="true"
......
......@@ -64,7 +64,6 @@ android {
// 22 treats them as warnings, on 23 it is fatal error
// ToDo: fix openssl stuff to not block targeting 23 or later
targetSdkVersion 22
manifestPlaceholders = [installLocation: "preferExternal"]
vectorDrawables.useSupportLibrary = true
}
buildTypes {
......@@ -72,7 +71,12 @@ android {
// make android studio happy...
jniDebuggable true
// would work just fine with external, but setting emulator up is a little more work
manifestPlaceholders = [installLocation: "internalOnly"]
manifestPlaceholders = [installLocation: "auto", extractNativeLibs: "false"]
}
release {
// need to extract native libs (allow to compress them in apk), since otherwise would
// exceed maximum size for playstore
manifestPlaceholders = [installLocation: "preferExternal", extractNativeLibs: "true"]
}
}
productFlavors {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment