Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b0fc1d4e authored by Andy Scherzinger's avatar Andy Scherzinger
Browse files

improved lib usage documentation for gradle

parent 97ebf067
Loading
Loading
Loading
Loading
+41 −28
Original line number Diff line number Diff line
# Nextcloud Android Library 
# [Nextcloud](https://nextcloud.com) Android Library 

### Introduction
## Introduction
Using Nextcloud Android library it will be the easiest way to communicate with Nextcloud servers.
Add this library in your project and integrate your application with Nextcloud seamlessly.

### Install Library
#### 2.1. Information how to get the library
## Use Library
In the repository it is not only the library project but also the example project “sample_client”; 
thanks to it you will learn how to use the library.

Get this code and compile it. In the repository it is not only the library project but also the example project “sample_client”; thanks to it you will learn how to use the library.
*There are different ways of adding this library to your code*

#### 2.2. Add library to your project
There are different ways of adding this library to your code, then it is described one of them
### Gradle / Maven dependency
At the moment we do not have a publishing mechanism to a maven repository so the easiest way to add the library to your app is via a JitPack Dependency [![](https://jitpack.io/v/nextcloud/android-library.svg)](https://jitpack.io/#nextcloud/android-library)

__Step 1.__ Compile the Nextcloud Android Library
__Step 2.__ Define a dependency within your project. For that, access to Properties > Android > Library and click on add and select the Nextcloud Android library
```
repositories {
    ...
    maven { url "https://jitpack.io" }
}
dependencies {
    ...
    compile 'com.github.nextcloud:android-library:-SNAPSHOT'
```

###  Branching strategy
### As a git submodule
Basically get this code and compile it having it integrated via a git submodule:

The repository holds two main branches with an infinite lifetime:
1. go into your own apps directory on the command line and add this lib as a submodule: ```git submodule add https://github.com/nextcloud/android-library nextcloud-android-library```
2. Import/Open your app in Android Studio

- stable
- master 
##  Branching strategy
The repository holds one main branch with an infinite lifetime:

Branch __origin/stable__ is considered the main branch where the source code of HEAD always reflects a production-ready state.
- master 

Branch __origin/master__ is considered the main branch where the source code of HEAD always reflects a state with the latest delivered development changes for the next release.

When the source code in the master branch reaches a stable point and is ready to be released, all of the changes should be merged back into stable somehow and then tagged with a release number. 

Other branches, some supporting branches are used to aid parallel development between team members, ease tracking of features, prepare for production releases and to assist in quickly fixing live production problems. Unlike the main branches, these branches always have a limited life time, since they will be removed eventually.

The different types of branches we may use are:
The different types of branches we use:

- Branch __perNewFeature__    
- Branch  __releaseBranches__

Both of them branch off from master and must merge back into master branch through a Pull Request in Github. Once the PR is approved and merged, the US branch may be deleted.
Both of them branch off from master and must merge back into master branch through a [pull requests](https://github.com/nextcloud/android-library/pulls) in Github. Once the PR is approved and merged, the branch may be deleted.


###  License
##  License

Nextcloud Android Library is available under MIT license. See the file LICENSE.md with the full license text. 

#### Third party libraries

Nextcloud Android Library uses Apache JackRabbit, version 2.2.5. Copyright (C) 2004-2010 The Apache Software Foundation. Licensed under Apache License, Version 2.0.

Apache JackRabbit depends on Commons HTTPClient version 3.1 and SLF4j version 1.7.5; both included also. Copyright (C) 2004-2010 The Apache Software Foundation. Licensed under Apache License, Version 2.0.
### Third party libraries
```
Nextcloud Android Library uses Apache JackRabbit, version 2.2.5. 
Copyright (C) 2004-2010 The Apache Software Foundation. 
Licensed under Apache License, Version 2.0.
```

```
Apache JackRabbit depends on Commons HTTPClient version 3.1 and SLF4j version 1.7.5; both included also. 
Copyright (C) 2004-2010 The Apache Software Foundation. 
Licensed under Apache License, Version 2.0.
```

### Compatibility
## Compatibility

Nextcloud Android Library is valid for Android systems from version Android 2.2 (android:minSdkVersion="8" android:targetSdkVersion="23").
Nextcloud Android library is valid for Android version 2.2 and up (android:minSdkVersion="8" android:targetSdkVersion="23").

Nextcloud Android library supports Nextcloud server from version 4.5.
Nextcloud Android library supports Nextcloud server from version 9.