Skip to content

Commit

Permalink
Merge pull request #12 from nextcloud/build24
Browse files Browse the repository at this point in the history
Update Toolchain/Android-Target to v24
  • Loading branch information
AndyScherzinger authored Nov 2, 2016
2 parents efbbb16 + 0d701fd commit 3a81bd5
Show file tree
Hide file tree
Showing 20 changed files with 61 additions and 95 deletions.
14 changes: 14 additions & 0 deletions .drone.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
pipeline:
test:
image: nextcloudci/android:android-7
commands:
- echo no | android create avd --force -n test -t $ANDROID_TARGET --abi $ANDROID_ABI -c 20M
- emulator -avd test -no-window &
- ./wait_for_emulator.sh
# build app
- ./gradlew clean build

environment:
- ANDROID_TARGET=android-24
- ANDROID_ABI=armeabi-v7a
- LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/:/opt/android-sdk-linux/tools/lib64/gles_mesa/
2 changes: 2 additions & 0 deletions .lgtm
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
pattern = "(?i):shipit:|:\\+1:|LGTM"
self_approval_off=true
approvals = 1
49 changes: 0 additions & 49 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

<uses-sdk
android:minSdkVersion="11"
android:targetSdkVersion="23" />
android:targetSdkVersion="24" />

</manifest>

25 changes: 15 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Using Nextcloud Android library it will be the easiest way to communicate with N
Add this library in your project and integrate your application with Nextcloud seamlessly.

## Use Library
In the repository it is not only the library project but also the example project sample_client;
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*
Expand Down Expand Up @@ -37,22 +37,27 @@ The repository holds one main branch with an infinite lifetime:

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.

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.
Other branches, some supporting branches are used to aid parallel development between team members, ease tracking of features and to assist in quickly fixing live production problems. Unlike the main branch, these branches always have a limited life time, since they will be removed eventually (feature branching).

The different types of branches we use:
## Development process
We are all about quality while not sacrificing speed so we use a very pragmatic workflow.

- Branch __perNewFeature__
- Branch __releaseBranches__

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.
* create an issue with feature request
* discuss it with other developers
* create mockup if necessary
* must be approved --> label approved
* after that no conceptual changes!
* develop code
* create [pull request](https://github.com/nextcloud/android-library/pulls)
* to assure the quality of the app, any PR gets reviewed, approved and tested by [two developers](https://github.com/nextcloud/android-library/blob/master/MAINTAINERS) before it will be merged to master

## License

Nextcloud Android Library is available under MIT license. See [LICENSE.md](https://github.com/nextcloud/android-library/blob/master/LICENSE.md) with the full license text.

### Third party libraries
```
Nextcloud Android Library uses Apache JackRabbit, version 2.2.5.
Nextcloud Android Library uses Apache JackRabbit, version 2.12.2.
Copyright (C) 2004-2010 The Apache Software Foundation.
Licensed under Apache License, Version 2.0.
```
Expand All @@ -65,6 +70,6 @@ Licensed under Apache License, Version 2.0.

## Compatibility

Nextcloud Android library is valid for Android version 3.0 and up (android:minSdkVersion="11" android:targetSdkVersion="23").
Nextcloud Android library is valid for Android version 3.0 and up (with ```android:minSdkVersion="11"``` and ```android:targetSdkVersion="24"```).

Nextcloud Android library supports Nextcloud server from version 9.
Nextcloud Android library supports Nextcloud server from version 9+.
8 changes: 4 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.3'
classpath 'com.android.tools.build:gradle:2.2.0'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
}
}
Expand All @@ -18,12 +18,12 @@ repositories {
}

dependencies {
compile 'org.apache.jackrabbit:jackrabbit-webdav:2.10.1'
compile 'org.apache.jackrabbit:jackrabbit-webdav:2.12.4'
}

android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
compileSdkVersion 24
buildToolsVersion "24.0.2"

sourceSets {
main {
Expand Down
Binary file not shown.
2 changes: 1 addition & 1 deletion project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt

# Project target.
target=android-23
target=android-24
android.library=true
2 changes: 1 addition & 1 deletion sample_client/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<uses-permission android:name="android.permission.INTERNET" />
<uses-sdk
android:minSdkVersion="11"
android:targetSdkVersion="23" />
android:targetSdkVersion="24" />
<application android:label="@string/app_name" android:icon="@drawable/ic_launcher">
<activity android:name="MainActivity"
android:label="@string/app_name"
Expand Down
9 changes: 2 additions & 7 deletions sample_client/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ dependencies {
}

android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
compileSdkVersion 24
buildToolsVersion "24.0.2"

sourceSets {
main {
Expand Down Expand Up @@ -43,9 +43,4 @@ android {
packagingOptions {
exclude 'META-INF/LICENSE.txt'
}
android {
lintOptions {
abortOnError false
}
}
}
2 changes: 1 addition & 1 deletion sample_client/project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt

# Project target.
target=android-23
target=android-24
android.library.reference.1=..
2 changes: 1 addition & 1 deletion sample_client/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
-->

<resources>
<string name="app_name">ownCloud Sample Client</string>
<string name="app_name">Nextcloud Sample Client</string>
<string name="refresh">Refresh</string>
<string name="upload">Upload</string>
<string name="delete_remote_file">Delete remote file</string>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
* <p/>
* Allow updating several parameters, triggering a request to the server per parameter.
*/

public class UpdateRemoteShareOperation extends RemoteOperation {

private static final String TAG = GetRemoteShareOperation.class.getSimpleName();
Expand Down Expand Up @@ -159,24 +158,24 @@ protected RemoteOperationResult run(OwnCloudClient client) {
}
if (mExpirationDateInMillis < 0) {
// clear expiration date
parametersToUpdate.add(new Pair(PARAM_EXPIRATION_DATE, ""));
parametersToUpdate.add(new Pair<>(PARAM_EXPIRATION_DATE, ""));

} else if (mExpirationDateInMillis > 0) {
// set expiration date
DateFormat dateFormat = new SimpleDateFormat(FORMAT_EXPIRATION_DATE);
Calendar expirationDate = Calendar.getInstance();
expirationDate.setTimeInMillis(mExpirationDateInMillis);
String formattedExpirationDate = dateFormat.format(expirationDate.getTime());
parametersToUpdate.add(new Pair(PARAM_EXPIRATION_DATE, formattedExpirationDate));
parametersToUpdate.add(new Pair<>(PARAM_EXPIRATION_DATE, formattedExpirationDate));

} // else, ignore - no update
if (mPermissions > 0) {
// set permissions
parametersToUpdate.add(new Pair(PARAM_PERMISSIONS, Integer.toString(mPermissions)));
parametersToUpdate.add(new Pair<>(PARAM_PERMISSIONS, Integer.toString(mPermissions)));
}

if (mPublicUpload != null) {
parametersToUpdate.add(new Pair(PARAM_PUBLIC_UPLOAD, Boolean.toString(mPublicUpload)));
parametersToUpdate.add(new Pair<>(PARAM_PUBLIC_UPLOAD, Boolean.toString(mPublicUpload)));
}

/// perform required PUT requests
Expand Down
2 changes: 1 addition & 1 deletion test_client/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

<uses-sdk
android:minSdkVersion="11"
android:targetSdkVersion="23" />
android:targetSdkVersion="24" />

<application
android:allowBackup="true"
Expand Down
11 changes: 3 additions & 8 deletions test_client/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.3'
classpath 'com.android.tools.build:gradle:2.2.0'
}
}

Expand All @@ -20,8 +20,8 @@ dependencies {
}

android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
compileSdkVersion 24
buildToolsVersion "24.0.2"

sourceSets {
main {
Expand Down Expand Up @@ -54,9 +54,4 @@ android {
packagingOptions {
exclude 'META-INF/LICENSE.txt'
}
android {
lintOptions {
abortOnError false
}
}
}
2 changes: 1 addition & 1 deletion test_client/project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt

# Project target.
target=android-23
target=android-24
android.library.reference.1=..
2 changes: 1 addition & 1 deletion test_client/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

<resources>

<string name="app_name">oc_framework-test-project</string>
<string name="app_name">Nc_framework-test-project</string>
<string name="action_settings">Settings</string>
<string name="hello_world">Hello world!</string>
<string name="test_account_not_found">The test account %1$s could not be found in the device</string>
Expand Down
2 changes: 1 addition & 1 deletion test_client/tests/project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt

# Project target.
target=android-23
target=android-24
2 changes: 1 addition & 1 deletion test_client/tests/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@

<resources>

<string name="app_name">Oc_framework-testTest</string>
<string name="app_name">Nc_framework-testTest</string>

</resources>
9 changes: 7 additions & 2 deletions wait_for_emulator.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,19 +1,24 @@
#!/bin/bash

# Originally written by Ralf Kistner <[email protected]>, but placed in the public domain

bootanim=""
failcounter=0
checkcounter=0

until [[ "$bootanim" =~ "stopped" ]]; do
bootanim=`adb -e shell getprop init.svc.bootanim 2>&1`
echo "($checkcounter) $bootanim"
if [[ "$bootanim" =~ "not found" ]]; then
let "failcounter += 1"
if [[ $failcounter -gt 30 ]]; then
if [[ $failcounter -gt 3 ]]; then
echo "Failed to start emulator"
exit 1
fi
fi
let "checkcounter += 1"
sleep 10
done
echo "Done"
echo "($checkcounter) Done"
adb -e shell input keyevent 82
echo "($checkcounter) Unlocked emulator screen"

0 comments on commit 3a81bd5

Please sign in to comment.