diff --git a/app/build.gradle b/app/build.gradle index fc04a1622..41d2614cd 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -76,7 +76,7 @@ android { } } - flavorDimensions "distribution" + flavorDimensions = ["distribution"] productFlavors { // Play Store and officially supported version @@ -170,16 +170,16 @@ android { dependencies { coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.4' - implementation 'androidx.core:core:1.13.0' + implementation 'androidx.core:core:1.13.1' implementation 'androidx.media:media:1.7.0' - implementation 'androidx.fragment:fragment:1.6.2' - implementation 'androidx.appcompat:appcompat:1.6.1' + implementation 'androidx.fragment:fragment:1.8.0' + implementation 'androidx.appcompat:appcompat:1.7.0' implementation 'androidx.preference:preference:1.2.1' implementation 'androidx.cardview:cardview:1.0.0' implementation 'androidx.recyclerview:recyclerview:1.3.2' implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0' implementation 'androidx.constraintlayout:constraintlayout:2.1.4' - implementation 'com.google.android.material:material:1.11.0' + implementation 'com.google.android.material:material:1.12.0' implementation 'androidx.browser:browser:1.8.0' implementation 'androidx.lifecycle:lifecycle-viewmodel:2.7.0' implementation 'androidx.lifecycle:lifecycle-livedata:2.7.0' @@ -204,8 +204,8 @@ dependencies { // Dependencies for the Play Store version. storeImplementation 'com.google.android.gms:play-services-maps:18.2.0' - storeImplementation 'com.google.firebase:firebase-analytics:21.5.0' - storeImplementation 'com.google.firebase:firebase-crashlytics:18.6.4' + storeImplementation 'com.google.firebase:firebase-analytics:22.0.1' + storeImplementation 'com.google.firebase:firebase-crashlytics:19.0.1' storeImplementation 'com.google.android.gms:play-services-code-scanner:16.1.0' // Dependencies for open version. @@ -220,7 +220,7 @@ dependencies { testImplementation 'junit:junit:4.13.2' // Once final classes can be mocked, go back to mockito-core. testImplementation 'org.mockito:mockito-inline:5.2.0' - testImplementation 'org.robolectric:robolectric:4.12.1' + testImplementation 'org.robolectric:robolectric:4.12.2' testImplementation 'androidx.test:core:1.5.0' testImplementation 'androidx.test.ext:junit:1.1.5' testImplementation 'androidx.test:rules:1.5.0' @@ -235,8 +235,8 @@ dependencies { testImplementation 'org.skyscreamer:jsonassert:1.5.1' testImplementation 'com.github.niknetniko:easy-random:master-SNAPSHOT' testImplementation 'org.apache.commons:commons-lang3:3.14.0' - testImplementation 'commons-validator:commons-validator:1.8.0' - testImplementation 'com.google.guava:guava:33.1.0-jre' + testImplementation 'commons-validator:commons-validator:1.9.0' + testImplementation 'com.google.guava:guava:33.2.1-jre' } diff --git a/app/src/test/java/be/ugent/zeus/hydra/association/EventDetailsActivityTest.java b/app/src/test/java/be/ugent/zeus/hydra/association/EventDetailsActivityTest.java index d6262922d..85a9b87f8 100644 --- a/app/src/test/java/be/ugent/zeus/hydra/association/EventDetailsActivityTest.java +++ b/app/src/test/java/be/ugent/zeus/hydra/association/EventDetailsActivityTest.java @@ -29,7 +29,6 @@ import be.ugent.zeus.hydra.common.network.InstanceProvider; import be.ugent.zeus.hydra.testing.NoNetworkInterceptor; -import be.ugent.zeus.hydra.testing.RobolectricUtils; import be.ugent.zeus.hydra.testing.Utils; import okhttp3.OkHttpClient; import org.junit.Before; @@ -37,6 +36,7 @@ import org.junit.runner.RunWith; import org.robolectric.RobolectricTestRunner; +import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation; import static org.junit.Assert.assertEquals; /** @@ -57,8 +57,10 @@ public void setUp() { public void shouldReturnCorrectIntent_whenStartIsCalled() { Event e = Utils.generate(Event.class); Association a = Utils.generate(Association.class); - Intent actual = EventDetailsActivity.start(RobolectricUtils.getActivityContext(), e, a); - Intent expected = new Intent(RobolectricUtils.getActivityContext(), EventDetailsActivity.class); + + var aContext = getInstrumentation().getTargetContext(); + var actual = EventDetailsActivity.start(aContext, e, a); + var expected = new Intent(aContext, EventDetailsActivity.class); assertEquals(expected.getComponent(), actual.getComponent()); assertEquals(e, IntentCompat.getParcelableExtra(actual, EventDetailsActivity.PARCEL_EVENT, Event.class)); diff --git a/app/src/test/java/be/ugent/zeus/hydra/testing/RobolectricUtils.java b/app/src/test/java/be/ugent/zeus/hydra/testing/RobolectricUtils.java index 6b9f836a7..0d9816026 100644 --- a/app/src/test/java/be/ugent/zeus/hydra/testing/RobolectricUtils.java +++ b/app/src/test/java/be/ugent/zeus/hydra/testing/RobolectricUtils.java @@ -81,7 +81,7 @@ public static void assertNotEmpty(TextView textView) { assertNotEquals("", textView.getText()); } - @SuppressWarnings("deprecation") + @Deprecated public static Context getActivityContext() { return Robolectric.setupActivity(BlankActivity.class); } diff --git a/build.gradle b/build.gradle index d38422b5b..beda96491 100644 --- a/build.gradle +++ b/build.gradle @@ -28,8 +28,8 @@ buildscript { } dependencies { classpath 'com.android.tools.build:gradle:8.2.2' - classpath 'com.google.gms:google-services:4.4.1' - classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.9' + classpath 'com.google.gms:google-services:4.4.2' + classpath 'com.google.firebase:firebase-crashlytics-gradle:3.0.1' } }