Added new releaseAppBundle target that adds full native libraries symbols
This commit is contained in:
parent
a1c61768d0
commit
32ee86f1f8
3 changed files with 19 additions and 3 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -23,5 +23,6 @@ res/value-hi_IN
|
||||||
linphone-sdk-android/*.aar
|
linphone-sdk-android/*.aar
|
||||||
app/debug
|
app/debug
|
||||||
app/release
|
app/release
|
||||||
|
app/releaseAppBundle
|
||||||
keystore.properties
|
keystore.properties
|
||||||
app/src/main/res/xml/contacts.xml
|
app/src/main/res/xml/contacts.xml
|
||||||
|
|
|
@ -52,6 +52,10 @@ to install the generated APK in the previous step (use installRelease instead if
|
||||||
|
|
||||||
APK files are stored within ```./app/build/outputs/apk/debug/``` and ```./app/build/outputs/apk/release/``` directories.
|
APK files are stored within ```./app/build/outputs/apk/debug/``` and ```./app/build/outputs/apk/release/``` directories.
|
||||||
|
|
||||||
|
When building a release AppBundle, use releaseAppBundle target instead of release.
|
||||||
|
Also make sure you have a NDK installed and that you have an environment variable named ```ANDROID_NDK_HOME``` that contains the path to the NDK.
|
||||||
|
This is to be able to include native libraries symbols into app bundle for the Play Store.
|
||||||
|
|
||||||
## Building a local SDK
|
## Building a local SDK
|
||||||
|
|
||||||
1. Clone the linphone-sdk repository from out gitlab:
|
1. Clone the linphone-sdk repository from out gitlab:
|
||||||
|
|
|
@ -62,7 +62,14 @@ android {
|
||||||
versionName "${project.version}"
|
versionName "${project.version}"
|
||||||
applicationId getPackageName()
|
applicationId getPackageName()
|
||||||
}
|
}
|
||||||
ndkVersion "21.3.6528147"
|
|
||||||
|
// Required to be able to generate app bundle with native libraries symbols, see releaseAppBundle below
|
||||||
|
def ndkHome = System.getenv('ANDROID_NDK_HOME')
|
||||||
|
if (ndkHome == null || !new File(ndkHome + "/source.properties").exists()) {
|
||||||
|
ndkVersion "21.3.6528147"
|
||||||
|
} else {
|
||||||
|
ndkPath ndkHome
|
||||||
|
}
|
||||||
|
|
||||||
applicationVariants.all { variant ->
|
applicationVariants.all { variant ->
|
||||||
variant.outputs.all {
|
variant.outputs.all {
|
||||||
|
@ -70,7 +77,7 @@ android {
|
||||||
}
|
}
|
||||||
|
|
||||||
// See https://developer.android.com/studio/releases/gradle-plugin#3-6-0-behavior for why extractNativeLibs is set to true in debug flavor
|
// See https://developer.android.com/studio/releases/gradle-plugin#3-6-0-behavior for why extractNativeLibs is set to true in debug flavor
|
||||||
if (variant.buildType.name == "release") {
|
if (variant.buildType.name == "release" || variant.buildType.name == "releaseAppBundle") {
|
||||||
variant.getMergedFlavor().manifestPlaceholders = [linphone_address_mime_type: "vnd.android.cursor.item/vnd." + getPackageName() + ".provider.sip_address",
|
variant.getMergedFlavor().manifestPlaceholders = [linphone_address_mime_type: "vnd.android.cursor.item/vnd." + getPackageName() + ".provider.sip_address",
|
||||||
linphone_file_provider: getPackageName() + ".fileprovider",
|
linphone_file_provider: getPackageName() + ".fileprovider",
|
||||||
appLabel: "@string/app_name",
|
appLabel: "@string/app_name",
|
||||||
|
@ -98,7 +105,6 @@ android {
|
||||||
|
|
||||||
buildTypes {
|
buildTypes {
|
||||||
release {
|
release {
|
||||||
ndk.debugSymbolLevel = 'SYMBOL_TABLE'
|
|
||||||
minifyEnabled true
|
minifyEnabled true
|
||||||
signingConfig signingConfigs.release
|
signingConfig signingConfigs.release
|
||||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||||
|
@ -112,6 +118,11 @@ android {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
releaseAppBundle {
|
||||||
|
initWith release
|
||||||
|
ndk.debugSymbolLevel = 'FULL'
|
||||||
|
}
|
||||||
|
|
||||||
debug {
|
debug {
|
||||||
applicationIdSuffix ".debug"
|
applicationIdSuffix ".debug"
|
||||||
debuggable true
|
debuggable true
|
||||||
|
|
Loading…
Reference in a new issue