Skip to content

Commit c3c2268

Browse files
committed
upgrade to gradle 5 and androidx
1 parent 4ded9c2 commit c3c2268

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+264
-264
lines changed

build.gradle

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ buildscript {
99
}
1010
}
1111
dependencies {
12-
classpath 'com.android.tools.build:gradle:3.3.2'
13-
classpath 'io.fabric.tools:gradle:1.26.0'
12+
classpath 'com.android.tools.build:gradle:3.4.2'
13+
classpath 'io.fabric.tools:gradle:1.31.0'
1414
classpath 'org.jfrog.buildinfo:build-info-extractor-gradle:4.9.3'
15-
classpath 'com.google.gms:google-services:4.2.0'
15+
classpath 'com.google.gms:google-services:4.3.0'
1616
}
1717
}
1818

gradle.properties

+4-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1-
org.gradle.jvmargs=-Xmx4096m -XX:MaxPermSize=4096m -XX:+HeapDumpOnOutOfMemoryError
1+
org.gradle.jvmargs=-Xmx4096m -XX:MaxPermSize=4096m -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
2+
android.useAndroidX=true
3+
android.useJetpack=false
4+
android.enableJetifier=true
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Thu Mar 14 14:13:31 PDT 2019
1+
#Fri Jul 19 12:01:18 PDT 2019
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip

settings.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
gradle.ext.gradleConfigVersion = 123
1+
gradle.ext.gradleConfigVersion = 124
22

33
if ( !gradle.ext.has('workspacePath') ) {
44
def env = System.getProperties();

tables_app/build.gradle

+21-22
Original file line numberDiff line numberDiff line change
@@ -118,14 +118,15 @@ allprojects {
118118

119119
dependencies {
120120
implementation fileTree(include: '*.jar', dir: 'libs')
121-
implementation 'com.android.support:support-annotations:28.0.0'
122-
implementation 'com.android.support:support-v4:28.0.0'
123-
implementation 'com.android.support:support-fragment:28.0.0'
124-
implementation 'com.android.support:preference-v7:28.0.0'
125-
implementation 'com.android.support:appcompat-v7:28.0.0'
121+
implementation 'androidx.annotation:annotation:1.1.0'
122+
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
123+
implementation 'androidx.fragment:fragment:1.0.0'
124+
implementation 'androidx.preference:preference:1.0.0'
125+
implementation 'androidx.appcompat:appcompat:1.0.2'
126+
implementation 'androidx.recyclerview:recyclerview:1.0.0'
126127
implementation 'com.github.wbrunette:ProgressWheel:2.0'
127-
implementation 'com.google.firebase:firebase-core:16.0.7'
128-
implementation ('com.crashlytics.sdk.android:crashlytics:2.9.5@aar') {
128+
implementation 'com.google.firebase:firebase-core:17.0.1'
129+
implementation ('com.crashlytics.sdk.android:crashlytics:2.10.1@aar') {
129130
transitive =true;
130131
}
131132

@@ -151,28 +152,26 @@ dependencies {
151152
classifier: snapshotRelease, version: latestVersion, ext: 'aar')
152153
}
153154

154-
implementation 'com.google.android.gms:play-services-maps:16.1.0'
155+
implementation 'com.google.android.gms:play-services-maps:17.0.0'
155156

156157
//for Espresso
157-
androidTestUitestImplementation 'com.android.support.test:runner:1.0.2'
158-
androidTestUitestImplementation 'com.android.support.test:rules:1.0.2'
159-
androidTestUitestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
160-
androidTestUitestImplementation 'com.android.support.test.espresso:espresso-intents:3.0.2'
161-
androidTestUitestImplementation 'com.android.support.test.espresso:espresso-web:3.0.2'
162-
androidTestUitestImplementation 'com.android.support.test.espresso:espresso-contrib:3.0.2'
163-
androidTestUitestImplementation 'com.android.support:support-annotations:28.0.0'
158+
androidTestUitestImplementation 'androidx.test:runner:1.2.0'
159+
androidTestUitestImplementation 'androidx.test:rules:1.2.0'
160+
androidTestUitestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
161+
androidTestUitestImplementation 'androidx.test.espresso:espresso-intents:3.2.0'
162+
androidTestUitestImplementation 'androidx.test.espresso:espresso-web:3.2.0'
163+
androidTestUitestImplementation 'androidx.test.espresso:espresso-contrib:3.2.0'
164+
androidTestUitestImplementation 'androidx.annotation:annotation:1.1.0'
164165

165166
//for UI Automator
166-
androidTestUitestImplementation 'com.android.support.test.uiautomator:uiautomator-v18:2.1.3'
167+
androidTestUitestImplementation 'androidx.test.uiautomator:uiautomator:2.2.0'
167168
androidTestUitestImplementation 'org.hamcrest:hamcrest-integration:1.3'
168169
}
169170

170-
task grantPermissionForODKApp () {
171-
doLast {
172-
grantServicesReadExternalStoragePermission.execute()
173-
grantServicesWriteExternalStoragePermission.execute()
174-
grantTablesAnimationPermission.execute()
175-
}
171+
task grantPermissionForODKApp {
172+
dependsOn grantServicesReadExternalStoragePermission
173+
dependsOn grantServicesWriteExternalStoragePermission
174+
dependsOn grantTablesAnimationPermission
176175
}
177176

178177
apply plugin: 'com.google.gms.google-services'

tables_app/src/androidTestUitest/java/org/opendatakit/espresso/AbsBaseTest.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@
22

33
import android.app.Activity;
44
import android.app.Application;
5-
import android.support.test.InstrumentationRegistry;
65
import android.util.Log;
6+
7+
import androidx.test.InstrumentationRegistry;
8+
79
import org.junit.Before;
810
import org.opendatakit.tables.application.Tables;
911

tables_app/src/androidTestUitest/java/org/opendatakit/espresso/ColorRuleTest.java

+18-20
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,23 @@
22

33
import android.Manifest;
44
import android.graphics.Rect;
5-
import android.support.test.InstrumentationRegistry;
6-
import android.support.test.filters.LargeTest;
7-
import android.support.test.rule.ActivityTestRule;
8-
import android.support.test.rule.GrantPermissionRule;
9-
import android.support.test.runner.AndroidJUnit4;
10-
import android.support.test.uiautomator.By;
11-
import android.support.test.uiautomator.UiDevice;
125
import android.view.View;
136
import android.widget.ScrollView;
147

8+
import androidx.test.InstrumentationRegistry;
9+
import androidx.test.filters.LargeTest;
10+
import androidx.test.rule.ActivityTestRule;
11+
import androidx.test.rule.GrantPermissionRule;
12+
import androidx.test.uiautomator.By;
13+
import androidx.test.uiautomator.UiDevice;
14+
1515
import org.hamcrest.Matcher;
1616
import org.junit.Before;
1717
import org.junit.ClassRule;
1818
import org.junit.Rule;
1919
import org.junit.Test;
2020
import org.junit.rules.RuleChain;
2121
import org.junit.rules.TestRule;
22-
import org.junit.runner.RunWith;
2322
import org.opendatakit.data.ColorRule;
2423
import org.opendatakit.data.ColorRuleGroup;
2524
import org.opendatakit.data.utilities.TableUtil;
@@ -37,24 +36,23 @@
3736
import java.util.List;
3837
import java.util.Locale;
3938

40-
import static android.support.test.espresso.Espresso.onData;
41-
import static android.support.test.espresso.Espresso.onView;
42-
import static android.support.test.espresso.Espresso.pressBack;
43-
import static android.support.test.espresso.action.ViewActions.click;
44-
import static android.support.test.espresso.action.ViewActions.longClick;
45-
import static android.support.test.espresso.assertion.ViewAssertions.matches;
46-
import static android.support.test.espresso.matcher.ViewMatchers.assertThat;
47-
import static android.support.test.espresso.matcher.ViewMatchers.isCompletelyDisplayed;
48-
import static android.support.test.espresso.matcher.ViewMatchers.withClassName;
49-
import static android.support.test.espresso.matcher.ViewMatchers.withId;
50-
import static android.support.test.espresso.matcher.ViewMatchers.withText;
39+
import static androidx.test.espresso.Espresso.onData;
40+
import static androidx.test.espresso.Espresso.onView;
41+
import static androidx.test.espresso.Espresso.pressBack;
42+
import static androidx.test.espresso.action.ViewActions.click;
43+
import static androidx.test.espresso.action.ViewActions.longClick;
44+
import static androidx.test.espresso.assertion.ViewAssertions.matches;
45+
import static androidx.test.espresso.matcher.ViewMatchers.assertThat;
46+
import static androidx.test.espresso.matcher.ViewMatchers.isCompletelyDisplayed;
47+
import static androidx.test.espresso.matcher.ViewMatchers.withClassName;
48+
import static androidx.test.espresso.matcher.ViewMatchers.withId;
49+
import static androidx.test.espresso.matcher.ViewMatchers.withText;
5150
import static org.hamcrest.Matchers.endsWith;
5251
import static org.hamcrest.Matchers.is;
5352
import static org.hamcrest.Matchers.notNullValue;
5453
import static org.opendatakit.util.TestConstants.APP_NAME;
5554
import static org.opendatakit.util.TestConstants.T_HOUSE_E_TABLE_ID;
5655

57-
@RunWith(AndroidJUnit4.class)
5856
@LargeTest
5957
public class ColorRuleTest extends AbsBaseTest {
6058
@ClassRule

tables_app/src/androidTestUitest/java/org/opendatakit/espresso/CsvTest.java

+22-22
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,24 @@
55
import android.app.Instrumentation;
66
import android.content.Intent;
77
import android.net.Uri;
8-
import android.support.test.InstrumentationRegistry;
9-
import android.support.test.espresso.Espresso;
10-
import android.support.test.espresso.intent.rule.IntentsTestRule;
11-
import android.support.test.filters.LargeTest;
12-
import android.support.test.rule.GrantPermissionRule;
13-
import android.support.test.runner.AndroidJUnit4;
14-
import android.support.test.uiautomator.UiDevice;
158
import android.widget.Button;
169
import android.widget.EditText;
1710
import android.widget.Spinner;
11+
12+
import androidx.test.InstrumentationRegistry;
13+
import androidx.test.espresso.Espresso;
14+
import androidx.test.espresso.intent.rule.IntentsTestRule;
15+
import androidx.test.filters.LargeTest;
16+
import androidx.test.rule.GrantPermissionRule;
17+
import androidx.test.uiautomator.UiDevice;
18+
1819
import org.junit.After;
1920
import org.junit.Before;
2021
import org.junit.ClassRule;
2122
import org.junit.Rule;
2223
import org.junit.Test;
2324
import org.junit.rules.RuleChain;
2425
import org.junit.rules.TestRule;
25-
import org.junit.runner.RunWith;
2626
import org.opendatakit.tables.R;
2727
import org.opendatakit.tables.activities.MainActivity;
2828
import org.opendatakit.tables.utils.TableFileUtils;
@@ -35,19 +35,19 @@
3535
import java.io.File;
3636
import java.io.FilenameFilter;
3737

38-
import static android.support.test.espresso.Espresso.onData;
39-
import static android.support.test.espresso.Espresso.onView;
40-
import static android.support.test.espresso.action.ViewActions.click;
41-
import static android.support.test.espresso.action.ViewActions.typeText;
42-
import static android.support.test.espresso.assertion.ViewAssertions.matches;
43-
import static android.support.test.espresso.intent.Intents.intending;
44-
import static android.support.test.espresso.intent.matcher.IntentMatchers.hasAction;
45-
import static android.support.test.espresso.matcher.RootMatchers.isPlatformPopup;
46-
import static android.support.test.espresso.matcher.ViewMatchers.assertThat;
47-
import static android.support.test.espresso.matcher.ViewMatchers.isCompletelyDisplayed;
48-
import static android.support.test.espresso.matcher.ViewMatchers.withClassName;
49-
import static android.support.test.espresso.matcher.ViewMatchers.withId;
50-
import static android.support.test.espresso.matcher.ViewMatchers.withText;
38+
import static androidx.test.espresso.Espresso.onData;
39+
import static androidx.test.espresso.Espresso.onView;
40+
import static androidx.test.espresso.action.ViewActions.click;
41+
import static androidx.test.espresso.action.ViewActions.typeText;
42+
import static androidx.test.espresso.assertion.ViewAssertions.matches;
43+
import static androidx.test.espresso.intent.Intents.intending;
44+
import static androidx.test.espresso.intent.matcher.IntentMatchers.hasAction;
45+
import static androidx.test.espresso.matcher.RootMatchers.isPlatformPopup;
46+
import static androidx.test.espresso.matcher.ViewMatchers.assertThat;
47+
import static androidx.test.espresso.matcher.ViewMatchers.isCompletelyDisplayed;
48+
import static androidx.test.espresso.matcher.ViewMatchers.withClassName;
49+
import static androidx.test.espresso.matcher.ViewMatchers.withId;
50+
import static androidx.test.espresso.matcher.ViewMatchers.withText;
5151
import static org.hamcrest.Matchers.endsWith;
5252
import static org.hamcrest.Matchers.equalTo;
5353
import static org.hamcrest.Matchers.is;
@@ -56,7 +56,7 @@
5656
import static org.opendatakit.util.TestConstants.T_HOUSE_DISPLAY_NAME;
5757
import static org.opendatakit.util.TestConstants.T_HOUSE_TABLE_ID;
5858

59-
@RunWith(AndroidJUnit4.class)
59+
6060
@LargeTest
6161
public class CsvTest {
6262
@ClassRule

tables_app/src/androidTestUitest/java/org/opendatakit/espresso/InteropTest.java

+16-17
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
package org.opendatakit.espresso;
22

33
import android.Manifest;
4-
import android.support.test.InstrumentationRegistry;
5-
import android.support.test.espresso.intent.rule.IntentsTestRule;
6-
import android.support.test.espresso.web.webdriver.Locator;
7-
import android.support.test.filters.LargeTest;
8-
import android.support.test.rule.GrantPermissionRule;
9-
import android.support.test.runner.AndroidJUnit4;
10-
import android.support.test.uiautomator.UiDevice;
4+
5+
import androidx.test.InstrumentationRegistry;
6+
import androidx.test.espresso.intent.rule.IntentsTestRule;
7+
import androidx.test.espresso.web.webdriver.Locator;
8+
import androidx.test.filters.LargeTest;
9+
import androidx.test.rule.GrantPermissionRule;
10+
import androidx.test.uiautomator.UiDevice;
11+
1112
import org.junit.Before;
1213
import org.junit.ClassRule;
1314
import org.junit.Rule;
1415
import org.junit.Test;
1516
import org.junit.rules.RuleChain;
1617
import org.junit.rules.TestRule;
17-
import org.junit.runner.RunWith;
1818
import org.opendatakit.tables.R;
1919
import org.opendatakit.tables.activities.MainActivity;
2020
import org.opendatakit.util.DisableAnimationsRule;
@@ -24,21 +24,20 @@
2424

2525
import java.net.MalformedURLException;
2626

27-
import static android.support.test.espresso.Espresso.onData;
28-
import static android.support.test.espresso.Espresso.onView;
29-
import static android.support.test.espresso.action.ViewActions.click;
30-
import static android.support.test.espresso.intent.Intents.intended;
31-
import static android.support.test.espresso.matcher.ViewMatchers.withId;
32-
import static android.support.test.espresso.matcher.ViewMatchers.withText;
33-
import static android.support.test.espresso.web.sugar.Web.onWebView;
34-
import static android.support.test.espresso.web.webdriver.DriverAtoms.webClick;
27+
import static androidx.test.espresso.Espresso.onData;
28+
import static androidx.test.espresso.Espresso.onView;
29+
import static androidx.test.espresso.action.ViewActions.click;
30+
import static androidx.test.espresso.intent.Intents.intended;
31+
import static androidx.test.espresso.matcher.ViewMatchers.withId;
32+
import static androidx.test.espresso.matcher.ViewMatchers.withText;
33+
import static androidx.test.espresso.web.sugar.Web.onWebView;
34+
import static androidx.test.espresso.web.webdriver.DriverAtoms.webClick;
3535
import static org.opendatakit.util.TestConstants.HOPE_TAB_ID;
3636
import static org.opendatakit.util.TestConstants.LAUNCH_DEMO_ID;
3737
import static org.opendatakit.util.TestConstants.TABLE_MGR_WAIT;
3838
import static org.opendatakit.util.TestConstants.T_HOUSE_E_TABLE_ID;
3939
import static org.opendatakit.util.TestConstants.WEB_WAIT_TIMEOUT;
4040

41-
@RunWith(AndroidJUnit4.class)
4241
@LargeTest
4342
public class InteropTest extends AbsBaseTest {
4443
@ClassRule

0 commit comments

Comments
 (0)