Skip to content

feat: update gradle dependencies #1163

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 10 commits into from
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
buildscript {
ext.kotlin_version = "1.5.31"
ext.kotlin_version = "1.6.20"
ext.jacocoVersion = '0.8.7'
repositories {
google()
mavenCentral()
}
dependencies {
classpath "com.android.tools.build:gradle:7.0.3"
classpath 'com.android.tools.build:gradle:7.1.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.jacoco:org.jacoco.core:$jacocoVersion"
classpath "com.dicedmelon.gradle:jacoco-android:0.1.5"
Expand Down Expand Up @@ -66,7 +66,7 @@ ext {
minSdkVersion = 21
targetSdkVersion = 31

mockitoCoreVersion = "3.12.4"
mockitoCoreVersion = '4.4.0'
junitVersion = "4.13.2"
robolectricVersion = "4.7"
}
2 changes: 1 addition & 1 deletion coroutines/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ android {
}

ext {
coroutinesVersion = "1.5.2"
coroutinesVersion = "1.6.1"
}

dependencies {
Expand Down
2 changes: 1 addition & 1 deletion facebook/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ android {
}

dependencies {
api "com.facebook.android:facebook-login:12.1.0"
api "com.facebook.android:facebook-login:13.1.0"
Copy link
Member

@mtrezza mtrezza May 27, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change to

api "com.facebook.android:facebook-login:[13.2.0, 14.0["

implementation project(":parse")

testImplementation "junit:junit:$rootProject.ext.junitVersion"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static org.mockito.Matchers.any;
import static org.mockito.Matchers.eq;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.never;
import static org.mockito.Mockito.times;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyInt;
import static org.mockito.ArgumentMatchers.anyList;
import static org.mockito.ArgumentMatchers.anyMap;
import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.ArgumentMatchers.nullable;
import static org.mockito.Matchers.any;
import static org.mockito.Matchers.anyInt;
import static org.mockito.Matchers.anyString;
import static org.mockito.Matchers.eq;
import static org.mockito.Mockito.doThrow;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.never;
Expand Down
2 changes: 1 addition & 1 deletion fcm/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ android {
}

dependencies {
api "com.google.firebase:firebase-messaging:23.0.0"
api 'com.google.firebase:firebase-messaging:23.0.3'
implementation project(":parse")
}

Expand Down
6 changes: 3 additions & 3 deletions google/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ android {

dependencies {
api "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
api "com.google.android.gms:play-services-auth:19.2.0"
api "androidx.activity:activity-ktx:1.3.1"
api "androidx.fragment:fragment-ktx:1.3.1"
api "com.google.android.gms:play-services-auth:20.1.0"
api "androidx.activity:activity-ktx:1.4.0"
api "androidx.fragment:fragment-ktx:1.4.1"
implementation project(":parse")
}

Expand Down
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Tue Nov 16 15:15:09 EET 2021
#Sat Apr 16 09:27:50 CEST 2022
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertTrue;
import static org.mockito.Matchers.anyBoolean;
import static org.mockito.ArgumentMatchers.anyBoolean;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
Expand Down
4 changes: 2 additions & 2 deletions parse/src/test/java/com/parse/EventuallyPinTest.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.parse;

import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.ArgumentMatchers.nullable;
import static org.mockito.Matchers.any;
import static org.mockito.Matchers.eq;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;

Expand Down
6 changes: 3 additions & 3 deletions parse/src/test/java/com/parse/FileObjectStoreTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import static org.mockito.Matchers.any;
import static org.mockito.Matchers.eq;
import static org.mockito.Matchers.isNull;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.ArgumentMatchers.isNull;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
import static org.skyscreamer.jsonassert.JSONAssert.assertEquals;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import static org.mockito.Matchers.any;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;

Expand Down
8 changes: 4 additions & 4 deletions parse/src/test/java/com/parse/OfflineObjectStoreTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
import static junit.framework.Assert.assertSame;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyBoolean;
import static org.mockito.ArgumentMatchers.anyList;
import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.ArgumentMatchers.nullable;
import static org.mockito.Matchers.any;
import static org.mockito.Matchers.anyBoolean;
import static org.mockito.Matchers.anyList;
import static org.mockito.Matchers.anyString;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
Expand Down
2 changes: 1 addition & 1 deletion parse/src/test/java/com/parse/OfflineQueryLogicTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.nullable;
import static org.mockito.Matchers.any;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.never;
import static org.mockito.Mockito.times;
Expand Down
4 changes: 2 additions & 2 deletions parse/src/test/java/com/parse/ParseACLTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertTrue;
import static org.mockito.Matchers.any;
import static org.mockito.Matchers.eq;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.reset;
import static org.mockito.Mockito.times;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertTrue;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.nullable;
import static org.mockito.Matchers.any;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
Expand Down
44 changes: 17 additions & 27 deletions parse/src/test/java/com/parse/ParseAnalyticsTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertTrue;
import static org.mockito.ArgumentMatchers.anyMap;
import static org.mockito.Matchers.anyString;
import static org.mockito.Matchers.eq;
import static org.mockito.Matchers.isNull;
import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.ArgumentMatchers.isNull;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
Expand All @@ -36,7 +36,6 @@
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Matchers;
import org.robolectric.RobolectricTestRunner;
import org.robolectric.annotation.LooperMode;

Expand Down Expand Up @@ -92,26 +91,23 @@ public void testTrackEventInBackgroundEmptyName() throws Exception {
public void testTrackEventInBackgroundNormalName() throws Exception {
ParseTaskUtils.wait(ParseAnalytics.trackEventInBackground("test"));

verify(controller, times(1))
.trackEventInBackground(eq("test"), Matchers.eq(null), isNull(String.class));
verify(controller, times(1)).trackEventInBackground(eq("test"), eq(null), isNull());
}

@Test
public void testTrackEventInBackgroundNullParameters() throws Exception {
ParseTaskUtils.wait(
ParseAnalytics.trackEventInBackground("test", (Map<String, String>) null));

verify(controller, times(1))
.trackEventInBackground(eq("test"), Matchers.eq(null), isNull(String.class));
verify(controller, times(1)).trackEventInBackground(eq("test"), eq(null), isNull());
}

@Test
public void testTrackEventInBackgroundEmptyParameters() throws Exception {
Map<String, String> dimensions = new HashMap<>();
ParseTaskUtils.wait(ParseAnalytics.trackEventInBackground("test", dimensions));

verify(controller, times(1))
.trackEventInBackground(eq("test"), eq(dimensions), isNull(String.class));
verify(controller, times(1)).trackEventInBackground(eq("test"), eq(dimensions), isNull());
}

@Test
Expand All @@ -120,17 +116,15 @@ public void testTrackEventInBackgroundNormalParameters() throws Exception {
dimensions.put("key", "value");
ParseTaskUtils.wait(ParseAnalytics.trackEventInBackground("test", dimensions));

verify(controller, times(1))
.trackEventInBackground(eq("test"), eq(dimensions), isNull(String.class));
verify(controller, times(1)).trackEventInBackground(eq("test"), eq(dimensions), isNull());
}

@Test
public void testTrackEventInBackgroundNullCallback() {
Map<String, String> dimensions = new HashMap<>();
ParseAnalytics.trackEventInBackground("test", dimensions, null);

verify(controller, times(1))
.trackEventInBackground(eq("test"), eq(dimensions), isNull(String.class));
verify(controller, times(1)).trackEventInBackground(eq("test"), eq(dimensions), isNull());
}

@Test
Expand All @@ -150,8 +144,7 @@ public void testTrackEventInBackgroundNormalCallback() throws Exception {

// Make sure the callback is called
assertTrue(done.tryAcquire(1, 10, TimeUnit.SECONDS));
verify(controller, times(1))
.trackEventInBackground(eq("test"), eq(dimensions), isNull(String.class));
verify(controller, times(1)).trackEventInBackground(eq("test"), eq(dimensions), isNull());

final Semaphore doneAgain = new Semaphore(0);
ParseAnalytics.trackEventInBackground(
Expand All @@ -165,8 +158,7 @@ public void testTrackEventInBackgroundNormalCallback() throws Exception {

// Make sure the callback is called
assertTrue(doneAgain.tryAcquire(1, 10, TimeUnit.SECONDS));
verify(controller, times(1))
.trackEventInBackground(eq("test"), Matchers.eq(null), isNull(String.class));
verify(controller, times(1)).trackEventInBackground(eq("test"), eq(null), isNull());
}

// endregion
Expand All @@ -177,45 +169,43 @@ public void testTrackEventInBackgroundNormalCallback() throws Exception {
public void testTrackAppOpenedInBackgroundNullIntent() throws Exception {
ParseTaskUtils.wait(ParseAnalytics.trackAppOpenedInBackground(null));

verify(controller, times(1))
.trackAppOpenedInBackground(isNull(String.class), isNull(String.class));
verify(controller, times(1)).trackAppOpenedInBackground(isNull(), isNull());
}

@Test
public void testTrackAppOpenedInBackgroundEmptyIntent() throws Exception {
Intent intent = new Intent();
ParseTaskUtils.wait(ParseAnalytics.trackAppOpenedInBackground(intent));

verify(controller, times(1))
.trackAppOpenedInBackground(isNull(String.class), isNull(String.class));
verify(controller, times(1)).trackAppOpenedInBackground(isNull(), isNull());
}

@Test
public void testTrackAppOpenedInBackgroundNormalIntent() throws Exception {
Intent intent = makeIntentWithParseData("test");
ParseTaskUtils.wait(ParseAnalytics.trackAppOpenedInBackground(intent));

verify(controller, times(1)).trackAppOpenedInBackground(eq("test"), isNull(String.class));
verify(controller, times(1)).trackAppOpenedInBackground(eq("test"), isNull());
}

@Test
public void testTrackAppOpenedInBackgroundDuplicatedIntent() throws Exception {
Intent intent = makeIntentWithParseData("test");
ParseTaskUtils.wait(ParseAnalytics.trackAppOpenedInBackground(intent));

verify(controller, times(1)).trackAppOpenedInBackground(eq("test"), isNull(String.class));
verify(controller, times(1)).trackAppOpenedInBackground(eq("test"), isNull());

ParseTaskUtils.wait(ParseAnalytics.trackAppOpenedInBackground(intent));

verify(controller, times(1)).trackAppOpenedInBackground(eq("test"), isNull(String.class));
verify(controller, times(1)).trackAppOpenedInBackground(eq("test"), isNull());
}

@Test
public void testTrackAppOpenedInBackgroundNullCallback() throws Exception {
Intent intent = makeIntentWithParseData("test");
ParseAnalytics.trackAppOpenedInBackground(intent, null);

verify(controller, times(1)).trackAppOpenedInBackground(eq("test"), isNull(String.class));
verify(controller, times(1)).trackAppOpenedInBackground(eq("test"), isNull());
}

@Test
Expand All @@ -233,7 +223,7 @@ public void testTrackAppOpenedInBackgroundNormalCallback() throws Exception {

// Make sure the callback is called
assertTrue(done.tryAcquire(1, 10, TimeUnit.SECONDS));
verify(controller, times(1)).trackAppOpenedInBackground(eq("test"), isNull(String.class));
verify(controller, times(1)).trackAppOpenedInBackground(eq("test"), isNull());
}

// endregion
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
*/
package com.parse;

import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.verifyNoMoreInteractions;
Expand All @@ -20,7 +21,6 @@
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.mockito.Matchers;

public class ParseAuthenticationManagerTest {

Expand Down Expand Up @@ -71,7 +71,7 @@ public void testRegister() {
@Test
public void testRestoreAuthentication() throws ParseException {
when(controller.getAsync(false)).thenReturn(Task.<ParseUser>forResult(null));
when(provider.onRestore(Matchers.<Map<String, String>>any())).thenReturn(true);
when(provider.onRestore(any())).thenReturn(true);
manager.register("test_provider", provider);

Map<String, String> authData = new HashMap<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;
import static org.mockito.Matchers.any;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
Expand Down
8 changes: 4 additions & 4 deletions parse/src/test/java/com/parse/ParseCloudTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertTrue;
import static org.mockito.ArgumentMatchers.anyMap;
import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.ArgumentMatchers.isNull;
import static org.mockito.ArgumentMatchers.nullable;
import static org.mockito.Matchers.anyMap;
import static org.mockito.Matchers.anyString;
import static org.mockito.Matchers.eq;
import static org.mockito.Matchers.isNull;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
Expand Down
Loading