Commit f801f335 authored by Lucas Legrand's avatar Lucas Legrand

Update README.md

parent 1806fdd3
Introduction
-Introduction
Until today, integrating liblinphone sdk into a third party application required compiling a sdk from the sources or importing sdk binary files from: http://www.linphone.org/technical-corner/liblinphone/downloads .
In order to ease integration of this sdk, we adapted a Gitlab repository as a Maven one.
......@@ -9,7 +9,7 @@ With Gradle and this Maven repository, we now offer the ability to either host o
How to produce and host Liblinphone SDK on our Maven repository
-How to produce and host Liblinphone SDK on our Maven repository
To host Liblinphone SDK and allow future remote import, follow theses steps:
......@@ -17,42 +17,42 @@ To host Liblinphone SDK and allow future remote import, follow theses steps:
Get Linphone-Android and deploy locally Liblinphone SDK
git clone git@gitlab.linphone.org:BC/public/linphone-android.git
cd linphone-android
git checkout -b master origin/master
git submodule sync && git submodule update --init --recursive
./prepare.py -c && ./prepare.py && make
git clone git@gitlab.linphone.org:BC/public/linphone-android.git
cd linphone-android
git checkout -b master origin/master
git submodule sync && git submodule update --init --recursive
./prepare.py -c && ./prepare.py && make
Prepare the local Maven repository:
git clone https://gitlab.linphone.org/BC/public/maven_repository.git
git clone https://gitlab.linphone.org/BC/public/maven_repository.git
Set the liblinphone-sdk/build.gradle file as in the Maven repository.
It includes two parts:
apply plugin: 'maven'
apply plugin: 'maven'
...
...
///////////// Task /////////////
uploadArchives {
repositories {
mavenDeployer {
def home = "$System.env.HOME"
repository(url: 'file://localhost'+home+'/Workplace/maven_repository/')
pom.project {
groupId 'org.linphone.maven'
artifactId 'liblinphone-sdk'
version project.hasProperty("release") ? "4.0.0-RELEASE": "4.0.0"
///////////// Task /////////////
uploadArchives {
repositories {
mavenDeployer {
def home = "$System.env.HOME"
repository(url: 'file://localhost'+home+'/Workplace/maven_repository/')
pom.project {
groupId 'org.linphone.maven'
artifactId 'liblinphone-sdk'
version project.hasProperty("release") ? "4.0.0-RELEASE": "4.0.0"
}
}
}
}
}
Options explanation:
......@@ -69,7 +69,7 @@ Keep the -RELEASE part. Maven favors convention over configuration.
Check if linphone-android builds.
Then, in a terminal located at linphone-android's root, type:
gradle clean uploadArchives
gradle clean uploadArchives
Warning: If a not working version is produced, before building it again, clear the whole gradle cache ($HOME/.gradle/caches/), or gradle will produce the same.
......@@ -78,15 +78,15 @@ Warning: If a not working version is produced, before building it again, clear t
Sending files to our remote repositor
Go to your local maven_repository and in a terminal type:
git add org
git commit -m 'Your message'
git push
git add org
git commit -m 'Your message'
git push
How to use hosted Liblinphone SDK as a remote dependency
-How to use hosted Liblinphone SDK as a remote dependency
In another linphone-android project, edit linphone-android build.gradle as in the one located in maven_repository root.
......@@ -94,23 +94,23 @@ In another linphone-android project, edit linphone-android build.gradle as in th
Set our Maven repository source:
allprojects {
repositories {
maven{
url "https://gitlab.linphone.org/BC/public/maven_repository/raw/master"
allprojects {
repositories {
maven{
url "https://gitlab.linphone.org/BC/public/maven_repository/raw/master"
}
}
}
}
Change our local project dependency to remote dependency:
dependencies {
// implementation project(':liblinphone-sdk')
releaseImplementation 'org.linphone.maven:liblinphone-sdk:4.0.0-RELEASE'
debugImplementation 'org.linphone.maven:liblinphone-sdk:4.0.0'
}
dependencies {
// implementation project(':liblinphone-sdk')
releaseImplementation 'org.linphone.maven:liblinphone-sdk:4.0.0-RELEASE'
debugImplementation 'org.linphone.maven:liblinphone-sdk:4.0.0'
}
Comment release or debug line if no remote library is available for it.
Use again the settings provided in the creation part in order to give the way to gradle to find the right dependency:
......@@ -120,7 +120,7 @@ Use again the settings provided in the creation part in order to give the way to
In case of another library need, provided it is hosted, just change artifactId and version in accordance to its declaration in the creation part.
Sources:
-Sources:
All of theses served me to understand the way to produce this repository:
......
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