Skip to content
Merged
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
35 changes: 17 additions & 18 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ configurations.all {
}

ext {
supportLibraryVersion = '28.0.0'
jacocoVersion = "0.8.2"

travisBuild = System.getenv("TRAVIS") == "true"
Expand Down Expand Up @@ -82,7 +81,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 @@ -207,24 +206,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'
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:1.1.3'
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 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.exifinterface:exifinterface:1.0.0'
implementation 'com.github.albfernandez:juniversalchardet:2.0.0' // need this version for Android <7
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-rc2'
annotationProcessor 'com.jakewharton:butterknife-compiler:9.0.0-rc2'
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 @@ -235,28 +234,28 @@ dependencies {
implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.15'

implementation 'org.parceler:parceler-api:1.1.12'
annotationProcessor 'org.parceler:parceler:1.1.11'
annotationProcessor 'org.parceler:parceler:1.1.12'
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.1'
implementation 'com.google.code.gson:gson:2.8.5'

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

// 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'
androidTestImplementation 'androidx.test.espresso:espresso-contrib:3.1.0'
// 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'
// 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
@@ -1,3 +1,5 @@
# workaround since lombok and desugering have an issue
# to be fixed with gradle Android plugin 3.3.0
android.enableD8.desugaring=false
android.enableJetifier=true
android.useAndroidX=true
2 changes: 1 addition & 1 deletion scripts/analysis/lint-results.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
DO NOT TOUCH; GENERATED BY DRONE
<span class="mdl-layout-title">Lint Report: 85 warnings</span>
<span class="mdl-layout-title">Lint Report: 84 warnings</span>
10 changes: 5 additions & 5 deletions src/androidTest/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
the normal release/debug builds.
-->

<manifest
package="${applicationId}.test"
xmlns:tools="http://schemas.android.com/tools">
<uses-sdk tools:overrideLibrary="android.support.test.uiautomator.v18"/>
</manifest>
<manifest xmlns:tools="http://schemas.android.com/tools"
package="${applicationId}.test">

<uses-sdk tools:overrideLibrary="android_libs.ub_uiautomator" />
</manifest>
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,6 @@
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 com.owncloud.android.R;
import com.owncloud.android.ui.activity.FileDisplayActivity;
Expand All @@ -20,15 +15,20 @@
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;

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 tools.fastlane.screengrab.Screengrab;
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
15 changes: 8 additions & 7 deletions src/androidTest/disabledTests/uiautomator/InitialTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,19 @@
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 org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;

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 static org.hamcrest.CoreMatchers.notNullValue;
import static org.junit.Assert.assertThat;

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 @@ -22,6 +20,9 @@
import java.io.FileWriter;
import java.io.IOException;

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

/**
* Common base for all integration tests
*/
Expand Down
6 changes: 3 additions & 3 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 All @@ -21,7 +21,7 @@ public class FileIT extends AbstractIT {
@Test
public void testCreateFolder() {
String path = "/testFolder/";

// folder does not exist yet
assertNull(getStorageManager().getFileByPath(path));

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
2 changes: 1 addition & 1 deletion src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,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
10 changes: 5 additions & 5 deletions src/main/java/com/owncloud/android/MainApp.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,6 @@
import android.os.Bundle;
import android.os.Environment;
import android.os.StrictMode;
import android.support.annotation.RequiresApi;
import android.support.annotation.StringRes;
import android.support.multidex.MultiDexApplication;
import android.support.v4.util.Pair;
import android.support.v7.app.AlertDialog;
import android.text.TextUtils;
import android.view.WindowManager;

Expand Down Expand Up @@ -81,6 +76,11 @@
import java.util.Map;
import java.util.concurrent.TimeUnit;

import androidx.annotation.RequiresApi;
import androidx.annotation.StringRes;
import androidx.appcompat.app.AlertDialog;
import androidx.core.util.Pair;
import androidx.multidex.MultiDexApplication;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;

import static com.owncloud.android.ui.activity.ContactsPreferenceActivity.PREFERENCE_CONTACTS_AUTOMATIC_BACKUP;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,17 @@
import android.accounts.AccountAuthenticatorResponse;
import android.accounts.AccountManager;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;

import androidx.appcompat.app.AppCompatActivity;

/*
* Base class for implementing an Activity that is used to help implement an AbstractAccountAuthenticator.
* If the AbstractAccountAuthenticator needs to use an activity to handle the request then it can have the activity extend
* Base class for implementing an Activity that is used to help implement an AbstractAccountAuthenticator.
* If the AbstractAccountAuthenticator needs to use an activity to handle the request then it can have the activity extend
* AccountAuthenticatorActivity. The AbstractAccountAuthenticator passes in the response to the intent using the following:
* intent.putExtra(AccountManager.KEY_ACCOUNT_AUTHENTICATOR_RESPONSE, response);
*
* The activity then sets the result that is to be handed to the response via setAccountAuthenticatorResult(android.os.Bundle).
* This result will be sent as the result of the request when the activity finishes. If this is never set or if it is set to null
*
* The activity then sets the result that is to be handed to the response via setAccountAuthenticatorResult(android.os.Bundle).
* This result will be sent as the result of the request when the activity finishes. If this is never set or if it is set to null
* then error AccountManager.ERROR_CODE_CANCELED will be called on the response.
*/

Expand All @@ -41,7 +42,7 @@ public class AccountAuthenticatorActivity extends AppCompatActivity {
/**
* Set the result that is to be sent as the result of the request that caused this Activity to be launched.
* If result is null or this method is never called then the request will be canceled.
*
*
* @param result this is returned as the result of the AbstractAccountAuthenticator request
*/
public final void setAccountAuthenticatorResult(Bundle result) {
Expand All @@ -64,7 +65,7 @@ protected void onCreate(Bundle savedInstanceState) {
mAccountAuthenticatorResponse.onRequestContinued();
}
}

/**
* Sends the result or a Constants.ERROR_CODE_CANCELED error if a result isn't present.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,16 @@
import android.content.Context;
import android.content.SharedPreferences;
import android.preference.PreferenceManager;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;

import com.owncloud.android.MainApp;
import com.owncloud.android.datamodel.ArbitraryDataProvider;
import com.owncloud.android.lib.common.accounts.AccountUtils.Constants;
import com.owncloud.android.lib.resources.status.OwnCloudVersion;
import com.owncloud.android.ui.activity.ManageAccountsActivity;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

/**
* Helper class for dealing with accounts.
*/
Expand Down
Loading