mirror of
https://github.com/nextcloud/android.git
synced 2024-11-27 17:46:37 +03:00
Merge pull request #958 from nextcloud/newDrone
use drone for all flavours
This commit is contained in:
commit
d897b38dd8
3 changed files with 20 additions and 9 deletions
25
.drone.yml
25
.drone.yml
|
@ -1,19 +1,24 @@
|
|||
pipeline:
|
||||
test:
|
||||
image: nextcloudci/android:android-15
|
||||
image: nextcloudci/android:android-17
|
||||
commands:
|
||||
# uncomment gplay for Gplay, Modified only
|
||||
- sh -c "if [ '$FLAVOUR' != 'Generic' ]; then sed -i '/com.google.*.gms/s/^.*\/\///g' build.gradle; fi"
|
||||
|
||||
- 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 and assemble APK, in debug mode
|
||||
- ./gradlew assembleGeneric
|
||||
- ./gradlew assemble${FLAVOUR}
|
||||
|
||||
# run all the instrumented tests of app module - DISABLED until we get an stable setup for Espresso in Travis
|
||||
# - ./gradlew connectedDebugAndroidTest --info
|
||||
|
||||
# install app, then assemble and install instrumented tests of app module
|
||||
- ./gradlew :installGenericDebug
|
||||
#- ./gradlew :installModifiedDebug
|
||||
- ./gradlew :installGenericDebugAndroidTest
|
||||
#- ./gradlew :installModifiedDebugAndroidTest
|
||||
- ./gradlew :install${FLAVOUR}Debug
|
||||
- ./gradlew :install${FLAVOUR}DebugAndroidTest
|
||||
|
||||
# run sample instrumented unit test
|
||||
# TODO fails because test runner is not available
|
||||
#- adb shell am instrument -w -e debug false -e class com.owncloud.android.datamodel.OCFileUnitTest com.owncloud.android.test/android.support.test.runner.AndroidJUnitRunner
|
||||
|
@ -22,3 +27,11 @@ pipeline:
|
|||
- 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/
|
||||
|
||||
matrix:
|
||||
FLAVOUR:
|
||||
- Generic
|
||||
- Gplay
|
||||
- Modified
|
||||
|
||||
branches: master
|
|
@ -156,7 +156,7 @@ public class PushUtils {
|
|||
if (!TextUtils.isEmpty(arbitraryValue = arbitraryDataProvider.getValue(account, KEY_PUSH))) {
|
||||
Gson gson = new Gson();
|
||||
PushConfigurationState pushArbitraryData = gson.fromJson(arbitraryValue,
|
||||
PushArbitraryData.class);
|
||||
PushConfigurationState.class);
|
||||
RemoteOperation unregisterAccountDeviceForProxyOperation =
|
||||
new UnregisterAccountDeviceForProxyOperation(context.getResources().
|
||||
getString(R.string.push_server_url),
|
||||
|
|
|
@ -36,8 +36,6 @@ public class NCFirebaseInstanceIDService extends FirebaseInstanceIdService {
|
|||
//You can implement this method to store the token on your server
|
||||
if (!TextUtils.isEmpty(getResources().getString(R.string.push_server_url))) {
|
||||
PreferenceManager.setPushToken(MainApp.getAppContext(), FirebaseInstanceId.getInstance().getToken());
|
||||
PreferenceManager.setPushTokenUpdateTime(MainApp.getAppContext(), System.currentTimeMillis());
|
||||
|
||||
PushUtils.pushRegistrationToServer();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue