Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 23 additions & 17 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ android {
minSdkVersion 14
targetSdkVersion 28

testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

// arguments to be passed to functional tests
testInstrumentationRunnerArgument "TEST_USER", "\"$System.env.OCTEST_APP_USERNAME\""
Expand Down Expand Up @@ -210,24 +210,24 @@ android {

dependencies {
// dependencies for app building
implementation 'com.android.support:multidex:1.0.3'
implementation 'androidx.multidex:multidex:2.0.0'
// implementation project('nextcloud-android-library')
genericImplementation "com.github.nextcloud:android-library:master-SNAPSHOT"
gplayImplementation "com.github.nextcloud:android-library:master-SNAPSHOT"
versionDevImplementation 'com.github.nextcloud:android-library:master-SNAPSHOT' // use always latest master
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation "com.android.support:support-v4:${supportLibraryVersion}"
implementation "com.android.support:design:${supportLibraryVersion}"
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-alpha2'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.google.android.material:material:1.0.0'
implementation 'com.jakewharton:disklrucache:2.0.2'
implementation "com.android.support:appcompat-v7:${supportLibraryVersion}"
implementation "com.android.support:cardview-v7:${supportLibraryVersion}"
implementation "com.android.support:exifinterface:${supportLibraryVersion}"
implementation 'com.github.albfernandez:juniversalchardet:2.0.0' // need this version for Android <7
implementation 'androidx.appcompat:appcompat:1.0.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.exifinterface:exifinterface:1.0.0'
implementation 'com.github.albfernandez:juniversalchardet:2.2.0'
implementation 'com.google.code.findbugs:annotations:2.0.1'
implementation 'commons-io:commons-io:2.6'
implementation 'com.github.evernote:android-job:v1.2.5'
implementation 'com.jakewharton:butterknife:8.8.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
implementation 'com.jakewharton:butterknife:9.0.0-SNAPSHOT'
annotationProcessor 'com.jakewharton:butterknife-compiler:9.0.0-SNAPSHOT'
implementation 'org.greenrobot:eventbus:3.1.1'
implementation 'com.googlecode.ez-vcard:ez-vcard:0.10.4'
implementation 'org.lukhnos:nnio:0.2'
Expand All @@ -237,29 +237,35 @@ dependencies {
implementation 'com.github.chrisbanes:PhotoView:2.1.4'
implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.15'

// https://mvnrepository.com/artifact/androidx.biometric/biometric
implementation group: 'androidx.biometric', name: 'biometric', version: '1.0.0-alpha02'


implementation 'org.parceler:parceler-api:1.1.11'
annotationProcessor 'org.parceler:parceler:1.1.11'
implementation ('com.github.bumptech.glide:glide:3.7.0') {
exclude group: "com.android.support"
}
implementation 'com.caverock:androidsvg:1.3'
implementation "com.android.support:support-annotations:${supportLibraryVersion}"
implementation 'androidx.annotation:annotation:1.0.0'
implementation 'com.google.code.gson:gson:2.8.5'

implementation 'androidx.biometric:biometric:1.0.0-alpha02'

// dependencies for local unit tests
testImplementation 'junit:junit:4.12'
testImplementation 'org.mockito:mockito-core:2.23.0'
// dependencies for instrumented tests
// JUnit4 Rules
androidTestImplementation 'com.android.support.test:rules:1.0.2'
androidTestImplementation 'androidx.test:rules:1.1.0-alpha4'
// Android JUnit Runner
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'androidx.test:runner:1.1.0-alpha4'

// Espresso core
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-contrib:3.0.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0-alpha4'
androidTestImplementation 'androidx.test.espresso:espresso-contrib:3.1.0-alpha4'
// UIAutomator - for cross-app UI tests, and to grant screen is turned on in Espresso tests
androidTestImplementation 'com.android.support.test.uiautomator:uiautomator-v18:2.1.3'
androidTestImplementation 'androidx.test.uiautomator:uiautomator:2.2.0-alpha4'
// fix conflict in dependencies; see http://g.co/androidstudio/app-test-app-conflict for details
//androidTestImplementation "com.android.support:support-annotations:${supportLibraryVersion}"
implementation 'org.jetbrains:annotations:16.0.3'
Expand Down
2 changes: 2 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
android.enableJetifier=true
android.useAndroidX=true
20 changes: 10 additions & 10 deletions src/androidTest/disabledTests/screenshots/ScreenshotsIT.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package com.owncloud.android.screenshots;

import android.content.Intent;
import android.support.test.espresso.Espresso;
import android.support.test.espresso.action.ViewActions;
import android.support.test.espresso.contrib.DrawerActions;
import android.support.test.espresso.matcher.PreferenceMatchers;
import android.support.test.rule.ActivityTestRule;
import androidx.test.espresso.Espresso;
import androidx.test.espresso.action.ViewActions;
import androidx.test.espresso.contrib.DrawerActions;
import androidx.test.espresso.matcher.PreferenceMatchers;
import androidx.test.rule.ActivityTestRule;

import com.owncloud.android.R;
import com.owncloud.android.ui.activity.FileDisplayActivity;
Expand All @@ -24,11 +24,11 @@
import tools.fastlane.screengrab.UiAutomatorScreenshotStrategy;
import tools.fastlane.screengrab.locale.LocaleTestRule;

import static android.support.test.espresso.Espresso.onData;
import static android.support.test.espresso.Espresso.onView;
import static android.support.test.espresso.action.ViewActions.click;
import static android.support.test.espresso.matcher.ViewMatchers.withId;
import static android.support.test.espresso.matcher.ViewMatchers.withText;
import static androidx.test.espresso.Espresso.onData;
import static androidx.test.espresso.Espresso.onView;
import static androidx.test.espresso.action.ViewActions.click;
import static androidx.test.espresso.matcher.ViewMatchers.withId;
import static androidx.test.espresso.matcher.ViewMatchers.withText;
import static org.hamcrest.Matchers.anything;
import static org.hamcrest.core.AnyOf.anyOf;

Expand Down
14 changes: 7 additions & 7 deletions src/androidTest/disabledTests/uiautomator/InitialTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@
import android.content.Intent;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.support.test.InstrumentationRegistry;
import android.support.test.filters.SdkSuppress;
import android.support.test.runner.AndroidJUnit4;
import android.support.test.uiautomator.UiDevice;
import android.support.test.uiautomator.UiObject;
import android.support.test.uiautomator.UiObjectNotFoundException;
import android.support.test.uiautomator.UiSelector;
import androidx.test.InstrumentationRegistry;
import androidx.test.filters.SdkSuppress;
import androidx.test.runner.AndroidJUnit4;
import androidx.test.uiautomator.UiDevice;
import androidx.test.uiautomator.UiObject;
import androidx.test.uiautomator.UiObjectNotFoundException;
import androidx.test.uiautomator.UiSelector;

import org.junit.Before;
import org.junit.Test;
Expand Down
5 changes: 3 additions & 2 deletions src/androidTest/java/com/owncloud/android/AbstractIT.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
import android.accounts.OperationCanceledException;
import android.content.ActivityNotFoundException;
import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;

import com.owncloud.android.datamodel.FileDataStorageManager;
import com.owncloud.android.lib.common.OwnCloudClient;
Expand All @@ -21,6 +19,9 @@
import java.io.File;
import java.io.IOException;

import androidx.test.InstrumentationRegistry;
import androidx.test.runner.AndroidJUnit4;

/**
* Common base for all integration tests
*/
Expand Down
4 changes: 2 additions & 2 deletions src/androidTest/java/com/owncloud/android/FileIT.java
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package com.owncloud.android;

import android.support.test.runner.AndroidJUnit4;

import com.owncloud.android.lib.common.operations.RemoteOperationResult;
import com.owncloud.android.operations.CreateFolderOperation;
import com.owncloud.android.operations.common.SyncOperation;

import org.junit.Test;
import org.junit.runner.RunWith;

import androidx.test.runner.AndroidJUnit4;

import static junit.framework.TestCase.assertTrue;
import static org.junit.Assert.assertNull;

Expand Down
4 changes: 2 additions & 2 deletions src/androidTest/java/com/owncloud/android/UploadIT.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package com.owncloud.android;

import android.support.test.runner.AndroidJUnit4;

import com.owncloud.android.db.OCUpload;
import com.owncloud.android.files.services.FileUploader;
import com.owncloud.android.lib.common.operations.RemoteOperationResult;
Expand All @@ -11,6 +9,8 @@
import org.junit.Test;
import org.junit.runner.RunWith;

import androidx.test.runner.AndroidJUnit4;

import static junit.framework.TestCase.assertTrue;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,14 @@
package com.owncloud.android.datamodel;

import android.os.Parcel;
import android.support.test.filters.SmallTest;
import android.support.test.runner.AndroidJUnit4;

import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;

import androidx.test.filters.SmallTest;
import androidx.test.runner.AndroidJUnit4;

import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.MatcherAssert.assertThat;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
import android.accounts.Account;
import android.content.ContentResolver;
import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.filters.SmallTest;
import android.support.test.runner.AndroidJUnit4;

import com.owncloud.android.db.OCUpload;

Expand All @@ -17,6 +14,10 @@

import java.io.File;

import androidx.test.InstrumentationRegistry;
import androidx.test.filters.SmallTest;
import androidx.test.runner.AndroidJUnit4;

/**
* Created by JARP on 6/7/17.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@
package com.owncloud.android.util;

import android.os.Build;
import android.support.annotation.RequiresApi;
import android.support.test.runner.AndroidJUnit4;

import com.google.gson.JsonElement;
import com.google.gson.JsonParser;
Expand All @@ -50,7 +48,10 @@
import java.util.HashSet;
import java.util.Set;

import static android.support.test.InstrumentationRegistry.getInstrumentation;
import androidx.annotation.RequiresApi;
import androidx.test.runner.AndroidJUnit4;

import static androidx.test.InstrumentationRegistry.getInstrumentation;
import static junit.framework.Assert.assertFalse;
import static junit.framework.Assert.assertTrue;
import static org.junit.Assert.assertEquals;
Expand Down
3 changes: 2 additions & 1 deletion src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.USE_FINGERPRINT" />
<uses-permission android:name="android.permission.USE_BIOMETRIC"/>
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />

<!-- Apps that target Android 9 (API level 28) or higher and use foreground services
Expand Down Expand Up @@ -197,7 +198,7 @@

<!-- new provider used to generate URIs without file:// scheme (forbidden from Android 7) -->
<provider
android:name="android.support.v4.content.FileProvider"
android:name="androidx.core.content.FileProvider"
android:authorities="@string/file_provider_authority"
android:grantUriPermissions="true"
android:exported="false">
Expand Down
Loading