Commit b768b075 authored by Lucas Legrand's avatar Lucas Legrand

After deletion of gradle cache, 4.0.0 version could work on android mobile...

After deletion of gradle cache, 4.0.0 version could work on android mobile phone again. Readme.md filled to describe the steps to use this repository
parent 7460105a
Temporary Readme, will be filled up when this project will be functional.
INTRODUCTION
This project's aim was to allow gradle to retrieve the sdk from a remote repository.
To do so, i decided to create a Maven repository from this Git one.
I used 2 android-linphone projects in order to make it work:
one to produce .aar files and generate Maven artifacts, the other one retrieving the dependencie from the repository.
PRODUCTION
We need a project with a liblinphone-sdk built allowing linphone-android application to build.
In this part we will modify only liblinphone-sdk build.gradle file.
-Add the following line among others apply:
apply plugin: 'maven'
-In the Task part:
uploadArchives {
repositories {
mavenDeployer {
repository(url: 'file://localhost/tmp/artifacts/')
pom.project {
groupId 'org.linphone.maven'
artifactId 'liblinphone-sdk'
version "4.0.0"
}
}
}
}
Options explanation:
-repository: the place where all Maven files and .aar are going to be built.
It is currently on local hard drive, then sent on our repository with Git.
-pom.project: theses options will define the way we call the dependency in our EXPLOITATION project,
as following: 'groupId:artifactId:version'
Check if linphone-android builds.
Then, in a terminal located at linphone-android's root, type:
gradle clean uploadArchives
In /tmp/artifacts (in our example), start a git project and push produced files to this repository.
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.
EXPLOITATION
In this second project, we remove all previous dependency to liblinphone-sdk subproject,
from linphone-android build.gradle file, settings.gradle and can delete liblinphone-sdk folder.
Additions must be made in build.gradle:
-In allprojects/repositories:
maven{
url "https://gitlab.linphone.org/BC/public/maven_repository/raw/releases"
}
Keep the raw part even with future libraries, it shows the way to the real files, not thoses displayed in the web browser. The releases part is the branch.
-In dependencies:
Replace implementation project(':liblinphone-sdk')
With implementation 'org.linphone.maven:liblinphone-sdk:4.0.0'
As you can see, we reuse the settings provided in the PRODUCTION part in order to give the way to gradle to find the right dependency.
You can now build linphone-android as the dependency is provided remotely.
FEATURES THAT CAN BE INCLUDED:
-Send .aar and Maven files to this repository through Git in Android Studio
-Create controllers about version exclusivity
6c6435f5eea84080087c88d2e2c7a098
\ No newline at end of file
b3871d670c57e1d5ef4c5a4ae506b4d48255c281
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>org.linphone.maven</groupId>
<artifactId>liblinphone-sdk</artifactId>
<version>1.0.0</version>
<packaging>aar</packaging>
<dependencies>
<dependency>
<groupId>com.android.support</groupId>
<artifactId>multidex</artifactId>
<version>1.0.2</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-compress</artifactId>
<version>1.16.1</version>
<scope>compile</scope>
</dependency>
</dependencies>
</project>
60e06edc58f836637afc7ee5eea0618f
\ No newline at end of file
03d2486f61de3582f9f2b6afe19109e39c361e63
\ No newline at end of file
6c6435f5eea84080087c88d2e2c7a098
\ No newline at end of file
b3871d670c57e1d5ef4c5a4ae506b4d48255c281
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>org.linphone.maven</groupId>
<artifactId>liblinphone-sdk</artifactId>
<version>1.0.1</version>
<packaging>aar</packaging>
<dependencies>
<dependency>
<groupId>com.android.support</groupId>
<artifactId>multidex</artifactId>
<version>1.0.2</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-compress</artifactId>
<version>1.16.1</version>
<scope>compile</scope>
</dependency>
</dependencies>
</project>
dff1e08bf90c06854f0bac81dcd30708
\ No newline at end of file
803abe5ffdf87612bbdbab3075f3e7d1b71ef32d
\ No newline at end of file
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