mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 11:28:06 +00:00
[Switch submodule branch]
retrofit liblinphone sdk from dev_group_chat
(cherry picked from commit f24f1e4b53)
# Conflicts:
# submodules/linphone
This commit is contained in:
parent
ae70d532ec
commit
53eaaf965c
18 changed files with 176 additions and 151 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -30,6 +30,7 @@ project.properties
|
|||
res/.DS_Store
|
||||
res/raw/lpconfig.xsd
|
||||
res/raw/rootca.pem
|
||||
res/raw/*_grammar
|
||||
submodules/externals/build/cunit/CUnit/
|
||||
submodules/externals/build/ffmpeg/arm/
|
||||
submodules/externals/build/ffmpeg/x86
|
||||
|
|
|
|||
9
.gitmodules
vendored
9
.gitmodules
vendored
|
|
@ -108,3 +108,12 @@
|
|||
[submodule "submodules/bcmatroska2"]
|
||||
path = submodules/bcmatroska2
|
||||
url = git://git.linphone.org/bcmatroska2.git
|
||||
[submodule "submodules/externals/libxsd"]
|
||||
path = submodules/externals/libxsd
|
||||
url = git://git.linphone.org/libxsd
|
||||
[submodule "submodules/externals/soci"]
|
||||
path = submodules/externals/soci
|
||||
url = git://git.linphone.org/soci
|
||||
[submodule "submodules/externals/xerces-c"]
|
||||
path = submodules/externals/xerces-c
|
||||
url = git://git.linphone.org/xerces-c
|
||||
|
|
|
|||
269
build.gradle
269
build.gradle
|
|
@ -2,58 +2,56 @@
|
|||
buildDir = 'bin'
|
||||
|
||||
def getPackageName() {
|
||||
return "org.linphone"
|
||||
return "org.linphone"
|
||||
}
|
||||
|
||||
def firebaseEnable() {
|
||||
File googleFile = new File('google-services.json')
|
||||
return googleFile.exists()
|
||||
File googleFile = new File('google-services.json')
|
||||
return googleFile.exists()
|
||||
}
|
||||
|
||||
buildscript {
|
||||
File googleFile = new File('google-services.json')
|
||||
repositories {
|
||||
jcenter()
|
||||
mavenCentral()
|
||||
mavenLocal()
|
||||
google()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:3.1.0'
|
||||
if (googleFile.exists()) {
|
||||
classpath 'com.google.gms:google-services:3.1.0'
|
||||
File googleFile = new File('google-services.json')
|
||||
repositories {
|
||||
jcenter()
|
||||
mavenCentral()
|
||||
mavenLocal()
|
||||
google()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:3.1.0'
|
||||
if (googleFile.exists()) {
|
||||
classpath 'com.google.gms:google-services:3.1.0'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
allprojects {
|
||||
repositories {
|
||||
jcenter()
|
||||
mavenCentral()
|
||||
mavenLocal()
|
||||
google()
|
||||
}
|
||||
repositories {
|
||||
jcenter()
|
||||
mavenCentral()
|
||||
mavenLocal()
|
||||
google()
|
||||
}
|
||||
}
|
||||
|
||||
apply plugin: 'com.android.application'
|
||||
|
||||
dependencies {
|
||||
androidTestCompile('com.android.support.test.espresso:espresso-core:+') {
|
||||
exclude module: 'support-annotations'
|
||||
}
|
||||
androidTestCompile 'com.jayway.android.robotium:robotium-solo:+'
|
||||
androidTestCompile 'junit:junit:+'
|
||||
compile 'org.apache.commons:commons-compress:+'
|
||||
if (firebaseEnable()) {
|
||||
compile 'com.google.firebase:firebase-messaging:11.+'
|
||||
} else {
|
||||
compile fileTree(include: 'gcm.jar', dir: 'libs')
|
||||
compile 'com.android.support:support-v4:27.1.0'
|
||||
}
|
||||
androidTestImplementation('com.android.support.test.espresso:espresso-core:+') {
|
||||
exclude module: 'support-annotations'
|
||||
}
|
||||
androidTestImplementation 'com.jayway.android.robotium:robotium-solo:5.6.3'
|
||||
androidTestImplementation 'junit:junit:4.12'
|
||||
implementation 'org.apache.commons:commons-compress:1.16.1'
|
||||
if (firebaseEnable()) {
|
||||
implementation 'com.google.firebase:firebase-messaging:15.0.2'
|
||||
}
|
||||
implementation 'com.android.support:support-v4:26.0.1'
|
||||
}
|
||||
|
||||
if (firebaseEnable()) {
|
||||
apply plugin: 'com.google.gms.google-services'
|
||||
apply plugin: 'com.google.gms.google-services'
|
||||
}
|
||||
|
||||
//// Submodule Dir /////
|
||||
|
|
@ -61,20 +59,21 @@ def submoduleDir = ['submodules/mediastreamer2/java/src',
|
|||
'submodules/linphone/java/j2se',
|
||||
'submodules/linphone/java/common',
|
||||
'submodules/linphone/java/impl',
|
||||
'submodules/linphone/wrappers/java/classes/tools',
|
||||
'submodules/linphone/coreapi/help/examples/java']
|
||||
////////////////////////
|
||||
|
||||
///// Exclude Files /////
|
||||
def excludeFiles = []
|
||||
// Exclude firebase file if not enable
|
||||
def excludeFiles = ['H264Helper.java']// Exclude firebase file if not enable
|
||||
if (!firebaseEnable()) {
|
||||
excludeFiles.add('**/Firebase*')
|
||||
println '[Push Notification] Firebase disabled'
|
||||
excludeFiles.add('**/Firebase*')
|
||||
println '[Push Notification] Firebase disabled'
|
||||
} else {
|
||||
excludeFiles.add('**/gcm*')
|
||||
println '[Push Notification] Firebase enabled'
|
||||
excludeFiles.add('**/gcm*')
|
||||
println '[Push Notification] Firebase enabled'
|
||||
}
|
||||
excludeFiles.add('**/mediastream/MediastreamerActivity.java')
|
||||
excludeFiles.add('src/android/org/linphone/tutorials/*.java')
|
||||
|
||||
def excludePackage = []
|
||||
|
||||
|
|
@ -85,116 +84,116 @@ excludePackage.add('**/LICENSE.txt')
|
|||
/////////////////////////
|
||||
|
||||
android {
|
||||
defaultConfig {
|
||||
compileSdkVersion 26
|
||||
buildToolsVersion "27.0.3"
|
||||
applicationId getPackageName()
|
||||
multiDexEnabled true
|
||||
defaultConfig {
|
||||
compileSdkVersion 26
|
||||
applicationId getPackageName()
|
||||
multiDexEnabled true
|
||||
|
||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
lintOptions {
|
||||
checkReleaseBuilds false
|
||||
// Or, if you prefer, you can continue to check for errors in release builds,
|
||||
// but continue the build even when errors are found:
|
||||
abortOnError false
|
||||
disable 'MissingTranslation', 'UnusedResources'
|
||||
}
|
||||
// Signing
|
||||
signingConfigs {
|
||||
release {
|
||||
storeFile file(RELEASE_STORE_FILE)
|
||||
storePassword RELEASE_STORE_PASSWORD
|
||||
keyAlias RELEASE_KEY_ALIAS
|
||||
keyPassword RELEASE_KEY_PASSWORD
|
||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
}
|
||||
buildTypes {
|
||||
release {
|
||||
signingConfig signingConfigs.release
|
||||
lintOptions {
|
||||
checkReleaseBuilds false
|
||||
// Or, if you prefer, you can continue to check for errors in release builds,
|
||||
// but continue the build even when errors are found:
|
||||
abortOnError false
|
||||
disable 'MissingTranslation', 'UnusedResources'
|
||||
}
|
||||
packaged {
|
||||
initWith release
|
||||
signingConfig null
|
||||
// Signing
|
||||
signingConfigs {
|
||||
release {
|
||||
storeFile file(RELEASE_STORE_FILE)
|
||||
storePassword RELEASE_STORE_PASSWORD
|
||||
keyAlias RELEASE_KEY_ALIAS
|
||||
keyPassword RELEASE_KEY_PASSWORD
|
||||
}
|
||||
}
|
||||
}
|
||||
sourceSets {
|
||||
main {
|
||||
manifest.srcFile 'AndroidManifest.xml'
|
||||
def srcDirs = submoduleDir
|
||||
srcDirs.addAll(['src/android'])
|
||||
java.srcDirs = srcDirs
|
||||
resources.srcDirs = srcDirs
|
||||
aidl.srcDirs = srcDirs
|
||||
renderscript.srcDirs = srcDirs
|
||||
res.srcDirs = ['res']
|
||||
assets.srcDirs = ['assets']
|
||||
jniLibs.srcDirs = ['libs']
|
||||
java.excludes = excludeFiles
|
||||
buildTypes {
|
||||
release {
|
||||
signingConfig signingConfigs.release
|
||||
}
|
||||
packaged {
|
||||
initWith release
|
||||
signingConfig null
|
||||
}
|
||||
}
|
||||
sourceSets {
|
||||
main {
|
||||
manifest.srcFile 'AndroidManifest.xml'
|
||||
def srcDirs = submoduleDir
|
||||
srcDirs.addAll(['src/linphone-wrapper', 'src/android'])
|
||||
java.srcDirs = srcDirs
|
||||
resources.srcDirs = srcDirs
|
||||
aidl.srcDirs = srcDirs
|
||||
renderscript.srcDirs = srcDirs
|
||||
res.srcDirs = ['res']
|
||||
assets.srcDirs = ['assets']
|
||||
jniLibs.srcDirs = ['libs']
|
||||
java.excludes = excludeFiles
|
||||
|
||||
// Exclude some useless files
|
||||
packagingOptions {
|
||||
excludes = excludePackage
|
||||
}
|
||||
// Exclude some useless files
|
||||
packagingOptions {
|
||||
excludes = excludePackage
|
||||
}
|
||||
}
|
||||
|
||||
debug.setRoot('build-types/debug')
|
||||
release.setRoot('build-types/release')
|
||||
}
|
||||
sourceSets {
|
||||
androidTest {
|
||||
manifest.srcFile 'AndroidManifest.xml'
|
||||
def srcDirs = submoduleDir
|
||||
srcDirs.addAll(['src/android',
|
||||
'src/androidTest'])
|
||||
java.srcDirs = srcDirs
|
||||
resources.srcDirs = srcDirs
|
||||
aidl.srcDirs = srcDirs
|
||||
renderscript.srcDirs = srcDirs
|
||||
res.srcDirs = ['res']
|
||||
assets.srcDirs = ['assets']
|
||||
jniLibs.srcDirs = ['libs']
|
||||
java.excludes = excludeFiles
|
||||
|
||||
debug.setRoot('build-types/debug')
|
||||
release.setRoot('build-types/release')
|
||||
}
|
||||
sourceSets {
|
||||
androidTest {
|
||||
manifest.srcFile 'AndroidManifest.xml'
|
||||
def srcDirs = submoduleDir
|
||||
srcDirs.addAll(['src/android',
|
||||
'src/androidTest'])
|
||||
java.srcDirs = srcDirs
|
||||
resources.srcDirs = srcDirs
|
||||
aidl.srcDirs = srcDirs
|
||||
renderscript.srcDirs = srcDirs
|
||||
res.srcDirs = ['res']
|
||||
assets.srcDirs = ['assets']
|
||||
jniLibs.srcDirs = ['libs']
|
||||
java.excludes = excludeFiles
|
||||
// Exclude some useless files
|
||||
packagingOptions {
|
||||
excludes = excludePackage
|
||||
}
|
||||
}
|
||||
|
||||
// Exclude some useless files
|
||||
packagingOptions {
|
||||
excludes = excludePackage
|
||||
}
|
||||
debug.setRoot('build-types/debug')
|
||||
release.setRoot('build-types/release')
|
||||
}
|
||||
packagingOptions {
|
||||
pickFirst 'META-INF/NOTICE'
|
||||
pickFirst 'META-INF/LICENSE'
|
||||
pickFirst 'META-INF/MANIFEST.MF'
|
||||
}
|
||||
|
||||
debug.setRoot('build-types/debug')
|
||||
release.setRoot('build-types/release')
|
||||
}
|
||||
packagingOptions {
|
||||
pickFirst 'META-INF/NOTICE'
|
||||
pickFirst 'META-INF/LICENSE'
|
||||
exclude 'META-INF/MANIFEST.MF'
|
||||
}
|
||||
}
|
||||
|
||||
// Grant permissions
|
||||
android.applicationVariants.all { variant ->
|
||||
def applicationId = getPackageName()
|
||||
def adb = android.getAdbExecutable().toString()
|
||||
def variantName = variant.name.capitalize()
|
||||
def grantPermissionTask = tasks.create("grant${variantName}Permissions").doLast({
|
||||
"${adb} devices".execute().text.eachLine {
|
||||
"${adb} shell pm grant ${applicationId} android.permission.RECORD_AUDIO".execute()
|
||||
"${adb} shell pm grant ${applicationId} android.permission.WRITE_EXTERNAL_STORAGE".execute()
|
||||
"${adb} shell pm grant ${applicationId} android.permission.CAMERA".execute()
|
||||
"${adb} shell pm grant ${applicationId} android.permission.READ_PHONE_STATE".execute()
|
||||
"${adb} shell pm grant ${applicationId} android.permission.READ_CONTACTS".execute()
|
||||
"${adb} shell pm grant ${applicationId} android.permission.WRITE_CONTACTS".execute()
|
||||
}
|
||||
})
|
||||
def applicationId = getPackageName()
|
||||
def adb = android.getAdbExecutable().toString()
|
||||
def variantName = variant.name.capitalize()
|
||||
def grantPermissionTask = tasks.create("grant${variantName}Permissions").doLast({
|
||||
"${adb} devices".execute().text.eachLine {
|
||||
"${adb} shell pm grant ${applicationId} android.permission.RECORD_AUDIO".execute()
|
||||
"${adb} shell pm grant ${applicationId} android.permission.WRITE_EXTERNAL_STORAGE".execute()
|
||||
"${adb} shell pm grant ${applicationId} android.permission.CAMERA".execute()
|
||||
"${adb} shell pm grant ${applicationId} android.permission.READ_PHONE_STATE".execute()
|
||||
"${adb} shell pm grant ${applicationId} android.permission.READ_CONTACTS".execute()
|
||||
"${adb} shell pm grant ${applicationId} android.permission.WRITE_CONTACTS".execute()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
task runApplication {
|
||||
doLast {
|
||||
def result = exec {
|
||||
executable = android.getAdbExecutable().toString()
|
||||
ignoreExitValue true
|
||||
args = ['shell', 'monkey', '-p', getPackageName(), '-c', 'android.intent.category.LAUNCHER', '1']
|
||||
doLast {
|
||||
def result = exec {
|
||||
executable = android.getAdbExecutable().toString()
|
||||
ignoreExitValue true
|
||||
args = ['shell', 'monkey', '-p', getPackageName(), '-c', 'android.intent.category.LAUNCHER', '1']
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -21,5 +21,4 @@
|
|||
############################################################################
|
||||
|
||||
# Blacklist these dependencies because they are useless for now
|
||||
lcb_blacklist_dependencies("libxsd" "xerces-c" "soci")
|
||||
|
||||
#nop
|
||||
|
|
|
|||
|
|
@ -4,4 +4,5 @@ RELEASE_STORE_PASSWORD=
|
|||
RELEASE_KEY_ALIAS=
|
||||
RELEASE_KEY_PASSWORD=
|
||||
|
||||
#org.gradle.jvmargs=-XX\:MaxHeapSize\=2048M -Xmx2048M
|
||||
org.gradle.jvmargs=-Xmx1536M
|
||||
|
|
|
|||
23
prepare.py
23
prepare.py
|
|
@ -54,6 +54,7 @@ class AndroidTarget(prepare.Target):
|
|||
self.additional_args = [
|
||||
"-DLINPHONE_BUILDER_EXTERNAL_BUILDERS_PATH=" + external_builders_path
|
||||
]
|
||||
self.additional_args += ['-DENABLE_JAVA_WRAPPER=NO']
|
||||
|
||||
|
||||
class AndroidArmTarget(AndroidTarget):
|
||||
|
|
@ -95,18 +96,18 @@ android_targets = {
|
|||
'x86_64': AndroidX86_64Target()
|
||||
}
|
||||
|
||||
android_virtual_targets= {
|
||||
android_virtual_targets = {
|
||||
'all': ['arm', 'armv7', 'arm64', 'x86', 'x86_64']
|
||||
}
|
||||
|
||||
class AndroidPreparator(prepare.Preparator):
|
||||
|
||||
def __init__(self, targets=android_targets):
|
||||
prepare.Preparator.__init__(self, targets, default_targets=['armv7', 'arm64', 'x86'], virtual_targets=android_virtual_targets)
|
||||
self.min_supported_ndk = 11
|
||||
self.max_supported_ndk = 17
|
||||
prepare.Preparator.__init__(self, targets, default_targets=['armv7', 'arm64'], virtual_targets=android_virtual_targets)
|
||||
self.min_supported_ndk = 16
|
||||
self.max_supported_ndk = 16
|
||||
self.unsupported_ndk_version = None
|
||||
self.min_cmake_version = "3.7"
|
||||
self.min_cmake_version = "3.10"
|
||||
self.release_with_debug_info = True
|
||||
self.veryclean = True
|
||||
self.show_gpl_disclaimer = True
|
||||
|
|
@ -332,6 +333,18 @@ copy-libs:
|
|||
\tif test -d "liblinphone-sdk/android-x86/share/linphonej"; then \\
|
||||
\t\tcp -R liblinphone-sdk/android-x86/share/linphonej/java/* src/linphone-wrapper; \\
|
||||
\tfi
|
||||
\tif test -d "liblinphone-sdk/android-arm/share/belr/grammars"; then \\
|
||||
\t\tcp liblinphone-sdk/android-arm/share/belr/grammars/*_grammar res/raw/; \\
|
||||
\tfi
|
||||
\tif test -d "liblinphone-sdk/android-armv7/share/belr/grammars"; then \\
|
||||
\t\tcp liblinphone-sdk/android-armv7/share/belr/grammars/*_grammar res/raw/; \\
|
||||
\tfi
|
||||
\tif test -d "liblinphone-sdk/android-arm64/share/belr/grammars"; then \\
|
||||
\t\tcp liblinphone-sdk/android-arm64/share/belr/grammars/*_grammar res/raw/; \\
|
||||
\tfi
|
||||
\tif test -d "liblinphone-sdk/android-x86/share/belr/grammars"; then \\
|
||||
\t\tcp liblinphone-sdk/android-x86/share/belr/grammars/*_grammar res/raw/; \\
|
||||
\tfi
|
||||
|
||||
copy-libs-mediastreamer:
|
||||
\trm -rf submodules/mediastreamer2/java/libs/armeabi
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit 85e73f9fa892b09af8d71419a9079f8c804e70b7
|
||||
Subproject commit ca4a89930dd8db94a60ae4a1dbf44a3710497429
|
||||
|
|
@ -1 +1 @@
|
|||
Subproject commit b41ca6b5d85780990c2986f861b2f7832cb79e2e
|
||||
Subproject commit bc7a47598455d62a73a80f5df70f972b31be5fb8
|
||||
|
|
@ -1 +1 @@
|
|||
Subproject commit 2d04062e83f43ff249c6b0dad9fbdf7e3f4cd436
|
||||
Subproject commit b1622d7ddf1cbe6a0f929537861dfa8b45b293c4
|
||||
|
|
@ -1 +1 @@
|
|||
Subproject commit 61244560df5f4f45a495d8525e970aa73e4e3beb
|
||||
Subproject commit 8e841b047641b1812a83880a90e89d702747ca5b
|
||||
|
|
@ -1 +1 @@
|
|||
Subproject commit d16688298e83a496753c9d0c200962a1ed7dbc87
|
||||
Subproject commit d389b30b6c417d8bc7a79f561075a5c58871e3bc
|
||||
1
submodules/externals/libxsd
vendored
Submodule
1
submodules/externals/libxsd
vendored
Submodule
|
|
@ -0,0 +1 @@
|
|||
Subproject commit 34af5de2ee71dde72a010fde336d2efa9c386abd
|
||||
2
submodules/externals/mbedtls
vendored
2
submodules/externals/mbedtls
vendored
|
|
@ -1 +1 @@
|
|||
Subproject commit cb152c35ddf7cc837221072e7dc99809f0f7c885
|
||||
Subproject commit d9385339a5c2979786cfc844c0527593c14662c5
|
||||
1
submodules/externals/soci
vendored
Submodule
1
submodules/externals/soci
vendored
Submodule
|
|
@ -0,0 +1 @@
|
|||
Subproject commit d1fc622b2cbe5fe9b55959b32af054c7ae75e1a1
|
||||
2
submodules/externals/srtp
vendored
2
submodules/externals/srtp
vendored
|
|
@ -1 +1 @@
|
|||
Subproject commit a752d47da1a80e634f81a57bb975b6a80fc14ffa
|
||||
Subproject commit 4a5ea6a64043038f4a4ac0f18d54db02a08d9b92
|
||||
1
submodules/externals/xerces-c
vendored
Submodule
1
submodules/externals/xerces-c
vendored
Submodule
|
|
@ -0,0 +1 @@
|
|||
Subproject commit 4a6d98d2ad797c37a9d12c1da772ca813c2f95b7
|
||||
|
|
@ -1 +1 @@
|
|||
Subproject commit 87b973e0560a590db0aed0bf657c4e79dfc72f7f
|
||||
Subproject commit e7722332645b324dfc6aba3e94ab71750a3c0fd7
|
||||
|
|
@ -1 +1 @@
|
|||
Subproject commit 4cea5e6e7b6da329030b4f34b66a6168b864bb1d
|
||||
Subproject commit 1fcd6fd1558f26255ae9dac687191ddf988bfd5b
|
||||
Loading…
Add table
Reference in a new issue