Commit 25cc459c authored by jehan's avatar jehan

merge tmp/lime_v2 into master

parents b10caf77 d6b95048
......@@ -486,7 +486,7 @@ job-ubuntu-rolling-ninja-clang-novideo:
- ccache -s
- mkdir -p build-desktop
- cd build-desktop
- cmake .. -G "$CMAKE_GENERATOR" -DLINPHONESDK_PLATFORM=Desktop -DCMAKE_OSX_DEPLOYMENT_TARGET=10.9 $CMAKE_OPTIONS
- cmake .. -G "$CMAKE_GENERATOR" -DLINPHONESDK_PLATFORM=Desktop -DCMAKE_OSX_DEPLOYMENT_TARGET=10.9 $DEFAULT_CMAKE_OPTIONS $CMAKE_OPTIONS
- cmake --build . --target sdk -- $ADDITIONAL_BUILD_OPTIONS
- ccache -s
......@@ -527,7 +527,7 @@ job-macosx-xcode:
script:
- mkdir -p build-desktop
- cd build-desktop
- cmake .. -G Xcode -DLINPHONESDK_PLATFORM=Desktop -DCMAKE_OSX_DEPLOYMENT_TARGET=10.9 $CMAKE_OPTIONS
- cmake .. -G Xcode -DLINPHONESDK_PLATFORM=Desktop -DCMAKE_OSX_DEPLOYMENT_TARGET=10.9 $DEFAULT_CMAKE_OPTIONS $CMAKE_OPTIONS
- cmake --build . --target sdk -- -IDEBuildOperationMaxNumberOfConcurrentCompileTasks=`sysctl -n hw.ncpu`
......@@ -539,7 +539,7 @@ job-windows-vs2015:
script:
- mkdir build-desktop
- cd build-desktop
- cmake .. -G "Visual Studio 14 2015" -DLINPHONESDK_PLATFORM=Desktop -DCMAKE_BUILD_TYPE=Release %CMAKE_OPTIONS%
- cmake .. -G "Visual Studio 14 2015" -DLINPHONESDK_PLATFORM=Desktop -DCMAKE_BUILD_TYPE=Release %DEFAULT_CMAKE_OPTIONS% %CMAKE_OPTIONS%
- cmake --build . --target sdk --config Release -- /maxcpucount
......
Subproject commit da379dcd9581a84b0f6f570aa2564309337636c1
Subproject commit 5175d83374ff933f5dd31b70cdc9a71e48f6e3db
<?xml version="1.0" encoding="utf-8"?>
<manifest package="org.linphone.core"
xmlns:android="http://schemas.android.com/apk/res/android"
android:installLocation="auto"
android:versionCode="4001"
android:versionName="4.0.0">
<uses-sdk
android:minSdkVersion="16"
android:targetSdkVersion="28"/>
xmlns:android="http://schemas.android.com/apk/res/android"
android:installLocation="auto">
</manifest>
......@@ -19,20 +19,22 @@ allprojects {
jcenter()
mavenCentral()
mavenLocal()
maven { url "https://raw.github.com/synergian/wagon-git/releases"}
}
}
configurations {
javadocDeps
deployerJars
}
apply plugin: 'com.android.library'
apply plugin: 'maven'
dependencies {
implementation 'org.apache.commons:commons-compress:1.16.1'
javadocDeps 'org.apache.commons:commons-compress:1.16.1'
deployerJars "ar.com.synergian:wagon-git:0.2.5"
}
def rootSdk = '@LINPHONESDK_BUILD_DIR@/linphone-sdk/android-@LINPHONESDK_FIRST_ARCH@'
......@@ -44,9 +46,34 @@ def excludePackage = []
excludePackage.add('**/gdb.*')
excludePackage.add('**/libopenh264**')
excludePackage.add('**/**tester**')
excludePackage.add('**/LICENSE.txt')
def gitVersion = new ByteArrayOutputStream()
def gitBranch = new ByteArrayOutputStream()
task getGitVersion {
exec {
commandLine 'git', 'describe', '--always'
standardOutput = gitVersion
}
exec {
commandLine 'git', 'name-rev', '--name-only', 'HEAD'
standardOutput = gitBranch
}
doLast {
def branchSplit = gitBranch.toString().trim().split('/')
def splitLen = branchSplit.length
if (splitLen == 4) {
gitBranch = branchSplit[2] + '/' + branchSplit[3]
println("Local repository seems to be in detached head state, using last 2 segments of Git branch: " + gitBranch.toString().trim())
} else {
println("Git branch: " + gitBranch.toString().trim())
}
}
}
project.tasks['preBuild'].dependsOn 'getGitVersion'
android {
buildTypes {
......@@ -57,6 +84,10 @@ android {
defaultConfig {
compileSdkVersion 28
buildToolsVersion "28.0.0"
minSdkVersion 16
targetSdkVersion 28
versionCode 4100
versionName "4.1"
multiDexEnabled true
setProperty("archivesBaseName", "linphone-sdk-android")
consumerProguardFiles "${buildDir}/proguard.txt"
......@@ -76,12 +107,20 @@ android {
signingConfig signingConfigs.release
minifyEnabled true
useProguard true
proguardFiles "${buildDir}/proguard.txt"
resValue "string", "linphone_sdk_version", gitVersion.toString().trim()
resValue "string", "linphone_sdk_branch", gitBranch.toString().trim()
}
packaged {
initWith release
signingConfig null
//matchingFallbacks = ['debug', 'release']
}
debug {
debuggable true
resValue "string", "linphone_sdk_version", gitVersion.toString().trim() + "-debug"
resValue "string", "linphone_sdk_branch", gitBranch.toString().trim()
}
}
lintOptions {
......@@ -165,7 +204,7 @@ task copyAssets(type: Sync) {
}
doFirst {
println("Syncing sdk assets into root dir ${destinationDir}")
}
}
// do not copy those
includeEmptyDirs = false
......@@ -173,3 +212,19 @@ task copyAssets(type: Sync) {
project.tasks['preBuild'].dependsOn 'copyAssets'
project.tasks['preBuild'].dependsOn 'copyProguard'
uploadArchives {
repositories {
mavenDeployer {
configuration = configurations.deployerJars
repository(url: 'git:' + gitBranch.toString().trim() + '://git@gitlab.linphone.org:BC/public/maven_repository.git')
pom.project {
groupId 'org.linphone'
artifactId 'linphone-sdk-android'
version gitVersion.toString().trim()
}
}
}
}
project.tasks['uploadArchives'].dependsOn 'getGitVersion'
Subproject commit 4c8be2e9603c47378b10b07cf698a0540891cf0e
Subproject commit 1f9ff61b346ff59d9cac4290b4361a8b845c2bcc
*.iml
.gradle
/local.properties
/.idea
.DS_Store
/build
/captures
.externalNativeBuild
To run all the tests:
./gradlew installDebugAndroidTest
./gradlew installDebug
./gradlew grantPermissions
./gradlew connectAndroidTest -i
To run a specific suite:
adb shell am instrument -w -r -e debug false -e class 'org.linphone.tester.<suite name>Tests' org.linphone.tester.test/android.support.test.runner.AndroidJUnitRunner
apply plugin: 'com.android.application'
def excludePackage = []
excludePackage.add('**/gdb.*')
excludePackage.add('**/libopenh264**')
excludePackage.add('**/LICENSE.txt')
android {
compileSdkVersion 28
defaultConfig {
applicationId "org.linphone.tester"
minSdkVersion 16
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
testOptions {
// Changes the directory where Gradle saves test reports. By default, Gradle saves test reports
// in the path_to_your_project/module_name/build/outputs/reports/ directory.
// '$rootDir' sets the path relative to the root directory of the current project.
reportDir "$rootDir/"
// Changes the directory where Gradle saves test results. By default, Gradle saves test results
// in the path_to_your_project/module_name/build/outputs/test-results/ directory.
// '$rootDir' sets the path relative to the root directory of the current project.
resultsDir "$rootDir/"
}
sourceSets {
main {
packagingOptions {
excludes = excludePackage
}
}
}
packagingOptions {
pickFirst 'META-INF/NOTICE'
pickFirst 'META-INF/LICENSE'
exclude 'META-INF/MANIFEST.MF'
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation project(":linphone-sdk-android")
// Required for local unit tests (JUnit 4 framework)
implementation 'junit:junit:4.12'
// Required for instrumented tests
implementation 'com.android.support:support-annotations:24.0.0'
implementation 'com.android.support.test:runner:0.5'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:design:28.0.0'
}
// Grant permissions
task grantPermissions {
def adb = android.getAdbExecutable().toString()
"${adb} devices".execute().text.eachLine {
if(it.endsWith("device")){
def device = it.split()[0]
println "Granting permissions on devices ${device}"
"${adb} shell pm grant ${android.defaultConfig.applicationId} android.permission.RECORD_AUDIO".execute()
"${adb} shell pm grant ${android.defaultConfig.applicationId} android.permission.WRITE_EXTERNAL_STORAGE".execute()
"${adb} shell pm grant ${android.defaultConfig.applicationId} android.permission.CAMERA".execute()
"${adb} shell pm grant ${android.defaultConfig.applicationId} android.permission.WRITE_EXTERNAL_STORAGE".execute()
}
}
}
\ No newline at end of file
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.linphone.tester"
android:sharedUserId="org.linphone.tester">
<instrumentation
android:name="android.support.test.runner.AndroidJUnitRunner"
android:targetPackage="org.linphone.tester">
<meta-data
android:name="class"
android:value="org.linphone.tester.AllTests" />
</instrumentation>
</manifest>
package org.linphone.tester;
import junit.framework.TestSuite;
import org.junit.runner.RunWith;
@RunWith(org.junit.runners.AllTests.class)
public class AccountCreatorTests {
public static TestSuite suite() {
TestSuite testSuites = new TestSuite();
testSuites.setName("Account creator");
LinphoneTestSuite testsList = new LinphoneTestSuite();
testsList.run(new String[]{"tester", "--list-tests", "Account creator"});
for (String testName: testsList.getList()) {
LinphoneTest test = new LinphoneTest("Account creator", testName);
testSuites.addTest(test);
}
return testSuites;
}
}
package org.linphone.tester;
import junit.framework.TestSuite;
import org.junit.runner.RunWith;
@RunWith(org.junit.runners.AllTests.class)
public class AllTests {
public static TestSuite suite() {
TestSuite testSuites = new TestSuite();
testSuites.setName("All suites");
LinphoneTestSuite suitesList = new LinphoneTestSuite();
suitesList.run(new String[]{"tester", "--list-suites"});
for (String suiteName : suitesList.getList()) {
LinphoneTestSuite testsList = new LinphoneTestSuite();
testsList.run(new String[]{"tester", "--list-tests", suiteName});
for (String testName: testsList.getList()) {
LinphoneTest test = new LinphoneTest(suiteName, testName);
testSuites.addTest(test);
}
}
return testSuites;
}
}
package org.linphone.tester;
import junit.framework.TestSuite;
import org.junit.runner.RunWith;
@RunWith(org.junit.runners.AllTests.class)
public class AudioBypassTests {
public static TestSuite suite() {
TestSuite testSuites = new TestSuite();
testSuites.setName("Audio Bypass");
LinphoneTestSuite testsList = new LinphoneTestSuite();
testsList.run(new String[]{"tester", "--list-tests", "Audio Bypass"});
for (String testName: testsList.getList()) {
LinphoneTest test = new LinphoneTest("Audio Bypass", testName);
testSuites.addTest(test);
}
return testSuites;
}
}
package org.linphone.tester;
import junit.framework.TestSuite;
import org.junit.runner.RunWith;
@RunWith(org.junit.runners.AllTests.class)
public class ClonableObjectTests {
public static TestSuite suite() {
TestSuite testSuites = new TestSuite();
testSuites.setName("ClonableObject");
LinphoneTestSuite testsList = new LinphoneTestSuite();
testsList.run(new String[]{"tester", "--list-tests", "ClonableObject"});
for (String testName: testsList.getList()) {
LinphoneTest test = new LinphoneTest("ClonableObject", testName);
testSuites.addTest(test);
}
return testSuites;
}
}
package org.linphone.tester;
import junit.framework.TestSuite;
import org.junit.runner.RunWith;
@RunWith(org.junit.runners.AllTests.class)
public class ConferenceEventTests {
public static TestSuite suite() {
TestSuite testSuites = new TestSuite();
testSuites.setName("Conference event");
LinphoneTestSuite testsList = new LinphoneTestSuite();
testsList.run(new String[]{"tester", "--list-tests", "Conference event"});
for (String testName: testsList.getList()) {
LinphoneTest test = new LinphoneTest("Conference event", testName);
testSuites.addTest(test);
}
return testSuites;
}
}
package org.linphone.tester;
import junit.framework.TestSuite;
import org.junit.runner.RunWith;
@RunWith(org.junit.runners.AllTests.class)
public class ContentsTests {
public static TestSuite suite() {
TestSuite testSuites = new TestSuite();
testSuites.setName("Contents");
LinphoneTestSuite testsList = new LinphoneTestSuite();
testsList.run(new String[]{"tester", "--list-tests", "Contents"});
for (String testName: testsList.getList()) {
LinphoneTest test = new LinphoneTest("Contents", testName);
testSuites.addTest(test);
}
return testSuites;
}
}
package org.linphone.tester;
import junit.framework.TestSuite;
import org.junit.runner.RunWith;
@RunWith(org.junit.runners.AllTests.class)
public class CpimTests {
public static TestSuite suite() {
TestSuite testSuites = new TestSuite();
testSuites.setName("Cpim");
LinphoneTestSuite testsList = new LinphoneTestSuite();
testsList.run(new String[]{"tester", "--list-tests", "Cpim"});
for (String testName: testsList.getList()) {
LinphoneTest test = new LinphoneTest("Cpim", testName);
testSuites.addTest(test);
}
return testSuites;
}
}
package org.linphone.tester;
import junit.framework.TestSuite;
import org.junit.runner.RunWith;
@RunWith(org.junit.runners.AllTests.class)
public class DTMFTests {
public static TestSuite suite() {
TestSuite testSuites = new TestSuite();
testSuites.setName("DTMF");
LinphoneTestSuite testsList = new LinphoneTestSuite();
testsList.run(new String[]{"tester", "--list-tests", "DTMF"});
for (String testName: testsList.getList()) {
LinphoneTest test = new LinphoneTest("DTMF", testName);
testSuites.addTest(test);
}
return testSuites;
}
}
package org.linphone.tester;
import junit.framework.TestSuite;
import org.junit.runner.RunWith;
@RunWith(org.junit.runners.AllTests.class)
public class EventTests {
public static TestSuite suite() {
TestSuite testSuites = new TestSuite();
testSuites.setName("Event");
LinphoneTestSuite testsList = new LinphoneTestSuite();
testsList.run(new String[]{"tester", "--list-tests", "Event"});
for (String testName: testsList.getList()) {
LinphoneTest test = new LinphoneTest("Event", testName);
testSuites.addTest(test);
}
return testSuites;
}
}
package org.linphone.tester;
import junit.framework.TestSuite;
import org.junit.runner.RunWith;
@RunWith(org.junit.runners.AllTests.class)
public class FlexisipTests {
public static TestSuite suite() {
TestSuite testSuites = new TestSuite();
testSuites.setName("Flexisip");
LinphoneTestSuite testsList = new LinphoneTestSuite();
testsList.run(new String[]{"tester", "--list-tests", "Flexisip"});
for (String testName: testsList.getList()) {
LinphoneTest test = new LinphoneTest("Flexisip", testName);
testSuites.addTest(test);
}
return testSuites;
}
}
package org.linphone.tester;
import junit.framework.TestSuite;
import org.junit.runner.RunWith;
@RunWith(org.junit.runners.AllTests.class)
public class GroupChatTests {
public static TestSuite suite() {
TestSuite testSuites = new TestSuite();
testSuites.setName("Group Chat");
LinphoneTestSuite testsList = new LinphoneTestSuite();
testsList.run(new String[]{"tester", "--list-tests", "Group Chat"});
for (String testName: testsList.getList()) {
LinphoneTest test = new LinphoneTest("Group Chat", testName);
testSuites.addTest(test);
}
return testSuites;
}
}
package org.linphone.tester;
import junit.framework.TestSuite;
import org.junit.runner.RunWith;
@RunWith(org.junit.runners.AllTests.class)
public class LogCollectionTests {
public static TestSuite suite() {
TestSuite testSuites = new TestSuite();
testSuites.setName("LogCollection");
LinphoneTestSuite testsList = new LinphoneTestSuite();
testsList.run(new String[]{"tester", "--list-tests", "LogCollection"});
for (String testName: testsList.getList()) {
LinphoneTest test = new LinphoneTest("LogCollection", testName);
testSuites.addTest(test);
}
return testSuites;
}
}
package org.linphone.tester;
import junit.framework.TestSuite;
import org.junit.runner.RunWith;
@RunWith(org.junit.runners.AllTests.class)
public class MainDbTests {
public static TestSuite suite() {
TestSuite testSuites = new TestSuite();
testSuites.setName("MainDb");
LinphoneTestSuite testsList = new LinphoneTestSuite();
testsList.run(new String[]{"tester", "--list-tests", "MainDb"});
for (String testName: testsList.getList()) {
LinphoneTest test = new LinphoneTest("MainDb", testName);
testSuites.addTest(test);
}
return testSuites;
}
}
package org.linphone.tester;
import junit.framework.TestSuite;
import org.junit.runner.RunWith;
@RunWith(org.junit.runners.AllTests.class)
public class MessageTests {
public static TestSuite suite() {
TestSuite testSuites = new TestSuite();
testSuites.setName("Message");
LinphoneTestSuite testsList = new LinphoneTestSuite();
testsList.run(new String[]{"tester", "--list-tests", "Message"});
for (String testName: testsList.getList()) {
LinphoneTest test = new LinphoneTest("Message", testName);
testSuites.addTest(test);
}
return testSuites;
}
}
package org.linphone.tester;
import junit.framework.TestSuite;
import org.junit.runner.RunWith;
@RunWith(org.junit.runners.AllTests.class)
public class MultiCallTests {
public static TestSuite suite() {
TestSuite testSuites = new TestSuite();
testSuites.setName("Multi call");
LinphoneTestSuite testsList = new LinphoneTestSuite();
testsList.run(new String[]{"tester", "--list-tests", "Multi call"});
for (String testName: testsList.getList()) {
LinphoneTest test = new LinphoneTest("Multi call", testName);
testSuites.addTest(test);
}
return testSuites;
}
}
package org.linphone.tester;
import junit.framework.TestSuite;
import org.junit.runner.RunWith;
@RunWith(org.junit.