diff --git a/buildSrc/build.gradle b/buildSrc/build.gradle index c4f1777ba06..f9a2b41aa68 100644 --- a/buildSrc/build.gradle +++ b/buildSrc/build.gradle @@ -37,7 +37,7 @@ dependencies { implementation "com.jaredsburrows:gradle-license-plugin:0.8.1" implementation 'digital.wup:android-maven-publish:3.6.2' - implementation 'com.android.tools.build:gradle:3.0.1' + implementation 'com.android.tools.build:gradle:3.2.1' testImplementation 'junit:junit:4.12' testImplementation('org.spockframework:spock-core:1.1-groovy-2.4') { exclude group: 'org.codehaus.groovy' diff --git a/buildSrc/src/main/groovy/com/google/firebase/gradle/plugins/license/LicenseResolverPlugin.groovy b/buildSrc/src/main/groovy/com/google/firebase/gradle/plugins/license/LicenseResolverPlugin.groovy index 6a185c568c0..03a966fbf9c 100644 --- a/buildSrc/src/main/groovy/com/google/firebase/gradle/plugins/license/LicenseResolverPlugin.groovy +++ b/buildSrc/src/main/groovy/com/google/firebase/gradle/plugins/license/LicenseResolverPlugin.groovy @@ -98,7 +98,7 @@ class LicenseResolverPlugin implements Plugin { // must run before preBuild, otherwise it produces an empty license report. project.tasks.getByName('preBuild').mustRunAfter licensesTask - project.tasks.getByName("bundle${variantName}") { + project.tasks.getByName("bundle${variantName}Aar") { dependsOn licensesTask from licensesTask.outputDir } diff --git a/firebase-common/firebase-common.gradle b/firebase-common/firebase-common.gradle index 1d74315f81f..fb5e174e274 100644 --- a/firebase-common/firebase-common.gradle +++ b/firebase-common/firebase-common.gradle @@ -14,7 +14,7 @@ apply plugin: 'com.android.library' -def androidVersion = 26 +def androidVersion = 28 android { adbOptions { @@ -23,16 +23,13 @@ android { compileSdkVersion androidVersion defaultConfig { + minSdkVersion 14 targetSdkVersion androidVersion multiDexEnabled true testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } sourceSets { - main { - java { - } - } androidTest { java { srcDir 'src/testUtil' @@ -58,18 +55,19 @@ android { dependencies { implementation "com.google.android.gms:play-services-basement:$playServicesVersion" implementation "com.google.android.gms:play-services-tasks:$playServicesVersion" - compileOnly 'com.google.code.findbugs:jsr305:1.3.9' + + compileOnly 'com.google.code.findbugs:jsr305:3.0.2' testImplementation 'com.android.support.test:runner:1.0.2' testImplementation 'org.robolectric:robolectric:4.0-alpha-3' - testImplementation 'junit:junit:4.11' - testImplementation 'com.google.truth:truth:0.36' - testImplementation 'org.mockito:mockito-core:1.10.19' + testImplementation 'junit:junit:4.12' + testImplementation 'com.google.truth:truth:0.42' + testImplementation 'org.mockito:mockito-core:2.21.0' - androidTestImplementation 'junit:junit:4.11' + androidTestImplementation 'junit:junit:4.12' androidTestImplementation 'com.android.support.test:runner:1.0.2' - androidTestImplementation 'com.google.truth:truth:0.36' - androidTestImplementation 'org.mockito:mockito-core:1.10.19' + androidTestImplementation 'com.google.truth:truth:0.42' + androidTestImplementation 'org.mockito:mockito-core:2.21.0' androidTestImplementation 'com.linkedin.dexmaker:dexmaker:2.16.0' androidTestImplementation 'com.linkedin.dexmaker:dexmaker-mockito:2.16.0' androidTestImplementation ('com.google.firebase:firebase-auth:16.0.2') { diff --git a/firebase-common/src/main/AndroidManifest.xml b/firebase-common/src/main/AndroidManifest.xml index 98082f2bbe7..c0c662065cb 100644 --- a/firebase-common/src/main/AndroidManifest.xml +++ b/firebase-common/src/main/AndroidManifest.xml @@ -1,7 +1,6 @@ - - - diff --git a/firebase-database/firebase-database.gradle b/firebase-database/firebase-database.gradle index d3d65abf6a3..1f4ee4ba985 100644 --- a/firebase-database/firebase-database.gradle +++ b/firebase-database/firebase-database.gradle @@ -14,7 +14,7 @@ apply plugin: 'com.android.library' -def androidVersion = 26 +def androidVersion = 28 tasks.withType(org.gradle.api.tasks.testing.Test) { @@ -35,6 +35,7 @@ android { compileSdkVersion androidVersion defaultConfig { targetSdkVersion androidVersion + minSdkVersion 14 multiDexEnabled true testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } @@ -42,26 +43,22 @@ android { buildTypes { release { minifyEnabled false - useProguard true - consumerProguardFiles 'proguard.txt' } debug { } } sourceSets { - sourceSets { - androidTest { - java { - srcDir 'src/testUtil/java' - } + androidTest { + java { + srcDir 'src/testUtil/java' } - test { - java { - srcDir 'src/testUtil/java' - } - resources { - srcDirs "src/test/resources" - } + } + test { + java { + srcDir 'src/testUtil/java' + } + resources { + srcDirs "src/test/resources" } } } @@ -86,20 +83,23 @@ dependencies { androidTestImplementation "com.android.support:support-annotations:$supportAnnotationsVersion" androidTestImplementation 'com.android.support.test:rules:1.0.2' androidTestImplementation 'com.android.support.test:runner:1.0.2' - androidTestImplementation 'com.google.truth:truth:0.39' + androidTestImplementation 'com.google.truth:truth:0.42' androidTestImplementation 'com.fasterxml.jackson.core:jackson-core:2.9.6' androidTestImplementation 'com.fasterxml.jackson.core:jackson-databind:2.9.6' androidTestImplementation 'junit:junit:4.12' - androidTestImplementation 'net.java.quickcheck:quickcheck:0.6' + androidTestImplementation 'net.java:quickcheck:0.6' + androidTestAnnotationProcessor 'net.java:quickcheck-src-generator:0.6' + androidTestAnnotationProcessor 'net.java.quickcheck:quickcheck-src-generator:0.6' + testImplementation 'junit:junit:4.12' - testImplementation 'org.mockito:mockito-core:2.18.3' + testImplementation 'org.mockito:mockito-core:2.21.0' testImplementation 'org.robolectric:robolectric:3.8' testImplementation 'com.firebase:firebase-token-generator:2.0.0' testImplementation 'com.fasterxml.jackson.core:jackson-core:2.9.6' testImplementation 'com.fasterxml.jackson.core:jackson-databind:2.9.6' testImplementation 'net.java.quickcheck:quickcheck:0.6' - testImplementation 'com.google.truth:truth:0.39' + testImplementation 'com.google.truth:truth:0.42' testImplementation 'com.android.support.test:rules:1.0.2' } diff --git a/firebase-database/src/androidTest/AndroidManifest.xml b/firebase-database/src/androidTest/AndroidManifest.xml index d43c61d2d36..bd4a6dd5bbd 100644 --- a/firebase-database/src/androidTest/AndroidManifest.xml +++ b/firebase-database/src/androidTest/AndroidManifest.xml @@ -16,8 +16,7 @@ - + diff --git a/firebase-database/src/main/AndroidManifest.xml b/firebase-database/src/main/AndroidManifest.xml index c05ee64a731..1b8c9298286 100644 --- a/firebase-database/src/main/AndroidManifest.xml +++ b/firebase-database/src/main/AndroidManifest.xml @@ -15,7 +15,6 @@ - diff --git a/firebase-firestore/firebase-firestore.gradle b/firebase-firestore/firebase-firestore.gradle index 39a65b5ac7a..26422831a82 100644 --- a/firebase-firestore/firebase-firestore.gradle +++ b/firebase-firestore/firebase-firestore.gradle @@ -15,7 +15,7 @@ apply plugin: 'com.android.library' apply plugin: 'com.google.protobuf' -def androidVersion = 26 +def androidVersion = 28 protobuf { // Configure the protoc executable @@ -56,6 +56,7 @@ android { compileSdkVersion androidVersion defaultConfig { targetSdkVersion androidVersion + minSdkVersion 14 multiDexEnabled true testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } @@ -90,6 +91,9 @@ dependencies { implementation project(':protolite-well-known-types') implementation project(':firebase-database-collection') + //To provide @Generated annotations + compileOnly 'javax.annotation:jsr250-api:1.0' + implementation 'io.grpc:grpc-stub:1.12.0' implementation 'io.grpc:grpc-protobuf-lite:1.12.0' implementation 'io.grpc:grpc-okhttp:1.12.0' @@ -104,19 +108,19 @@ dependencies { exclude group: "com.google.firebase", module: "firebase-common" } - testCompile 'junit:junit:4.11' - testCompile 'org.mockito:mockito-core:1.10.19' - testCompile 'org.robolectric:robolectric:4.0-alpha-3' - testCompile 'com.google.truth:truth:0.36' - testCompile 'com.fasterxml.jackson.core:jackson-databind:2.0.1' - testCompile 'com.google.guava:guava-testlib:12.0-rc2' + testImplementation 'junit:junit:4.12' + testImplementation 'org.mockito:mockito-core:2.21.0' + testImplementation 'org.robolectric:robolectric:4.0-alpha-3' + testImplementation 'com.google.truth:truth:0.42' + testImplementation 'com.fasterxml.jackson.core:jackson-databind:2.9.6' + testImplementation 'com.google.guava:guava-testlib:12.0-rc2' - androidTestCompile 'junit:junit:4.11' - androidTestCompile 'com.google.truth:truth:0.36' - androidTestCompile 'com.fasterxml.jackson.core:jackson-databind:2.0.1' - androidTestCompile "com.android.support:support-annotations:$supportAnnotationsVersion" - androidTestCompile 'com.android.support.test:runner:1.0.2' - androidTestCompile 'com.android.support.test:rules:1.0.2' + androidTestImplementation 'junit:junit:4.12' + androidTestImplementation 'com.google.truth:truth:0.42' + androidTestImplementation 'com.fasterxml.jackson.core:jackson-databind:2.9.6' + androidTestImplementation "com.android.support:support-annotations:$supportAnnotationsVersion" + androidTestImplementation 'com.android.support.test:runner:1.0.2' + androidTestImplementation 'com.android.support.test:rules:1.0.2' } // ========================================================================== diff --git a/firebase-firestore/lint.xml b/firebase-firestore/lint.xml index 6fb92c28721..5cdbff248f9 100644 --- a/firebase-firestore/lint.xml +++ b/firebase-firestore/lint.xml @@ -2,7 +2,7 @@ - + diff --git a/firebase-firestore/src/main/AndroidManifest.xml b/firebase-firestore/src/main/AndroidManifest.xml index 7f4f807ed11..e3ad260008c 100644 --- a/firebase-firestore/src/main/AndroidManifest.xml +++ b/firebase-firestore/src/main/AndroidManifest.xml @@ -2,8 +2,6 @@ - - diff --git a/firebase-functions/firebase-functions.gradle b/firebase-functions/firebase-functions.gradle index 66d755f9288..d33008db626 100644 --- a/firebase-functions/firebase-functions.gradle +++ b/firebase-functions/firebase-functions.gradle @@ -14,7 +14,7 @@ apply plugin: 'com.android.library' -def androidVersion = 26 +def androidVersion = 28 android { adbOptions { @@ -24,15 +24,12 @@ android { compileSdkVersion androidVersion defaultConfig { targetSdkVersion androidVersion + minSdkVersion 14 multiDexEnabled true testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } sourceSets { - main { - java { - } - } androidTest { java { srcDir 'src/testUtil' @@ -62,13 +59,13 @@ dependencies { annotationProcessor 'com.google.auto.value:auto-value:1.6' - androidTestCompile 'junit:junit:4.11' - androidTestCompile 'com.google.truth:truth:0.36' - androidTestCompile 'com.android.support.test:runner:1.0.2' - androidTestCompile 'org.mockito:mockito-core:1.10.19' - androidTestCompile 'com.google.truth:truth:0.36' - androidTestCompile 'com.linkedin.dexmaker:dexmaker:2.16.0' - androidTestCompile 'com.linkedin.dexmaker:dexmaker-mockito:2.16.0' + androidTestImplementation 'junit:junit:4.12' + androidTestImplementation 'com.google.truth:truth:0.42' + androidTestImplementation 'com.android.support.test:runner:1.0.2' + androidTestImplementation 'org.mockito:mockito-core:2.21.0' + androidTestImplementation 'com.google.truth:truth:0.42' + androidTestImplementation 'com.linkedin.dexmaker:dexmaker:2.16.0' + androidTestImplementation 'com.linkedin.dexmaker:dexmaker-mockito:2.16.0' } diff --git a/firebase-functions/src/androidTest/AndroidManifest.xml b/firebase-functions/src/androidTest/AndroidManifest.xml index 3d7fb81988c..1da6c39bdca 100644 --- a/firebase-functions/src/androidTest/AndroidManifest.xml +++ b/firebase-functions/src/androidTest/AndroidManifest.xml @@ -1,7 +1,5 @@ - diff --git a/firebase-functions/src/main/AndroidManifest.xml b/firebase-functions/src/main/AndroidManifest.xml index 4073a046c91..b27668ca405 100644 --- a/firebase-functions/src/main/AndroidManifest.xml +++ b/firebase-functions/src/main/AndroidManifest.xml @@ -2,7 +2,6 @@ - diff --git a/firebase-inappmessaging-display/src/main/res/drawable/btn_clear.png b/firebase-inappmessaging-display/src/main/res/drawable/btn_clear.png deleted file mode 100644 index 9b0b5a2829e..00000000000 Binary files a/firebase-inappmessaging-display/src/main/res/drawable/btn_clear.png and /dev/null differ diff --git a/firebase-inappmessaging-display/src/main/res/drawable/image_placeholder.png b/firebase-inappmessaging-display/src/main/res/drawable/image_placeholder.png deleted file mode 100644 index a045db6b3c7..00000000000 Binary files a/firebase-inappmessaging-display/src/main/res/drawable/image_placeholder.png and /dev/null differ diff --git a/firebase-storage/firebase-storage.gradle b/firebase-storage/firebase-storage.gradle index bb9446f27bd..1829942e97f 100644 --- a/firebase-storage/firebase-storage.gradle +++ b/firebase-storage/firebase-storage.gradle @@ -14,7 +14,7 @@ apply plugin: 'com.android.library' -def androidVersion = 26 +def androidVersion = 28 tasks.withType(org.gradle.api.tasks.testing.Test) { @@ -35,6 +35,7 @@ android { compileSdkVersion androidVersion defaultConfig { targetSdkVersion androidVersion + minSdkVersion 14 multiDexEnabled true testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } @@ -82,10 +83,10 @@ dependencies { androidTestImplementation "com.android.support:support-annotations:$supportAnnotationsVersion" androidTestImplementation 'com.android.support.test:rules:1.0.2' androidTestImplementation 'com.android.support.test:runner:1.0.2' - androidTestImplementation 'com.google.truth:truth:0.39' + androidTestImplementation 'com.google.truth:truth:0.42' androidTestImplementation 'junit:junit:4.12' testImplementation 'junit:junit:4.12' - testImplementation 'org.mockito:mockito-core:2.18.3' + testImplementation 'org.mockito:mockito-core:2.21.0' testImplementation 'org.robolectric:robolectric:4.0-alpha-3-SNAPSHOT' } diff --git a/firebase-storage/src/androidTest/AndroidManifest.xml b/firebase-storage/src/androidTest/AndroidManifest.xml index d7c8addc83e..9c9ff5d2d95 100644 --- a/firebase-storage/src/androidTest/AndroidManifest.xml +++ b/firebase-storage/src/androidTest/AndroidManifest.xml @@ -14,8 +14,6 @@ - diff --git a/firebase-storage/src/main/AndroidManifest.xml b/firebase-storage/src/main/AndroidManifest.xml index cf5c1098461..69b9ce7943f 100644 --- a/firebase-storage/src/main/AndroidManifest.xml +++ b/firebase-storage/src/main/AndroidManifest.xml @@ -16,7 +16,6 @@ - diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 7e9b2d3072d..842b452bd0b 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.8-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip diff --git a/protolite-well-known-types/protolite-well-known-types.gradle b/protolite-well-known-types/protolite-well-known-types.gradle index 4d424185329..f7962ff7cc2 100644 --- a/protolite-well-known-types/protolite-well-known-types.gradle +++ b/protolite-well-known-types/protolite-well-known-types.gradle @@ -16,52 +16,52 @@ apply plugin: 'com.android.library' apply plugin: 'com.google.protobuf' ext { - firebaseSkipPreguard = true + firebaseSkipPreguard = true } protobuf { - protoc { - artifact = 'com.google.protobuf:protoc:3.4.0' - } - plugins { - javalite { - artifact = 'com.google.protobuf:protoc-gen-javalite:3.0.0' + protoc { + artifact = 'com.google.protobuf:protoc:3.4.0' } - } - generateProtoTasks { - all().each { task -> - task.builtins { - remove java - } - task.plugins { - javalite {} - } + plugins { + javalite { + artifact = 'com.google.protobuf:protoc-gen-javalite:3.0.0' + } + } + generateProtoTasks { + all().each { task -> + task.builtins { + remove java + } + task.plugins { + javalite {} + } + } } - } } android { - compileSdkVersion 26 + compileSdkVersion 28 - defaultConfig { - minSdkVersion 14 - targetSdkVersion 26 - versionCode 1 - versionName '1.0' - } + defaultConfig { + minSdkVersion 14 + targetSdkVersion 28 + versionCode 1 + versionName '1.0' + } - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' + } } - } - sourceSets.main.resources.srcDirs = [ 'build/extracted-protos/main/'] - sourceSets.main.resources.includes = [ '**/*.proto' ] + sourceSets.main.resources.srcDirs = ['build/extracted-protos/main/'] + sourceSets.main.resources.includes = ['**/*.proto'] } dependencies { - implementation 'com.google.protobuf:protobuf-lite:3.0.1' - protobuf 'com.google.protobuf:protobuf-java:3.1.0' - protobuf 'com.google.api.grpc:proto-google-common-protos:1.11.0' + implementation 'com.google.protobuf:protobuf-lite:3.0.1' + protobuf 'com.google.protobuf:protobuf-java:3.5.1' + protobuf 'com.google.api.grpc:proto-google-common-protos:1.11.0' } diff --git a/root-project.gradle b/root-project.gradle index 50350c6eb26..aefc7f2daad 100644 --- a/root-project.gradle +++ b/root-project.gradle @@ -27,8 +27,8 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:3.0.1' - classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.3' + classpath 'com.android.tools.build:gradle:3.2.1' + classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.6' classpath 'net.ltgt.gradle:gradle-errorprone-plugin:0.6' classpath 'org.jsoup:jsoup:1.11.2' classpath 'gradle.plugin.com.github.sherter.google-java-format:google-java-format-gradle-plugin:0.6' @@ -40,7 +40,7 @@ buildscript { ext { playServicesVersion = '16.0.1' - supportAnnotationsVersion = '26.1.0' + supportAnnotationsVersion = '28.0.0' errorproneVersion = '2.3.2' errorproneJavacVersion = '9+181-r4173-1' } diff --git a/test-apps/build.gradle b/test-apps/build.gradle index 6dec6964fb0..c101239bcd8 100644 --- a/test-apps/build.gradle +++ b/test-apps/build.gradle @@ -21,7 +21,7 @@ buildscript { google() } dependencies { - classpath 'com.android.tools.build:gradle:3.1.4' + classpath 'com.android.tools.build:gradle:3.2.1' classpath 'com.google.gms:google-services:4.1.0' classpath 'gradle.plugin.com.github.sherter.google-java-format:google-java-format-gradle-plugin:0.7.1' } diff --git a/test-apps/database-test-app/build.gradle b/test-apps/database-test-app/build.gradle index 0de0533d49d..b2a06dbcc83 100644 --- a/test-apps/database-test-app/build.gradle +++ b/test-apps/database-test-app/build.gradle @@ -18,12 +18,12 @@ apply plugin: 'com.android.application' android { testBuildType = project.testBuildType - compileSdkVersion 27 + compileSdkVersion 28 defaultConfig { applicationId "com.google.firebase.testapps.database" minSdkVersion 16 - targetSdkVersion 27 + targetSdkVersion 28 versionCode 1 versionName "1.0" multiDexEnabled true diff --git a/test-apps/database-test-app/src/androidTest/java/com/google/firebase/testapps/database/TestActivityTest.java b/test-apps/database-test-app/src/androidTest/java/com/google/firebase/testapps/database/TestActivityTest.java index e46e9328986..1100133eefc 100644 --- a/test-apps/database-test-app/src/androidTest/java/com/google/firebase/testapps/database/TestActivityTest.java +++ b/test-apps/database-test-app/src/androidTest/java/com/google/firebase/testapps/database/TestActivityTest.java @@ -14,11 +14,12 @@ package com.google.firebase.testapps.database; -import android.support.test.espresso.Espresso; +import android.support.test.espresso.IdlingRegistry; import android.support.test.espresso.IdlingResource; +import android.support.test.filters.LargeTest; import android.support.test.rule.ActivityTestRule; import android.support.test.runner.AndroidJUnit4; -import android.test.suitebuilder.annotation.LargeTest; + import org.junit.After; import org.junit.Before; import org.junit.Rule; @@ -26,9 +27,9 @@ import org.junit.runner.RunWith; import static android.support.test.espresso.Espresso.onView; -import static android.support.test.espresso.action.ViewActions.*; -import static android.support.test.espresso.assertion.ViewAssertions.*; -import static android.support.test.espresso.matcher.ViewMatchers.*; +import static android.support.test.espresso.assertion.ViewAssertions.matches; +import static android.support.test.espresso.matcher.ViewMatchers.withId; +import static android.support.test.espresso.matcher.ViewMatchers.withText; @LargeTest @RunWith(AndroidJUnit4.class) @@ -43,13 +44,13 @@ public class TestActivityTest { @Before public void before() { mIdlingResource = mActivityTestRule.getActivity().getIdlingResource(); - Espresso.registerIdlingResources(mIdlingResource); + IdlingRegistry.getInstance().register(mIdlingResource); } @After public void unregisterIdlingResource() { if (mIdlingResource != null) { - Espresso.unregisterIdlingResources(mIdlingResource); + IdlingRegistry.getInstance().unregister(mIdlingResource); } } diff --git a/test-apps/database-test-app/src/main/java/com/google/firebase/testapps/database/TestActivity.java b/test-apps/database-test-app/src/main/java/com/google/firebase/testapps/database/TestActivity.java index b994ff3e531..c941e394df6 100644 --- a/test-apps/database-test-app/src/main/java/com/google/firebase/testapps/database/TestActivity.java +++ b/test-apps/database-test-app/src/main/java/com/google/firebase/testapps/database/TestActivity.java @@ -24,6 +24,7 @@ import android.support.test.espresso.idling.CountingIdlingResource; import android.widget.TextView; import android.widget.Toast; + import com.google.android.gms.tasks.OnSuccessListener; import com.google.firebase.auth.AuthResult; import com.google.firebase.auth.FirebaseAuth; @@ -31,12 +32,14 @@ import com.google.firebase.database.DatabaseError; import com.google.firebase.database.FirebaseDatabase; import com.google.firebase.database.ValueEventListener; + import java.util.Map; public class TestActivity extends Activity { + private final CountingIdlingResource idlingResource = + new CountingIdlingResource("Firebase database listener"); private FirebaseDatabase db; private FirebaseAuth auth; - private final CountingIdlingResource idlingResource = new CountingIdlingResource("Firebase database listener"); private TextView restaurantTextView; @Override @@ -80,16 +83,15 @@ public void onCancelled(DatabaseError error) { //// Signout of any existing sessions and sign in with email and password auth.signOut(); auth.signInWithEmailAndPassword("test@mailinator.com", "password") - .addOnSuccessListener( - new OnSuccessListener() { - @Override - public void onSuccess(AuthResult authResult) { - db.getReference("restaurants") + .addOnSuccessListener(new OnSuccessListener() { + @Override + public void onSuccess(AuthResult authResult) { + db.getReference("restaurants") .child("Baadal") .child("location") .setValue("Google MTV"); - } - }); + } + }); } @VisibleForTesting diff --git a/test-apps/firestore-test-app/build.gradle b/test-apps/firestore-test-app/build.gradle index be1c2d35183..33ea575d6f4 100644 --- a/test-apps/firestore-test-app/build.gradle +++ b/test-apps/firestore-test-app/build.gradle @@ -18,12 +18,12 @@ apply plugin: 'com.android.application' android { testBuildType = project.testBuildType - compileSdkVersion 27 + compileSdkVersion 28 defaultConfig { applicationId "com.google.firebase.testapps.firestore" minSdkVersion 16 - targetSdkVersion 27 + targetSdkVersion 28 versionCode 1 versionName "1.0" multiDexEnabled true diff --git a/test-apps/firestore-test-app/src/androidTest/java/com/google/firebase/testapps/firestore/TestActivityTest.java b/test-apps/firestore-test-app/src/androidTest/java/com/google/firebase/testapps/firestore/TestActivityTest.java index f6025b8866c..60590606d52 100644 --- a/test-apps/firestore-test-app/src/androidTest/java/com/google/firebase/testapps/firestore/TestActivityTest.java +++ b/test-apps/firestore-test-app/src/androidTest/java/com/google/firebase/testapps/firestore/TestActivityTest.java @@ -14,11 +14,12 @@ package com.google.firebase.testapps.firestore; -import android.support.test.espresso.Espresso; +import android.support.test.espresso.IdlingRegistry; import android.support.test.espresso.IdlingResource; +import android.support.test.filters.LargeTest; import android.support.test.rule.ActivityTestRule; import android.support.test.runner.AndroidJUnit4; -import android.test.suitebuilder.annotation.LargeTest; + import org.junit.After; import org.junit.Before; import org.junit.Rule; @@ -26,9 +27,9 @@ import org.junit.runner.RunWith; import static android.support.test.espresso.Espresso.onView; -import static android.support.test.espresso.action.ViewActions.*; -import static android.support.test.espresso.assertion.ViewAssertions.*; -import static android.support.test.espresso.matcher.ViewMatchers.*; +import static android.support.test.espresso.assertion.ViewAssertions.matches; +import static android.support.test.espresso.matcher.ViewMatchers.withId; +import static android.support.test.espresso.matcher.ViewMatchers.withText; @LargeTest @RunWith(AndroidJUnit4.class) @@ -42,13 +43,13 @@ public class TestActivityTest { @Before public void before() { mIdlingResource = mActivityTestRule.getActivity().getIdlingResource(); - Espresso.registerIdlingResources(mIdlingResource); + IdlingRegistry.getInstance().register(mIdlingResource); } @After public void unregisterIdlingResource() { if (mIdlingResource != null) { - Espresso.unregisterIdlingResources(mIdlingResource); + IdlingRegistry.getInstance().unregister(mIdlingResource); } } diff --git a/test-apps/functions-test-app/build.gradle b/test-apps/functions-test-app/build.gradle index fd6ea2601dc..23d0ef60a42 100644 --- a/test-apps/functions-test-app/build.gradle +++ b/test-apps/functions-test-app/build.gradle @@ -18,12 +18,12 @@ apply plugin: 'com.android.application' android { testBuildType = project.testBuildType - compileSdkVersion 27 + compileSdkVersion 28 defaultConfig { applicationId "com.google.firebase.testapps.functions" minSdkVersion 16 - targetSdkVersion 27 + targetSdkVersion 28 versionCode 1 versionName "1.0" testInstrumentationRunner 'android.support.test.runner.AndroidJUnitRunner' diff --git a/test-apps/functions-test-app/src/androidTest/java/com/google/firebase/testapps/functions/TestActivityTest.java b/test-apps/functions-test-app/src/androidTest/java/com/google/firebase/testapps/functions/TestActivityTest.java index 7804c21f14a..4b96842993c 100644 --- a/test-apps/functions-test-app/src/androidTest/java/com/google/firebase/testapps/functions/TestActivityTest.java +++ b/test-apps/functions-test-app/src/androidTest/java/com/google/firebase/testapps/functions/TestActivityTest.java @@ -14,11 +14,12 @@ package com.google.firebase.testapps.functions; -import android.support.test.espresso.Espresso; +import android.support.test.espresso.IdlingRegistry; import android.support.test.espresso.IdlingResource; +import android.support.test.filters.LargeTest; import android.support.test.rule.ActivityTestRule; import android.support.test.runner.AndroidJUnit4; -import android.test.suitebuilder.annotation.LargeTest; + import org.junit.After; import org.junit.Before; import org.junit.Rule; @@ -26,9 +27,9 @@ import org.junit.runner.RunWith; import static android.support.test.espresso.Espresso.onView; -import static android.support.test.espresso.action.ViewActions.*; -import static android.support.test.espresso.assertion.ViewAssertions.*; -import static android.support.test.espresso.matcher.ViewMatchers.*; +import static android.support.test.espresso.assertion.ViewAssertions.matches; +import static android.support.test.espresso.matcher.ViewMatchers.withId; +import static android.support.test.espresso.matcher.ViewMatchers.withText; @LargeTest @RunWith(AndroidJUnit4.class) @@ -43,13 +44,13 @@ public class TestActivityTest { @Before public void before() { mIdlingResource = mActivityTestRule.getActivity().getIdlingResource(); - Espresso.registerIdlingResources(mIdlingResource); + IdlingRegistry.getInstance().register(mIdlingResource); } @After public void unregisterIdlingResource() { if (mIdlingResource != null) { - Espresso.unregisterIdlingResources(mIdlingResource); + IdlingRegistry.getInstance().unregister(mIdlingResource); } } diff --git a/test-apps/gradle/wrapper/gradle-wrapper.properties b/test-apps/gradle/wrapper/gradle-wrapper.properties index 3fa24777a75..f9fe699b1e2 100644 --- a/test-apps/gradle/wrapper/gradle-wrapper.properties +++ b/test-apps/gradle/wrapper/gradle-wrapper.properties @@ -19,4 +19,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.8-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip diff --git a/test-apps/storage-test-app/build.gradle b/test-apps/storage-test-app/build.gradle index 2e8167a101e..3412c1c9f59 100644 --- a/test-apps/storage-test-app/build.gradle +++ b/test-apps/storage-test-app/build.gradle @@ -18,12 +18,12 @@ apply plugin: 'com.android.application' android { testBuildType = project.testBuildType - compileSdkVersion 27 + compileSdkVersion 28 defaultConfig { applicationId "com.google.firebase.testapps.storage" minSdkVersion 16 - targetSdkVersion 27 + targetSdkVersion 28 versionCode 1 versionName "1.0" multiDexEnabled true diff --git a/test-apps/storage-test-app/src/androidTest/java/com/google/firebase/testapps/storage/TestActivityTest.java b/test-apps/storage-test-app/src/androidTest/java/com/google/firebase/testapps/storage/TestActivityTest.java index dc525921aed..daa719d3e8b 100644 --- a/test-apps/storage-test-app/src/androidTest/java/com/google/firebase/testapps/storage/TestActivityTest.java +++ b/test-apps/storage-test-app/src/androidTest/java/com/google/firebase/testapps/storage/TestActivityTest.java @@ -20,10 +20,11 @@ import static android.support.test.espresso.matcher.ViewMatchers.*; import android.support.test.espresso.Espresso; +import android.support.test.espresso.IdlingRegistry; import android.support.test.espresso.IdlingResource; import android.support.test.rule.ActivityTestRule; import android.support.test.runner.AndroidJUnit4; -import android.test.suitebuilder.annotation.LargeTest; +import android.support.test.filters.LargeTest; import org.junit.After; import org.junit.Before; import org.junit.Rule; @@ -43,13 +44,13 @@ public class TestActivityTest { public void before() { mIdlingResource = mActivityTestRule.getActivity().getIdlingResource(); // To prove that the test fails, omit this call: - Espresso.registerIdlingResources(mIdlingResource); + IdlingRegistry.getInstance().register(mIdlingResource); } @After public void unregisterIdlingResource() { if (mIdlingResource != null) { - Espresso.unregisterIdlingResources(mIdlingResource); + IdlingRegistry.getInstance().unregister(mIdlingResource); } } diff --git a/tools/errorprone/errorprone.gradle b/tools/errorprone/errorprone.gradle index c5285cd9693..e7a329ccf2a 100644 --- a/tools/errorprone/errorprone.gradle +++ b/tools/errorprone/errorprone.gradle @@ -16,10 +16,10 @@ apply plugin: 'java-library' dependencies { - implementation 'com.google.errorprone:error_prone_check_api:2.3.1' + implementation 'com.google.errorprone:error_prone_check_api:2.3.2' implementation 'com.google.auto.service:auto-service:1.0-rc4' - testImplementation 'junit:junit:4.11' + testImplementation 'junit:junit:4.12' testImplementation 'com.google.errorprone:error_prone_test_helpers:2.3.1' testCompile 'com.google.errorprone:javac:9+181-r4173-1' }