diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 0a66f305ef8..b4a1de1c04a 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -93,15 +93,20 @@ # All domain and utility-specific shared test infrastructure. /testing/src/main/java/org/oppia/android/testing/FakeAnalyticsEventLogger.kt @oppia/android-app-infrastructure-reviewers /testing/src/main/java/org/oppia/android/testing/FakeExceptionLogger.kt @oppia/android-app-infrastructure-reviewers +/testing/src/main/java/org/oppia/android/testing/FakeFirebaseAuthInstanceWrapperImpl.kt @oppia/android-app-infrastructure-reviewers +/testing/src/main/java/org/oppia/android/testing/FakeFirestoreEventLogger.kt @oppia/android-app-infrastructure-reviewers +/testing/src/main/java/org/oppia/android/testing/FakeFirestoreInstanceWrapperImpl.kt @oppia/android-app-infrastructure-reviewers /testing/src/main/java/org/oppia/android/testing/FakePerformanceMetricAssessor.kt @oppia/android-app-infrastructure-reviewers /testing/src/main/java/org/oppia/android/testing/FakePerformanceMetricsEventLogger.kt @oppia/android-app-infrastructure-reviewers /testing/src/main/java/org/oppia/android/testing/TestImageLoaderModule.kt @oppia/android-app-infrastructure-reviewers /testing/src/main/java/org/oppia/android/testing/TestLogReportingModule.kt @oppia/android-app-infrastructure-reviewers /testing/src/test/java/org/oppia/android/testing/FakeAnalyticsEventLoggerTest.kt @oppia/android-app-infrastructure-reviewers /testing/src/test/java/org/oppia/android/testing/FakeExceptionLoggerTest.kt @oppia/android-app-infrastructure-reviewers +/testing/src/test/java/org/oppia/android/testing/FakeFirestoreEventLoggerTest.kt @oppia/android-app-infrastructure-reviewers /testing/src/test/java/org/oppia/android/testing/FakePerformanceMetricAssessorTest.kt @oppia/android-app-infrastructure-reviewers /testing/src/test/java/org/oppia/android/testing/FakePerformanceMetricsEventLoggerTest.kt @oppia/android-app-infrastructure-reviewers +/testing/src/*/java/org/oppia/android/testing/firebase/ @oppia/android-app-infrastructure-reviewers /testing/src/*/java/org/oppia/android/testing/lightweightcheckpointing/ @oppia/android-app-infrastructure-reviewers /testing/src/*/java/org/oppia/android/testing/logging/ @oppia/android-app-infrastructure-reviewers /testing/src/*/java/org/oppia/android/testing/math/ @oppia/android-app-infrastructure-reviewers diff --git a/app/BUILD.bazel b/app/BUILD.bazel index 32677435108..4019ad3cd6c 100644 --- a/app/BUILD.bazel +++ b/app/BUILD.bazel @@ -713,7 +713,7 @@ kt_android_library( "//third_party:androidx_databinding_databinding-runtime", "//utility", "//utility/src/main/java/org/oppia/android/util/extensions:context_extensions", - "//utility/src/main/java/org/oppia/android/util/logging/firebase:debug_event_logger", + "//utility/src/main/java/org/oppia/android/util/logging/firebase:debug_module", "//utility/src/main/java/org/oppia/android/util/math:fraction_parser", "//utility/src/main/java/org/oppia/android/util/networking:network_connection_debug_util", "//utility/src/main/java/org/oppia/android/util/parser/html:html_parser", @@ -1018,4 +1018,15 @@ android_library( ], ) +android_library( + name = "firestore_deps", + exports = [ + "//third_party:com_google_auto_value_auto-value-annotations", + "//third_party:com_google_firebase_firebase-appcheck", + "//third_party:com_google_firebase_firebase-appcheck-debug", + "//third_party:com_google_firebase_firebase-appcheck-playintegrity", + "//third_party:org_checkerframework_checker-qual", + ], +) + dagger_rules() diff --git a/app/build.gradle b/app/build.gradle index 6de6e2c4757..3090289b14a 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -169,8 +169,13 @@ dependencies { 'com.google.dagger:dagger:2.24', 'com.google.firebase:firebase-analytics:17.5.0', 'com.google.firebase:firebase-analytics-ktx:17.5.0', + 'com.google.firebase:firebase-appcheck:16.0.0', + 'com.google.firebase:firebase-appcheck-debug:16.0.0', + 'com.google.firebase:firebase-appcheck-playintegrity:16.0.0', 'com.google.firebase:firebase-core:17.5.0', 'com.google.firebase:firebase-crashlytics:17.0.0', + 'com.google.firebase:firebase-firestore-ktx:24.2.1', + 'com.google.firebase:firebase-auth-ktx:19.3.1', 'com.google.guava:guava:28.1-android', 'com.google.protobuf:protobuf-javalite:3.17.3', 'com.github.oppia:CircularImageview:35d08ba88a', diff --git a/app/src/main/java/org/oppia/android/app/administratorcontrols/appversion/AppVersionViewModel.kt b/app/src/main/java/org/oppia/android/app/administratorcontrols/appversion/AppVersionViewModel.kt index f67614fd3be..b9d77464349 100644 --- a/app/src/main/java/org/oppia/android/app/administratorcontrols/appversion/AppVersionViewModel.kt +++ b/app/src/main/java/org/oppia/android/app/administratorcontrols/appversion/AppVersionViewModel.kt @@ -5,9 +5,9 @@ import androidx.lifecycle.ViewModel import org.oppia.android.R import org.oppia.android.app.fragment.FragmentScope import org.oppia.android.app.translation.AppLanguageResourceHandler -import org.oppia.android.app.utility.getLastUpdateTime -import org.oppia.android.app.utility.getVersionName import org.oppia.android.app.viewmodel.ObservableViewModel +import org.oppia.android.util.extensions.getLastUpdateTime +import org.oppia.android.util.extensions.getVersionName import javax.inject.Inject /** [ViewModel] for [AppVersionFragment]. */ diff --git a/app/src/main/java/org/oppia/android/app/application/AbstractOppiaApplication.kt b/app/src/main/java/org/oppia/android/app/application/AbstractOppiaApplication.kt index 7581fc75bf5..11a3025ff14 100644 --- a/app/src/main/java/org/oppia/android/app/application/AbstractOppiaApplication.kt +++ b/app/src/main/java/org/oppia/android/app/application/AbstractOppiaApplication.kt @@ -9,8 +9,12 @@ import androidx.multidex.MultiDexApplication import androidx.work.Configuration import androidx.work.WorkManager import com.google.firebase.FirebaseApp +import com.google.firebase.appcheck.FirebaseAppCheck +import com.google.firebase.appcheck.debug.DebugAppCheckProviderFactory +import com.google.firebase.appcheck.playintegrity.PlayIntegrityAppCheckProviderFactory import org.oppia.android.app.activity.ActivityComponent import org.oppia.android.app.activity.ActivityComponentFactory +import org.oppia.android.app.model.BuildFlavor import org.oppia.android.domain.oppialogger.ApplicationStartupListener /** The root base [Application] of the Oppia app. */ @@ -47,6 +51,20 @@ abstract class AbstractOppiaApplication( // TODO(#4751): Re-enable WorkManager for S+. if (Build.VERSION.SDK_INT < Build.VERSION_CODES.S) { FirebaseApp.initializeApp(applicationContext) + // FirebaseAppCheck protects our API resources from abuse. It works with Firebase services, + // Google Cloud services, and can also be implemented for our own APIs. + // See https://firebase.google.com/docs/app-check for currently supported Firebase products. + // Note that as of this code being checked in, only the app's Firestore usage is affected by + // App Check (Analytics is NOT affected). + if (component.getCurrentBuildFlavor() == BuildFlavor.DEVELOPER) { + FirebaseAppCheck.getInstance().installAppCheckProviderFactory( + DebugAppCheckProviderFactory.getInstance(), + ) + } else { + FirebaseAppCheck.getInstance().installAppCheckProviderFactory( + PlayIntegrityAppCheckProviderFactory.getInstance(), + ) + } WorkManager.initialize(applicationContext, workManagerConfiguration) val workManager = WorkManager.getInstance(applicationContext) component.getAnalyticsStartupListenerStartupListeners().forEach { it.onCreate(workManager) } diff --git a/app/src/main/java/org/oppia/android/app/application/ApplicationComponent.kt b/app/src/main/java/org/oppia/android/app/application/ApplicationComponent.kt index 4b36869cda8..4fc1daefb7d 100644 --- a/app/src/main/java/org/oppia/android/app/application/ApplicationComponent.kt +++ b/app/src/main/java/org/oppia/android/app/application/ApplicationComponent.kt @@ -4,6 +4,7 @@ import android.app.Application import androidx.work.Configuration import dagger.BindsInstance import org.oppia.android.app.activity.ActivityComponentImpl +import org.oppia.android.app.model.BuildFlavor import org.oppia.android.domain.oppialogger.ApplicationStartupListener import org.oppia.android.domain.oppialogger.analytics.AnalyticsStartupListener import javax.inject.Provider @@ -30,4 +31,6 @@ interface ApplicationComponent : ApplicationInjector { fun getAnalyticsStartupListenerStartupListeners(): Set fun getWorkManagerConfiguration(): Configuration + + fun getCurrentBuildFlavor(): BuildFlavor } diff --git a/app/src/main/java/org/oppia/android/app/application/alpha/AlphaApplicationComponent.kt b/app/src/main/java/org/oppia/android/app/application/alpha/AlphaApplicationComponent.kt index c91e02f702f..136fd1dbb9a 100644 --- a/app/src/main/java/org/oppia/android/app/application/alpha/AlphaApplicationComponent.kt +++ b/app/src/main/java/org/oppia/android/app/application/alpha/AlphaApplicationComponent.kt @@ -12,6 +12,7 @@ import org.oppia.android.app.shim.ViewBindingShimModule import org.oppia.android.app.translation.ActivityRecreatorProdModule import org.oppia.android.data.backends.gae.NetworkConfigProdModule import org.oppia.android.data.backends.gae.NetworkModule +import org.oppia.android.domain.auth.AuthenticationModule import org.oppia.android.domain.classify.InteractionsModule import org.oppia.android.domain.classify.rules.algebraicexpressioninput.AlgebraicExpressionInputModule import org.oppia.android.domain.classify.rules.continueinteraction.ContinueModule @@ -99,6 +100,7 @@ import javax.inject.Singleton PerformanceMetricsConfigurationsModule::class, AlphaBuildFlavorModule::class, EventLoggingConfigurationModule::class, CpuPerformanceSnapshotterModule::class, PerformanceMetricsAssessorModule::class, ExplorationProgressModule::class, + AuthenticationModule::class, ] ) interface AlphaApplicationComponent : ApplicationComponent { diff --git a/app/src/main/java/org/oppia/android/app/application/alpha/BUILD.bazel b/app/src/main/java/org/oppia/android/app/application/alpha/BUILD.bazel index 9c410695450..ce982039b52 100644 --- a/app/src/main/java/org/oppia/android/app/application/alpha/BUILD.bazel +++ b/app/src/main/java/org/oppia/android/app/application/alpha/BUILD.bazel @@ -19,6 +19,7 @@ kt_android_library( "//app/src/main/java/org/oppia/android/app/application:abstract_application", "//app/src/main/java/org/oppia/android/app/application:application_component", "//app/src/main/java/org/oppia/android/app/application:common_application_modules", + "//domain/src/main/java/org/oppia/android/domain/auth:auth_module", "//utility/src/main/java/org/oppia/android/util/logging:standard_event_logging_configuration_module", "//utility/src/main/java/org/oppia/android/util/logging/firebase:prod_module", "//utility/src/main/java/org/oppia/android/util/networking:prod_module", diff --git a/app/src/main/java/org/oppia/android/app/application/alphakenya/AlphaKenyaApplicationComponent.kt b/app/src/main/java/org/oppia/android/app/application/alphakenya/AlphaKenyaApplicationComponent.kt index a65a7cf5724..75d07359cd4 100644 --- a/app/src/main/java/org/oppia/android/app/application/alphakenya/AlphaKenyaApplicationComponent.kt +++ b/app/src/main/java/org/oppia/android/app/application/alphakenya/AlphaKenyaApplicationComponent.kt @@ -13,6 +13,7 @@ import org.oppia.android.app.shim.ViewBindingShimModule import org.oppia.android.app.translation.ActivityRecreatorProdModule import org.oppia.android.data.backends.gae.NetworkConfigProdModule import org.oppia.android.data.backends.gae.NetworkModule +import org.oppia.android.domain.auth.AuthenticationModule import org.oppia.android.domain.classify.InteractionsModule import org.oppia.android.domain.classify.rules.algebraicexpressioninput.AlgebraicExpressionInputModule import org.oppia.android.domain.classify.rules.continueinteraction.ContinueModule @@ -100,6 +101,7 @@ import javax.inject.Singleton PerformanceMetricsConfigurationsModule::class, AlphaBuildFlavorModule::class, KenyaAlphaEventLoggingConfigurationModule::class, CpuPerformanceSnapshotterModule::class, PerformanceMetricsAssessorModule::class, ExplorationProgressModule::class, + AuthenticationModule::class, ] ) interface AlphaKenyaApplicationComponent : ApplicationComponent { diff --git a/app/src/main/java/org/oppia/android/app/application/alphakenya/BUILD.bazel b/app/src/main/java/org/oppia/android/app/application/alphakenya/BUILD.bazel index 538d47308dc..ff7623c9481 100644 --- a/app/src/main/java/org/oppia/android/app/application/alphakenya/BUILD.bazel +++ b/app/src/main/java/org/oppia/android/app/application/alphakenya/BUILD.bazel @@ -20,6 +20,7 @@ kt_android_library( "//app/src/main/java/org/oppia/android/app/application:application_component", "//app/src/main/java/org/oppia/android/app/application:common_application_modules", "//app/src/main/java/org/oppia/android/app/application/alpha:alpha_build_flavor_module", + "//domain/src/main/java/org/oppia/android/domain/auth:auth_module", "//utility/src/main/java/org/oppia/android/util/logging:kenya_alpha_event_logging_configuration_module", "//utility/src/main/java/org/oppia/android/util/logging/firebase:prod_module", "//utility/src/main/java/org/oppia/android/util/networking:prod_module", diff --git a/app/src/main/java/org/oppia/android/app/application/beta/BUILD.bazel b/app/src/main/java/org/oppia/android/app/application/beta/BUILD.bazel index db532533d41..f8bc14be8ca 100644 --- a/app/src/main/java/org/oppia/android/app/application/beta/BUILD.bazel +++ b/app/src/main/java/org/oppia/android/app/application/beta/BUILD.bazel @@ -22,6 +22,7 @@ kt_android_library( "//app/src/main/java/org/oppia/android/app/application:abstract_application", "//app/src/main/java/org/oppia/android/app/application:application_component", "//app/src/main/java/org/oppia/android/app/application:common_application_modules", + "//domain/src/main/java/org/oppia/android/domain/auth:auth_module", "//utility/src/main/java/org/oppia/android/util/logging:standard_event_logging_configuration_module", "//utility/src/main/java/org/oppia/android/util/logging/firebase:prod_module", "//utility/src/main/java/org/oppia/android/util/networking:prod_module", diff --git a/app/src/main/java/org/oppia/android/app/application/beta/BetaApplicationComponent.kt b/app/src/main/java/org/oppia/android/app/application/beta/BetaApplicationComponent.kt index b427b4eaeb3..bbe79384e81 100644 --- a/app/src/main/java/org/oppia/android/app/application/beta/BetaApplicationComponent.kt +++ b/app/src/main/java/org/oppia/android/app/application/beta/BetaApplicationComponent.kt @@ -12,6 +12,7 @@ import org.oppia.android.app.shim.ViewBindingShimModule import org.oppia.android.app.translation.ActivityRecreatorProdModule import org.oppia.android.data.backends.gae.NetworkConfigProdModule import org.oppia.android.data.backends.gae.NetworkModule +import org.oppia.android.domain.auth.AuthenticationModule import org.oppia.android.domain.classify.InteractionsModule import org.oppia.android.domain.classify.rules.algebraicexpressioninput.AlgebraicExpressionInputModule import org.oppia.android.domain.classify.rules.continueinteraction.ContinueModule @@ -99,7 +100,7 @@ import javax.inject.Singleton PerformanceMetricsConfigurationsModule::class, BetaBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, CpuPerformanceSnapshotterModule::class, PerformanceMetricsAssessorModule::class, - ExplorationProgressModule::class, + ExplorationProgressModule::class, AuthenticationModule::class, ] ) interface BetaApplicationComponent : ApplicationComponent { diff --git a/app/src/main/java/org/oppia/android/app/application/dev/BUILD.bazel b/app/src/main/java/org/oppia/android/app/application/dev/BUILD.bazel index 53841df1c37..7949a279c20 100644 --- a/app/src/main/java/org/oppia/android/app/application/dev/BUILD.bazel +++ b/app/src/main/java/org/oppia/android/app/application/dev/BUILD.bazel @@ -26,6 +26,7 @@ kt_android_library( "//app/src/main/java/org/oppia/android/app/application:abstract_application", "//app/src/main/java/org/oppia/android/app/application:application_component", "//app/src/main/java/org/oppia/android/app/application:common_application_modules", + "//domain/src/main/java/org/oppia/android/domain/auth:auth_module", "//utility/src/main/java/org/oppia/android/util/logging:standard_event_logging_configuration_module", "//utility/src/main/java/org/oppia/android/util/logging/firebase:debug_module", "//utility/src/main/java/org/oppia/android/util/networking:debug_module", diff --git a/app/src/main/java/org/oppia/android/app/application/dev/DeveloperApplicationComponent.kt b/app/src/main/java/org/oppia/android/app/application/dev/DeveloperApplicationComponent.kt index 1d718d5727e..522e68679f4 100644 --- a/app/src/main/java/org/oppia/android/app/application/dev/DeveloperApplicationComponent.kt +++ b/app/src/main/java/org/oppia/android/app/application/dev/DeveloperApplicationComponent.kt @@ -13,6 +13,7 @@ import org.oppia.android.app.shim.ViewBindingShimModule import org.oppia.android.app.translation.ActivityRecreatorProdModule import org.oppia.android.data.backends.gae.NetworkConfigProdModule import org.oppia.android.data.backends.gae.NetworkModule +import org.oppia.android.domain.auth.AuthenticationModule import org.oppia.android.domain.classify.InteractionsModule import org.oppia.android.domain.classify.rules.algebraicexpressioninput.AlgebraicExpressionInputModule import org.oppia.android.domain.classify.rules.continueinteraction.ContinueModule @@ -101,6 +102,7 @@ import javax.inject.Singleton PerformanceMetricsAssessorModule::class, PerformanceMetricsConfigurationsModule::class, DeveloperBuildFlavorModule::class, EventLoggingConfigurationModule::class, CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + AuthenticationModule::class, ] ) interface DeveloperApplicationComponent : ApplicationComponent { diff --git a/app/src/main/java/org/oppia/android/app/application/ga/BUILD.bazel b/app/src/main/java/org/oppia/android/app/application/ga/BUILD.bazel index 5421f374f20..baa4b12237b 100644 --- a/app/src/main/java/org/oppia/android/app/application/ga/BUILD.bazel +++ b/app/src/main/java/org/oppia/android/app/application/ga/BUILD.bazel @@ -22,6 +22,7 @@ kt_android_library( "//app/src/main/java/org/oppia/android/app/application:abstract_application", "//app/src/main/java/org/oppia/android/app/application:application_component", "//app/src/main/java/org/oppia/android/app/application:common_application_modules", + "//domain/src/main/java/org/oppia/android/domain/auth:auth_module", "//utility/src/main/java/org/oppia/android/util/logging:standard_event_logging_configuration_module", "//utility/src/main/java/org/oppia/android/util/logging/firebase:prod_module", "//utility/src/main/java/org/oppia/android/util/networking:prod_module", diff --git a/app/src/main/java/org/oppia/android/app/application/ga/GaApplicationComponent.kt b/app/src/main/java/org/oppia/android/app/application/ga/GaApplicationComponent.kt index 92cc87a5043..b4b476bc6d3 100644 --- a/app/src/main/java/org/oppia/android/app/application/ga/GaApplicationComponent.kt +++ b/app/src/main/java/org/oppia/android/app/application/ga/GaApplicationComponent.kt @@ -12,6 +12,7 @@ import org.oppia.android.app.shim.ViewBindingShimModule import org.oppia.android.app.translation.ActivityRecreatorProdModule import org.oppia.android.data.backends.gae.NetworkConfigProdModule import org.oppia.android.data.backends.gae.NetworkModule +import org.oppia.android.domain.auth.AuthenticationModule import org.oppia.android.domain.classify.InteractionsModule import org.oppia.android.domain.classify.rules.algebraicexpressioninput.AlgebraicExpressionInputModule import org.oppia.android.domain.classify.rules.continueinteraction.ContinueModule @@ -99,7 +100,7 @@ import javax.inject.Singleton PerformanceMetricsConfigurationsModule::class, GaBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, CpuPerformanceSnapshotterModule::class, PerformanceMetricsAssessorModule::class, - ExplorationProgressModule::class, + ExplorationProgressModule::class, AuthenticationModule::class, ] ) interface GaApplicationComponent : ApplicationComponent { diff --git a/app/src/main/java/org/oppia/android/app/customview/interaction/FractionInputInteractionView.kt b/app/src/main/java/org/oppia/android/app/customview/interaction/FractionInputInteractionView.kt index 1fb50be3f5b..eec5f745241 100644 --- a/app/src/main/java/org/oppia/android/app/customview/interaction/FractionInputInteractionView.kt +++ b/app/src/main/java/org/oppia/android/app/customview/interaction/FractionInputInteractionView.kt @@ -20,8 +20,6 @@ import org.oppia.android.app.utility.KeyboardHelper.Companion.showSoftKeyboard // background="@drawable/edit_text_background" // maxLength="200". -// TODO(#4135): Add a dedicated test suite for this class. - /** The custom EditText class for fraction input interaction view. */ class FractionInputInteractionView @JvmOverloads constructor( context: Context, diff --git a/app/src/main/java/org/oppia/android/app/devoptions/vieweventlogs/ViewEventLogsViewModel.kt b/app/src/main/java/org/oppia/android/app/devoptions/vieweventlogs/ViewEventLogsViewModel.kt index 09362e1d90e..274079e2ce8 100644 --- a/app/src/main/java/org/oppia/android/app/devoptions/vieweventlogs/ViewEventLogsViewModel.kt +++ b/app/src/main/java/org/oppia/android/app/devoptions/vieweventlogs/ViewEventLogsViewModel.kt @@ -5,6 +5,7 @@ import org.oppia.android.app.translation.AppLanguageResourceHandler import org.oppia.android.app.viewmodel.ObservableViewModel import org.oppia.android.util.locale.OppiaLocale import org.oppia.android.util.logging.firebase.DebugAnalyticsEventLogger +import org.oppia.android.util.logging.firebase.DebugFirestoreEventLoggerImpl import javax.inject.Inject /** @@ -14,11 +15,15 @@ import javax.inject.Inject @FragmentScope class ViewEventLogsViewModel @Inject constructor( debugAnalyticsEventLogger: DebugAnalyticsEventLogger, + debugFirestoreEventLogger: DebugFirestoreEventLoggerImpl, private val machineLocale: OppiaLocale.MachineLocale, private val resourceHandler: AppLanguageResourceHandler ) : ObservableViewModel() { + // Retrieves events from cache that are meant to be uploaded to Firebase Firestore. + private val firestoreEvents = debugFirestoreEventLogger.getEventList() - private val eventList = debugAnalyticsEventLogger.getEventList() + // Retrieves events from cache that are meant to be uploaded to Firebase Analytics. + private val analyticsEvents = debugAnalyticsEventLogger.getEventList() /** * List of [EventLogItemViewModel] used to populate recyclerview of [ViewEventLogsFragment] @@ -29,8 +34,10 @@ class ViewEventLogsViewModel @Inject constructor( } private fun processEventLogsList(): List { - return eventList.map { - EventLogItemViewModel(it, machineLocale, resourceHandler) - }.reversed() + return (analyticsEvents + firestoreEvents) + .map { + EventLogItemViewModel(it, machineLocale, resourceHandler) + } + .sortedByDescending { it.eventLog.timestamp } } } diff --git a/app/src/main/java/org/oppia/android/app/notice/DeprecationNoticeActionListener.kt b/app/src/main/java/org/oppia/android/app/notice/DeprecationNoticeActionListener.kt index b9edef60fcc..73900fb119b 100644 --- a/app/src/main/java/org/oppia/android/app/notice/DeprecationNoticeActionListener.kt +++ b/app/src/main/java/org/oppia/android/app/notice/DeprecationNoticeActionListener.kt @@ -1,9 +1,24 @@ package org.oppia.android.app.notice -import org.oppia.android.app.splash.DeprecationNoticeActionType +import org.oppia.android.app.model.DeprecationNoticeType /** Listener for when an option on any deprecation dialog is clicked. */ interface DeprecationNoticeActionListener { /** Called when a dialog button is clicked. */ - fun onActionButtonClicked(noticeType: DeprecationNoticeActionType) + fun onActionButtonClicked(noticeActionResponse: DeprecationNoticeActionResponse) +} + +/** Sealed data class for the response to a deprecation notice action. */ +sealed class DeprecationNoticeActionResponse { + /** Action for when the user presses the 'Close' button on a deprecation dialog. */ + object Close : DeprecationNoticeActionResponse() + + /** Action for when the user presses the 'Dismiss' button on a deprecation dialog. */ + data class Dismiss( + val deprecationNoticeType: DeprecationNoticeType, + val deprecatedVersion: Int, + ) : DeprecationNoticeActionResponse() + + /** Action for when the user presses the 'Update' button on a deprecation dialog. */ + object Update : DeprecationNoticeActionResponse() } diff --git a/app/src/main/java/org/oppia/android/app/notice/ForcedAppDeprecationNoticeDialogFragmentPresenter.kt b/app/src/main/java/org/oppia/android/app/notice/ForcedAppDeprecationNoticeDialogFragmentPresenter.kt index 265670fb3be..ca7bf0c46a7 100644 --- a/app/src/main/java/org/oppia/android/app/notice/ForcedAppDeprecationNoticeDialogFragmentPresenter.kt +++ b/app/src/main/java/org/oppia/android/app/notice/ForcedAppDeprecationNoticeDialogFragmentPresenter.kt @@ -4,14 +4,13 @@ import android.app.Dialog import androidx.appcompat.app.AlertDialog import androidx.appcompat.app.AppCompatActivity import org.oppia.android.R -import org.oppia.android.app.splash.DeprecationNoticeActionType import org.oppia.android.app.translation.AppLanguageResourceHandler import javax.inject.Inject /** Presenter class responsible for showing an app deprecation dialog to the user. */ class ForcedAppDeprecationNoticeDialogFragmentPresenter @Inject constructor( private val activity: AppCompatActivity, - private val resourceHandler: AppLanguageResourceHandler + private val resourceHandler: AppLanguageResourceHandler, ) { private val deprecationNoticeActionListener by lazy { activity as DeprecationNoticeActionListener @@ -31,12 +30,12 @@ class ForcedAppDeprecationNoticeDialogFragmentPresenter @Inject constructor( ) .setPositiveButton(R.string.forced_app_update_dialog_update_button_text) { _, _ -> deprecationNoticeActionListener.onActionButtonClicked( - DeprecationNoticeActionType.UPDATE + DeprecationNoticeActionResponse.Update ) } .setNegativeButton(R.string.forced_app_update_dialog_close_button_text) { _, _ -> deprecationNoticeActionListener.onActionButtonClicked( - DeprecationNoticeActionType.CLOSE + DeprecationNoticeActionResponse.Close ) } .setCancelable(false) diff --git a/app/src/main/java/org/oppia/android/app/notice/OptionalAppDeprecationNoticeDialogFragmentPresenter.kt b/app/src/main/java/org/oppia/android/app/notice/OptionalAppDeprecationNoticeDialogFragmentPresenter.kt index be4b938c522..47e5de99de3 100644 --- a/app/src/main/java/org/oppia/android/app/notice/OptionalAppDeprecationNoticeDialogFragmentPresenter.kt +++ b/app/src/main/java/org/oppia/android/app/notice/OptionalAppDeprecationNoticeDialogFragmentPresenter.kt @@ -4,14 +4,18 @@ import android.app.Dialog import androidx.appcompat.app.AlertDialog import androidx.appcompat.app.AppCompatActivity import org.oppia.android.R -import org.oppia.android.app.splash.DeprecationNoticeActionType +import org.oppia.android.app.model.DeprecationNoticeType import org.oppia.android.app.translation.AppLanguageResourceHandler +import org.oppia.android.util.platformparameter.OptionalAppUpdateVersionCode +import org.oppia.android.util.platformparameter.PlatformParameterValue import javax.inject.Inject /** Presenter class responsible for showing an optional update dialog to the user. */ class OptionalAppDeprecationNoticeDialogFragmentPresenter @Inject constructor( private val activity: AppCompatActivity, - private val resourceHandler: AppLanguageResourceHandler + private val resourceHandler: AppLanguageResourceHandler, + @OptionalAppUpdateVersionCode + private val optionalAppUpdateVersionCode: PlatformParameterValue, ) { private val deprecationNoticeActionListener by lazy { activity as DeprecationNoticeActionListener @@ -31,12 +35,15 @@ class OptionalAppDeprecationNoticeDialogFragmentPresenter @Inject constructor( ) .setPositiveButton(R.string.optional_app_update_dialog_update_button_text) { _, _ -> deprecationNoticeActionListener.onActionButtonClicked( - DeprecationNoticeActionType.UPDATE + DeprecationNoticeActionResponse.Update ) } .setNegativeButton(R.string.optional_app_update_dialog_dismiss_button_text) { _, _ -> deprecationNoticeActionListener.onActionButtonClicked( - DeprecationNoticeActionType.DISMISS + DeprecationNoticeActionResponse.Dismiss( + deprecationNoticeType = DeprecationNoticeType.APP_DEPRECATION, + deprecatedVersion = optionalAppUpdateVersionCode.value + ) ) } .setCancelable(false) diff --git a/app/src/main/java/org/oppia/android/app/notice/OsDeprecationNoticeDialogFragmentPresenter.kt b/app/src/main/java/org/oppia/android/app/notice/OsDeprecationNoticeDialogFragmentPresenter.kt index efcfc84ed20..d7f875c7400 100644 --- a/app/src/main/java/org/oppia/android/app/notice/OsDeprecationNoticeDialogFragmentPresenter.kt +++ b/app/src/main/java/org/oppia/android/app/notice/OsDeprecationNoticeDialogFragmentPresenter.kt @@ -4,14 +4,18 @@ import android.app.Dialog import androidx.appcompat.app.AlertDialog import androidx.appcompat.app.AppCompatActivity import org.oppia.android.R -import org.oppia.android.app.splash.DeprecationNoticeActionType +import org.oppia.android.app.model.DeprecationNoticeType import org.oppia.android.app.translation.AppLanguageResourceHandler +import org.oppia.android.util.platformparameter.LowestSupportedApiLevel +import org.oppia.android.util.platformparameter.PlatformParameterValue import javax.inject.Inject /** Presenter class responsible for showing an OS deprecation dialog to the user. */ class OsDeprecationNoticeDialogFragmentPresenter @Inject constructor( private val activity: AppCompatActivity, - private val resourceHandler: AppLanguageResourceHandler + private val resourceHandler: AppLanguageResourceHandler, + @LowestSupportedApiLevel + private val lowestSupportedApiLevel: PlatformParameterValue ) { private val deprecationNoticeActionListener by lazy { activity as DeprecationNoticeActionListener @@ -31,7 +35,10 @@ class OsDeprecationNoticeDialogFragmentPresenter @Inject constructor( ) .setNegativeButton(R.string.os_deprecation_dialog_dismiss_button_text) { _, _ -> deprecationNoticeActionListener.onActionButtonClicked( - DeprecationNoticeActionType.DISMISS + DeprecationNoticeActionResponse.Dismiss( + deprecationNoticeType = DeprecationNoticeType.OS_DEPRECATION, + deprecatedVersion = lowestSupportedApiLevel.value + ) ) } .setCancelable(false) diff --git a/app/src/main/java/org/oppia/android/app/notice/testing/ForcedAppDeprecationNoticeDialogFragmentTestActivity.kt b/app/src/main/java/org/oppia/android/app/notice/testing/ForcedAppDeprecationNoticeDialogFragmentTestActivity.kt index e6b223af14d..f147a68ea66 100644 --- a/app/src/main/java/org/oppia/android/app/notice/testing/ForcedAppDeprecationNoticeDialogFragmentTestActivity.kt +++ b/app/src/main/java/org/oppia/android/app/notice/testing/ForcedAppDeprecationNoticeDialogFragmentTestActivity.kt @@ -2,8 +2,8 @@ package org.oppia.android.app.notice.testing import android.os.Bundle import org.oppia.android.app.notice.DeprecationNoticeActionListener +import org.oppia.android.app.notice.DeprecationNoticeActionResponse import org.oppia.android.app.notice.ForcedAppDeprecationNoticeDialogFragment -import org.oppia.android.app.splash.DeprecationNoticeActionType import org.oppia.android.app.testing.activity.TestActivity /** [TestActivity] for setting up a test environment for testing the beta notice dialog. */ @@ -24,7 +24,7 @@ class ForcedAppDeprecationNoticeDialogFragmentTestActivity : .showNow(supportFragmentManager, "forced_app_deprecation_dialog") } - override fun onActionButtonClicked(noticeType: DeprecationNoticeActionType) { - mockCallbackListener.onActionButtonClicked(noticeType) + override fun onActionButtonClicked(noticeActionResponse: DeprecationNoticeActionResponse) { + mockCallbackListener.onActionButtonClicked(noticeActionResponse) } } diff --git a/app/src/main/java/org/oppia/android/app/notice/testing/OptionalAppDeprecationNoticeDialogFragmentTestActivity.kt b/app/src/main/java/org/oppia/android/app/notice/testing/OptionalAppDeprecationNoticeDialogFragmentTestActivity.kt index d3ffd8b519e..fec17b953ff 100644 --- a/app/src/main/java/org/oppia/android/app/notice/testing/OptionalAppDeprecationNoticeDialogFragmentTestActivity.kt +++ b/app/src/main/java/org/oppia/android/app/notice/testing/OptionalAppDeprecationNoticeDialogFragmentTestActivity.kt @@ -2,8 +2,8 @@ package org.oppia.android.app.notice.testing import android.os.Bundle import org.oppia.android.app.notice.DeprecationNoticeActionListener +import org.oppia.android.app.notice.DeprecationNoticeActionResponse import org.oppia.android.app.notice.OptionalAppDeprecationNoticeDialogFragment -import org.oppia.android.app.splash.DeprecationNoticeActionType import org.oppia.android.app.testing.activity.TestActivity /** [TestActivity] for setting up a test environment for testing the beta notice dialog. */ @@ -24,7 +24,7 @@ class OptionalAppDeprecationNoticeDialogFragmentTestActivity : .showNow(supportFragmentManager, "optional_app_deprecation_dialog") } - override fun onActionButtonClicked(noticeType: DeprecationNoticeActionType) { - mockCallbackListener.onActionButtonClicked(noticeType) + override fun onActionButtonClicked(noticeActionResponse: DeprecationNoticeActionResponse) { + mockCallbackListener.onActionButtonClicked(noticeActionResponse) } } diff --git a/app/src/main/java/org/oppia/android/app/notice/testing/OsDeprecationNoticeDialogFragmentTestActivity.kt b/app/src/main/java/org/oppia/android/app/notice/testing/OsDeprecationNoticeDialogFragmentTestActivity.kt index 13923f43fd8..53801dd3d4e 100644 --- a/app/src/main/java/org/oppia/android/app/notice/testing/OsDeprecationNoticeDialogFragmentTestActivity.kt +++ b/app/src/main/java/org/oppia/android/app/notice/testing/OsDeprecationNoticeDialogFragmentTestActivity.kt @@ -2,8 +2,8 @@ package org.oppia.android.app.notice.testing import android.os.Bundle import org.oppia.android.app.notice.DeprecationNoticeActionListener +import org.oppia.android.app.notice.DeprecationNoticeActionResponse import org.oppia.android.app.notice.OsDeprecationNoticeDialogFragment -import org.oppia.android.app.splash.DeprecationNoticeActionType import org.oppia.android.app.testing.activity.TestActivity /** [TestActivity] for setting up a test environment for testing the beta notice dialog. */ @@ -24,7 +24,7 @@ class OsDeprecationNoticeDialogFragmentTestActivity : .showNow(supportFragmentManager, "os_deprecation_dialog") } - override fun onActionButtonClicked(noticeType: DeprecationNoticeActionType) { - mockCallbackListener.onActionButtonClicked(noticeType) + override fun onActionButtonClicked(noticeActionResponse: DeprecationNoticeActionResponse) { + mockCallbackListener.onActionButtonClicked(noticeActionResponse) } } diff --git a/app/src/main/java/org/oppia/android/app/parser/StringToNumberParser.kt b/app/src/main/java/org/oppia/android/app/parser/StringToNumberParser.kt index 5b625623ad2..ae0c3771b46 100644 --- a/app/src/main/java/org/oppia/android/app/parser/StringToNumberParser.kt +++ b/app/src/main/java/org/oppia/android/app/parser/StringToNumberParser.kt @@ -41,6 +41,9 @@ class StringToNumberParser { * detection should be done using [getRealTimeAnswerError], instead. */ fun getSubmitTimeError(text: String): NumericInputParsingError { + if (text.isBlank()) { + return NumericInputParsingError.EMPTY_INPUT + } if (text.length > 15) { return NumericInputParsingError.NUMBER_TOO_LONG } @@ -57,7 +60,8 @@ class StringToNumberParser { VALID(error = null), INVALID_FORMAT(error = R.string.number_error_invalid_format), STARTING_WITH_FLOATING_POINT(error = R.string.number_error_starting_with_floating_point), - NUMBER_TOO_LONG(error = R.string.number_error_larger_than_fifteen_characters); + NUMBER_TOO_LONG(error = R.string.number_error_larger_than_fifteen_characters), + EMPTY_INPUT(error = R.string.number_error_empty_input); /** * Returns the string corresponding to this error's string resources, or null if there is none. diff --git a/app/src/main/java/org/oppia/android/app/player/state/itemviewmodel/NumericInputViewModel.kt b/app/src/main/java/org/oppia/android/app/player/state/itemviewmodel/NumericInputViewModel.kt index 93bdddde6f0..04174714b4f 100644 --- a/app/src/main/java/org/oppia/android/app/player/state/itemviewmodel/NumericInputViewModel.kt +++ b/app/src/main/java/org/oppia/android/app/player/state/itemviewmodel/NumericInputViewModel.kt @@ -36,25 +36,34 @@ class NumericInputViewModel private constructor( override fun onPropertyChanged(sender: Observable, propertyId: Int) { interactionAnswerErrorOrAvailabilityCheckReceiver.onPendingAnswerErrorOrAvailabilityCheck( pendingAnswerError, - answerText.isNotEmpty() + inputAnswerAvailable = true // Allow blank answer submission. ) } } errorMessage.addOnPropertyChangedCallback(callback) isAnswerAvailable.addOnPropertyChangedCallback(callback) + + // Initializing with default values so that submit button is enabled by default. + interactionAnswerErrorOrAvailabilityCheckReceiver.onPendingAnswerErrorOrAvailabilityCheck( + pendingAnswerError = null, + inputAnswerAvailable = true + ) } - /** It checks the pending error for the current numeric input, and correspondingly updates the error string based on the specified error category. */ + /** + * It checks the pending error for the current numeric input, and correspondingly updates the + * error string based on the specified error category. + */ override fun checkPendingAnswerError(category: AnswerErrorCategory): String? { - if (answerText.isNotEmpty()) { - pendingAnswerError = when (category) { - AnswerErrorCategory.REAL_TIME -> + pendingAnswerError = when (category) { + AnswerErrorCategory.REAL_TIME -> + if (answerText.isNotEmpty()) stringToNumberParser.getRealTimeAnswerError(answerText.toString()) .getErrorMessageFromStringRes(resourceHandler) - AnswerErrorCategory.SUBMIT_TIME -> - stringToNumberParser.getSubmitTimeError(answerText.toString()) - .getErrorMessageFromStringRes(resourceHandler) - } + else null + AnswerErrorCategory.SUBMIT_TIME -> + stringToNumberParser.getSubmitTimeError(answerText.toString()) + .getErrorMessageFromStringRes(resourceHandler) } errorMessage.set(pendingAnswerError) return pendingAnswerError diff --git a/app/src/main/java/org/oppia/android/app/splash/SplashActivity.kt b/app/src/main/java/org/oppia/android/app/splash/SplashActivity.kt index f9310821ddb..062139ce975 100644 --- a/app/src/main/java/org/oppia/android/app/splash/SplashActivity.kt +++ b/app/src/main/java/org/oppia/android/app/splash/SplashActivity.kt @@ -11,21 +11,13 @@ import org.oppia.android.app.fragment.FragmentComponentBuilderInjector import org.oppia.android.app.fragment.FragmentComponentFactory import org.oppia.android.app.model.ScreenName.SPLASH_ACTIVITY import org.oppia.android.app.notice.BetaNoticeClosedListener +import org.oppia.android.app.notice.DeprecationNoticeActionListener +import org.oppia.android.app.notice.DeprecationNoticeActionResponse import org.oppia.android.app.notice.DeprecationNoticeExitAppListener import org.oppia.android.app.notice.GeneralAvailabilityUpgradeNoticeClosedListener import org.oppia.android.util.logging.CurrentAppScreenNameIntentDecorator.decorateWithScreenName import javax.inject.Inject -/** Enum class for the various deprecation notice actions available to the user. */ -enum class DeprecationNoticeActionType { - /** Action for when the user presses the 'Close' option on a deprecation dialog. */ - CLOSE, - /** Action for when the user presses the 'Dismiss' option on a deprecation dialog. */ - DISMISS, - /** Action for when the user presses the 'Update' option on a deprecation dialog. */ - UPDATE -} - /** * An activity that shows a temporary loading page until the app is fully loaded then navigates to * the profile selection screen. @@ -38,6 +30,7 @@ class SplashActivity : AppCompatActivity(), FragmentComponentFactory, DeprecationNoticeExitAppListener, + DeprecationNoticeActionListener, BetaNoticeClosedListener, GeneralAvailabilityUpgradeNoticeClosedListener { @@ -69,4 +62,7 @@ class SplashActivity : override fun onGaUpgradeNoticeOkayButtonClicked(permanentlyDismiss: Boolean) = splashActivityPresenter.handleOnGaUpgradeNoticeOkayButtonClicked(permanentlyDismiss) + + override fun onActionButtonClicked(noticeActionResponse: DeprecationNoticeActionResponse) = + splashActivityPresenter.handleOnDeprecationNoticeActionClicked(noticeActionResponse) } diff --git a/app/src/main/java/org/oppia/android/app/splash/SplashActivityPresenter.kt b/app/src/main/java/org/oppia/android/app/splash/SplashActivityPresenter.kt index dd926f56612..805a1268c13 100644 --- a/app/src/main/java/org/oppia/android/app/splash/SplashActivityPresenter.kt +++ b/app/src/main/java/org/oppia/android/app/splash/SplashActivityPresenter.kt @@ -13,9 +13,15 @@ import org.oppia.android.app.model.AppStartupState import org.oppia.android.app.model.AppStartupState.BuildFlavorNoticeMode import org.oppia.android.app.model.AppStartupState.StartupMode import org.oppia.android.app.model.BuildFlavor +import org.oppia.android.app.model.DeprecationNoticeType +import org.oppia.android.app.model.DeprecationResponse import org.oppia.android.app.notice.AutomaticAppDeprecationNoticeDialogFragment import org.oppia.android.app.notice.BetaNoticeDialogFragment +import org.oppia.android.app.notice.DeprecationNoticeActionResponse +import org.oppia.android.app.notice.ForcedAppDeprecationNoticeDialogFragment import org.oppia.android.app.notice.GeneralAvailabilityUpgradeNoticeDialogFragment +import org.oppia.android.app.notice.OptionalAppDeprecationNoticeDialogFragment +import org.oppia.android.app.notice.OsDeprecationNoticeDialogFragment import org.oppia.android.app.onboarding.OnboardingActivity import org.oppia.android.app.profile.ProfileChooserActivity import org.oppia.android.app.translation.AppLanguageLocaleHandler @@ -23,6 +29,7 @@ import org.oppia.android.app.utility.lifecycle.LifecycleSafeTimerFactory import org.oppia.android.databinding.SplashActivityBinding import org.oppia.android.domain.locale.LocaleController import org.oppia.android.domain.onboarding.AppStartupStateController +import org.oppia.android.domain.onboarding.DeprecationController import org.oppia.android.domain.oppialogger.OppiaLogger import org.oppia.android.domain.topic.PrimeTopicAssetsController import org.oppia.android.domain.translation.TranslationController @@ -31,11 +38,16 @@ import org.oppia.android.util.data.DataProvider import org.oppia.android.util.data.DataProviders.Companion.combineWith import org.oppia.android.util.data.DataProviders.Companion.toLiveData import org.oppia.android.util.locale.OppiaLocale +import org.oppia.android.util.platformparameter.EnableAppAndOsDeprecation +import org.oppia.android.util.platformparameter.PlatformParameterValue import javax.inject.Inject private const val AUTO_DEPRECATION_NOTICE_DIALOG_FRAGMENT_TAG = "auto_deprecation_notice_dialog" +private const val FORCED_DEPRECATION_NOTICE_DIALOG_FRAGMENT_TAG = "forced_deprecation_notice_dialog" private const val BETA_NOTICE_DIALOG_FRAGMENT_TAG = "beta_notice_dialog" private const val GA_UPDATE_NOTICE_DIALOG_FRAGMENT_TAG = "general_availability_update_notice_dialog" +private const val OPTIONAL_UPDATE_NOTICE_DIALOG_FRAGMENT_TAG = "optional_update_notice_dialog" +private const val OS_UPDATE_NOTICE_DIALOG_FRAGMENT_TAG = "os_update_notice_dialog" private const val SPLASH_INIT_STATE_DATA_PROVIDER_ID = "splash_init_state_data_provider" /** The presenter for [SplashActivity]. */ @@ -47,9 +59,12 @@ class SplashActivityPresenter @Inject constructor( private val primeTopicAssetsController: PrimeTopicAssetsController, private val translationController: TranslationController, private val localeController: LocaleController, + private val deprecationController: DeprecationController, private val appLanguageLocaleHandler: AppLanguageLocaleHandler, private val lifecycleSafeTimerFactory: LifecycleSafeTimerFactory, - private val currentBuildFlavor: BuildFlavor + private val currentBuildFlavor: BuildFlavor, + @EnableAppAndOsDeprecation + private val enableAppAndOsDeprecation: PlatformParameterValue, ) { lateinit var startupMode: StartupMode @@ -67,6 +82,19 @@ class SplashActivityPresenter @Inject constructor( subscribeToOnboardingFlow() } + fun handleOnDeprecationNoticeActionClicked( + noticeActionResponse: DeprecationNoticeActionResponse + ) { + when (noticeActionResponse) { + is DeprecationNoticeActionResponse.Close -> handleOnDeprecationNoticeCloseAppButtonClicked() + is DeprecationNoticeActionResponse.Dismiss -> handleOnDeprecationNoticeDialogDismissed( + deprecationNoticeType = noticeActionResponse.deprecationNoticeType, + deprecatedVersion = noticeActionResponse.deprecatedVersion + ) + is DeprecationNoticeActionResponse.Update -> handleOnDeprecationNoticeUpdateButtonClicked() + } + } + /** Handles cases where the user clicks the close app option on a deprecation notice dialog. */ fun handleOnDeprecationNoticeCloseAppButtonClicked() { // If the app close button is clicked for the deprecation notice, finish the activity to close @@ -74,8 +102,8 @@ class SplashActivityPresenter @Inject constructor( activity.finish() } - /** Handles cases where the user clicks the update option on a deprecation notice dialog. */ - fun handleOnDeprecationNoticeUpdateButtonClicked() { + /** Handles cases where the user clicks the update button on a deprecation notice dialog. */ + private fun handleOnDeprecationNoticeUpdateButtonClicked() { // If the Update button is clicked for the deprecation notice, launch the Play Store and open // the Oppia app's page. val packageName = activity.packageName @@ -100,7 +128,17 @@ class SplashActivityPresenter @Inject constructor( } /** Handles cases where the user dismisses the deprecation notice dialog. */ - fun handleOnDeprecationNoticeDialogDismissed() { + private fun handleOnDeprecationNoticeDialogDismissed( + deprecationNoticeType: DeprecationNoticeType, + deprecatedVersion: Int + ) { + val deprecationResponse = DeprecationResponse.newBuilder() + .setDeprecationNoticeType(deprecationNoticeType) + .setDeprecatedVersion(deprecatedVersion) + .build() + + deprecationController.saveDeprecationResponse(deprecationResponse) + // If the Dismiss button is clicked for the deprecation notice, the dialog is automatically // dismissed. Navigate to profile chooser activity. activity.startActivity(ProfileChooserActivity.createProfileChooserActivity(activity)) @@ -200,6 +238,47 @@ class SplashActivityPresenter @Inject constructor( } private fun processStartupMode() { + if (enableAppAndOsDeprecation.value) { + processAppAndOsDeprecationEnabledStartUpMode() + } else { + processLegacyStartupMode() + } + } + + private fun processAppAndOsDeprecationEnabledStartUpMode() { + when (startupMode) { + StartupMode.USER_IS_ONBOARDED -> { + activity.startActivity(ProfileChooserActivity.createProfileChooserActivity(activity)) + activity.finish() + } + StartupMode.APP_IS_DEPRECATED -> { + showDialog( + FORCED_DEPRECATION_NOTICE_DIALOG_FRAGMENT_TAG, + ForcedAppDeprecationNoticeDialogFragment::newInstance + ) + } + StartupMode.OPTIONAL_UPDATE_AVAILABLE -> { + showDialog( + OPTIONAL_UPDATE_NOTICE_DIALOG_FRAGMENT_TAG, + OptionalAppDeprecationNoticeDialogFragment::newInstance + ) + } + StartupMode.OS_IS_DEPRECATED -> { + showDialog( + OS_UPDATE_NOTICE_DIALOG_FRAGMENT_TAG, + OsDeprecationNoticeDialogFragment::newInstance + ) + } + else -> { + // In all other cases (including errors when the startup state fails to load or is + // defaulted), assume the user needs to be onboarded. + activity.startActivity(OnboardingActivity.createOnboardingActivity(activity)) + activity.finish() + } + } + } + + private fun processLegacyStartupMode() { when (startupMode) { StartupMode.USER_IS_ONBOARDED -> { activity.startActivity(ProfileChooserActivity.createProfileChooserActivity(activity)) diff --git a/app/src/main/java/org/oppia/android/app/survey/SurveyOutroDialogFragmentPresenter.kt b/app/src/main/java/org/oppia/android/app/survey/SurveyOutroDialogFragmentPresenter.kt index 8399bb9a0e5..ba001da3705 100644 --- a/app/src/main/java/org/oppia/android/app/survey/SurveyOutroDialogFragmentPresenter.kt +++ b/app/src/main/java/org/oppia/android/app/survey/SurveyOutroDialogFragmentPresenter.kt @@ -56,11 +56,11 @@ class SurveyOutroDialogFragmentPresenter @Inject constructor( private fun endSurveyWithCallback(callback: () -> Unit) { surveyController.stopSurveySession(surveyCompleted = true).toLiveData().observe( activity, - { - when (it) { + { result -> + when (result) { is AsyncResult.Pending -> oppiaLogger.d("SurveyActivity", "Stopping survey session") is AsyncResult.Failure -> { - oppiaLogger.d("SurveyActivity", "Failed to stop the survey session") + oppiaLogger.d("SurveyActivity", "Failed to stop the survey session", result.error) activity.finish() // Can't recover from the session failing to stop. } is AsyncResult.Success -> { diff --git a/app/src/main/res/layout/view_event_logs_event_log_item_view.xml b/app/src/main/res/layout/view_event_logs_event_log_item_view.xml index 37a985146e1..b080bc27bc9 100644 --- a/app/src/main/res/layout/view_event_logs_event_log_item_view.xml +++ b/app/src/main/res/layout/view_event_logs_event_log_item_view.xml @@ -31,6 +31,7 @@ ما هي %s؟ من هو المشرف؟ كيف يمكنني إنشاء ملف تعريف(حساب) جديد؟ - ما هي %s؟ - من هو المشرف؟ - لماذا لا يتم تحميل مشغل الاستكشاف؟ - لماذا لا يتم تشغيل الصوت الخاص بي؟ + كيف يمكنني الحصول على التطبيق بلغتي؟ + وجدت خلل. كيف يمكنني الإبلاغ عنه؟ + لماذا هناك فقط دروس رياضيات؟ + هل ستقومون بإنشاء مزيد من الدروس؟ لماذا لا يتم تحميل مشغل الاستكشاف؟ لماذا لا يتم تشغيل الصوت الخاص بي؟ كيف يمكنني حذف ملف التعريف(حساب)؟ - كيف يمكنني تغيير بريدي الإلكتروني / رقم هاتفي؟ - لا أجد سؤالي هنا. ماذا الان؟ + كيف يمكنني تحديث التطبيق؟ + كيف يمكنني تحديث نظام التشغيل Android الخاص بي؟ + لا أجد سؤالي هنا. ماذا الان؟ <p>%1$s <i>\"أو-بي-يا\"</i>(فنلندية) - \"للتعلم\"</p><p><br></p><p>%1$sمهمتنا هي مساعدة أي شخص على تعلم أي شيء يريده بطريقة فعالة وممتعة.</p><p><br></p><p>من خلال إنشاء مجموعة من الدروس المجانية عالية الجودة والفعالة بشكل واضح بمساعدة معلمين من جميع أنحاء العالم ، تهدف %1$s إلى تزويد الطلاب بتعليم جيد - بغض النظر عن مكان وجودهم أو الموارد التقليدية التي يمكنهم الوصول إليها.</p><p><br></p><p>كطالب ، يمكنك أن تبدأ مغامرتك التعليمية من خلال تصفح الموضوعات المدرجة في الصفحة الرئيسية!</p> <p>المشرف هو المستخدم الرئيسي الذي يدير ملفات التعريف والإعدادات لكل ملف تعريف على حسابه. هم على الأرجح والدك أو معلمك أو وصي عليك الذي أنشأ هذا الملف الشخصي لك.</p><p><br></p><p>يمكن للمسؤولين إدارة الملفات الشخصية وتعيين أرقام التعريف الشخصية وتغيير الإعدادات الأخرى ضمن حساباتهم. بناءً على ملف التعريف الخاص بك ، قد تكون أذونات المسؤول مطلوبة لبعض الميزات مثل تنزيل الموضوعات وتغيير رقم التعريف الشخصي وغير ذلك.</p><p><br></p><p>لمعرفة من هو المسؤول لديك ، انتقل إلى منتقي الملف الشخصي. الملف الشخصي الأول المدرج ولديه \"المسؤول\" مكتوب باسمه هو المسؤول.</p> <p>إذا كانت هذه هي المرة الأولى التي تنشئ فيها ملفًا شخصيًا وليس لديك رقم تعريف شخصي: <ol><li> من منتقي الملف الشخصي ، اضغط على<strong> قم بإعداد ملفات تعريف متعددة</strong></li><li> قم بإنشاء رقم تعريف شخصي و<strong>احفظ</strong></li><li> املأ جميع البيانات للملف الشخصي.<ol><li>(اختياري) قم بتحميل صورة.</li> <li>إدخال اسم.</li> <li>(اختياري) قم بتعيين رقم تعريف شخصي مكون من 3 أرقام.</li></ol></li><li> اضغط<strong>إنشاء</strong> . تمت إضافة هذا الملف الشخصي إلى منتقي ملف التعريف الخاص بك!</li></ol></p><p> إذا قمت بإنشاء ملف تعريف من قبل ولديك رقم تعريف شخصي:<ol><li> من منتقي الملف الشخصي ، اضغط على<strong>إضافة الملف الشخصي</strong></li> <li> أدخل رقم التعريف الشخصي الخاص بك وانقر فوق<strong>إرسال</strong></li><li> املأ جميع الحقول للملف الشخصي. <ol> <li>(اختياري) قم بتحميل صورة.</li> <li>إدخال اسم.</li> <li>(اختياري) قم بتعيين رقم تعريف شخصي مكون من 3 أرقام. </li></ol></li><li> اضغط<strong>إنشاء</strong> . تمت إضافة هذا الملف الشخصي إلى منتقي ملف التعريف الخاص بك!</li></ol></p><br><p> ملاحظة: فقط ال<u>مدير</u> قادر على إدارة الملفات الشخصية.</p> - <p>%1$s <i>\"أو-بي-يا\"</i>(فنلندية) - \"للتعلم\"</p><p><br></p><p>%1$sمهمتنا هي مساعدة أي شخص على تعلم أي شيء يريده بطريقة فعالة وممتعة.</p><p><br></p><p>من خلال إنشاء مجموعة من الدروس المجانية عالية الجودة والفعالة بشكل واضح بمساعدة معلمين من جميع أنحاء العالم ، تهدف %1$s إلى تزويد الطلاب بتعليم جيد - بغض النظر عن مكان وجودهم أو الموارد التقليدية التي يمكنهم الوصول إليها.</p><p><br></p><p>كطالب ، يمكنك أن تبدأ مغامرتك التعليمية من خلال تصفح الموضوعات المدرجة في الصفحة الرئيسية!</p> - <p>المشرف هو المستخدم الرئيسي الذي يدير ملفات التعريف والإعدادات لكل ملف تعريف على حسابه. هم على الأرجح والدك أو معلمك أو وصي عليك الذي أنشأ هذا الملف الشخصي لك.</p><p><br></p><p>يمكن للمسؤولين إدارة الملفات الشخصية وتعيين أرقام التعريف الشخصية وتغيير الإعدادات الأخرى ضمن حساباتهم. بناءً على ملف التعريف الخاص بك ، قد تكون أذونات المسؤول مطلوبة لبعض الميزات مثل تنزيل الموضوعات وتغيير رقم التعريف الشخصي وغير ذلك.</p><p><br></p><p>لمعرفة من هو المسؤول لديك ، انتقل إلى منتقي الملف الشخصي. الملف الشخصي الأول المدرج ولديه \"المسؤول\" مكتوب باسمه هو المسؤول.</p> - <p>إذا لم يتم تحميل مشغل الاستكشاف</p><p><br></p><p>تحقق لمعرفة ما إذا كان التطبيق محدثًا أم لا:</p><p> <ul> <li> انتقل إلى متجر Play وتأكد من تحديث التطبيق إلى أحدث إصدار </li></ul><p><br></p><p>تحقق من اتصالك بالإنترنت:</p><ul><li> إذا كان اتصالك بالإنترنت بطيئًا ، فحاول إعادة الاتصال بشبكة Wi-Fi أو الاتصال بشبكة أخرى. </li></ul><p>اطلب من المشرف التحقق من أجهزتهم واتصال الإنترنت:</p><ul><li> اطلب من المشرف استكشاف الأخطاء وإصلاحها باستخدام الخطوات المذكورة أعلاه </li></ul><p>أخبرنا إذا كنت لا تزال تواجه مشكلات في التحميل:</p><ul><li> أبلغ عن مشكلة عن طريق الاتصال بنا على admin@oppia.org. </li></ul> - <p>إذا لم يتم تشغيل الصوت الخاص بك</p><p><br></p><p>تحقق لمعرفة ما إذا كان التطبيق محدثًا أم لا:</p><ul><li>انتقل إلى متجر Play وتأكد من تحديث التطبيق إلى أحدث إصدار</li></ul><p><br></p><p>تحقق من اتصالك بالإنترنت:</p><ul><li>إذا كان اتصالك بالإنترنت بطيئًا ، فحاول إعادة الاتصال بشبكة Wi-Fi أو الاتصال بشبكة أخرى. قد يتسبب الإنترنت البطيء في تحميل الصوت بشكل غير منتظم ، مما يجعل من الصعب تشغيله.</li></ul><p><br></p><p>اطلب من المسؤول التحقق من أجهزتهم واتصال الإنترنت:</p><ul><li>اطلب من المسؤول استكشاف الأخطاء وإصلاحها باستخدام الخطوات المذكورة أعلاه</li></ul><p><br></p><p>أخبرنا إذا كنت لا تزال تواجه مشكلات في التحميل:</p><ul><li>أبلغ عن مشكلة عن طريق الاتصال بنا على admin@oppia.org.</li></ul> +

تدعم حاليًا تطبيق %s اللغات التالية: الإنجليزية، البرتغالية البرازيلية، العربية، السواحيلية، والبيدجن النيجيري. اختر إحدى هذه اللغات من القائمة، تحت الخيارات. لطلب التطبيق بلغتك، يرجى الاتصال بنا على admin@oppia.org.

+

  1. من شاشة البداية لتطبيق %s الخاص بك، اضغط على القائمة في الزاوية اليسرى العليا.
  2. اضغط على مشاركة التعليقات.
  3. اتبع التعليمات للإبلاغ عن الخلل أو مشاركة التعليقات.

+

مهمة %1$s هي مساعدة المتعلمين في اكتساب المهارات الحياتية الضرورية. الرياضيات هي مهارة أساسية في الحياة اليومية. %1$s سيقدم دروسًا جديدة في العلوم ومواضيع أخرى قريبًا!

+

نعم، %s سيقدم دروس جديدة في العلوم ومواضيع أخرى قريبًا. يرجى التحقق مرة أخرى للحصول على التحديثات!

<p>إذا لم يتم تحميل مشغل الاستكشاف</p><p><br></p><p>تحقق لمعرفة ما إذا كان التطبيق محدثًا أم لا:</p><p> <ul> <li> انتقل إلى متجر Play وتأكد من تحديث التطبيق إلى أحدث إصدار </li></ul><p><br></p><p>تحقق من اتصالك بالإنترنت:</p><ul><li> إذا كان اتصالك بالإنترنت بطيئًا ، فحاول إعادة الاتصال بشبكة Wi-Fi أو الاتصال بشبكة أخرى. </li></ul><p>اطلب من المشرف التحقق من أجهزتهم واتصال الإنترنت:</p><ul><li> اطلب من المشرف استكشاف الأخطاء وإصلاحها باستخدام الخطوات المذكورة أعلاه </li></ul><p>أخبرنا إذا كنت لا تزال تواجه مشكلات في التحميل:</p><ul><li> أبلغ عن مشكلة عن طريق الاتصال بنا على admin@oppia.org. </li></ul> <p>إذا لم يتم تشغيل الصوت الخاص بك</p><p><br></p><p>تحقق لمعرفة ما إذا كان التطبيق محدثًا أم لا:</p><ul><li>انتقل إلى متجر Play وتأكد من تحديث التطبيق إلى أحدث إصدار</li></ul><p><br></p><p>تحقق من اتصالك بالإنترنت:</p><ul><li>إذا كان اتصالك بالإنترنت بطيئًا ، فحاول إعادة الاتصال بشبكة Wi-Fi أو الاتصال بشبكة أخرى. قد يتسبب الإنترنت البطيء في تحميل الصوت بشكل غير منتظم ، مما يجعل من الصعب تشغيله.</li></ul><p><br></p><p>اطلب من المسؤول التحقق من أجهزتهم واتصال الإنترنت:</p><ul><li>اطلب من المسؤول استكشاف الأخطاء وإصلاحها باستخدام الخطوات المذكورة أعلاه</li></ul><p><br></p><p>أخبرنا إذا كنت لا تزال تواجه مشكلات في التحميل:</p><ul><li>أبلغ عن مشكلة عن طريق الاتصال بنا على admin@oppia.org.</li></ul> <p>بمجرد حذف ملف التعريف:</p><ol><li>لا يمكن استعادة ملف التعريف.</li><li>سيتم حذف معلومات الملف الشخصي مثل الاسم والصور والتقدم بشكل دائم.</li></ol><p>لحذف ملف تعريف (باستثناء<u>المسؤول</u>):</p><ol><li> من الصفحة الرئيسية للمسؤول ، اضغط على زر القائمة أعلى اليسار.</li><li> اضغط على<strong>ضوابط المسؤول</strong>. </li><li> اضغط على<strong>تحرير ملفات التعريف</strong>.</li><li> اضغط على الملف الشخصي الذي ترغب في حذفه.</li><li> في الجزء السفلي من الشاشة ، انقر فوق<strong>حذف الملف الشخصي</strong>. </li><li> اضغط<strong>حذف</strong>لتأكيد الحذف. </li></ol><p><br></p><p> ملاحظة:<u>المسؤول</u>فقط هو القادر على إدارة الملفات الشخصية.</p> - <p>لتغيير بريدك الإلكتروني / رقم هاتفك:</p><ol><li> من الصفحة الرئيسية للمشرف ، اضغط على زر القائمة أعلى اليسار.</li><li> اضغط على <strong> عناصر تحكم المسؤول </strong>.</li><li> اضغط على <strong> تعديل الحساب </strong>.</li></ol><p><br></p> <p>إذا كنت تريد تغيير بريدك الإلكتروني:</p><ol><li>أدخل بريدك الإلكتروني الجديد وانقر على <strong> حفظ </strong>.</li><li> يتم إرسال رابط التأكيد لتأكيد بريدك الإلكتروني الجديد. ستنتهي صلاحية الرابط بعد 24 ساعة ويجب النقر عليه لربطه بحسابك.</li></ol><p><br></p> <p>في حالة تغيير رقم هاتفك: </p><ol><li> أدخل رقم هاتفك الجديد وانقر على <strong> تحقق </strong>.</li><li> يتم إرسال رمز لتأكيد رقمك الجديد. ستنتهي صلاحية الرمز بعد 5 دقائق ويجب إدخاله في الشاشة الجديدة لربطه بحسابك.</li></ol> - <p> إذا لم تتمكن من العثور على سؤالك أو كنت ترغب في الإبلاغ عن خطأ ، فاتصل بنا على admin@oppia.org. </p> +

  1. افتح تطبيق متجر Google Play.
  2. ابحث عن تطبيق %s.
  3. اضغط على تحديث.

+

  1. اضغط على تطبيق الإعدادات على هاتفك.
  2. اضغط على تحديث النظام.
  3. اضغط على تحديث النظام واتبع التعليمات لتحديث نظام التشغيل Android الخاص بك.

+ <p> إذا لم تتمكن من العثور على سؤالك أو كنت ترغب في الإبلاغ عن خطأ ، فاتصل بنا على admin@oppia.org. </p> نشاط اختبار جزء تحرير ملف التعريف يتحكم المسؤول في نشاط اختبار التجزئة أكمل دراستك diff --git a/app/src/main/res/values-pcm-rNG/strings.xml b/app/src/main/res/values-pcm-rNG/strings.xml index 9dcc4a8953c..6ff2280d115 100644 --- a/app/src/main/res/values-pcm-rNG/strings.xml +++ b/app/src/main/res/values-pcm-rNG/strings.xml @@ -510,27 +510,29 @@ Wetin be %s? Who be Administrator? How I go fit create a new profile? - Wetin be %s? - Who be Administrator? - Why di Exploration player no dey load? - Why my audio no dey play? - Why di Exploration player no dey load? + How I fit get the app for my language? + I see bug for di app. How I fit report am? + Why only math lessons dey available? + Una go dey create more lessons? + Why di Exploration player no dey load? Why my audio no dey play? How I go delete a profile? - How I go take change my email/phone nomba? - I no dey find my question here. What now? + How I fit update di app? + How I fit update my Android OS? + I no dey find my question here. What now? <p>%1$s <i>\"O-pee-yah\"</i> (Finnish) - \"to learn\"</p><p><br></p><p>%1$s\'s mission na to help anyone learn anything dey want in an effective and enjoyable way.</p><p><br></p><p>By creating a set of free, high-quality, demonstrably effective lessons with di help of educators from around di world, %1$s dey aim to provide students with quality education — regardless of where dem dey or di traditional resources wey dem get access to.</p><p><br></p><p>As a student, you fit start your learning adventure by browsing di topics listed on di Home Page!</p> <p>An Administrator na di main user wey dey manage profiles and settings for every profile on top their account. They fit be your parent, teacher, or guardian wey don create dis profile for you. </p><p><br></p><p>Administrators get di ability to manage profiles, assign PINs, and change other settings under their account. Depending on your profile, Administrator permissions fit dey required for some features such as changing your PIN, and more. </p><p><br></p><p>To see who your Administrator be, go di Profile Chooser. Di first profile fot di list and get \"Administrator\" written under their name na di Administrator. </p> <p>If na your first time creating a profile and not have a PIN:<ol><li>From di Profile Chooser, tap on <strong>Set up Multiple Profiles</strong>.</li><li>Create a PIN and <strong>Save</strong>.</li><li>Fill in all boxes for di profile.<ol><li>(Optional) Upload a photo.</li><li>Enter a name.</li><li>(Optional) Assign a 3-digit PIN.</li></ol></li><li>Tap <strong>Create</strong>. Dis profile go add to your Profile Chooser!</li></ol></p><p> If you don create a profile before and you get a PIN:<ol><li>From di Profile Chooser, tap on <strong>Add Profile</strong>. </li><li>Enter your PIN and tap <strong>Submit</strong>. </li><li>Fill in all boxes for di profile.<ol><li> (Optional) Upload a photo. </li><li> Enter a name. </li><li> (Optional) Assign a 3-digit PIN. </li></ol></li><li>Tap <strong>Create</strong>. Dis profile go add to your Profile Chooser!</li></ol></p><br><p>Note: Only di <u>Administrator</u> go dey able to manage profiles.</p> - <p>%1$s <i>\"O-pee-yah\"</i> (Finnish) - \"to learn\"</p><p><br></p><p>%1$s\'s mission na to help anyone learn anything dey want in an effective and enjoyable way.</p><p><br></p><p>By creating a set of free, high-quality, demonstrably effective lessons with di help of educators from around di world, %1$s dey aim to provide students with quality education — regardless of where dem dey or di traditional resources wey dem get access to.</p><p><br></p><p>As a student, you fit start your learning adventure by browsing di topics listed on di Home Page!</p> - <p>An Administrator na di main user wey dey manage profiles and settings for every profile on top their account. They fit be your parent, teacher, or guardian wey don create dis profile for you. </p><p><br></p><p>Administrators get di ability to manage profiles, assign PINs, and change other settings under their account. Depending on your profile, Administrator permissions fit dey required for some features such as changing your PIN, and more. </p><p><br></p><p>To see who your Administrator be, go di Profile Chooser. Di first profile fot di list and get \"Administrator\" written under their name na di Administrator. </p> - <p>If di Exploration Player no dey load</p><p><br></p><p>Check to see if di app dey up to date:</p><p><ul><li> Go to di Play Store and make sure sey di app dey updated to di latest version </li></ul><p><br></p><p>Check your internet connection:</p><ul><li> If your internet connection dey slow, try re-connecting to your Wi-Fi network or connecting to a different network. </li></ul><p>Ask di Administrator to check their device and internet connection:</p><ul><li> Get di Administrator to troubleshoot using di steps above </li></ul><p>Let us know if you still dey get issues with loading:</p><ul><li> Report a problem by contacting us at admin@oppia.org. </li></ul> - <p>If your audio no dey play</p><p><br></p><p>Check to see if di app dey up to date:</p><ul><li> Go to di Play Store and make sure sey di app dey updated to di latest version </li></ul><p><br></p><p>Check your internet connection:</p><ul><li> If your internet connection dey slow, try re-connecting to your Wi-Fi network or connecting to a different network. Slow internet fit cause di audio to load irregularly, and go make am difficult to play. </li></ul><p><br></p><p>Ask di Administrator to check their device and internet connection:</p><ul><li> Get di Administrator to troubleshoot using di steps for up</li></ul><p><br></p><p>Let us know if you still dey get issues with loading:</p><ul><li> Report a problem by contacting us at admin@oppia.org. </li></ul> + <p>The %s app dey support English, Brazilian Portuguese, Arabic, Swahili, and Nigerian Pidgin. Select one of these languages for di menu, under Options. To ask for the app for your language, abeg contact us for admin@oppia.org.</p> + <p>
  1. From your %s app home screen, tap the menu for di top left corner.
  2. Tap Share feedback.
  3. Follow di instructions to report di bug or share feedback.
</p>
+

%1$s mission na to help learners gain necessary life skills. Math na essential skill for everyday life. %1$s go dey offer new lessons on science and other subjects very soon!

+

Yes, %s go dey offer new lessons on science and other subjects very soon. Abeg check back for updates!

<p>If di Exploration Player no dey load</p><p><br></p><p>Check to see if di app dey up to date:</p><p><ul><li> Go to di Play Store and make sure sey di app dey updated to di latest version </li></ul><p><br></p><p>Check your internet connection:</p><ul><li> If your internet connection dey slow, try re-connecting to your Wi-Fi network or connecting to a different network. </li></ul><p>Ask di Administrator to check their device and internet connection:</p><ul><li> Get di Administrator to troubleshoot using di steps above </li></ul><p>Let us know if you still dey get issues with loading:</p><ul><li> Report a problem by contacting us at admin@oppia.org. </li></ul> <p>If your audio no dey play</p><p><br></p><p>Check to see if di app dey up to date:</p><ul><li> Go to di Play Store and make sure sey di app dey updated to di latest version </li></ul><p><br></p><p>Check your internet connection:</p><ul><li> If your internet connection dey slow, try re-connecting to your Wi-Fi network or connecting to a different network. Slow internet fit cause di audio to load irregularly, and go make am difficult to play. </li></ul><p><br></p><p>Ask di Administrator to check their device and internet connection:</p><ul><li> Get di Administrator to troubleshoot using di steps for up</li></ul><p><br></p><p>Let us know if you still dey get issues with loading:</p><ul><li> Report a problem by contacting us at admin@oppia.org. </li></ul> <p>Once profile don delete:</p><ol><li>Di profile no fit dey recovered. </li><li> Profile information such as name, photos, and progress go permanently delete. </li></ol><p>To delete a profile (excluding the <u>Administrator\'s</u>):</p><ol><li> From di Administrator\'s Home Page, tap on di menu button on di top left. </li><li>Tap on <strong>Administrator Controls</strong>. </li><li>Tap on <strong>Edit Profiles</strong>. </li><li>Tap on di Profile wey you wan delete. </li><li>For di bottom of di screen, tap <strong>Profile Deletion</strong>. </li><li>Tap <strong>Delete</strong> to confirm deletion. </li></ol><p><br></p><p>Note: Only di <u>Administrator</u> go dey able to manage profiles.</p> - <p>To change your email/phone nomba:</p><ol><li>From di Administrator\'s Home Page, tap on di menu button for di top left.</li><li>Tap on <strong>Administrator Controls</strong>.</li><li>Tap on <strong>Edit Account</strong>.</li></ol><p><br></p> <p>If you wan change your email:</p><ol><li>Enter your new email and tap <strong>Save</strong>.</li><li>A confirmation link go send to confirm your new email. Di link go expire after 24 hours and you must click on am to be associated with your account.</li></ol><p><br></p> <p>If you dey change your phone nomba:</p><ol><li> Enter your new phone nomba and tap <strong>Verify</strong>.</li><li> A code go send to confirm your new nomba. Di code go expire after 5 minutes and you must be enter am in for di new screen to be associated with your account.</li></ol> - <p>If you no fit find your question or you go like to report a bug, contact us for admin@oppia.org.</p> +

  1. Open di Google Play Store app.
  2. Search for di %s app.
  3. Tap Update.

+
  1. Tap your phone\'s Settings app.
  2. Tap System updates.
  3. Tap System updates and follow di instructions to update your Android operating system.
+ <p>If you no fit find your question or you go like to report a bug, contact us for admin@oppia.org.</p> Profile Edit Fragment Test Activity Administrator Controls Fragment Test Activity Continue Studying diff --git a/app/src/main/res/values-pt-rBR/strings.xml b/app/src/main/res/values-pt-rBR/strings.xml index d76077f8188..668870a2bcb 100644 --- a/app/src/main/res/values-pt-rBR/strings.xml +++ b/app/src/main/res/values-pt-rBR/strings.xml @@ -202,12 +202,10 @@ %s história concluída - %s Histórias concluídas %s Histórias concluídas %s Tópico em andamento - %s Tópicos em andamento %s Tópicos em andamento Página de seleção de perfil @@ -483,27 +481,29 @@ O que é %s? Quem é um administrador? Como posso criar um novo perfil? - O que é %s? - Quem é um administrador? - Por que a exploração não está carregando? - Por que meu áudio não está tocando? + Como posso obter o aplicativo no meu idioma? + Achei um bug. Como posso reportar? + Por que só existem aulas de matemática? + Vocês vão criar mais lições? Por que a exploração não está carregando? Por que meu áudio não está tocando? Como posso deletar um perfil? - Como posso alterar meu e-mail/número de telefone? - Não consigo encontrar minha pergunta aqui. E agora? + Como eu atualizo o aplicativo? + Como eu atualizo meu sistema operacional Android? + Não consigo encontrar minha pergunta aqui. E agora? <p>%1$s <i>\"O-pee-yah\"</i> (Finnish) - \"aprender\"</p><p><br></p><p>%1$s tem a missão de ajudar qualquer pessoa a aprender o que quiser de uma forma eficaz e agradável.</p><p><br></p><p>Ao criar um conjunto de aulas gratuitas, de alta qualidade e comprovadamente eficazes com a ajuda de educadores de todo o mundo, %1$s visa proporcionar aos alunos uma educação de qualidade - independentemente de onde estejam ou a quais recursos tradicionais tenham acesso.</p><p><br></p><p>Como estudante, você pode começar sua aventura de aprendizado navegando pelos tópicos listados na página inicial!</p> <p>Um administrador é o usuário principal que gerencia perfis e configurações para cada perfil em sua conta. Provavelmente, eles são seus pais, professores ou responsáveis ​​que criaram este perfil para você.</p><p><br></p><p>Os administradores podem gerenciar perfis, atribuir PINs e alterar outras configurações em suas contas. Dependendo do seu perfil, as permissões de administrador podem ser necessárias para determinados recursos, como download de tópicos, alteração do PIN e mais. </p><p><br></p><p>Para ver quem é o seu administrador, vá para o Seletor de perfil. O primeiro perfil listado e com \"Administrador\" escrito em seu nome é o Administrador. </p> <p>Se é a sua primeira vez criando um perfil e você não tem um PIN:<ol> <li> No Seletor de Perfil, toque em <strong>Configurar Múltiplos Perfis</strong>. </li> <li> Crie um PIN e <strong>Salvar</strong>. </li> <li> Preencha todos os campos do perfil. <ol> <li> (Opcional) Carregue uma foto. </li> <li> Insira um nome. </li> <li> (Opcional) Atribua um PIN de 3 dígitos. </li></ol></li><li> 4. Toque em <strong>Criar</strong>. Este perfil está adicionado ao seu Seletor de Perfil! </li></ol></p><p> Se você já criou um perfil antes e tem um PIN: <ol> <li>No Seletor de Perfil, toque em <strong>Adicionar Perfil</strong>. </li> <li> 2. Digite seu PIN e toque em <strong>Enviar</strong>. </li> <li> Preencha todos os campos do perfil. <ol> <li> (Opcional) Carregue uma foto. </li> <li> Insira um nome. </li> <li> (Opcional) Atribua um PIN de 3 dígitos. </li> </ol> </li> <li> 4. Toque em <strong>Criar</strong>. Este perfil está adicionado ao seu Seletor de Perfil! </li></ol></p><br><p> Nota: Apenas o <u>Administrador</u> pode gerenciar perfis.</p> - <p>%1$s <i>\"O-pee-yah\"</i> (Finnish) - \"aprender\"</p><p><br></p><p>%1$s tem a missão de ajudar qualquer pessoa a aprender o que quiser de uma forma eficaz e agradável.</p><p><br></p><p>Ao criar um conjunto de aulas gratuitas, de alta qualidade e comprovadamente eficazes com a ajuda de educadores de todo o mundo, %1$s visa proporcionar aos alunos uma educação de qualidade - independentemente de onde estejam ou a quais recursos tradicionais tenham acesso.</p><p><br></p><p>Como estudante, você pode começar sua aventura de aprendizado navegando pelos tópicos listados na página inicial!</p> - <p>Um administrador é o usuário principal que gerencia perfis e configurações para cada perfil em sua conta. Provavelmente, eles são seus pais, professores ou responsáveis ​​que criaram este perfil para você.</p><p><br></p><p>Os administradores podem gerenciar perfis, atribuir PINs e alterar outras configurações em suas contas. Dependendo do seu perfil, as permissões de administrador podem ser necessárias para determinados recursos, como download de tópicos, alteração do PIN e mais. </p><p><br></p><p>Para ver quem é o seu administrador, vá para o Seletor de perfil. O primeiro perfil listado e com \"Administrador\" escrito em seu nome é o Administrador. </p> - <p>Se a exploração não estiver carregando</p><p><br></p><p>Verifique se o aplicativo está atualizado:</p><p> <ul> <li> Acesse a Play Store e certifique-se de que o aplicativo esteja atualizado com a versão mais recente </li></ul><p><br></p><p>Verifique sua conexão com a internet:</p><ul><li> Se sua conexão com a Internet estiver lenta, tente se reconectar à rede Wi-Fi ou conectar-se a uma rede diferente. </li></ul><p>Peça ao administrador para verificar o dispositivo e a conexão com a Internet:</p><ul><li> Peça ao administrador para solucionar o problema usando as etapas acima </li></ul><p>Informe-nos se você ainda tiver problemas com o carregamento::</p><ul><li> Relate um problema entrando em contato conosco em admin@oppia.org. </li> </ul> - <p>Se o seu áudio não estiver tocando</p><p><br></p><p>Verifique se o aplicativo está atualizado:</p><ul><li> Acesse a Play Store e certifique-se de que o aplicativo esteja atualizado com a versão mais recente </li></ul><p><br></p><p>Verifique sua conexão com a internet:</p><ul><li> Se sua conexão com a Internet estiver lenta, tente se reconectar à rede Wi-Fi ou conectar-se a uma rede diferente. A Internet lenta pode fazer com que o áudio carregue irregularmente, dificultando a reprodução. </li></ul><p><br></p><p>Peça ao administrador para verificar o dispositivo e a conexão com a Internet:</p><ul><li> Peça ao administrador para solucionar o problema usando as etapas acima</li></ul><p><br></p><p>Informe-nos se você ainda tiver problemas com o carregamento:</p><ul><li> Relate um problema entrando em contato conosco em admin@oppia.org. </li></ul> +

O aplicativo %s atualmente suporta Inglês, Português Brasileiro, Árabe, Suaíli e Pidgin Nigeriano. Escolha uma dessas línguas no menu, em Opções. Para solicitar o aplicativo no seu idioma, entre em contato conosco em admin@oppia.org.

+

  1. Na tela inicial do seu aplicativo %s, toque no menu no canto superior esquerdo.
  2. Toque em Compartilhar feedback.
  3. Siga as instruções para reportar o bug ou compartilhar feedback.

+

A missão de %1$s é ajudar os aprendizes a adquirir habilidades necessárias para a vida. A matemática é uma habilidade essencial no dia a dia. %1$s estará oferecendo novas lições sobre ciência e outras disciplinas em breve!

+

Sim, %s estará oferecendo novas lições sobre ciência e outras disciplinas em breve. Por favor, volte para conferir as atualizações!

<p>Se a exploração não estiver carregando</p><p><br></p><p>Verifique se o aplicativo está atualizado:</p><p> <ul> <li> Acesse a Play Store e certifique-se de que o aplicativo esteja atualizado com a versão mais recente </li></ul><p><br></p><p>Verifique sua conexão com a internet:</p><ul><li> Se sua conexão com a Internet estiver lenta, tente se reconectar à rede Wi-Fi ou conectar-se a uma rede diferente. </li></ul><p>Peça ao administrador para verificar o dispositivo e a conexão com a Internet:</p><ul><li> Peça ao administrador para solucionar o problema usando as etapas acima </li></ul><p>Informe-nos se você ainda tiver problemas com o carregamento::</p><ul><li> Relate um problema entrando em contato conosco em admin@oppia.org. </li> </ul> <p>Se o seu áudio não estiver tocando</p><p><br></p><p>Verifique se o aplicativo está atualizado:</p><ul><li> Acesse a Play Store e certifique-se de que o aplicativo esteja atualizado com a versão mais recente </li></ul><p><br></p><p>Verifique sua conexão com a internet:</p><ul><li> Se sua conexão com a Internet estiver lenta, tente se reconectar à rede Wi-Fi ou conectar-se a uma rede diferente. A Internet lenta pode fazer com que o áudio carregue irregularmente, dificultando a reprodução. </li></ul><p><br></p><p>Peça ao administrador para verificar o dispositivo e a conexão com a Internet:</p><ul><li> Peça ao administrador para solucionar o problema usando as etapas acima</li></ul><p><br></p><p>Informe-nos se você ainda tiver problemas com o carregamento:</p><ul><li> Relate um problema entrando em contato conosco em admin@oppia.org. </li></ul> <p>Depois que um perfil é deletado:</p> <ol><li>O perfil não pode ser recuperado. </li> <li> As informações do perfil, como nome, fotos e progresso, serão excluídas permanentemente. </li></ol><p>Para deletar um perfil(excluindo o do <u>Administrador</u>):</p> <ol><li>Na página inicial do administrador, toque no botão de menu no canto superior esquerdo.</li> <li>Toque em <strong>Controles do Administrador</strong>.</li> <li>3. Toque em <strong>Editar Perfis</strong>.</li> <li>4. Toque no perfil que deseja excluir.</li> <li>5. Na parte inferior da tela, toque em <strong>Exclusão de Perfil</strong>.</li> <li>6. Toque em <strong>Deletar</strong> para confirmar a exclusão.</li></ol><p><br></p><p>Nota: Apenas o <u>Administrador</u> pode gerenciar perfis.</p> - <p>Para alterar seu e-mail/número de telefone:</p><ol><li>Na página inicial do administrador, toque no botão de menu no canto superior esquerdo.</li><li>Toque em <strong>Controles do Administrador</strong>.</li><li>Toque em <strong>Editar Conta</strong>.</li></ol><p><br></p> <p>Se você deseja alterar seu e-mail:</p><ol><li>Digite seu novo e-mail e toque em <strong>Salvar</strong>.</li><li>Um link de confirmação será enviado para confirmar seu novo e-mail. O link irá expirar após 24 horas e deve ser clicado para ser associado à sua conta. </li></ol><p><br></p> <p>Se mudar seu número de telefone:</p><ol><li>Digite seu novo número de telefone e toque em <strong>Verificar</strong>.</li><li>Um código será enviado para confirmar seu novo número. O código expira após 5 minutos e deve ser inserido na nova tela para ser associado à sua conta.</li></ol> - <p>Se você não consegue encontrar sua pergunta ou gostaria de relatar um problema, entre em contato conosco em admin@oppia.org.</p> +

  1. Abra o aplicativo Google Play Store.
  2. Procure pelo aplicativo %s.
  3. Toque em Atualizar.

+

  1. Toque no aplicativo Configurações do seu telefone.
  2. Toque em Atualizações do sistema.
  3. Toque em Atualizações do sistema e siga as instruções para atualizar o sistema operacional Android.

+ <p>Se você não consegue encontrar sua pergunta ou gostaria de relatar um problema, entre em contato conosco em admin@oppia.org.</p> Atividade de Teste de Fragmento de Edição de Perfil Controle Administrativo da Atividade de Teste de Fragmento Continuar estudando diff --git a/app/src/main/res/values-sw/strings.xml b/app/src/main/res/values-sw/strings.xml index 3a25ec5b46a..2c697434dc8 100644 --- a/app/src/main/res/values-sw/strings.xml +++ b/app/src/main/res/values-sw/strings.xml @@ -414,25 +414,27 @@ %s ni nini? Msimamizi ni nani? Ninawezaje kuunda wasifu mpya? - %s ni nini? - Msimamizi ni nani? - Kwa nini kicheza Uchunguzi hakipakii? - Kwa nini sauti yangu haichezwi? + Ninawezaje kupata programu kwa lugha yangu? + Nimegundua mdudu. Ninawezaje kuripoti? + Kwa nini kuna masomo ya hesabu tu? + Je, mtatengeneza masomo zaidi? Kwa nini kicheza Uchunguzi hakipakii? Kwa nini sauti yangu haichezwi? Ninawezaje kufuta wasifu? - Nitabadilisha aje barua pepe/nambari yangu ya simu? - Sijapata swali langu hapa. Nini sasa? + Ni jinsi gani naweza kusasisha programu? + Jinsi gani naweza kusasisha mfumo wangu wa Android? + Sijapata swali langu hapa. Nini sasa? <p>%1$s <i>\"O-pee-yah\"</i> (Kifini) - \"kujifunza\"</p><p><br></p><p>%1$s\'s dhamira ni kumsaidia mtu yeyote kujifunza chochote anachotaka kwa njia bora na ya kufurahisha.</p><p><br></p><p>Kwa kuunda seti ya masomo yasiyolipishwa, ya ubora wa juu, na yenye matokeo kwa usaidizi. ya waelimishaji kutoka duniani kote, %1$s inalenga kuwapa wanafunzi elimu bora — bila kujali walipo au ni nyenzo gani za jadi wanazoweza kufikia.</p><p><br></p><p> Kama mwanafunzi, unaweza kuanza safari yako ya kujifunza kwa kuvinjari mada zilizoorodheshwa kwenye Ukurasa wa Mwanzo!</p> <p>Msimamizi ndiye mtumiaji mkuu anayedhibiti wasifu na mipangilio ya kila wasifu kwenye akaunti yake.Uwezekano mkubwa ni mzazi, mwalimu au mlezi wako aliyekuundia wasifu huu. </p><p><br></p><p>Wasimamizi wana uwezo wa kudhibiti wasifu, kugawa Nambari ya Siri, na kubadilisha mipangilio mingine chini ya akaunti yao. Kulingana na wasifu wako, ruhusa za Msimamizi zinaweza kuhitajika kwa vipengele fulani kama vile kupakua Mada, kubadilisha Nambari yako ya Siri na zaidi. </p><p><br></p><p>Ili kujua Msimamizi wako ni nani, nenda kwa Kichagua Wasifu. Wasifu wa kwanza ulioorodheshwa na una \"Msimamizi\" iliyoandikwa chini ya jina lake ni Msimamizi. </p> <p>Ikiwa ni mara yako ya kwanza kuunda wasifu na huna Nambari ya Siri: <ol> <li> Kutoka kwa Kichagua Wasifu, gusa <strong>Weka Wasifu Nyingi</strong>. </li> <li> Unda Nambari ya Siri na <strong>Hifadhi</strong>. </li> <li> Jaza sehemu zote za wasifu. <ol><li> (Si lazima) Pakia picha. </li> <li> Weka jina. </li> <li> (Si lazima) Weka Nambari ya Siri yenye tarakimu 3.</li></ol></li><li>Gusa <strong>Unda</strong>. Wasifu huu umeongezwa kwa Kichagua Wasifu wako! </li></ol></p><p> Ikiwa umeunda wasifu hapo awali na una Nambari ya Siri: <ol><li> Kutoka kwa Kichagua Wasifu, gusa <strong>Ongeza Wasifu</strong>. </li><li>Weka Nambari yako ya Siri na uguse <strong>Wasilisha</strong>. </li><li> Jaza sehemu zote za wasifu. <ol><li> (Si lazima) Pakia picha. </li> <li> Weka jina. </li> <li> (Si lazima) Weka Nambari ya Siri yenye tarakimu 3. </li></ol></li><li> Gusa <strong>Unda</strong>. Wasifu huu umeongezwa kwa Kichagua Wasifu wako! </li></ol></p><br><p> Kumbuka: <u>Msimamizi pekee</u> ndiye anayeweza kudhibiti wasifu.</p> - <p>%1$s <i>\"O-pee-yah\"</i> (Kifini) - \"kujifunza\"</p><p><br></p><p>%1$s\'s dhamira ni kumsaidia mtu yeyote kujifunza chochote anachotaka kwa njia bora na ya kufurahisha.</p><p><br></p><p>Kwa kuunda seti ya masomo yasiyolipishwa, ya ubora wa juu, na yenye matokeo kwa usaidizi. ya waelimishaji kutoka duniani kote, %1$s inalenga kuwapa wanafunzi elimu bora — bila kujali walipo au ni nyenzo gani za jadi wanazoweza kufikia.</p><p><br></p><p> Kama mwanafunzi, unaweza kuanza safari yako ya kujifunza kwa kuvinjari mada zilizoorodheshwa kwenye Ukurasa wa Mwanzo!</p> - <p>Msimamizi ndiye mtumiaji mkuu anayedhibiti wasifu na mipangilio ya kila wasifu kwenye akaunti yake.Uwezekano mkubwa ni mzazi, mwalimu au mlezi wako aliyekuundia wasifu huu. </p><p><br></p><p>Wasimamizi wana uwezo wa kudhibiti wasifu, kugawa Nambari ya Siri, na kubadilisha mipangilio mingine chini ya akaunti yao. Kulingana na wasifu wako, ruhusa za Msimamizi zinaweza kuhitajika kwa vipengele fulani kama vile kupakua Mada, kubadilisha Nambari yako ya Siri na zaidi. </p><p><br></p><p>Ili kujua Msimamizi wako ni nani, nenda kwa Kichagua Wasifu. Wasifu wa kwanza ulioorodheshwa na una \"Msimamizi\" iliyoandikwa chini ya jina lake ni Msimamizi. </p> - <p>Ikiwa Kicheza Ugunduzi hakipakii</p><p><br></p><p>Angalia kama programu imesasishwa:</p><p> <ul> <li> Nenda kwenye Hifadhi ya Michezo na uhakikishe kuwa programu imesasishwa hadi toleo lake jipya zaidi </li> </ul> <p><br></p><p>Angalia muunganisho wako wa mtandao:</p><ul><li> Ikiwa muunganisho wako wa mtandao ni wa polepole, jaribu kuunganisha tena kwenye mtandao wako wa Wi-Fi au unganisha kwenye mtandao tofauti. </li></ul><p>Uliza Msimamizi aangalie kifaa chake na muunganisho wa mtandao:</p><ul><li> Pata Msimamizi kusuluhisha kwa kutumia hatua hapo juu </li></ul><p>Tujulishe ikiwa bado una matatizo ya upakiaji:</p><ul><li> Ripoti tatizo kwa kuwasiliana nasi kwa admin@oppia.org. </li></ul> - <p>Ikiwa sauti yako haichezi</p><p><br></p><p>Angalia ili kuona kama programu imesasishwa:</p><ul><li> Nenda kwenye Hifadhi ya Michezo na uhakikishe kuwa programu imesasishwa hadi toleo lake jipya zaidi </li></ul><p><br></p><p>Angalia muunganisho wako wa mtandao:</p><ul><li> Iwapo muunganisho wako wa mtandao ni wa polepole, jaribu kuunganisha tena kwenye mtandao wako wa Wi-Fi au unganisha kwenye mtandao tofauti. Mtandao wa polepole unaweza kusababisha sauti kupakia kwa njia isiyo ya kawaida, na kuifanya iwe vigumu kucheza. </li></ul><p><br></p><p>Uliza Msimamizi aangalie kifaa chake na muunganisho wa mtandao:</p><ul><li> Wasiliana na Msimamizi ili asuluhishe kwa kutumia hatua hapo juu</li></ul><p><br></p><p>Tujulishe ikiwa bado una matatizo ya upakiaji:</p><ul><li> Ripoti tatizo kwa kuwasiliana nasi kwa admin@oppia.org. </li></ul> +

Programu ya %s kwa sasa inasaidia Kiingereza, Kireno cha Brazil, Kiarabu, Kiswahili, na Kipidgin cha Nigeria. Chagua moja ya lugha hizi kwenye menyu, chini ya Chaguo. Ili kuomba programu kwa lugha yako, tafadhali wasiliana nasi kwa admin@oppia.org.

+

  1. Kutoka kwenye skrini kuu ya programu yako ya %s, bonyeza menyu kwenye kona ya juu kushoto.
  2. Bonyeza Shiriki Maoni.
  3. Fuata maagizo ya kuripoti mdudu au kushiriki maoni.

+

Malengo ya %1$s ni kusaidia wanafunzi kupata stadi muhimu za maisha. Hisabati ni stadi muhimu katika maisha ya kila siku. %1$s itatoa masomo mapya kuhusu sayansi na masomo mengine hivi karibuni!

+

Ndiyo, %s itatoa masomo mapya kuhusu sayansi na masomo mengine hivi karibuni. Tafadhali rudia kwa ajili ya habari mpya!

<p>Ikiwa Kicheza Ugunduzi hakipakii</p><p><br></p><p>Angalia kama programu imesasishwa:</p><p> <ul> <li> Nenda kwenye Hifadhi ya Michezo na uhakikishe kuwa programu imesasishwa hadi toleo lake jipya zaidi </li> </ul> <p><br></p><p>Angalia muunganisho wako wa mtandao:</p><ul><li> Ikiwa muunganisho wako wa mtandao ni wa polepole, jaribu kuunganisha tena kwenye mtandao wako wa Wi-Fi au unganisha kwenye mtandao tofauti. </li></ul><p>Uliza Msimamizi aangalie kifaa chake na muunganisho wa mtandao:</p><ul><li> Pata Msimamizi kusuluhisha kwa kutumia hatua hapo juu </li></ul><p>Tujulishe ikiwa bado una matatizo ya upakiaji:</p><ul><li> Ripoti tatizo kwa kuwasiliana nasi kwa admin@oppia.org. </li></ul> <p>Ikiwa sauti yako haichezi</p><p><br></p><p>Angalia ili kuona kama programu imesasishwa:</p><ul><li> Nenda kwenye Hifadhi ya Michezo na uhakikishe kuwa programu imesasishwa hadi toleo lake jipya zaidi </li></ul><p><br></p><p>Angalia muunganisho wako wa mtandao:</p><ul><li> Iwapo muunganisho wako wa mtandao ni wa polepole, jaribu kuunganisha tena kwenye mtandao wako wa Wi-Fi au unganisha kwenye mtandao tofauti. Mtandao wa polepole unaweza kusababisha sauti kupakia kwa njia isiyo ya kawaida, na kuifanya iwe vigumu kucheza. </li></ul><p><br></p><p>Uliza Msimamizi aangalie kifaa chake na muunganisho wa mtandao:</p><ul><li> Wasiliana na Msimamizi ili asuluhishe kwa kutumia hatua hapo juu</li></ul><p><br></p><p>Tujulishe ikiwa bado una matatizo ya upakiaji:</p><ul><li> Ripoti tatizo kwa kuwasiliana nasi kwa admin@oppia.org. </li></ul> <p>Wasifu unapofutwa:</p><ol><li> Wasifu hauwezi kurejeshwa. </li><li> Taarifa ya wasifu kama vile jina, picha na maendeleo yatafutwa kabisa. </li></ol><p>Ili kufuta wasifu (bila kujumuisha <u>Msimamizi</u>):</p> <ol><li> Kutoka kwa Ukurasa wa Mwanzo wa Msimamizi, gusa kitufe cha menyu kilicho upande wa juu kushoto. </li><li> Gusa <strong>Vidhibiti vya Msimamizi</strong>. </li><li> Gusa <strong>Hariri Wasifu</strong>. </li><li> Gonga Wasifu ambao ungependa kufuta. </li><li> Katika sehemu ya chini ya skrini, gusa <strong>Ufutaji wa Wasifu</strong>. </li><li> Gusa <strong>Futa</strong> ili kuthibitisha kufuta.</li></ol><p><br></p><p>Kumbuka: <u>Msimamizi</u> pekee ndiye anayeweza kudhibiti wasifu.</p> - <p>Ili kubadilisha barua pepe/nambari yako ya simu:</p> <ol><li>Kutoka kwa Ukurasa wa Mwanzo wa Msimamizi, gusa kitufe cha menyu kilicho upande wa juu kushoto.</li> <li>Gusa <strong>Vidhibiti vya Msimamizi</strong>.</li><li> Gusa <strong>Hariri Akaunti</strong>.</li></ol><p><br></p> <p>Ikiwa ungependa kubadilisha barua pepe yako:</p><ol><li> Weka barua pepe yako mpya na uguse <strong>Hifadhi</strong>.</li><li> Kiungo cha uthibitishaji kinatumwa ili kuthibitisha barua pepe yako mpya. Muda wa kiungo utaisha baada ya saa 24 na lazima ubofye ili kuhusishwa na akaunti yako. </li></ol><p><br></p> <p>Ikiwa unabadilisha nambari yako ya simu:</p><ol><li> Weka nambari yako mpya ya simu na uguse <strong>Thibitisha</strong>.</li><li> Nambari ya kuthibitisha inatumwa ili kuthibitisha nambari yako mpya. Nambari ya kuthibitisha itaisha baada ya dakika 5 na lazima iwekwe kwenye skrini mpya ili kuhusishwa na akaunti yako.</li></ol> - <p>Ikiwa huwezi kupata swali lako au ungependa kuripoti hitilafu, wasiliana nasi kwa admin@oppia.org.</p> +

  1. Fungua programu ya Duka la Google Play.
  2. Tafuta programu ya %s.
  3. Bonyeza Sasisha.

+

  1. Bonyeza programu ya Mipangilio kwenye simu yako.
  2. Bonyeza Sasisho la mfumo.
  3. Bonyeza Sasisho la mfumo na fuata maagizo ya kusasisha mfumo wako wa uendeshaji wa Android.

+ <p>Ikiwa huwezi kupata swali lako au ungependa kuripoti hitilafu, wasiliana nasi kwa admin@oppia.org.</p> diff --git a/app/src/main/res/values-sw600dp-land/dimens.xml b/app/src/main/res/values-sw600dp-land/dimens.xml index 3f60f076e3b..d24a8c3c4e8 100644 --- a/app/src/main/res/values-sw600dp-land/dimens.xml +++ b/app/src/main/res/values-sw600dp-land/dimens.xml @@ -1,11 +1,11 @@ 64dp - 96dp - 96dp - 96dp + 72dp + 72dp + 72dp 8dp - 64dp + 48dp 96dp 64dp 32dp @@ -276,7 +276,7 @@ 176dp - 96dp + 72dp 68dp 76dp 24dp @@ -444,8 +444,8 @@ 112dp - 96dp - 96dp + 72dp + 72dp 132dp diff --git a/app/src/main/res/values-sw600dp-port/dimens.xml b/app/src/main/res/values-sw600dp-port/dimens.xml index 681f7e8b90e..325532ede04 100644 --- a/app/src/main/res/values-sw600dp-port/dimens.xml +++ b/app/src/main/res/values-sw600dp-port/dimens.xml @@ -1,11 +1,11 @@ 96dp - 120dp - 120dp - 120dp + 56dp + 64dp + 60dp 8dp - 60dp + 32dp 120dp 60dp 32dp @@ -281,10 +281,10 @@ 128dp - 120dp - 68dp + 60dp + 52dp 76dp - 24dp + 16dp 120dp @@ -441,8 +441,8 @@ 112dp - 120dp - 120dp + 60dp + 60dp 132dp diff --git a/app/src/main/res/values/faqs.xml b/app/src/main/res/values/faqs.xml index e58bc3eef82..1c8e0af249c 100644 --- a/app/src/main/res/values/faqs.xml +++ b/app/src/main/res/values/faqs.xml @@ -13,7 +13,6 @@ @string/faq_question_11 @string/faq_question_12 @string/faq_question_13 - @string/faq_question_14 @@ -29,6 +28,5 @@ @string/faq_answer_11 @string/faq_answer_12 @string/faq_answer_13 - @string/faq_answer_14 diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index cc2b39169e5..d8f15a46ec2 100755 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -170,6 +170,7 @@ Please begin your answer with a number (e.g.,”0” in 0.5). Please enter a valid number. The answer can contain at most 15 digits (0–9) or symbols (. or -). + Enter a number to continue. Please write a ratio that consists of digits separated by colons (e.g. 1:2 or 1:2:3). Please enter a valid ratio (e.g. 1:2 or 1:2:3). Your answer has two colons (:) next to each other. @@ -555,25 +556,23 @@ Why is the Exploration player not loading? Why is my audio not playing? How can I delete a profile? - How can I change my email/phone number? - How do I update the app? - How do I update my Android OS? - I can\'t find my question here. What now? + How do I update the app? + How do I update my Android OS? + I can\'t find my question here. What now? %1$s "O-pee-yah" (Finnish) - "to learn"


%1$s\'s mission is to help anyone learn anything they want in an effective and enjoyable way.


By creating a set of free, high-quality, demonstrably effective lessons with the help of educators from around the world, %1$s aims to provide students with quality education — regardless of where they are or what traditional resources they have access to.


As a student, you can begin your learning adventure by browsing the topics listed on the Home Page!

]]>
An Administrator is the main user that manages profiles and settings for every profile on their account. They are most likely your parent, teacher, or guardian that created this profile for you.


Administrators have the ability to manage profiles, assign PINs, and change other settings under their account. Depending on your profile, Administrator permissions may be required for certain features such as changing your PIN, and more.


To see who your Administrator is, go to the Profile Chooser. The first profile listed and has "Administrator" written under their name is the Administrator.

]]>
If it is your first time creating a profile and you do not have a PIN:
  1. From the Profile Chooser, tap on Set up Multiple Profiles.
  2. Create a PIN and Save.
  3. Fill in all fields for the profile.
    1. (Optional) Upload a photo.
    2. Enter a name.
    3. (Optional) Assign a 3-digit PIN.
  4. Tap Create. This profile is added to your Profile Chooser!

If you have created a profile before and have a PIN:

  1. From the Profile Chooser, tap on Add Profile.
  2. Enter your PIN and tap Submit.
  3. Fill in all fields for the profile.
    1. (Optional) Upload a photo.
    2. Enter a name.
    3. (Optional) Assign a 3-digit PIN.
  4. Tap Create. This profile is added to your Profile Chooser!


Note: Only the Administrator is able to manage profiles.

]]>
- The %s app currently supports English, Brazilian Portuguese, Arabic, and Nigerian Pidgin. Choose one of these languages in the menu, under Options. To request the app in your language, please contact us at email address.

]]>
-
  1. From your %s app home screen, tap the menu in the top left corner.
  2. Tap Share feedback.
  3. Follow the instructions to report the bug or share feedback.

    ]]> + The %s app currently supports English, Brazilian Portuguese, Arabic, Swahili and Nigerian Pidgin. Choose one of these languages in the menu, under Options. To request the app in your language, please contact us at admin@oppia.org.

    ]]>
    +
    1. From your %s app home screen, tap the menu in the top left corner.
    2. Tap Share feedback.
    3. Follow the instructions to report the bug or share feedback.
    4. ]]> %1$s’s mission is to help learners gain necessary life skills. Math is an essential skill in everyday life. %1$s will be offering new lessons on science and other subjects soon!

      ]]>
      Yes, %s will be offering new lessons on science and other subjects soon. Please check back for updates!

      ]]>
      If the Exploration Player is not loading


      Check to see if the app is up to date:

      • Go to the Play Store and make sure the app is updated to its latest version


      Check your internet connection:

      • If your internet connection is slow, try re-connecting to your Wi-Fi network or connecting to a different network.

      Ask the Administrator to check their device and internet connection:

      • Get the Administrator to troubleshoot using the steps above

      Let us know if you still have issues with loading:

      • Report a problem by contacting us at admin@oppia.org.
      ]]>
      If your audio is not playing


      Check to see if the app is up to date:

      • Go to the Play Store and make sure the app is updated to its latest version


      Check your internet connection:

      • If your internet connection is slow, try re-connecting to your Wi-Fi network or connecting to a different network. Slow internet may cause the audio to load irregularly, making it difficult to play.


      Ask the Administrator to check their device and internet connection:

      • Get the Administrator to troubleshoot using the steps above


      Let us know if you still have issues with loading:

      • Report a problem by contacting us at admin@oppia.org.
      ]]>
      Once a profile is deleted:

      1. The profile cannot be recovered.
      2. Profile information such as name, photos, and progress will be permanently deleted.

      To delete a profile (excluding the Administrator\'s):

      1. From the Administrator\'s Home Page, tap on the menu button on the top left.
      2. Tap on Administrator Controls.
      3. Tap on Edit Profiles.
      4. Tap on the Profile you would like to delete.
      5. At the bottom of the screen, tap Profile Deletion.
      6. Tap Delete to confirm deletion.


      Note: Only the Administrator is able to manage profiles.

      ]]>
      - To change your email/phone number:

      1. From the Administrator\'s Home Page, tap on the menu button on the top left.
      2. Tap on Administrator Controls.
      3. Tap on Edit Account.


      If you want to change your email:

      1. Enter your new email and tap Save.
      2. A confirmation link is sent to confirm your new email. The link will expire after 24 hours and must be clicked on to be associated with your account.


      If changing your phone number:

      1. Enter your new phone number and tap Verify.
      2. A code is sent to confirm your new number. The code will expire after 5 minutes and must be entered in the new screen to be associated with your account.
      ]]>
      -
      1. Open the Google Play Store app.
      2. Search for the %s app.
      3. Tap Update.

        ]]> -
        1. Tap your phone\'s Settings app.
        2. Tap System updates.
        3. Tap System updates and follow the instructions to update your Android operating system.

          ]]> - If you cannot find your question or would like to report a bug, contact us at admin@oppia.org.

          ]]>
          +
          1. Open the Google Play Store app.
          2. Search for the %s app.
          3. Tap Update.

            ]]> +
            1. Tap your phone\'s Settings app.
            2. Tap System updates.
            3. Tap System updates and follow the instructions to update your Android operating system.

              ]]> + If you cannot find your question or would like to report a bug, contact us at admin@oppia.org.

              ]]>
              Profile Edit Fragment Test Activity Administrator Controls Fragment Test Activity diff --git a/app/src/sharedTest/java/org/oppia/android/app/administratorcontrols/AdministratorControlsActivityTest.kt b/app/src/sharedTest/java/org/oppia/android/app/administratorcontrols/AdministratorControlsActivityTest.kt index 7eed7b8f290..4a340d416ca 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/administratorcontrols/AdministratorControlsActivityTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/administratorcontrols/AdministratorControlsActivityTest.kt @@ -104,6 +104,7 @@ import org.oppia.android.domain.topic.PrimeTopicAssetsControllerModule import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.OppiaTestRule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.platformparameter.TestPlatformParameterModule import org.oppia.android.testing.profile.ProfileTestHelper @@ -971,7 +972,8 @@ class AdministratorControlsActivityTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/administratorcontrols/AdministratorControlsFragmentTest.kt b/app/src/sharedTest/java/org/oppia/android/app/administratorcontrols/AdministratorControlsFragmentTest.kt index 14feb91afcc..b50d9c099f2 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/administratorcontrols/AdministratorControlsFragmentTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/administratorcontrols/AdministratorControlsFragmentTest.kt @@ -92,6 +92,7 @@ import org.oppia.android.domain.topic.PrimeTopicAssetsControllerModule import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.OppiaTestRule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.platformparameter.TestPlatformParameterModule import org.oppia.android.testing.profile.ProfileTestHelper @@ -655,7 +656,8 @@ class AdministratorControlsFragmentTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/administratorcontrols/AppVersionActivityTest.kt b/app/src/sharedTest/java/org/oppia/android/app/administratorcontrols/AppVersionActivityTest.kt index d6b1beaee52..1ceb6cd85ee 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/administratorcontrols/AppVersionActivityTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/administratorcontrols/AppVersionActivityTest.kt @@ -46,8 +46,6 @@ import org.oppia.android.app.player.state.itemviewmodel.SplitScreenInteractionMo import org.oppia.android.app.shim.ViewBindingShimModule import org.oppia.android.app.translation.testing.ActivityRecreatorTestModule import org.oppia.android.app.utility.OrientationChangeAction.Companion.orientationLandscape -import org.oppia.android.app.utility.getLastUpdateTime -import org.oppia.android.app.utility.getVersionName import org.oppia.android.data.backends.gae.NetworkConfigProdModule import org.oppia.android.data.backends.gae.NetworkModule import org.oppia.android.domain.classify.InteractionsModule @@ -82,6 +80,7 @@ import org.oppia.android.domain.topic.PrimeTopicAssetsControllerModule import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.OppiaTestRule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestCoroutineDispatchers @@ -90,6 +89,8 @@ import org.oppia.android.testing.time.FakeOppiaClockModule import org.oppia.android.util.accessibility.AccessibilityTestModule import org.oppia.android.util.caching.AssetModule import org.oppia.android.util.caching.testing.CachingTestModule +import org.oppia.android.util.extensions.getLastUpdateTime +import org.oppia.android.util.extensions.getVersionName import org.oppia.android.util.gcsresource.GcsResourceModule import org.oppia.android.util.locale.LocaleProdModule import org.oppia.android.util.logging.CurrentAppScreenNameIntentDecorator.extractCurrentAppScreenName @@ -306,7 +307,8 @@ class AppVersionActivityTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/administratorcontrols/learneranalytics/BUILD.bazel b/app/src/sharedTest/java/org/oppia/android/app/administratorcontrols/learneranalytics/BUILD.bazel index f98a384b911..da61bfc0e69 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/administratorcontrols/learneranalytics/BUILD.bazel +++ b/app/src/sharedTest/java/org/oppia/android/app/administratorcontrols/learneranalytics/BUILD.bazel @@ -51,6 +51,7 @@ app_test( "//app/src/main/java/org/oppia/android/app/translation/testing:test_module", "//testing", "//testing/src/main/java/org/oppia/android/testing/junit:initialize_default_locale_rule", + "//testing/src/main/java/org/oppia/android/testing/logging:event_log_subject", "//testing/src/main/java/org/oppia/android/testing/logging:sync_status_test_module", "//testing/src/main/java/org/oppia/android/testing/platformparameter:test_module", "//testing/src/main/java/org/oppia/android/testing/robolectric:test_module", diff --git a/app/src/sharedTest/java/org/oppia/android/app/administratorcontrols/learneranalytics/ProfileAndDeviceIdActivityTest.kt b/app/src/sharedTest/java/org/oppia/android/app/administratorcontrols/learneranalytics/ProfileAndDeviceIdActivityTest.kt index 901453c91dd..4a76dfd4479 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/administratorcontrols/learneranalytics/ProfileAndDeviceIdActivityTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/administratorcontrols/learneranalytics/ProfileAndDeviceIdActivityTest.kt @@ -73,6 +73,7 @@ import org.oppia.android.domain.topic.PrimeTopicAssetsControllerModule import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.OppiaTestRule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.profile.ProfileTestHelper import org.oppia.android.testing.robolectric.RobolectricModule @@ -229,7 +230,8 @@ class ProfileAndDeviceIdActivityTest { MathEquationInputModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, CpuPerformanceSnapshotterModule::class, - ApplicationLifecycleModule::class, ExplorationProgressModule::class + ApplicationLifecycleModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/administratorcontrols/learneranalytics/ProfileAndDeviceIdFragmentTest.kt b/app/src/sharedTest/java/org/oppia/android/app/administratorcontrols/learneranalytics/ProfileAndDeviceIdFragmentTest.kt index 632098510b5..5e41e379417 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/administratorcontrols/learneranalytics/ProfileAndDeviceIdFragmentTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/administratorcontrols/learneranalytics/ProfileAndDeviceIdFragmentTest.kt @@ -9,6 +9,7 @@ import android.view.View import androidx.annotation.IdRes import androidx.appcompat.app.AppCompatActivity import androidx.recyclerview.widget.RecyclerView +import androidx.test.core.app.ActivityScenario import androidx.test.core.app.ApplicationProvider import androidx.test.espresso.Espresso.onView import androidx.test.espresso.ViewInteraction @@ -23,7 +24,6 @@ import androidx.test.espresso.matcher.ViewMatchers.isEnabled import androidx.test.espresso.matcher.ViewMatchers.isRoot import androidx.test.espresso.matcher.ViewMatchers.withId import androidx.test.espresso.matcher.ViewMatchers.withText -import androidx.test.ext.junit.rules.ActivityScenarioRule import androidx.test.ext.junit.runners.AndroidJUnit4 import androidx.test.ext.truth.content.IntentSubject.assertThat import androidx.work.Configuration @@ -56,6 +56,7 @@ import org.oppia.android.app.application.ApplicationStartupListenerModule import org.oppia.android.app.application.testing.TestingBuildFlavorModule import org.oppia.android.app.devoptions.DeveloperOptionsModule import org.oppia.android.app.devoptions.DeveloperOptionsStarterModule +import org.oppia.android.app.model.OppiaEventLogs import org.oppia.android.app.model.ProfileId import org.oppia.android.app.player.state.itemviewmodel.SplitScreenInteractionModule import org.oppia.android.app.recyclerview.RecyclerViewMatcher.Companion.atPositionOnView @@ -102,7 +103,11 @@ import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.FakeAnalyticsEventLogger import org.oppia.android.testing.OppiaTestRule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule +import org.oppia.android.testing.logging.EventLogSubject +import org.oppia.android.testing.logging.EventLogSubject.Companion.assertThat +import org.oppia.android.testing.logging.EventLogSubject.LearnerDetailsContextSubject import org.oppia.android.testing.logging.SyncStatusTestModule import org.oppia.android.testing.logging.TestSyncStatusManager import org.oppia.android.testing.platformparameter.TestPlatformParameterModule @@ -117,6 +122,7 @@ import org.oppia.android.util.caching.AssetModule import org.oppia.android.util.caching.testing.CachingTestModule import org.oppia.android.util.gcsresource.GcsResourceModule import org.oppia.android.util.locale.LocaleProdModule +import org.oppia.android.util.locale.OppiaLocale import org.oppia.android.util.logging.EventLoggingConfigurationModule import org.oppia.android.util.logging.LoggerModule import org.oppia.android.util.logging.SyncStatusManager.SyncStatus @@ -130,7 +136,10 @@ import org.oppia.android.util.parser.image.GlideImageLoaderModule import org.oppia.android.util.parser.image.ImageParsingModule import org.robolectric.annotation.Config import org.robolectric.annotation.LooperMode +import java.security.MessageDigest +import java.util.Base64 import java.util.concurrent.TimeUnit +import java.util.zip.GZIPInputStream import javax.inject.Inject import javax.inject.Singleton @@ -147,11 +156,6 @@ import javax.inject.Singleton class ProfileAndDeviceIdFragmentTest { @get:Rule val initializeDefaultLocaleRule = InitializeDefaultLocaleRule() @get:Rule val oppiaTestRule = OppiaTestRule() - @get:Rule - var activityRule = - ActivityScenarioRule( - TestActivity.createIntent(ApplicationProvider.getApplicationContext()) - ) @Inject lateinit var profileTestHelper: ProfileTestHelper @Inject lateinit var testCoroutineDispatchers: TestCoroutineDispatchers @@ -163,6 +167,7 @@ class ProfileAndDeviceIdFragmentTest { @Inject lateinit var syncStatusManager: TestSyncStatusManager @Inject lateinit var learnerAnalyticsLogger: LearnerAnalyticsLogger @Inject lateinit var fakeAnalyticsEventLogger: FakeAnalyticsEventLogger + @Inject lateinit var machineLocale: OppiaLocale.MachineLocale private val clipboardManager by lazy { context.getSystemService(Context.CLIPBOARD_SERVICE) as ClipboardManager @@ -193,559 +198,587 @@ class ProfileAndDeviceIdFragmentTest { @Test fun testFragment_withOnlyAdminProfile_hasThreeItems() { - initializeActivityAndAddFragment() - - // There should be three items: a header, a profile, and the sync status. - onView(withId(R.id.profile_and_device_id_recycler_view)).check(hasItemCount(count = 4)) + runWithLaunchedActivityAndAddedFragment { + // There should be three items: a header, a profile, and the sync status. + onView(withId(R.id.profile_and_device_id_recycler_view)).check(hasItemCount(count = 4)) + } } @Test fun testFragment_withOnlyAdminProfile_hasDeviceIdHeader() { - initializeActivityAndAddFragment() - - onDeviceIdLabelAt(position = 0).check(matches(isDisplayed())) + runWithLaunchedActivityAndAddedFragment { + onDeviceIdLabelAt(position = 0).check(matches(isDisplayed())) + } } @Test fun testFragment_hasDeviceId() { - initializeActivityAndAddFragment() - - onDeviceIdLabelAt(position = 0).check(matches(withText(containsString("0347439ebe8b")))) + runWithLaunchedActivityAndAddedFragment { + onDeviceIdLabelAt(position = 0).check(matches(withText(containsString("113e04cc09a3")))) + } } @Test fun testFragment_deviceId_hasCopyButton() { - initializeActivityAndAddFragment() - - onDeviceIdCopyButtonAt(position = 0).check(matches(isDisplayed())) + runWithLaunchedActivityAndAddedFragment { + onDeviceIdCopyButtonAt(position = 0).check(matches(isDisplayed())) + } } @Test fun testFragment_deviceId_clickCopyButton_copiesDeviceIdToClipboard() { - initializeActivityAndAddFragment() - - onDeviceIdCopyButtonAt(position = 0).perform(click()) - testCoroutineDispatchers.runCurrent() + runWithLaunchedActivityAndAddedFragment { + onDeviceIdCopyButtonAt(position = 0).perform(click()) + testCoroutineDispatchers.runCurrent() + } val clipData = getCurrentClipData() assertThat(clipData?.description?.label).isEqualTo("Oppia installation ID") assertThat(clipData?.itemCount).isEqualTo(1) - assertThat(clipData?.getItemAt(0)?.text).isEqualTo("0347439ebe8b") + assertThat(clipData?.getItemAt(0)?.text).isEqualTo("113e04cc09a3") } @Test fun testFragment_withOnlyAdminProfile_hasOneProfileListed() { - initializeActivityAndAddFragment() - - onProfileNameAt(position = 1).check(matches(isDisplayed())) + runWithLaunchedActivityAndAddedFragment { + onProfileNameAt(position = 1).check(matches(isDisplayed())) + } } @Test fun testFragment_profileEntry_hasProfileName() { - initializeActivityAndAddFragment() - - onProfileNameAt(position = 1).check(matches(withText("Admin"))) + runWithLaunchedActivityAndAddedFragment { + onProfileNameAt(position = 1).check(matches(withText("Admin"))) + } } @Test fun testFragment_profileEntry_hasLearnerId() { - initializeActivityAndAddFragment() - - onLearnerIdAt(position = 1).check(matches(withText("a9fe66ab"))) + runWithLaunchedActivityAndAddedFragment { + onLearnerIdAt(position = 1).check(matches(withText("8dcbbd21"))) + } } @Test fun testFragment_profileEntry_hasCopyButton() { - initializeActivityAndAddFragment() - - onLearnerIdCopyButtonAt(position = 1).check(matches(isDisplayed())) + runWithLaunchedActivityAndAddedFragment { + onLearnerIdCopyButtonAt(position = 1).check(matches(isDisplayed())) + } } @Test fun testFragment_profileEntry_clickFirstCopyButton_copiesAdminLearnerIdToClipboard() { - initializeActivityAndAddFragment() - - onLearnerIdCopyButtonAt(position = 1).perform(click()) - testCoroutineDispatchers.runCurrent() + runWithLaunchedActivityAndAddedFragment { + onLearnerIdCopyButtonAt(position = 1).perform(click()) + testCoroutineDispatchers.runCurrent() + } val clipData = getCurrentClipData() assertThat(clipData?.description?.label).isEqualTo("Admin's learner ID") assertThat(clipData?.itemCount).isEqualTo(1) - assertThat(clipData?.getItemAt(0)?.text).isEqualTo("a9fe66ab") + assertThat(clipData?.getItemAt(0)?.text).isEqualTo("8dcbbd21") } @Test fun testFragment_multipleProfiles_listsAllProfiles() { profileTestHelper.addMoreProfiles(numProfiles = 5) - initializeActivityAndAddFragment() - - // Header + admin + 5 new profiles + sync status = 8 items. - onView(withId(R.id.profile_and_device_id_recycler_view)).check(hasItemCount(count = 9)) + runWithLaunchedActivityAndAddedFragment { + // Header + admin + 5 new profiles + sync status = 8 items. + onView(withId(R.id.profile_and_device_id_recycler_view)).check(hasItemCount(count = 9)) + } } @Test fun testFragment_multipleProfiles_adminIsFirst() { profileTestHelper.addMoreProfiles(numProfiles = 5) - initializeActivityAndAddFragment() - - onProfileNameAt(position = 1).check(matches(withText("Admin"))) + runWithLaunchedActivityAndAddedFragment { + onProfileNameAt(position = 1).check(matches(withText("Admin"))) + } } @Test fun testFragment_multipleProfiles_secondEntryHasDifferentName() { profileTestHelper.addMoreProfiles(numProfiles = 5) - initializeActivityAndAddFragment() - - // The second entry is not the admin. - onProfileNameAt(position = 2).check(matches(withText("A"))) + runWithLaunchedActivityAndAddedFragment { + // The second entry is not the admin. + onProfileNameAt(position = 2).check(matches(withText("A"))) + } } @Test fun testFragment_multipleProfiles_secondEntryHasDifferentLearnerIdThanFirst() { profileTestHelper.addMoreProfiles(numProfiles = 5) - initializeActivityAndAddFragment() - - // The second profile has a different learner ID. - onLearnerIdAt(position = 1).check(matches(withText("a9fe66ab"))) - onLearnerIdAt(position = 2).check(matches(withText("6e563e2f"))) + runWithLaunchedActivityAndAddedFragment { + // The second profile has a different learner ID. + onLearnerIdAt(position = 1).check(matches(withText("8dcbbd21"))) + onLearnerIdAt(position = 2).check(matches(withText("208663b0"))) + } } @Test fun testFragment_multipleProfiles_copySecondEntry_copiesDifferentLearnerIdThanFirst() { profileTestHelper.addMoreProfiles(numProfiles = 5) - initializeActivityAndAddFragment() - - onLearnerIdCopyButtonAt(position = 2).perform(click()) - testCoroutineDispatchers.runCurrent() + runWithLaunchedActivityAndAddedFragment { + onLearnerIdCopyButtonAt(position = 2).perform(click()) + testCoroutineDispatchers.runCurrent() + } val clipData = getCurrentClipData() assertThat(clipData?.description?.label).isEqualTo("A's learner ID") assertThat(clipData?.itemCount).isEqualTo(1) - assertThat(clipData?.getItemAt(0)?.text).isEqualTo("6e563e2f") + assertThat(clipData?.getItemAt(0)?.text).isEqualTo("208663b0") } @Test fun testFragment_initialState_deviceIdCopyButtonHasCopyLabel() { - initializeActivityAndAddFragment() - - onDeviceIdCopyButtonAt(position = 0).check(matches(withText("Copy"))) + runWithLaunchedActivityAndAddedFragment { + onDeviceIdCopyButtonAt(position = 0).check(matches(withText("Copy"))) + } } @Test fun testFragment_adminProfile_initialState_learnerIdCopyButtonHasCopyLabel() { - initializeActivityAndAddFragment() - - onLearnerIdCopyButtonAt(position = 1).check(matches(withText("Copy"))) + runWithLaunchedActivityAndAddedFragment { + onLearnerIdCopyButtonAt(position = 1).check(matches(withText("Copy"))) + } } @Test fun testFragment_adminProfile_clickDeviceIdCopyButton_deviceIdIsCopiedButNotLearnerId() { - initializeActivityAndAddFragment() - - onDeviceIdCopyButtonAt(position = 0).perform(click()) - testCoroutineDispatchers.runCurrent() + runWithLaunchedActivityAndAddedFragment { + onDeviceIdCopyButtonAt(position = 0).perform(click()) + testCoroutineDispatchers.runCurrent() - onDeviceIdCopyButtonAt(position = 0).check(matches(withText("Copied"))) - onLearnerIdCopyButtonAt(position = 1).check(matches(withText("Copy"))) + onDeviceIdCopyButtonAt(position = 0).check(matches(withText("Copied"))) + onLearnerIdCopyButtonAt(position = 1).check(matches(withText("Copy"))) + } } @Test fun testFragment_adminProfile_clickLearnerIdCopyButton_learnerIdIsCopiedButNotDeviceId() { - initializeActivityAndAddFragment() - - onLearnerIdCopyButtonAt(position = 1).perform(click()) - testCoroutineDispatchers.runCurrent() + runWithLaunchedActivityAndAddedFragment { + onLearnerIdCopyButtonAt(position = 1).perform(click()) + testCoroutineDispatchers.runCurrent() - onDeviceIdCopyButtonAt(position = 0).check(matches(withText("Copy"))) - onLearnerIdCopyButtonAt(position = 1).check(matches(withText("Copied"))) + onDeviceIdCopyButtonAt(position = 0).check(matches(withText("Copy"))) + onLearnerIdCopyButtonAt(position = 1).check(matches(withText("Copied"))) + } } @Test fun testFragment_adminProfile_clickLearnerIdCopyButton_copyInOtherApp_nothingIsCopied() { - initializeActivityAndAddFragment() - onLearnerIdCopyButtonAt(position = 1).perform(click()) - testCoroutineDispatchers.runCurrent() + runWithLaunchedActivityAndAddedFragment { + onLearnerIdCopyButtonAt(position = 1).perform(click()) + testCoroutineDispatchers.runCurrent() - updateClipDataAsThoughFromAnotherApp() + updateClipDataAsThoughFromAnotherApp() - // Changing the clipboard in a different app should reset the labels. - onDeviceIdCopyButtonAt(position = 0).check(matches(withText("Copy"))) - onLearnerIdCopyButtonAt(position = 1).check(matches(withText("Copy"))) + // Changing the clipboard in a different app should reset the labels. + onDeviceIdCopyButtonAt(position = 0).check(matches(withText("Copy"))) + onLearnerIdCopyButtonAt(position = 1).check(matches(withText("Copy"))) + } } @Test fun testFragment_adminProfile_clickLearnerIdCopyButton_rotate_learnerIdStillCopied() { - initializeActivityAndAddFragment() - onLearnerIdCopyButtonAt(position = 1).perform(click()) - testCoroutineDispatchers.runCurrent() + runWithLaunchedActivityAndAddedFragment { + onLearnerIdCopyButtonAt(position = 1).perform(click()) + testCoroutineDispatchers.runCurrent() - onView(isRoot()).perform(orientationLandscape()) - testCoroutineDispatchers.runCurrent() + onView(isRoot()).perform(orientationLandscape()) + testCoroutineDispatchers.runCurrent() - // The button label should be restored after a rotation. - onDeviceIdCopyButtonAt(position = 0).check(matches(withText("Copy"))) - onLearnerIdCopyButtonAt(position = 1).check(matches(withText("Copied"))) + // The button label should be restored after a rotation. + onDeviceIdCopyButtonAt(position = 0).check(matches(withText("Copy"))) + onLearnerIdCopyButtonAt(position = 1).check(matches(withText("Copied"))) + } } @Test fun testFragment_multipleProfiles_rotate_profilesStillPresent() { profileTestHelper.addMoreProfiles(numProfiles = 5) - initializeActivityAndAddFragment() - onView(isRoot()).perform(orientationLandscape()) - testCoroutineDispatchers.runCurrent() + runWithLaunchedActivityAndAddedFragment { + onView(isRoot()).perform(orientationLandscape()) + testCoroutineDispatchers.runCurrent() - onView(withId(R.id.profile_and_device_id_recycler_view)).check(hasItemCount(count = 9)) + onView(withId(R.id.profile_and_device_id_recycler_view)).check(hasItemCount(count = 9)) + } } @Test fun testFragment_firstEntry_noAdminEvents_hasZeroAdminEventsReported() { profileTestHelper.addMoreProfiles(numProfiles = 1) - initializeActivityAndAddFragment() - onAwaitingUploadLearnerEventsCountAt(position = 1).check(matches(withText("0"))) - onUploadedLearnerEventsCountAt(position = 1).check(matches(withText("0"))) + runWithLaunchedActivityAndAddedFragment { + onAwaitingUploadLearnerEventsCountAt(position = 1).check(matches(withText("0"))) + onUploadedLearnerEventsCountAt(position = 1).check(matches(withText("0"))) + } } @Test fun testFragment_firstEntry_adminEvents_notUploaded_hasSomeAdminEventsReported() { profileTestHelper.addMoreProfiles(numProfiles = 1) - initializeActivityAndAddFragment() - disconnectNetwork() // Ensure events are cached. + runWithLaunchedActivityAndAddedFragment { + disconnectNetwork() // Ensure events are cached. - // Log a couple of events. - logTwoAnalyticsEvents(profileId = ADMIN_PROFILE_ID) + // Log a couple of events. + logTwoAnalyticsEvents(profileId = ADMIN_PROFILE_ID) - // Two are awaiting upload, but neither have been uploaded yet. - onAwaitingUploadLearnerEventsCountAt(position = 1).check(matches(withText("2"))) - onUploadedLearnerEventsCountAt(position = 1).check(matches(withText("0"))) + // Two are awaiting upload, but neither have been uploaded yet. + onAwaitingUploadLearnerEventsCountAt(position = 1).check(matches(withText("2"))) + onUploadedLearnerEventsCountAt(position = 1).check(matches(withText("0"))) + } } @Test fun testFragment_firstEntry_adminEvents_uploaded_hasSomeAdminEventsReported() { profileTestHelper.addMoreProfiles(numProfiles = 1) - initializeActivityAndAddFragment() - disconnectNetwork() // Ensure events are cached. + runWithLaunchedActivityAndAddedFragment { + disconnectNetwork() // Ensure events are cached. - // Log a couple of events, upload them, then log one more event. - logTwoAnalyticsEvents(profileId = ADMIN_PROFILE_ID) - connectOnlyToFlushWorkerQueue() - logAnalyticsEvent(profileId = ADMIN_PROFILE_ID) + // Log a couple of events, upload them, then log one more event. + logTwoAnalyticsEvents(profileId = ADMIN_PROFILE_ID) + connectOnlyToFlushWorkerQueue() + logAnalyticsEvent(profileId = ADMIN_PROFILE_ID) - // Two should be uploaded, and one waiting upload. - onAwaitingUploadLearnerEventsCountAt(position = 1).check(matches(withText("1"))) - onUploadedLearnerEventsCountAt(position = 1).check(matches(withText("2"))) + // Two should be uploaded, and one waiting upload. + onAwaitingUploadLearnerEventsCountAt(position = 1).check(matches(withText("1"))) + onUploadedLearnerEventsCountAt(position = 1).check(matches(withText("2"))) + } } @Test fun testFragment_firstEntry_noGenericEvents_hasZeroGenericEventsReported() { profileTestHelper.addMoreProfiles(numProfiles = 1) - initializeActivityAndAddFragment() - onAwaitingUploadUncategorizedEventsCountAt(position = 1).check(matches(withText("0"))) - onUploadedUncategorizedEventsCountAt(position = 1).check(matches(withText("0"))) + runWithLaunchedActivityAndAddedFragment { + onAwaitingUploadUncategorizedEventsCountAt(position = 1).check(matches(withText("0"))) + onUploadedUncategorizedEventsCountAt(position = 1).check(matches(withText("0"))) + } } @Test fun testFragment_firstEntry_genericEvents_notUploaded_hasSomeGenericEventsReported() { profileTestHelper.addMoreProfiles(numProfiles = 1) - initializeActivityAndAddFragment() - disconnectNetwork() // Ensure events are cached. + runWithLaunchedActivityAndAddedFragment { + disconnectNetwork() // Ensure events are cached. - // Log a couple of events off of the admin profile. - logTwoAnalyticsEvents(profileId = null) + // Log a couple of events off of the admin profile. + logTwoAnalyticsEvents(profileId = null) - onAwaitingUploadUncategorizedEventsCountAt(position = 1).check(matches(withText("2"))) - onUploadedUncategorizedEventsCountAt(position = 1).check(matches(withText("0"))) + onAwaitingUploadUncategorizedEventsCountAt(position = 1).check(matches(withText("2"))) + onUploadedUncategorizedEventsCountAt(position = 1).check(matches(withText("0"))) + } } @Test fun testFragment_firstEntry_genericEvents_uploaded_hasSomeGenericEventsReported() { profileTestHelper.addMoreProfiles(numProfiles = 1) - initializeActivityAndAddFragment() - disconnectNetwork() // Ensure events are cached. + runWithLaunchedActivityAndAddedFragment { + disconnectNetwork() // Ensure events are cached. - // Log a couple of events, upload them, then log one more event, off of the admin profile. - logTwoAnalyticsEvents(profileId = null) - connectOnlyToFlushWorkerQueue() - logAnalyticsEvent(profileId = null) + // Log a couple of events, upload them, then log one more event, off of the admin profile. + logTwoAnalyticsEvents(profileId = null) + connectOnlyToFlushWorkerQueue() + logAnalyticsEvent(profileId = null) - onAwaitingUploadUncategorizedEventsCountAt(position = 1).check(matches(withText("1"))) - onUploadedUncategorizedEventsCountAt(position = 1).check(matches(withText("2"))) + onAwaitingUploadUncategorizedEventsCountAt(position = 1).check(matches(withText("1"))) + onUploadedUncategorizedEventsCountAt(position = 1).check(matches(withText("2"))) + } } @Test fun testFragment_firstEntry_mixOfAdminAndGenericEvents_someUploaded_reportsAllEvents() { profileTestHelper.addMoreProfiles(numProfiles = 1) - initializeActivityAndAddFragment() - disconnectNetwork() // Ensure events are cached. - - // Log & upload a mix of events with and without the admin profile. - logAnalyticsEvent(profileId = ADMIN_PROFILE_ID) - logThreeAnalyticsEvents(profileId = null) - connectOnlyToFlushWorkerQueue() - logAnalyticsEvent(profileId = null) - logTwoAnalyticsEvents(profileId = ADMIN_PROFILE_ID) - - // Event counts should be represented in the correct places. - onAwaitingUploadLearnerEventsCountAt(position = 1).check(matches(withText("2"))) - onUploadedLearnerEventsCountAt(position = 1).check(matches(withText("1"))) - onAwaitingUploadUncategorizedEventsCountAt(position = 1).check(matches(withText("1"))) - onUploadedUncategorizedEventsCountAt(position = 1).check(matches(withText("3"))) + runWithLaunchedActivityAndAddedFragment { + disconnectNetwork() // Ensure events are cached. + + // Log & upload a mix of events with and without the admin profile. + logAnalyticsEvent(profileId = ADMIN_PROFILE_ID) + logThreeAnalyticsEvents(profileId = null) + connectOnlyToFlushWorkerQueue() + logAnalyticsEvent(profileId = null) + logTwoAnalyticsEvents(profileId = ADMIN_PROFILE_ID) + + // Event counts should be represented in the correct places. + onAwaitingUploadLearnerEventsCountAt(position = 1).check(matches(withText("2"))) + onUploadedLearnerEventsCountAt(position = 1).check(matches(withText("1"))) + onAwaitingUploadUncategorizedEventsCountAt(position = 1).check(matches(withText("1"))) + onUploadedUncategorizedEventsCountAt(position = 1).check(matches(withText("3"))) + } } @Test fun testFragment_secondEntry_noLearnerEvents_hasZeroLearnerEventsReported() { profileTestHelper.addMoreProfiles(numProfiles = 1) - initializeActivityAndAddFragment() - onAwaitingUploadLearnerEventsCountAt(position = 2).check(matches(withText("0"))) - onUploadedLearnerEventsCountAt(position = 2).check(matches(withText("0"))) + runWithLaunchedActivityAndAddedFragment { + onAwaitingUploadLearnerEventsCountAt(position = 2).check(matches(withText("0"))) + onUploadedLearnerEventsCountAt(position = 2).check(matches(withText("0"))) + } } @Test fun testFragment_secondEntry_learnerEvents_notUploaded_hasSomeLearnerEventsReported() { profileTestHelper.addMoreProfiles(numProfiles = 1) - initializeActivityAndAddFragment() - disconnectNetwork() // Ensure events are cached. + runWithLaunchedActivityAndAddedFragment { + disconnectNetwork() // Ensure events are cached. - // Log a couple of events. - logTwoAnalyticsEvents(profileId = LEARNER_PROFILE_ID_0) + // Log a couple of events. + logTwoAnalyticsEvents(profileId = LEARNER_PROFILE_ID_0) - // Two are awaiting upload, but neither have been uploaded yet. - onAwaitingUploadLearnerEventsCountAt(position = 2).check(matches(withText("2"))) - onUploadedLearnerEventsCountAt(position = 2).check(matches(withText("0"))) + // Two are awaiting upload, but neither have been uploaded yet. + onAwaitingUploadLearnerEventsCountAt(position = 2).check(matches(withText("2"))) + onUploadedLearnerEventsCountAt(position = 2).check(matches(withText("0"))) + } } @Test fun testFragment_secondEntry_learnerEvents_uploaded_hasSomeLearnerEventsReported() { profileTestHelper.addMoreProfiles(numProfiles = 1) - initializeActivityAndAddFragment() - disconnectNetwork() // Ensure events are cached. + runWithLaunchedActivityAndAddedFragment { + disconnectNetwork() // Ensure events are cached. - // Log a couple of events, upload them, then log one more event. - logTwoAnalyticsEvents(profileId = LEARNER_PROFILE_ID_0) - connectOnlyToFlushWorkerQueue() - logAnalyticsEvent(profileId = LEARNER_PROFILE_ID_0) + // Log a couple of events, upload them, then log one more event. + logTwoAnalyticsEvents(profileId = LEARNER_PROFILE_ID_0) + connectOnlyToFlushWorkerQueue() + logAnalyticsEvent(profileId = LEARNER_PROFILE_ID_0) - // Two should be uploaded, and one waiting upload. - onAwaitingUploadLearnerEventsCountAt(position = 2).check(matches(withText("1"))) - onUploadedLearnerEventsCountAt(position = 2).check(matches(withText("2"))) + // Two should be uploaded, and one waiting upload. + onAwaitingUploadLearnerEventsCountAt(position = 2).check(matches(withText("1"))) + onUploadedLearnerEventsCountAt(position = 2).check(matches(withText("2"))) + } } @Test fun testFragment_secondEntry_learnerEvents_hasZeroAdminOrGenericEventsReported() { profileTestHelper.addMoreProfiles(numProfiles = 1) - initializeActivityAndAddFragment() - disconnectNetwork() // Ensure events are cached. - - // Log a couple of events, upload them, then log one more event, for a learner profile. - logTwoAnalyticsEvents(profileId = LEARNER_PROFILE_ID_0) - connectOnlyToFlushWorkerQueue() - logAnalyticsEvent(profileId = LEARNER_PROFILE_ID_0) - - // The admin profile's event counts shouldn't change since the only logged events were for a - // specific learner profile. - onAwaitingUploadLearnerEventsCountAt(position = 1).check(matches(withText("0"))) - onUploadedLearnerEventsCountAt(position = 1).check(matches(withText("0"))) - onAwaitingUploadUncategorizedEventsCountAt(position = 1).check(matches(withText("0"))) - onUploadedUncategorizedEventsCountAt(position = 1).check(matches(withText("0"))) + runWithLaunchedActivityAndAddedFragment { + disconnectNetwork() // Ensure events are cached. + + // Log a couple of events, upload them, then log one more event, for a learner profile. + logTwoAnalyticsEvents(profileId = LEARNER_PROFILE_ID_0) + connectOnlyToFlushWorkerQueue() + logAnalyticsEvent(profileId = LEARNER_PROFILE_ID_0) + + // The admin profile's event counts shouldn't change since the only logged events were for a + // specific learner profile. + onAwaitingUploadLearnerEventsCountAt(position = 1).check(matches(withText("0"))) + onUploadedLearnerEventsCountAt(position = 1).check(matches(withText("0"))) + onAwaitingUploadUncategorizedEventsCountAt(position = 1).check(matches(withText("0"))) + onUploadedUncategorizedEventsCountAt(position = 1).check(matches(withText("0"))) + } } @Test fun testFragment_secondEntry_adminAndGenericEvents_uploaded_hasZeroLearnerEventsReported() { profileTestHelper.addMoreProfiles(numProfiles = 1) - initializeActivityAndAddFragment() - disconnectNetwork() // Ensure events are cached. - - // Log a couple of events generically and for the admin profile. - logAnalyticsEvent(profileId = ADMIN_PROFILE_ID) - logAnalyticsEvent(profileId = null) - connectOnlyToFlushWorkerQueue() - logAnalyticsEvent(profileId = ADMIN_PROFILE_ID) - logAnalyticsEvent(profileId = null) - - // No events should be reported for the learner since it didn't have any events uploaded. - onAwaitingUploadLearnerEventsCountAt(position = 2).check(matches(withText("0"))) - onUploadedLearnerEventsCountAt(position = 2).check(matches(withText("0"))) + runWithLaunchedActivityAndAddedFragment { + disconnectNetwork() // Ensure events are cached. + + // Log a couple of events generically and for the admin profile. + logAnalyticsEvent(profileId = ADMIN_PROFILE_ID) + logAnalyticsEvent(profileId = null) + connectOnlyToFlushWorkerQueue() + logAnalyticsEvent(profileId = ADMIN_PROFILE_ID) + logAnalyticsEvent(profileId = null) + + // No events should be reported for the learner since it didn't have any events uploaded. + onAwaitingUploadLearnerEventsCountAt(position = 2).check(matches(withText("0"))) + onUploadedLearnerEventsCountAt(position = 2).check(matches(withText("0"))) + } } @Test fun testFragment_initialState_profileDataHasYetToBeCollected() { - initializeActivityAndAddFragment() - - onSyncStatusAt(position = 2) - .check(matches(withText(containsString("No data has been collected yet to upload")))) + runWithLaunchedActivityAndAddedFragment { + onSyncStatusAt(position = 2) + .check(matches(withText(containsString("No data has been collected yet to upload")))) + } } @Test fun testFragment_initialState_wait_profileDataHasYetToBeCollected() { - initializeActivityAndAddFragment() - - testCoroutineDispatchers.advanceTimeBy(delayTimeMillis = TimeUnit.SECONDS.toMillis(1)) + runWithLaunchedActivityAndAddedFragment { + testCoroutineDispatchers.advanceTimeBy(delayTimeMillis = TimeUnit.SECONDS.toMillis(1)) - onSyncStatusAt(position = 2) - .check(matches(withText(containsString("No data has been collected yet to upload")))) + onSyncStatusAt(position = 2) + .check(matches(withText(containsString("No data has been collected yet to upload")))) + } } @Test fun testFragment_eventLogged_waitingForUpload_indicatorTextMentionsWaiting() { - initializeActivityAndAddFragment() - disconnectNetwork() // Ensure events are cached. - - // Enqueue the event, but don't actually begin uploading it, then reconnect to the network. Note - // that the extra event log is a slight hack to force a refresh of the status indicator (since - // network changes are polled when there are other changes to represent rather than being - // actively "pushed" by the system). - logAnalyticsEvent() - connectNetwork() - logAnalyticsEvent() - - // The status indicator is suggesting that events can be uploaded (and there are some available - // to upload), they just haven't been scheduled yet. - onSyncStatusAt(position = 2) - .check(matches(withText(containsString("Waiting to schedule data uploading worker…")))) + runWithLaunchedActivityAndAddedFragment { + disconnectNetwork() // Ensure events are cached. + + // Enqueue the event, but don't actually begin uploading it, then reconnect to the network. + // Note that the extra event log is a slight hack to force a refresh of the status indicator + // (since network changes are polled when there are other changes to represent rather than + // being actively "pushed" by the system). + logAnalyticsEvent() + connectNetwork() + logAnalyticsEvent() + + // The status indicator is suggesting that events can be uploaded (and there are some + // available to upload), they just haven't been scheduled yet. + onSyncStatusAt(position = 2) + .check(matches(withText(containsString("Waiting to schedule data uploading worker…")))) + } } @Test fun testFragment_eventLogged_waitingForUpload_uploadStarted_profileDataIsCurrentlyUploading() { - initializeActivityAndAddFragment() - disconnectNetwork() // Ensure events are cached. + runWithLaunchedActivityAndAddedFragment { + disconnectNetwork() // Ensure events are cached. - // Unfortunately, it's tricky to pause the actual upload worker so this is a hacky way to - // produce the same situation to ensure the label is correct. - logAnalyticsEvent() - syncStatusManager.forceSyncStatus(SyncStatus.DATA_UPLOADING) - testCoroutineDispatchers.runCurrent() + // Unfortunately, it's tricky to pause the actual upload worker so this is a hacky way to + // produce the same situation to ensure the label is correct. + logAnalyticsEvent() + syncStatusManager.forceSyncStatus(SyncStatus.DATA_UPLOADING) + testCoroutineDispatchers.runCurrent() - onSyncStatusAt(position = 2) - .check(matches(withText(containsString("Profile data is currently uploading")))) + onSyncStatusAt(position = 2) + .check(matches(withText(containsString("Profile data is currently uploading")))) + } } @Test fun testFragment_noConnectivity_indicatorTextMentionsDataCannotBeUploaded() { - initializeActivityAndAddFragment() - disconnectNetwork() // Ensure events are cached. - - // Enqueue an event but don't reconnect to the network. - logAnalyticsEvent() - - // The status indicator is suggesting that internet connectivity needs to resume in order to - // upload events. - onSyncStatusAt(position = 2) - .check( - matches( - withText( - containsString( - "Please connect to a WiFi or Cellular network in order to upload profile data" + runWithLaunchedActivityAndAddedFragment { + disconnectNetwork() // Ensure events are cached. + + // Enqueue an event but don't reconnect to the network. + logAnalyticsEvent() + + // The status indicator is suggesting that internet connectivity needs to resume in order to + // upload events. + onSyncStatusAt(position = 2) + .check( + matches( + withText( + containsString( + "Please connect to a WiFi or Cellular network in order to upload profile data" + ) ) ) ) - ) + } } @Test fun testFragment_eventLogged_waitForUpload_profileDataIsUploaded() { - initializeActivityAndAddFragment() - disconnectNetwork() // Ensure events are cached. + runWithLaunchedActivityAndAddedFragment { + disconnectNetwork() // Ensure events are cached. - logAnalyticsEvent() - connectNetwork() - flushEventWorkerQueue() + logAnalyticsEvent() + connectNetwork() + flushEventWorkerQueue() - onSyncStatusAt(position = 2) - .check(matches(withText(containsString("All profile data has been uploaded")))) + onSyncStatusAt(position = 2) + .check(matches(withText(containsString("All profile data has been uploaded")))) + } } @Test fun testFragment_eventLogged_uploadError_profileDataHasError() { - initializeActivityAndAddFragment() - disconnectNetwork() // Ensure events are cached. - logAnalyticsEvent() + runWithLaunchedActivityAndAddedFragment { + disconnectNetwork() // Ensure events are cached. + logAnalyticsEvent() - // An upload error can currently only be simulated by directly influencing the sync manager. - syncStatusManager.forceSyncStatus(SyncStatus.UPLOAD_ERROR) - testCoroutineDispatchers.runCurrent() + // An upload error can currently only be simulated by directly influencing the sync manager. + syncStatusManager.forceSyncStatus(SyncStatus.UPLOAD_ERROR) + testCoroutineDispatchers.runCurrent() - onSyncStatusAt(position = 2) - .check(matches(withText(containsString("Something went wrong when trying to upload events")))) + onSyncStatusAt(position = 2) + .check( + matches(withText(containsString("Something went wrong when trying to upload events"))) + ) + } } @Test fun testFragment_eventLogged_uploadError_anotherLogged_wait_profileDataIsUploading() { - initializeActivityAndAddFragment() - disconnectNetwork() // Ensure events are cached. - logAnalyticsEvent() - syncStatusManager.reportUploadError() - testCoroutineDispatchers.runCurrent() - - logAnalyticsEvent() - connectNetwork() - flushEventWorkerQueue() - - onSyncStatusAt(position = 2) - .check(matches(withText(containsString("All profile data has been uploaded")))) + runWithLaunchedActivityAndAddedFragment { + disconnectNetwork() // Ensure events are cached. + logAnalyticsEvent() + syncStatusManager.reportUploadError() + testCoroutineDispatchers.runCurrent() + + logAnalyticsEvent() + connectNetwork() + flushEventWorkerQueue() + + onSyncStatusAt(position = 2) + .check(matches(withText(containsString("All profile data has been uploaded")))) + } } @Test fun testFragment_rotate_profileDataHasYetToBeCollected() { - initializeActivityAndAddFragment() + runWithLaunchedActivityAndAddedFragment { + onView(isRoot()).perform(orientationLandscape()) + testCoroutineDispatchers.runCurrent() - onView(isRoot()).perform(orientationLandscape()) - testCoroutineDispatchers.runCurrent() - - onSyncStatusAt(position = 2) - .check(matches(withText(containsString("No data has been collected yet to upload")))) + onSyncStatusAt(position = 2) + .check(matches(withText(containsString("No data has been collected yet to upload")))) + } } @Test fun testFragment_eventLogged_waitingForUpload_rotate_profileDataIsCurrentlyUploading() { - initializeActivityAndAddFragment() - disconnectNetwork() // Ensure events are cached. - logAnalyticsEvent() - syncStatusManager.forceSyncStatus(SyncStatus.DATA_UPLOADING) - testCoroutineDispatchers.runCurrent() + runWithLaunchedActivityAndAddedFragment { + disconnectNetwork() // Ensure events are cached. + logAnalyticsEvent() + syncStatusManager.forceSyncStatus(SyncStatus.DATA_UPLOADING) + testCoroutineDispatchers.runCurrent() - onView(isRoot()).perform(orientationLandscape()) - testCoroutineDispatchers.runCurrent() + onView(isRoot()).perform(orientationLandscape()) + testCoroutineDispatchers.runCurrent() - onSyncStatusAt(position = 2) - .check(matches(withText(containsString("Profile data is currently uploading")))) + onSyncStatusAt(position = 2) + .check(matches(withText(containsString("Profile data is currently uploading")))) + } } @Test fun testFragment_eventLogged_waitForUpload_rotate_profileDataIsUploaded() { - initializeActivityAndAddFragment() - disconnectNetwork() // Ensure events are cached. - logAnalyticsEvent() - connectNetwork() - flushEventWorkerQueue() + runWithLaunchedActivityAndAddedFragment { + disconnectNetwork() // Ensure events are cached. + logAnalyticsEvent() + connectNetwork() + flushEventWorkerQueue() - onView(isRoot()).perform(orientationLandscape()) - testCoroutineDispatchers.runCurrent() + onView(isRoot()).perform(orientationLandscape()) + testCoroutineDispatchers.runCurrent() - onSyncStatusAt(position = 2) - .check(matches(withText(containsString("All profile data has been uploaded")))) + onSyncStatusAt(position = 2) + .check(matches(withText(containsString("All profile data has been uploaded")))) + } } @Test fun testFragment_eventsLogged_uploadError_rotate_profileDataHasError() { - initializeActivityAndAddFragment() - disconnectNetwork() // Ensure events are cached. - logAnalyticsEvent() - syncStatusManager.forceSyncStatus(SyncStatus.UPLOAD_ERROR) - testCoroutineDispatchers.runCurrent() - - onView(isRoot()).perform(orientationLandscape()) - testCoroutineDispatchers.runCurrent() - - onSyncStatusAt(position = 2) - .check(matches(withText(containsString("Something went wrong when trying to upload events")))) + runWithLaunchedActivityAndAddedFragment { + disconnectNetwork() // Ensure events are cached. + logAnalyticsEvent() + syncStatusManager.forceSyncStatus(SyncStatus.UPLOAD_ERROR) + testCoroutineDispatchers.runCurrent() + + onView(isRoot()).perform(orientationLandscape()) + testCoroutineDispatchers.runCurrent() + + onSyncStatusAt(position = 2) + .check( + matches(withText(containsString("Something went wrong when trying to upload events"))) + ) + } } @Test @@ -753,127 +786,166 @@ class ProfileAndDeviceIdFragmentTest { // Use fake time so that the generated event logs are consistent across runs. fakeOppiaClock.setFakeTimeMode(FakeOppiaClock.FakeTimeMode.MODE_FIXED_FAKE_TIME) profileTestHelper.addMoreProfiles(numProfiles = 2) - initializeActivityAndAddFragment() - disconnectNetwork() // Ensure events are cached. - - // Log & upload some events, then enqueue others. - logThreeAnalyticsEvents(profileId = null) - logTwoAnalyticsEvents(profileId = ADMIN_PROFILE_ID) - logAnalyticsEvent(profileId = LEARNER_PROFILE_ID_0) - logTwoAnalyticsEvents(profileId = LEARNER_PROFILE_ID_1) - connectOnlyToFlushWorkerQueue() - logAnalyticsEvent(profileId = null) - logThreeAnalyticsEvents(profileId = ADMIN_PROFILE_ID) - logTwoAnalyticsEvents(profileId = LEARNER_PROFILE_ID_0) - logAnalyticsEvent(profileId = LEARNER_PROFILE_ID_1) - connectNetwork() - logAnalyticsEvent(profileId = null) // Log an event to trigger tracking the network change. - - onShareIdsAndEventsButtonAt(position = 5).perform(click()) - testCoroutineDispatchers.runCurrent() - - val expectedShareText = - """ - Oppia app installation ID: 932459768f39 - - Profile name: Admin, learner ID: a9fe66ab - - Uploading learner events: 3 - - Uploaded learner events: 2 - - Uploading uncategorized events: 1 - - Uploaded uncategorized events: 4 - - Profile name: A, learner ID: 6e563e2f - - Uploading learner events: 2 - - Uploaded learner events: 1 - - Profile name: B, learner ID: 5c0710a2 - - Uploading learner events: 1 - - Uploaded learner events: 2 - Current sync status: Waiting to schedule data uploading worker…. - Event log encoding integrity checks: - - First 40 chars of encoded string: H4sIAAAAAAAAAOPSlGBUUj3FqMTFX5JaXBKfk5pY - - Last 40 chars of encoded string: BzGNlJIepORoISdAydHERJ4m4sMLAFFY60EUAwAA - - SHA-1 hash (unwrapped event string): 76f7a26348b4034787982f9505c6b5697efc6567 - - Total event string length (unwrapped): 140 - Encoded event logs: - H4sIAAAAAAAAAOPSlGBUUj3FqMTFX5JaXBKfk5pYlJdaFJ+ZIgQRyMwrLknMyQEKcBkSrVSLwYjBisGJ - gU5ajEnVwsTBSDdNTELEBzGNlJIepORoISdAydHERJ4m4sMLAFFY60EUAwAA - """.trimIndent() - val intents = getIntents() - assertThat(intents).hasSize(1) - assertThat(intents.single()).hasAction(Intent.ACTION_SEND) - assertThat(intents.single()).hasType("text/plain") - assertThat(intents.single()).extras().containsKey(Intent.EXTRA_TEXT) - assertThat(intents.single()).extras().string(Intent.EXTRA_TEXT).isEqualTo(expectedShareText) + runWithLaunchedActivityAndAddedFragment { + disconnectNetwork() // Ensure events are cached. + + // Log & upload some events, then enqueue others. + logThreeAnalyticsEvents(profileId = null) + logTwoAnalyticsEvents(profileId = ADMIN_PROFILE_ID) + logAnalyticsEvent(profileId = LEARNER_PROFILE_ID_0) + logTwoAnalyticsEvents(profileId = LEARNER_PROFILE_ID_1) + connectOnlyToFlushWorkerQueue() + logAnalyticsEvent(profileId = null) + logThreeAnalyticsEvents(profileId = ADMIN_PROFILE_ID) + logTwoAnalyticsEvents(profileId = LEARNER_PROFILE_ID_0) + logAnalyticsEvent(profileId = LEARNER_PROFILE_ID_1) + connectNetwork() + logAnalyticsEvent(profileId = null) // Log an event to trigger tracking the network change. + + onShareIdsAndEventsButtonAt(position = 5).perform(click()) + testCoroutineDispatchers.runCurrent() + + val expectedShareTextPattern = + """ + Oppia app installation ID: 113e04cc09a3 + - Profile name: Admin, learner ID: 8dcbbd21 + - Uploading learner events: 3 + - Uploaded learner events: 2 + - Uploading uncategorized events: 1 + - Uploaded uncategorized events: 4 + - Profile name: A, learner ID: 208663b0 + - Uploading learner events: 2 + - Uploaded learner events: 1 + - Profile name: B, learner ID: 92d0c6e2 + - Uploading learner events: 1 + - Uploaded learner events: 2 + Current sync status: Waiting to schedule data uploading worker…. + Event log encoding integrity checks: + - First 40 chars of encoded string: ([\p{Alnum}/\\+=]+) + - Last 40 chars of encoded string: ([\p{Alnum}/\\+=]+) + - SHA-1 hash \(unwrapped event string\): (\p{XDigit}+) + - Total event string length \(unwrapped\): (\p{Digit}+) + Encoded event logs:([\p{Alnum}/+=\p{Space}]+) + """.trimIndent().toRegex() + val intents = getIntents() + val extraText = intents.singleOrNull()?.getStringExtra(Intent.EXTRA_TEXT) + assertThat(intents).hasSize(1) + assertThat(intents.single()).hasAction(Intent.ACTION_SEND) + assertThat(intents.single()).hasType("text/plain") + assertThat(intents.single()).extras().containsKey(Intent.EXTRA_TEXT) + assertThat(extraText).matches(expectedShareTextPattern.toPattern()) + val (encodingPrefix, encodingSuffix, shaHash, encodingLength, rawEncodedLogs) = + extraText?.let { expectedShareTextPattern.matchEntire(it) }?.destructured!! + val unwrappedEncodedLogs = rawEncodedLogs.trim().replace(" ", "").replace("\n", "") + // Verify that the correct _values_ are being outputted, even if the specific values might + // differ slightly (depending on the running platform). + assertThat(encodingPrefix).isEqualTo(unwrappedEncodedLogs.take(40)) + assertThat(encodingSuffix).isEqualTo(unwrappedEncodedLogs.takeLast(40)) + assertThat(shaHash).isEqualTo(unwrappedEncodedLogs.computeSha1Hash()) + assertThat(encodingLength.toInt()).isEqualTo(unwrappedEncodedLogs.length) + // Verify the encoded events themselves are correct by decoding them and analyzing the loaded + // proto (since the string can vary somewhat). + val eventLogs = decodeEventLogString(unwrappedEncodedLogs) + assertThat(eventLogs.eventLogsToUploadCount).isEqualTo(7) + assertThat(eventLogs.uploadedEventLogsCount).isEqualTo(9) + assertThat(eventLogs.eventLogsToUploadList[0]).hasCommonPropsWithNoProfileId() + assertThat(eventLogs.eventLogsToUploadList[1]).hasCommonPropsWithProfile(ADMIN_PROFILE_ID) + assertThat(eventLogs.eventLogsToUploadList[2]).hasCommonPropsWithProfile(ADMIN_PROFILE_ID) + assertThat(eventLogs.eventLogsToUploadList[3]).hasCommonPropsWithProfile(ADMIN_PROFILE_ID) + assertThat(eventLogs.eventLogsToUploadList[4]).hasCommonPropsWithProfile(LEARNER_PROFILE_ID_0) + assertThat(eventLogs.eventLogsToUploadList[5]).hasCommonPropsWithProfile(LEARNER_PROFILE_ID_0) + assertThat(eventLogs.eventLogsToUploadList[6]).hasCommonPropsWithProfile(LEARNER_PROFILE_ID_1) + assertThat(eventLogs.uploadedEventLogsList[0]).hasCommonPropsWithNoProfileId() + assertThat(eventLogs.uploadedEventLogsList[1]).hasCommonPropsWithNoProfileId() + assertThat(eventLogs.uploadedEventLogsList[2]).hasCommonPropsWithNoProfileId() + assertThat(eventLogs.uploadedEventLogsList[3]).hasCommonPropsWithProfile(ADMIN_PROFILE_ID) + assertThat(eventLogs.uploadedEventLogsList[4]).hasCommonPropsWithProfile(ADMIN_PROFILE_ID) + assertThat(eventLogs.uploadedEventLogsList[5]).hasCommonPropsWithProfile(LEARNER_PROFILE_ID_0) + assertThat(eventLogs.uploadedEventLogsList[6]).hasCommonPropsWithProfile(LEARNER_PROFILE_ID_1) + assertThat(eventLogs.uploadedEventLogsList[7]).hasCommonPropsWithProfile(LEARNER_PROFILE_ID_1) + assertThat(eventLogs.uploadedEventLogsList[8]).hasCommonPropsWithNoProfileId() + } } @Test fun testFragment_noEventsPending_uploadLogsButtonDisabled() { profileTestHelper.addMoreProfiles(numProfiles = 1) - initializeActivityAndAddFragment() - disconnectNetwork() // Ensure events are cached. + runWithLaunchedActivityAndAddedFragment { + disconnectNetwork() // Ensure events are cached. - // The upload button should be disabled when there are no events to upload. - onUploadLogsButtonAt(position = 4).check(matches(not(isEnabled()))) + // The upload button should be disabled when there are no events to upload. + onUploadLogsButtonAt(position = 4).check(matches(not(isEnabled()))) + } } @Test fun testFragment_multipleEventsPending_noConnection_uploadLogsButtonDisabled() { profileTestHelper.addMoreProfiles(numProfiles = 1) - initializeActivityAndAddFragment() - disconnectNetwork() // Ensure events are cached. + runWithLaunchedActivityAndAddedFragment { + disconnectNetwork() // Ensure events are cached. - logAnalyticsEvent(profileId = null) - logAnalyticsEvent(profileId = ADMIN_PROFILE_ID) - logAnalyticsEvent(profileId = LEARNER_PROFILE_ID_0) + logAnalyticsEvent(profileId = null) + logAnalyticsEvent(profileId = ADMIN_PROFILE_ID) + logAnalyticsEvent(profileId = LEARNER_PROFILE_ID_0) - // The button is still disabled since there's no internet connection. - onUploadLogsButtonAt(position = 4).check(matches(not(isEnabled()))) + // The button is still disabled since there's no internet connection. + onUploadLogsButtonAt(position = 4).check(matches(not(isEnabled()))) + } } @Test fun testFragment_multipleEventsPending_uploadLogsButtonEnabled() { profileTestHelper.addMoreProfiles(numProfiles = 1) - initializeActivityAndAddFragment() - disconnectNetwork() // Ensure events are cached. + runWithLaunchedActivityAndAddedFragment { + disconnectNetwork() // Ensure events are cached. - logAnalyticsEvent(profileId = null) - logAnalyticsEvent(profileId = ADMIN_PROFILE_ID) - logAnalyticsEvent(profileId = LEARNER_PROFILE_ID_0) - connectNetwork() - logAnalyticsEvent(profileId = null) // Log an event to trigger tracking the network change. + logAnalyticsEvent(profileId = null) + logAnalyticsEvent(profileId = ADMIN_PROFILE_ID) + logAnalyticsEvent(profileId = LEARNER_PROFILE_ID_0) + connectNetwork() + logAnalyticsEvent(profileId = null) // Log an event to trigger tracking the network change. - // With events pending & connectivity, the upload button should now be available to press. - onUploadLogsButtonAt(position = 4).check(matches(isEnabled())) + // With events pending & connectivity, the upload button should now be available to press. + onUploadLogsButtonAt(position = 4).check(matches(isEnabled())) + } } @Test fun testFragment_multipleEventsPending_clickUploadLogs_wait_uploadsEventLogs() { profileTestHelper.addMoreProfiles(numProfiles = 1) - initializeActivityAndAddFragment() - disconnectNetwork() // Ensure events are cached. - logAnalyticsEvent(profileId = null) - logAnalyticsEvent(profileId = ADMIN_PROFILE_ID) - logAnalyticsEvent(profileId = LEARNER_PROFILE_ID_0) - connectNetwork() - logAnalyticsEvent(profileId = null) // Log an event to trigger tracking the network change. - fakeAnalyticsEventLogger.clearAllEvents() - - // Click the 'upload logs' button and wait. - onUploadLogsButtonAt(position = 4).perform(click()) - testCoroutineDispatchers.runCurrent() - - // The events should be uploaded. - assertThat(fakeAnalyticsEventLogger.getEventListCount()).isEqualTo(3) + runWithLaunchedActivityAndAddedFragment { + disconnectNetwork() // Ensure events are cached. + logAnalyticsEvent(profileId = null) + logAnalyticsEvent(profileId = ADMIN_PROFILE_ID) + logAnalyticsEvent(profileId = LEARNER_PROFILE_ID_0) + connectNetwork() + logAnalyticsEvent(profileId = null) // Log an event to trigger tracking the network change. + fakeAnalyticsEventLogger.clearAllEvents() + + // Click the 'upload logs' button and wait. + onUploadLogsButtonAt(position = 4).perform(click()) + testCoroutineDispatchers.runCurrent() + + // The events should be uploaded. + assertThat(fakeAnalyticsEventLogger.getEventListCount()).isEqualTo(3) + } } - private fun initializeActivityAndAddFragment() { - activityRule.scenario.onActivity { activity -> - activity.setContentView(R.layout.test_activity) - - activity.supportFragmentManager.beginTransaction() - .add(R.id.test_fragment_placeholder, ProfileAndDeviceIdFragment()) - .commitNow() + private fun runWithLaunchedActivityAndAddedFragment( + testBlock: ActivityScenario.() -> Unit + ) { + ActivityScenario.launch(TestActivity.createIntent(context)).use { scenario -> + scenario.onActivity { activity -> + activity.setContentView(R.layout.test_activity) + + activity.supportFragmentManager.beginTransaction() + .add(R.id.test_fragment_placeholder, ProfileAndDeviceIdFragment()) + .commitNow() + } + connectNetwork() // Start with internet connectivity. + testCoroutineDispatchers.runCurrent() + scenario.testBlock() } - connectNetwork() // Start with internet connectivity. - testCoroutineDispatchers.runCurrent() } private fun scrollTo(position: Int) { @@ -943,7 +1015,7 @@ class ProfileAndDeviceIdFragmentTest { private fun logAnalyticsEvent(profileId: ProfileId? = null) { learnerAnalyticsLogger.logAppInForeground( - installationId = "test_install_id", profileId, learnerId = "test_learner_id" + installationId = TEST_INSTALLATION_ID, profileId, learnerId = TEST_LEARNER_ID ) testCoroutineDispatchers.runCurrent() } @@ -984,6 +1056,48 @@ class ProfileAndDeviceIdFragmentTest { disconnectNetwork() } + private fun String.computeSha1Hash(): String { + return machineLocale.run { + MessageDigest.getInstance("SHA-1") + .digest(this@computeSha1Hash.toByteArray()) + .joinToString("") { "%02x".formatForMachines(it) } + } + } + + private fun decodeEventLogString(encodedEventLogs: String): OppiaEventLogs { + return GZIPInputStream(Base64.getDecoder().decode(encodedEventLogs).inputStream()).use { inps -> + OppiaEventLogs.newBuilder().mergeFrom(inps).build() + } + } + + private fun EventLogSubject.hasCommonProperties() { + hasNoLanguageInformation() + hasTimestampThat().isEqualTo(0) + isEssentialPriority() + hasAppInForegroundContextThat().hasDefaultIds() + } + + private fun EventLogSubject.hasCommonPropsWithNoProfileId() { + hasCommonProperties() + hasNoProfileId() + } + + private fun EventLogSubject.hasCommonPropsWithProfile(profileId: ProfileId) { + hasCommonProperties() + hasProfileIdThat().isEqualTo(profileId) + } + + private fun EventLogSubject.hasNoLanguageInformation() { + hasAppLanguageSelectionThat().isEqualToDefaultInstance() + hasWrittenTranslationLanguageSelectionThat().isEqualToDefaultInstance() + hasAudioTranslationLanguageSelectionThat().isEqualToDefaultInstance() + } + + private fun LearnerDetailsContextSubject.hasDefaultIds() { + hasLearnerIdThat().isEqualTo(TEST_LEARNER_ID) + hasInstallationIdThat().isEqualTo(TEST_INSTALLATION_ID) + } + private fun setUpTestApplicationComponent() { ApplicationProvider.getApplicationContext().inject(this) } @@ -1028,7 +1142,8 @@ class ProfileAndDeviceIdFragmentTest { MathEquationInputModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, CpuPerformanceSnapshotterModule::class, - ApplicationLifecycleModule::class, ExplorationProgressModule::class + ApplicationLifecycleModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { @@ -1058,6 +1173,8 @@ class ProfileAndDeviceIdFragmentTest { private companion object { private const val DEFAULT_APPLICATION_ID = 123456789L + private const val TEST_LEARNER_ID = "test_learner_id" + private const val TEST_INSTALLATION_ID = "test_install_id" private val ADMIN_PROFILE_ID = createProfileId(internalProfileId = 0) private val LEARNER_PROFILE_ID_0 = createProfileId(internalProfileId = 1) diff --git a/app/src/sharedTest/java/org/oppia/android/app/completedstorylist/CompletedStoryListActivityTest.kt b/app/src/sharedTest/java/org/oppia/android/app/completedstorylist/CompletedStoryListActivityTest.kt index f12311e7c86..60c1d8e03c9 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/completedstorylist/CompletedStoryListActivityTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/completedstorylist/CompletedStoryListActivityTest.kt @@ -85,6 +85,7 @@ import org.oppia.android.domain.topic.PrimeTopicAssetsControllerModule import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.OppiaTestRule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.story.StoryProgressTestHelper @@ -530,7 +531,8 @@ class CompletedStoryListActivityTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/customview/LessonThumbnailImageViewTest.kt b/app/src/sharedTest/java/org/oppia/android/app/customview/LessonThumbnailImageViewTest.kt index cd902d72732..7eb357dd46a 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/customview/LessonThumbnailImageViewTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/customview/LessonThumbnailImageViewTest.kt @@ -66,6 +66,7 @@ import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.OppiaTestRule import org.oppia.android.testing.TestImageLoaderModule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestDispatcherModule @@ -178,7 +179,8 @@ class LessonThumbnailImageViewTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/customview/interaction/MathExpressionInteractionsViewTest.kt b/app/src/sharedTest/java/org/oppia/android/app/customview/interaction/MathExpressionInteractionsViewTest.kt index 8c53754b19a..2b8ea2dc02d 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/customview/interaction/MathExpressionInteractionsViewTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/customview/interaction/MathExpressionInteractionsViewTest.kt @@ -80,6 +80,7 @@ import org.oppia.android.domain.topic.PrimeTopicAssetsControllerModule import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.TestLogReportingModule import org.oppia.android.testing.espresso.EditTextInputAction +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.junit.OppiaParameterizedTestRunner import org.oppia.android.testing.junit.OppiaParameterizedTestRunner.Iteration @@ -1780,7 +1781,8 @@ class MathExpressionInteractionsViewTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/databinding/AppCompatCheckBoxBindingAdaptersTest.kt b/app/src/sharedTest/java/org/oppia/android/app/databinding/AppCompatCheckBoxBindingAdaptersTest.kt index 9fcf2bd1e47..ade4a20211d 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/databinding/AppCompatCheckBoxBindingAdaptersTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/databinding/AppCompatCheckBoxBindingAdaptersTest.kt @@ -67,6 +67,7 @@ import org.oppia.android.domain.topic.PrimeTopicAssetsControllerModule import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.TestImageLoaderModule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestDispatcherModule @@ -169,7 +170,8 @@ class AppCompatCheckBoxBindingAdaptersTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) diff --git a/app/src/sharedTest/java/org/oppia/android/app/databinding/CircularProgressIndicatorAdaptersTest.kt b/app/src/sharedTest/java/org/oppia/android/app/databinding/CircularProgressIndicatorAdaptersTest.kt index 48cd0f921ac..426294f59cf 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/databinding/CircularProgressIndicatorAdaptersTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/databinding/CircularProgressIndicatorAdaptersTest.kt @@ -71,6 +71,7 @@ import org.oppia.android.testing.RunOn import org.oppia.android.testing.TestImageLoaderModule import org.oppia.android.testing.TestLogReportingModule import org.oppia.android.testing.TestPlatform +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestCoroutineDispatchers @@ -300,7 +301,8 @@ class CircularProgressIndicatorAdaptersTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/databinding/DrawableBindingAdaptersTest.kt b/app/src/sharedTest/java/org/oppia/android/app/databinding/DrawableBindingAdaptersTest.kt index e996e8aebee..9817db99f6a 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/databinding/DrawableBindingAdaptersTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/databinding/DrawableBindingAdaptersTest.kt @@ -71,6 +71,7 @@ import org.oppia.android.domain.topic.PrimeTopicAssetsControllerModule import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.TestImageLoaderModule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestDispatcherModule @@ -189,7 +190,8 @@ class DrawableBindingAdaptersTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/databinding/ImageViewBindingAdaptersTest.kt b/app/src/sharedTest/java/org/oppia/android/app/databinding/ImageViewBindingAdaptersTest.kt index 464c7939a6f..d5690443bad 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/databinding/ImageViewBindingAdaptersTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/databinding/ImageViewBindingAdaptersTest.kt @@ -76,6 +76,7 @@ import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.OppiaTestRule import org.oppia.android.testing.TestImageLoaderModule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestDispatcherModule @@ -231,7 +232,8 @@ class ImageViewBindingAdaptersTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) /** Create a TestApplicationComponent. */ diff --git a/app/src/sharedTest/java/org/oppia/android/app/databinding/MarginBindingAdaptersTest.kt b/app/src/sharedTest/java/org/oppia/android/app/databinding/MarginBindingAdaptersTest.kt index 5b7202c4d9b..b720fc78a5d 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/databinding/MarginBindingAdaptersTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/databinding/MarginBindingAdaptersTest.kt @@ -80,6 +80,7 @@ import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.OppiaTestRule import org.oppia.android.testing.TestImageLoaderModule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestCoroutineDispatchers @@ -352,7 +353,8 @@ class MarginBindingAdaptersTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) /** Create a TestApplicationComponent. */ diff --git a/app/src/sharedTest/java/org/oppia/android/app/databinding/StateAssemblerMarginBindingAdaptersTest.kt b/app/src/sharedTest/java/org/oppia/android/app/databinding/StateAssemblerMarginBindingAdaptersTest.kt index 32edc11fdd6..0e7f32257a7 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/databinding/StateAssemblerMarginBindingAdaptersTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/databinding/StateAssemblerMarginBindingAdaptersTest.kt @@ -79,6 +79,7 @@ import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.OppiaTestRule import org.oppia.android.testing.TestImageLoaderModule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestDispatcherModule @@ -507,7 +508,8 @@ class StateAssemblerMarginBindingAdaptersTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) /** Create a TestApplicationComponent. */ diff --git a/app/src/sharedTest/java/org/oppia/android/app/databinding/StateAssemblerPaddingBindingAdaptersTest.kt b/app/src/sharedTest/java/org/oppia/android/app/databinding/StateAssemblerPaddingBindingAdaptersTest.kt index 201fc1fdd6f..104b314ef64 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/databinding/StateAssemblerPaddingBindingAdaptersTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/databinding/StateAssemblerPaddingBindingAdaptersTest.kt @@ -77,6 +77,7 @@ import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.OppiaTestRule import org.oppia.android.testing.TestImageLoaderModule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestDispatcherModule @@ -505,7 +506,8 @@ class StateAssemblerPaddingBindingAdaptersTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) diff --git a/app/src/sharedTest/java/org/oppia/android/app/databinding/TextViewBindingAdaptersTest.kt b/app/src/sharedTest/java/org/oppia/android/app/databinding/TextViewBindingAdaptersTest.kt index 4b0c22416c3..235498e6ef2 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/databinding/TextViewBindingAdaptersTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/databinding/TextViewBindingAdaptersTest.kt @@ -69,6 +69,7 @@ import org.oppia.android.domain.topic.PrimeTopicAssetsControllerModule import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.TestImageLoaderModule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestDispatcherModule @@ -338,7 +339,8 @@ class TextViewBindingAdaptersTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/databinding/ViewBindingAdaptersTest.kt b/app/src/sharedTest/java/org/oppia/android/app/databinding/ViewBindingAdaptersTest.kt index d45c83ec1a6..716820377d4 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/databinding/ViewBindingAdaptersTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/databinding/ViewBindingAdaptersTest.kt @@ -74,6 +74,7 @@ import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.OppiaTestRule import org.oppia.android.testing.TestImageLoaderModule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestDispatcherModule @@ -239,7 +240,8 @@ class ViewBindingAdaptersTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) /** Create a TestApplicationComponent. */ diff --git a/app/src/sharedTest/java/org/oppia/android/app/devoptions/DeveloperOptionsActivityTest.kt b/app/src/sharedTest/java/org/oppia/android/app/devoptions/DeveloperOptionsActivityTest.kt index d50f6dfa630..e2c0034aad8 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/devoptions/DeveloperOptionsActivityTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/devoptions/DeveloperOptionsActivityTest.kt @@ -92,6 +92,7 @@ import org.oppia.android.domain.topic.PrimeTopicAssetsControllerModule import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.OppiaTestRule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestCoroutineDispatchers @@ -341,7 +342,8 @@ class DeveloperOptionsActivityTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/devoptions/DeveloperOptionsFragmentTest.kt b/app/src/sharedTest/java/org/oppia/android/app/devoptions/DeveloperOptionsFragmentTest.kt index e0340041713..e20e3828a89 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/devoptions/DeveloperOptionsFragmentTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/devoptions/DeveloperOptionsFragmentTest.kt @@ -88,6 +88,7 @@ import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.OppiaTestRule import org.oppia.android.testing.TestLogReportingModule import org.oppia.android.testing.assertThrows +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestCoroutineDispatchers @@ -417,7 +418,7 @@ class DeveloperOptionsFragmentTest { createDeveloperOptionsTestActivityIntent(internalProfileId) ).use { testCoroutineDispatchers.runCurrent() - val exception = assertThrows(RuntimeException::class) { + val exception = assertThrows() { scrollToPosition(position = 2) onView(withId(R.id.force_crash_text_view)).perform(click()) } @@ -432,7 +433,7 @@ class DeveloperOptionsFragmentTest { ).use { testCoroutineDispatchers.runCurrent() onView(isRoot()).perform(orientationLandscape()) - val exception = assertThrows(RuntimeException::class) { + val exception = assertThrows() { scrollToPosition(position = 2) onView(withId(R.id.force_crash_text_view)).perform(click()) } @@ -662,7 +663,8 @@ class DeveloperOptionsFragmentTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/devoptions/MarkChaptersCompletedActivityTest.kt b/app/src/sharedTest/java/org/oppia/android/app/devoptions/MarkChaptersCompletedActivityTest.kt index e1513f5a954..0c666f19607 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/devoptions/MarkChaptersCompletedActivityTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/devoptions/MarkChaptersCompletedActivityTest.kt @@ -78,6 +78,7 @@ import org.oppia.android.domain.topic.PrimeTopicAssetsControllerModule import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.OppiaTestRule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestCoroutineDispatchers @@ -272,7 +273,8 @@ class MarkChaptersCompletedActivityTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/devoptions/MarkChaptersCompletedFragmentTest.kt b/app/src/sharedTest/java/org/oppia/android/app/devoptions/MarkChaptersCompletedFragmentTest.kt index 0fbc8a68ada..af03c3a086e 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/devoptions/MarkChaptersCompletedFragmentTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/devoptions/MarkChaptersCompletedFragmentTest.kt @@ -84,6 +84,7 @@ import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.OppiaTestRule import org.oppia.android.testing.TestLogReportingModule import org.oppia.android.testing.data.DataProviderTestMonitor +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.story.StoryProgressTestHelper @@ -1023,7 +1024,8 @@ class MarkChaptersCompletedFragmentTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/devoptions/MarkStoriesCompletedActivityTest.kt b/app/src/sharedTest/java/org/oppia/android/app/devoptions/MarkStoriesCompletedActivityTest.kt index 132b2656fdf..e36a5e93b11 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/devoptions/MarkStoriesCompletedActivityTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/devoptions/MarkStoriesCompletedActivityTest.kt @@ -69,6 +69,7 @@ import org.oppia.android.domain.topic.PrimeTopicAssetsControllerModule import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.OppiaTestRule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestDispatcherModule @@ -203,7 +204,8 @@ class MarkStoriesCompletedActivityTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/devoptions/MarkStoriesCompletedFragmentTest.kt b/app/src/sharedTest/java/org/oppia/android/app/devoptions/MarkStoriesCompletedFragmentTest.kt index c02e5e07704..489691717d9 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/devoptions/MarkStoriesCompletedFragmentTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/devoptions/MarkStoriesCompletedFragmentTest.kt @@ -78,6 +78,7 @@ import org.oppia.android.domain.topic.PrimeTopicAssetsControllerModule import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.OppiaTestRule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.story.StoryProgressTestHelper @@ -570,7 +571,8 @@ class MarkStoriesCompletedFragmentTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/devoptions/MarkTopicsCompletedActivityTest.kt b/app/src/sharedTest/java/org/oppia/android/app/devoptions/MarkTopicsCompletedActivityTest.kt index 33e3259e66b..5e9cfb3fdc4 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/devoptions/MarkTopicsCompletedActivityTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/devoptions/MarkTopicsCompletedActivityTest.kt @@ -69,6 +69,7 @@ import org.oppia.android.domain.topic.PrimeTopicAssetsControllerModule import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.OppiaTestRule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestDispatcherModule @@ -203,7 +204,8 @@ class MarkTopicsCompletedActivityTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/devoptions/MarkTopicsCompletedFragmentTest.kt b/app/src/sharedTest/java/org/oppia/android/app/devoptions/MarkTopicsCompletedFragmentTest.kt index 8360185d707..47e4e0c33a0 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/devoptions/MarkTopicsCompletedFragmentTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/devoptions/MarkTopicsCompletedFragmentTest.kt @@ -78,6 +78,7 @@ import org.oppia.android.domain.topic.PrimeTopicAssetsControllerModule import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.OppiaTestRule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.story.StoryProgressTestHelper @@ -551,7 +552,8 @@ class MarkTopicsCompletedFragmentTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/devoptions/ViewEventLogsActivityTest.kt b/app/src/sharedTest/java/org/oppia/android/app/devoptions/ViewEventLogsActivityTest.kt index d350653c5d8..a3a48b24828 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/devoptions/ViewEventLogsActivityTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/devoptions/ViewEventLogsActivityTest.kt @@ -69,6 +69,7 @@ import org.oppia.android.domain.question.QuestionModule import org.oppia.android.domain.topic.PrimeTopicAssetsControllerModule import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.OppiaTestRule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestDispatcherModule @@ -194,7 +195,8 @@ class ViewEventLogsActivityTest { PerformanceMetricsAssessorModule::class, PerformanceMetricsConfigurationsModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, CpuPerformanceSnapshotterModule::class, - ExplorationProgressModule::class + ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/devoptions/ViewEventLogsFragmentTest.kt b/app/src/sharedTest/java/org/oppia/android/app/devoptions/ViewEventLogsFragmentTest.kt index 40ed8ae48fb..c42f916f8fa 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/devoptions/ViewEventLogsFragmentTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/devoptions/ViewEventLogsFragmentTest.kt @@ -16,7 +16,10 @@ import androidx.test.espresso.matcher.ViewMatchers.withId import androidx.test.espresso.matcher.ViewMatchers.withText import androidx.test.ext.junit.runners.AndroidJUnit4 import com.google.firebase.FirebaseApp +import com.google.firebase.crashlytics.FirebaseCrashlytics import dagger.Component +import dagger.Module +import dagger.Provides import org.junit.After import org.junit.Before import org.junit.Rule @@ -33,6 +36,8 @@ import org.oppia.android.app.application.ApplicationModule import org.oppia.android.app.application.ApplicationStartupListenerModule import org.oppia.android.app.application.testing.TestingBuildFlavorModule import org.oppia.android.app.devoptions.vieweventlogs.testing.ViewEventLogsTestActivity +import org.oppia.android.app.model.EventLog +import org.oppia.android.app.model.ProfileId import org.oppia.android.app.player.state.itemviewmodel.SplitScreenInteractionModule import org.oppia.android.app.recyclerview.RecyclerViewMatcher.Companion.atPositionOnView import org.oppia.android.app.recyclerview.RecyclerViewMatcher.Companion.hasItemCount @@ -60,9 +65,12 @@ import org.oppia.android.domain.exploration.ExplorationStorageModule import org.oppia.android.domain.hintsandsolution.HintsAndSolutionConfigModule import org.oppia.android.domain.hintsandsolution.HintsAndSolutionProdModule import org.oppia.android.domain.onboarding.ExpirationMetaDataRetrieverModule -import org.oppia.android.domain.oppialogger.LogStorageModule +import org.oppia.android.domain.oppialogger.EventLogStorageCacheSize +import org.oppia.android.domain.oppialogger.ExceptionLogStorageCacheSize +import org.oppia.android.domain.oppialogger.FirestoreLogStorageCacheSize import org.oppia.android.domain.oppialogger.LoggingIdentifierModule import org.oppia.android.domain.oppialogger.OppiaLogger +import org.oppia.android.domain.oppialogger.PerformanceMetricsLogStorageCacheSize import org.oppia.android.domain.oppialogger.analytics.AnalyticsController import org.oppia.android.domain.oppialogger.analytics.ApplicationLifecycleModule import org.oppia.android.domain.oppialogger.analytics.CpuPerformanceSnapshotterModule @@ -73,7 +81,9 @@ import org.oppia.android.domain.platformparameter.PlatformParameterSingletonModu import org.oppia.android.domain.question.QuestionModule import org.oppia.android.domain.topic.PrimeTopicAssetsControllerModule import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule +import org.oppia.android.testing.FakeFirestoreInstanceWrapperImpl import org.oppia.android.testing.OppiaTestRule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestCoroutineDispatchers @@ -85,13 +95,21 @@ import org.oppia.android.util.caching.AssetModule import org.oppia.android.util.caching.testing.CachingTestModule import org.oppia.android.util.gcsresource.GcsResourceModule import org.oppia.android.util.locale.LocaleProdModule +import org.oppia.android.util.logging.AnalyticsEventLogger import org.oppia.android.util.logging.EventLoggingConfigurationModule +import org.oppia.android.util.logging.ExceptionLogger import org.oppia.android.util.logging.LoggerModule import org.oppia.android.util.logging.SyncStatusModule -import org.oppia.android.util.logging.firebase.DebugLogReportingModule +import org.oppia.android.util.logging.firebase.DebugAnalyticsEventLogger +import org.oppia.android.util.logging.firebase.DebugFirestoreEventLoggerImpl +import org.oppia.android.util.logging.firebase.FirebaseAnalyticsEventLogger +import org.oppia.android.util.logging.firebase.FirebaseExceptionLogger import org.oppia.android.util.logging.firebase.FirebaseLogUploaderModule +import org.oppia.android.util.logging.firebase.FirestoreEventLogger +import org.oppia.android.util.logging.firebase.FirestoreInstanceWrapper import org.oppia.android.util.logging.performancemetrics.PerformanceMetricsAssessorModule import org.oppia.android.util.logging.performancemetrics.PerformanceMetricsConfigurationsModule +import org.oppia.android.util.logging.performancemetrics.PerformanceMetricsEventLogger import org.oppia.android.util.networking.NetworkConnectionDebugUtilModule import org.oppia.android.util.networking.NetworkConnectionUtilDebugModule import org.oppia.android.util.parser.html.HtmlParserEntityTypeModule @@ -117,20 +135,28 @@ private const val TEST_SUB_TOPIC_ID = 1 class ViewEventLogsFragmentTest { @get:Rule val initializeDefaultLocaleRule = InitializeDefaultLocaleRule() + @get:Rule val oppiaTestRule = OppiaTestRule() @Inject lateinit var testCoroutineDispatchers: TestCoroutineDispatchers + @Inject lateinit var context: Context + @Inject lateinit var oppiaLogger: OppiaLogger + @Inject lateinit var analyticsController: AnalyticsController + @Inject lateinit var fakeOppiaClock: FakeOppiaClock + @Inject + lateinit var firestoreEventLogger: FirestoreEventLogger + @Before fun setUp() { setUpTestApplicationComponent() @@ -173,7 +199,7 @@ class ViewEventLogsFragmentTest { launch(ViewEventLogsTestActivity::class.java).use { testCoroutineDispatchers.runCurrent() onView(withId(R.id.view_event_logs_recycler_view)) - .check(hasItemCount(count = 5)) + .check(hasItemCount(count = 6)) } } @@ -183,7 +209,7 @@ class ViewEventLogsFragmentTest { testCoroutineDispatchers.runCurrent() onView(isRoot()).perform(orientationLandscape()) onView(withId(R.id.view_event_logs_recycler_view)) - .check(hasItemCount(count = 5)) + .check(hasItemCount(count = 6)) } } @@ -194,30 +220,36 @@ class ViewEventLogsFragmentTest { scrollToPosition(position = 0) verifyTextOnEventLogItemViewAtPosition( position = 0, - stringToMatch = "Open Revision Card", + stringToMatch = "Optional Response", targetViewId = R.id.view_event_logs_context_text_view ) scrollToPosition(position = 1) verifyTextOnEventLogItemViewAtPosition( position = 1, - stringToMatch = "Open Story Activity", + stringToMatch = "Open Revision Card", targetViewId = R.id.view_event_logs_context_text_view ) scrollToPosition(position = 2) verifyTextOnEventLogItemViewAtPosition( position = 2, - stringToMatch = "Open Lessons Tab", + stringToMatch = "Open Story Activity", targetViewId = R.id.view_event_logs_context_text_view ) scrollToPosition(position = 3) verifyTextOnEventLogItemViewAtPosition( position = 3, - stringToMatch = "Open Home", + stringToMatch = "Open Lessons Tab", targetViewId = R.id.view_event_logs_context_text_view ) scrollToPosition(position = 4) verifyTextOnEventLogItemViewAtPosition( position = 4, + stringToMatch = "Open Home", + targetViewId = R.id.view_event_logs_context_text_view + ) + scrollToPosition(position = 5) + verifyTextOnEventLogItemViewAtPosition( + position = 5, stringToMatch = "Open Profile Chooser", targetViewId = R.id.view_event_logs_context_text_view ) @@ -232,30 +264,36 @@ class ViewEventLogsFragmentTest { scrollToPosition(position = 0) verifyTextOnEventLogItemViewAtPosition( position = 0, - stringToMatch = "Open Revision Card", + stringToMatch = "Optional Response", targetViewId = R.id.view_event_logs_context_text_view ) scrollToPosition(position = 1) verifyTextOnEventLogItemViewAtPosition( position = 1, - stringToMatch = "Open Story Activity", + stringToMatch = "Open Revision Card", targetViewId = R.id.view_event_logs_context_text_view ) scrollToPosition(position = 2) verifyTextOnEventLogItemViewAtPosition( position = 2, - stringToMatch = "Open Lessons Tab", + stringToMatch = "Open Story Activity", targetViewId = R.id.view_event_logs_context_text_view ) scrollToPosition(position = 3) verifyTextOnEventLogItemViewAtPosition( position = 3, - stringToMatch = "Open Home", + stringToMatch = "Open Lessons Tab", targetViewId = R.id.view_event_logs_context_text_view ) scrollToPosition(position = 4) verifyTextOnEventLogItemViewAtPosition( position = 4, + stringToMatch = "Open Home", + targetViewId = R.id.view_event_logs_context_text_view + ) + scrollToPosition(position = 5) + verifyTextOnEventLogItemViewAtPosition( + position = 5, stringToMatch = "Open Profile Chooser", targetViewId = R.id.view_event_logs_context_text_view ) @@ -273,7 +311,7 @@ class ViewEventLogsFragmentTest { ) verifyTextOnEventLogItemViewAtPosition( position = 0, - stringToMatch = "Open Revision Card", + stringToMatch = "Optional Response", targetViewId = R.id.view_event_logs_context_text_view ) scrollToPosition(position = 1) @@ -283,7 +321,7 @@ class ViewEventLogsFragmentTest { ) verifyTextOnEventLogItemViewAtPosition( position = 1, - stringToMatch = "Open Story Activity", + stringToMatch = "Open Revision Card", targetViewId = R.id.view_event_logs_context_text_view ) scrollToPosition(position = 2) @@ -293,6 +331,16 @@ class ViewEventLogsFragmentTest { ) verifyTextOnEventLogItemViewAtPosition( position = 2, + stringToMatch = "Open Story Activity", + targetViewId = R.id.view_event_logs_context_text_view + ) + scrollToPosition(position = 3) + verifyItemDisplayedOnEventLogItemViewAtPosition( + position = 3, + targetViewId = R.id.view_event_logs_context_text_view + ) + verifyTextOnEventLogItemViewAtPosition( + position = 3, stringToMatch = "Open Lessons Tab", targetViewId = R.id.view_event_logs_context_text_view ) @@ -311,7 +359,7 @@ class ViewEventLogsFragmentTest { ) verifyTextOnEventLogItemViewAtPosition( position = 0, - stringToMatch = "Open Revision Card", + stringToMatch = "Optional Response", targetViewId = R.id.view_event_logs_context_text_view ) scrollToPosition(position = 1) @@ -321,7 +369,7 @@ class ViewEventLogsFragmentTest { ) verifyTextOnEventLogItemViewAtPosition( position = 1, - stringToMatch = "Open Story Activity", + stringToMatch = "Open Revision Card", targetViewId = R.id.view_event_logs_context_text_view ) scrollToPosition(position = 2) @@ -331,6 +379,16 @@ class ViewEventLogsFragmentTest { ) verifyTextOnEventLogItemViewAtPosition( position = 2, + stringToMatch = "Open Story Activity", + targetViewId = R.id.view_event_logs_context_text_view + ) + scrollToPosition(position = 3) + verifyItemDisplayedOnEventLogItemViewAtPosition( + position = 3, + targetViewId = R.id.view_event_logs_context_text_view + ) + verifyTextOnEventLogItemViewAtPosition( + position = 3, stringToMatch = "Open Lessons Tab", targetViewId = R.id.view_event_logs_context_text_view ) @@ -344,30 +402,36 @@ class ViewEventLogsFragmentTest { scrollToPosition(position = 0) verifyTextOnEventLogItemViewAtPosition( position = 0, - stringToMatch = scenario.convertTimeStampToDateAndTime(TEST_TIMESTAMP + 40000), + stringToMatch = scenario.convertTimeStampToDateAndTime(TEST_TIMESTAMP + 50000), targetViewId = R.id.view_event_logs_time_text_view ) scrollToPosition(position = 1) verifyTextOnEventLogItemViewAtPosition( position = 1, - stringToMatch = scenario.convertTimeStampToDateAndTime(TEST_TIMESTAMP + 30000), + stringToMatch = scenario.convertTimeStampToDateAndTime(TEST_TIMESTAMP + 40000), targetViewId = R.id.view_event_logs_time_text_view ) scrollToPosition(position = 2) verifyTextOnEventLogItemViewAtPosition( position = 2, - stringToMatch = scenario.convertTimeStampToDateAndTime(TEST_TIMESTAMP + 20000), + stringToMatch = scenario.convertTimeStampToDateAndTime(TEST_TIMESTAMP + 30000), targetViewId = R.id.view_event_logs_time_text_view ) scrollToPosition(position = 3) verifyTextOnEventLogItemViewAtPosition( position = 3, - stringToMatch = scenario.convertTimeStampToDateAndTime(TEST_TIMESTAMP + 10000), + stringToMatch = scenario.convertTimeStampToDateAndTime(TEST_TIMESTAMP + 20000), targetViewId = R.id.view_event_logs_time_text_view ) scrollToPosition(position = 4) verifyTextOnEventLogItemViewAtPosition( position = 4, + stringToMatch = scenario.convertTimeStampToDateAndTime(TEST_TIMESTAMP + 10000), + targetViewId = R.id.view_event_logs_time_text_view + ) + scrollToPosition(position = 5) + verifyTextOnEventLogItemViewAtPosition( + position = 5, stringToMatch = scenario.convertTimeStampToDateAndTime(TEST_TIMESTAMP), targetViewId = R.id.view_event_logs_time_text_view ) @@ -382,30 +446,36 @@ class ViewEventLogsFragmentTest { scrollToPosition(position = 0) verifyTextOnEventLogItemViewAtPosition( position = 0, - stringToMatch = scenario.convertTimeStampToDateAndTime(TEST_TIMESTAMP + 40000), + stringToMatch = scenario.convertTimeStampToDateAndTime(TEST_TIMESTAMP + 50000), targetViewId = R.id.view_event_logs_time_text_view ) scrollToPosition(position = 1) verifyTextOnEventLogItemViewAtPosition( position = 1, - stringToMatch = scenario.convertTimeStampToDateAndTime(TEST_TIMESTAMP + 30000), + stringToMatch = scenario.convertTimeStampToDateAndTime(TEST_TIMESTAMP + 40000), targetViewId = R.id.view_event_logs_time_text_view ) scrollToPosition(position = 2) verifyTextOnEventLogItemViewAtPosition( position = 2, - stringToMatch = scenario.convertTimeStampToDateAndTime(TEST_TIMESTAMP + 20000), + stringToMatch = scenario.convertTimeStampToDateAndTime(TEST_TIMESTAMP + 30000), targetViewId = R.id.view_event_logs_time_text_view ) scrollToPosition(position = 3) verifyTextOnEventLogItemViewAtPosition( position = 3, - stringToMatch = scenario.convertTimeStampToDateAndTime(TEST_TIMESTAMP + 10000), + stringToMatch = scenario.convertTimeStampToDateAndTime(TEST_TIMESTAMP + 20000), targetViewId = R.id.view_event_logs_time_text_view ) scrollToPosition(position = 4) verifyTextOnEventLogItemViewAtPosition( position = 4, + stringToMatch = scenario.convertTimeStampToDateAndTime(TEST_TIMESTAMP + 10000), + targetViewId = R.id.view_event_logs_time_text_view + ) + scrollToPosition(position = 5) + verifyTextOnEventLogItemViewAtPosition( + position = 5, stringToMatch = scenario.convertTimeStampToDateAndTime(TEST_TIMESTAMP), targetViewId = R.id.view_event_logs_time_text_view ) @@ -446,6 +516,12 @@ class ViewEventLogsFragmentTest { stringToMatch = "Essential", targetViewId = R.id.view_event_logs_priority_text_view ) + scrollToPosition(position = 5) + verifyTextOnEventLogItemViewAtPosition( + position = 5, + stringToMatch = "Essential", + targetViewId = R.id.view_event_logs_priority_text_view + ) } } @@ -484,6 +560,12 @@ class ViewEventLogsFragmentTest { stringToMatch = "Essential", targetViewId = R.id.view_event_logs_priority_text_view ) + scrollToPosition(position = 5) + verifyTextOnEventLogItemViewAtPosition( + position = 5, + stringToMatch = "Essential", + targetViewId = R.id.view_event_logs_priority_text_view + ) } } @@ -515,6 +597,39 @@ class ViewEventLogsFragmentTest { analyticsController.logImportantEvent( oppiaLogger.createOpenRevisionCardContext(TEST_TOPIC_ID, TEST_SUB_TOPIC_ID), profileId = null ) + + val eventLog = EventLog.newBuilder() + .setContext( + createOptionalSurveyResponseContext( + "survey_id", + profileId = null, + answer = "some response" + ) + ) + .setPriority(EventLog.Priority.ESSENTIAL) + .setTimestamp(TEST_TIMESTAMP + 50000) + .build() + + firestoreEventLogger.uploadEvent(eventLog) + } + + private fun createOptionalSurveyResponseContext( + surveyId: String, + profileId: ProfileId?, + answer: String + ): EventLog.Context { + return EventLog.Context.newBuilder() + .setOptionalResponse( + EventLog.OptionalSurveyResponseContext.newBuilder() + .setFeedbackAnswer(answer) + .setSurveyDetails( + EventLog.SurveyResponseContext.newBuilder() + .setProfileId(profileId?.internalId.toString()) + .setSurveyId(surveyId) + .build() + ) + ) + .build() } private fun verifyTextOnEventLogItemViewAtPosition( @@ -563,6 +678,56 @@ class ViewEventLogsFragmentTest { ) } + @Module + class TestLogStorageModule { + @Provides + @EventLogStorageCacheSize + fun provideEventLogStorageCacheSize(): Int = 2 + + @Provides + @ExceptionLogStorageCacheSize + fun provideExceptionLogStorageCacheSize(): Int = 2 + + @Provides + @PerformanceMetricsLogStorageCacheSize + fun providePerformanceMetricsLogStorageCacheSize(): Int = 2 + + @Provides + @FirestoreLogStorageCacheSize + fun provideFirestoreLogStorageCacheSize(): Int = 2 + } + + @Module + class TestLogReportingModule { + @Provides + @Singleton + fun provideExceptionLogger(): ExceptionLogger = + FirebaseExceptionLogger(FirebaseCrashlytics.getInstance()) + + @Provides + @Singleton + fun provideDebugEventLogger(debugAnalyticsEventLogger: DebugAnalyticsEventLogger): + AnalyticsEventLogger = debugAnalyticsEventLogger + + @Provides + @Singleton + fun providePerformanceMetricsEventLogger( + factory: FirebaseAnalyticsEventLogger.Factory + ): PerformanceMetricsEventLogger = + factory.createPerformanceMetricEventLogger() + + @Provides + @Singleton + fun provideDebugFirestoreEventLogger( + debugFirestoreEventLogger: DebugFirestoreEventLoggerImpl + ): FirestoreEventLogger = debugFirestoreEventLogger + + @Provides + @Singleton + fun provideFirebaseFirestoreInstanceWrapper(wrapperImpl: FakeFirestoreInstanceWrapperImpl): + FirestoreInstanceWrapper = wrapperImpl + } + // TODO(#59): Figure out a way to reuse modules instead of needing to re-declare them. @Singleton @Component( @@ -574,8 +739,8 @@ class ViewEventLogsFragmentTest { NumberWithUnitsRuleModule::class, NumericInputRuleModule::class, TextInputRuleModule::class, DragDropSortInputModule::class, ImageClickInputModule::class, InteractionsModule::class, GcsResourceModule::class, GlideImageLoaderModule::class, ImageParsingModule::class, - HtmlParserEntityTypeModule::class, QuestionModule::class, DebugLogReportingModule::class, - AccessibilityTestModule::class, LogStorageModule::class, CachingTestModule::class, + HtmlParserEntityTypeModule::class, QuestionModule::class, TestLogReportingModule::class, + AccessibilityTestModule::class, TestLogStorageModule::class, CachingTestModule::class, PrimeTopicAssetsControllerModule::class, ExpirationMetaDataRetrieverModule::class, ViewBindingShimModule::class, RatioInputModule::class, WorkManagerConfigurationModule::class, ApplicationStartupListenerModule::class, LogReportWorkerModule::class, @@ -592,7 +757,8 @@ class ViewEventLogsFragmentTest { MetricLogSchedulerModule::class, PerformanceMetricsAssessorModule::class, PerformanceMetricsConfigurationsModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class, ] ) diff --git a/app/src/sharedTest/java/org/oppia/android/app/devoptions/forcenetworktype/ForceNetworkTypeActivityTest.kt b/app/src/sharedTest/java/org/oppia/android/app/devoptions/forcenetworktype/ForceNetworkTypeActivityTest.kt index 3c5918d0f81..c163e91f5e0 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/devoptions/forcenetworktype/ForceNetworkTypeActivityTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/devoptions/forcenetworktype/ForceNetworkTypeActivityTest.kt @@ -70,6 +70,7 @@ import org.oppia.android.domain.topic.PrimeTopicAssetsControllerModule import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.OppiaTestRule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestDispatcherModule @@ -194,7 +195,8 @@ class ForceNetworkTypeActivityTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) /** [ApplicationComponent] for [ForceNetworkTypeActivityTest]. */ diff --git a/app/src/sharedTest/java/org/oppia/android/app/devoptions/forcenetworktype/ForceNetworkTypeFragmentTest.kt b/app/src/sharedTest/java/org/oppia/android/app/devoptions/forcenetworktype/ForceNetworkTypeFragmentTest.kt index 3c3548dd3d6..596ce0b7623 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/devoptions/forcenetworktype/ForceNetworkTypeFragmentTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/devoptions/forcenetworktype/ForceNetworkTypeFragmentTest.kt @@ -74,6 +74,7 @@ import org.oppia.android.domain.topic.PrimeTopicAssetsControllerModule import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.OppiaTestRule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestCoroutineDispatchers @@ -401,7 +402,8 @@ class ForceNetworkTypeFragmentTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) /** [ApplicationComponent] for [ForceNetworkTypeFragmentTest]. */ diff --git a/app/src/sharedTest/java/org/oppia/android/app/devoptions/mathexpressionparser/MathExpressionParserActivityTest.kt b/app/src/sharedTest/java/org/oppia/android/app/devoptions/mathexpressionparser/MathExpressionParserActivityTest.kt index 5bb2ba6db0c..c8c71821bc8 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/devoptions/mathexpressionparser/MathExpressionParserActivityTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/devoptions/mathexpressionparser/MathExpressionParserActivityTest.kt @@ -66,6 +66,7 @@ import org.oppia.android.domain.question.QuestionModule import org.oppia.android.domain.topic.PrimeTopicAssetsControllerModule import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestCoroutineDispatchers @@ -179,7 +180,8 @@ class MathExpressionParserActivityTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/devoptions/mathexpressionparser/MathExpressionParserFragmentTest.kt b/app/src/sharedTest/java/org/oppia/android/app/devoptions/mathexpressionparser/MathExpressionParserFragmentTest.kt index 036dfde42b4..b5d32fa77ee 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/devoptions/mathexpressionparser/MathExpressionParserFragmentTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/devoptions/mathexpressionparser/MathExpressionParserFragmentTest.kt @@ -77,6 +77,7 @@ import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.TestImageLoaderModule import org.oppia.android.testing.TestLogReportingModule import org.oppia.android.testing.espresso.EditTextInputAction +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestCoroutineDispatchers @@ -1419,7 +1420,8 @@ class MathExpressionParserFragmentTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/faq/FAQListFragmentTest.kt b/app/src/sharedTest/java/org/oppia/android/app/faq/FAQListFragmentTest.kt index b32169576f9..48da829d39e 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/faq/FAQListFragmentTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/faq/FAQListFragmentTest.kt @@ -80,6 +80,7 @@ import org.oppia.android.domain.topic.PrimeTopicAssetsControllerModule import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.OppiaTestRule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestDispatcherModule @@ -253,7 +254,8 @@ class FAQListFragmentTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/faq/FAQSingleActivityTest.kt b/app/src/sharedTest/java/org/oppia/android/app/faq/FAQSingleActivityTest.kt index e343041c2fe..9bfd477a36b 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/faq/FAQSingleActivityTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/faq/FAQSingleActivityTest.kt @@ -76,6 +76,7 @@ import org.oppia.android.domain.topic.PrimeTopicAssetsControllerModule import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.OppiaTestRule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestDispatcherModule @@ -240,7 +241,8 @@ class FAQSingleActivityTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/faq/FaqListActivityTest.kt b/app/src/sharedTest/java/org/oppia/android/app/faq/FaqListActivityTest.kt index 1f9086d1c4d..9b25a1320d4 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/faq/FaqListActivityTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/faq/FaqListActivityTest.kt @@ -64,6 +64,7 @@ import org.oppia.android.domain.topic.PrimeTopicAssetsControllerModule import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.OppiaTestRule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestDispatcherModule @@ -167,7 +168,8 @@ class FaqListActivityTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/help/HelpActivityTest.kt b/app/src/sharedTest/java/org/oppia/android/app/help/HelpActivityTest.kt index d4da5be6dc7..f48c81b20ee 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/help/HelpActivityTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/help/HelpActivityTest.kt @@ -63,6 +63,7 @@ import org.oppia.android.domain.topic.PrimeTopicAssetsControllerModule import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.OppiaTestRule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestDispatcherModule @@ -86,7 +87,6 @@ import org.robolectric.annotation.Config import org.robolectric.annotation.LooperMode import javax.inject.Inject import javax.inject.Singleton - /** Tests for [HelpActivity]. */ @RunWith(AndroidJUnit4::class) @LooperMode(LooperMode.Mode.PAUSED) @@ -169,7 +169,8 @@ class HelpActivityTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/help/HelpFragmentTest.kt b/app/src/sharedTest/java/org/oppia/android/app/help/HelpFragmentTest.kt index 7730b85edf8..74fbc2f0e70 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/help/HelpFragmentTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/help/HelpFragmentTest.kt @@ -95,6 +95,7 @@ import org.oppia.android.testing.OppiaTestRule import org.oppia.android.testing.RunOn import org.oppia.android.testing.TestLogReportingModule import org.oppia.android.testing.TestPlatform +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestCoroutineDispatchers @@ -1448,7 +1449,8 @@ class HelpFragmentTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/home/HomeActivityTest.kt b/app/src/sharedTest/java/org/oppia/android/app/home/HomeActivityTest.kt index 8e7bf121487..0a4238a194c 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/home/HomeActivityTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/home/HomeActivityTest.kt @@ -124,6 +124,7 @@ import org.oppia.android.testing.RunOn import org.oppia.android.testing.TestLogReportingModule import org.oppia.android.testing.TestPlatform import org.oppia.android.testing.data.DataProviderTestMonitor +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.DefineAppLanguageLocaleContext import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.platformparameter.TestPlatformParameterModule @@ -1332,8 +1333,9 @@ class HomeActivityTest { } } + @Config(qualifiers = "+port") @Test - fun testHomeActivity_allTopicsCompleted_displaysAllTopicCards() { + fun testHomeActivity_allTopicsCompleted_mobilePortrait_displaysAllTopicCardsIn2Columns() { fakeOppiaClock.setFakeTimeMode(FakeOppiaClock.FakeTimeMode.MODE_UPTIME_MILLIS) storyProgressTestHelper.markAllTopicsAsCompleted( profileId = profileId, @@ -1343,11 +1345,55 @@ class HomeActivityTest { launch(createHomeActivityIntent(internalProfileId)).use { testCoroutineDispatchers.runCurrent() scrollToPosition(position = 3) - if (context.resources.getBoolean(R.bool.isTablet)) { - verifyHomeRecyclerViewHasGridColumnCount(columnCount = 3) - } else { - verifyHomeRecyclerViewHasGridColumnCount(columnCount = 2) - } + verifyHomeRecyclerViewHasGridColumnCount(columnCount = 2) + } + } + + @Config(qualifiers = "+land") + @Test + fun testHomeActivity_allTopicsCompleted_mobileLandscape_displaysAllTopicCardsIn3Columns() { + fakeOppiaClock.setFakeTimeMode(FakeOppiaClock.FakeTimeMode.MODE_UPTIME_MILLIS) + storyProgressTestHelper.markAllTopicsAsCompleted( + profileId = profileId, + timestampOlderThanOneWeek = false + ) + logIntoAdminTwice() + launch(createHomeActivityIntent(internalProfileId)).use { + testCoroutineDispatchers.runCurrent() + scrollToPosition(position = 3) + verifyHomeRecyclerViewHasGridColumnCount(columnCount = 3) + } + } + + @Config(qualifiers = "+sw600dp-port") + @Test + fun testHomeActivity_allTopicsCompleted_tabletPortrait_displaysAllTopicCardsIn3Columns() { + fakeOppiaClock.setFakeTimeMode(FakeOppiaClock.FakeTimeMode.MODE_UPTIME_MILLIS) + storyProgressTestHelper.markAllTopicsAsCompleted( + profileId = profileId, + timestampOlderThanOneWeek = false + ) + logIntoAdminTwice() + launch(createHomeActivityIntent(internalProfileId)).use { + testCoroutineDispatchers.runCurrent() + scrollToPosition(position = 3) + verifyHomeRecyclerViewHasGridColumnCount(columnCount = 3) + } + } + + @Config(qualifiers = "+sw600dp-land") + @Test + fun testHomeActivity_allTopicsCompleted_tabletLandscape_displaysAllTopicCardsIn4Columns() { + fakeOppiaClock.setFakeTimeMode(FakeOppiaClock.FakeTimeMode.MODE_UPTIME_MILLIS) + storyProgressTestHelper.markAllTopicsAsCompleted( + profileId = profileId, + timestampOlderThanOneWeek = false + ) + logIntoAdminTwice() + launch(createHomeActivityIntent(internalProfileId)).use { + testCoroutineDispatchers.runCurrent() + scrollToPosition(position = 3) + verifyHomeRecyclerViewHasGridColumnCount(columnCount = 4) } } @@ -2000,7 +2046,8 @@ class HomeActivityTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/home/RecentlyPlayedFragmentTest.kt b/app/src/sharedTest/java/org/oppia/android/app/home/RecentlyPlayedFragmentTest.kt index 91a5071439b..e03c49a7ca7 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/home/RecentlyPlayedFragmentTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/home/RecentlyPlayedFragmentTest.kt @@ -110,6 +110,7 @@ import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.OppiaTestRule import org.oppia.android.testing.TestImageLoaderModule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.lightweightcheckpointing.ExplorationCheckpointTestHelper import org.oppia.android.testing.lightweightcheckpointing.FRACTIONS_STORY_0_EXPLORATION_0_CURRENT_VERSION @@ -1500,7 +1501,8 @@ class RecentlyPlayedFragmentTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/home/TopicSummaryViewModelTest.kt b/app/src/sharedTest/java/org/oppia/android/app/home/TopicSummaryViewModelTest.kt index 97198f4f58c..19d874cc4a9 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/home/TopicSummaryViewModelTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/home/TopicSummaryViewModelTest.kt @@ -67,6 +67,7 @@ import org.oppia.android.domain.translation.TranslationController import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.OppiaTestRule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestDispatcherModule @@ -390,7 +391,8 @@ class TopicSummaryViewModelTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/home/WelcomeViewModelTest.kt b/app/src/sharedTest/java/org/oppia/android/app/home/WelcomeViewModelTest.kt index 74ca4cbf4ff..59ec6348510 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/home/WelcomeViewModelTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/home/WelcomeViewModelTest.kt @@ -64,6 +64,7 @@ import org.oppia.android.domain.topic.PrimeTopicAssetsControllerModule import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.OppiaTestRule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestDispatcherModule @@ -363,7 +364,8 @@ class WelcomeViewModelTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/home/promotedlist/PromotedStoryListViewModelTest.kt b/app/src/sharedTest/java/org/oppia/android/app/home/promotedlist/PromotedStoryListViewModelTest.kt index 55b960353a7..5fd5a452779 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/home/promotedlist/PromotedStoryListViewModelTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/home/promotedlist/PromotedStoryListViewModelTest.kt @@ -67,6 +67,7 @@ import org.oppia.android.domain.translation.TranslationController import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.OppiaTestRule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestDispatcherModule @@ -376,7 +377,8 @@ class PromotedStoryListViewModelTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/home/promotedlist/PromotedStoryViewModelTest.kt b/app/src/sharedTest/java/org/oppia/android/app/home/promotedlist/PromotedStoryViewModelTest.kt index 6e96d63a095..0ac61cb1caa 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/home/promotedlist/PromotedStoryViewModelTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/home/promotedlist/PromotedStoryViewModelTest.kt @@ -65,6 +65,7 @@ import org.oppia.android.domain.translation.TranslationController import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.OppiaTestRule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestDispatcherModule @@ -402,7 +403,8 @@ class PromotedStoryViewModelTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/mydownloads/MyDownloadsActivityTest.kt b/app/src/sharedTest/java/org/oppia/android/app/mydownloads/MyDownloadsActivityTest.kt index 11b4b912b73..ff6d31f06d7 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/mydownloads/MyDownloadsActivityTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/mydownloads/MyDownloadsActivityTest.kt @@ -62,6 +62,7 @@ import org.oppia.android.domain.topic.PrimeTopicAssetsControllerModule import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.OppiaTestRule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestDispatcherModule @@ -160,7 +161,8 @@ class MyDownloadsActivityTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/mydownloads/MyDownloadsFragmentTest.kt b/app/src/sharedTest/java/org/oppia/android/app/mydownloads/MyDownloadsFragmentTest.kt index 3e1ce04a34f..447b3d33ed1 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/mydownloads/MyDownloadsFragmentTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/mydownloads/MyDownloadsFragmentTest.kt @@ -72,6 +72,7 @@ import org.oppia.android.domain.topic.PrimeTopicAssetsControllerModule import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.OppiaTestRule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestDispatcherModule @@ -239,7 +240,8 @@ class MyDownloadsFragmentTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/notice/BUILD.bazel b/app/src/sharedTest/java/org/oppia/android/app/notice/BUILD.bazel index d0733552b3b..8a43be43344 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/notice/BUILD.bazel +++ b/app/src/sharedTest/java/org/oppia/android/app/notice/BUILD.bazel @@ -103,6 +103,7 @@ app_test( "//third_party:robolectric_android-all", "//utility/src/main/java/org/oppia/android/util/accessibility:test_module", "//utility/src/main/java/org/oppia/android/util/caching/testing:caching_test_module", + "//utility/src/main/java/org/oppia/android/util/extensions:context_extensions", "//utility/src/main/java/org/oppia/android/util/logging:standard_event_logging_configuration_module", "//utility/src/main/java/org/oppia/android/util/networking:debug_module", ], @@ -131,6 +132,7 @@ app_test( "//third_party:robolectric_android-all", "//utility/src/main/java/org/oppia/android/util/accessibility:test_module", "//utility/src/main/java/org/oppia/android/util/caching/testing:caching_test_module", + "//utility/src/main/java/org/oppia/android/util/extensions:context_extensions", "//utility/src/main/java/org/oppia/android/util/logging:standard_event_logging_configuration_module", "//utility/src/main/java/org/oppia/android/util/networking:debug_module", ], @@ -159,6 +161,7 @@ app_test( "//third_party:robolectric_android-all", "//utility/src/main/java/org/oppia/android/util/accessibility:test_module", "//utility/src/main/java/org/oppia/android/util/caching/testing:caching_test_module", + "//utility/src/main/java/org/oppia/android/util/extensions:context_extensions", "//utility/src/main/java/org/oppia/android/util/logging:standard_event_logging_configuration_module", "//utility/src/main/java/org/oppia/android/util/networking:debug_module", ], diff --git a/app/src/sharedTest/java/org/oppia/android/app/notice/BetaNoticeDialogFragmentTest.kt b/app/src/sharedTest/java/org/oppia/android/app/notice/BetaNoticeDialogFragmentTest.kt index 9ab0a7a8159..423822f8d19 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/notice/BetaNoticeDialogFragmentTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/notice/BetaNoticeDialogFragmentTest.kt @@ -76,6 +76,7 @@ import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.OppiaTestRule import org.oppia.android.testing.TestImageLoaderModule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestCoroutineDispatchers @@ -250,7 +251,8 @@ class BetaNoticeDialogFragmentTest { ApplicationLifecycleModule::class, SyncStatusModule::class, TestingBuildFlavorModule::class, CachingTestModule::class, MetricLogSchedulerModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/notice/ForcedAppDeprecationNoticeDialogFragmentTest.kt b/app/src/sharedTest/java/org/oppia/android/app/notice/ForcedAppDeprecationNoticeDialogFragmentTest.kt index d0b1aa4fc7e..af3c7d48a5f 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/notice/ForcedAppDeprecationNoticeDialogFragmentTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/notice/ForcedAppDeprecationNoticeDialogFragmentTest.kt @@ -39,7 +39,6 @@ import org.oppia.android.app.devoptions.DeveloperOptionsStarterModule import org.oppia.android.app.notice.testing.ForcedAppDeprecationNoticeDialogFragmentTestActivity import org.oppia.android.app.player.state.itemviewmodel.SplitScreenInteractionModule import org.oppia.android.app.shim.ViewBindingShimModule -import org.oppia.android.app.splash.DeprecationNoticeActionType import org.oppia.android.app.translation.testing.ActivityRecreatorTestModule import org.oppia.android.data.backends.gae.NetworkConfigProdModule import org.oppia.android.data.backends.gae.NetworkModule @@ -76,6 +75,7 @@ import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.OppiaTestRule import org.oppia.android.testing.TestImageLoaderModule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestCoroutineDispatchers @@ -164,7 +164,7 @@ class ForcedAppDeprecationNoticeDialogFragmentTest { clickOnDialogView(withText(R.string.forced_app_update_dialog_update_button_text)) verify(mockDeprecationNoticeActionListener) - .onActionButtonClicked(DeprecationNoticeActionType.UPDATE) + .onActionButtonClicked(DeprecationNoticeActionResponse.Update) } } @@ -182,7 +182,7 @@ class ForcedAppDeprecationNoticeDialogFragmentTest { clickOnDialogView(withText(R.string.forced_app_update_dialog_close_button_text)) verify(mockDeprecationNoticeActionListener) - .onActionButtonClicked(DeprecationNoticeActionType.CLOSE) + .onActionButtonClicked(DeprecationNoticeActionResponse.Close) } } @@ -240,7 +240,8 @@ class ForcedAppDeprecationNoticeDialogFragmentTest { ApplicationLifecycleModule::class, SyncStatusModule::class, TestingBuildFlavorModule::class, CachingTestModule::class, MetricLogSchedulerModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) diff --git a/app/src/sharedTest/java/org/oppia/android/app/notice/GeneralAvailabilityUpgradeNoticeDialogFragmentTest.kt b/app/src/sharedTest/java/org/oppia/android/app/notice/GeneralAvailabilityUpgradeNoticeDialogFragmentTest.kt index d44a2e47d6a..171e62cd76c 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/notice/GeneralAvailabilityUpgradeNoticeDialogFragmentTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/notice/GeneralAvailabilityUpgradeNoticeDialogFragmentTest.kt @@ -76,6 +76,7 @@ import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.OppiaTestRule import org.oppia.android.testing.TestImageLoaderModule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestCoroutineDispatchers @@ -257,7 +258,8 @@ class GeneralAvailabilityUpgradeNoticeDialogFragmentTest { ApplicationLifecycleModule::class, SyncStatusModule::class, TestingBuildFlavorModule::class, CachingTestModule::class, MetricLogSchedulerModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/notice/OptionalAppDeprecationNoticeDialogFragmentTest.kt b/app/src/sharedTest/java/org/oppia/android/app/notice/OptionalAppDeprecationNoticeDialogFragmentTest.kt index c9545e4e324..723ba24ae55 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/notice/OptionalAppDeprecationNoticeDialogFragmentTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/notice/OptionalAppDeprecationNoticeDialogFragmentTest.kt @@ -36,10 +36,10 @@ import org.oppia.android.app.application.ApplicationStartupListenerModule import org.oppia.android.app.application.testing.TestingBuildFlavorModule import org.oppia.android.app.devoptions.DeveloperOptionsModule import org.oppia.android.app.devoptions.DeveloperOptionsStarterModule +import org.oppia.android.app.model.DeprecationNoticeType import org.oppia.android.app.notice.testing.OptionalAppDeprecationNoticeDialogFragmentTestActivity import org.oppia.android.app.player.state.itemviewmodel.SplitScreenInteractionModule import org.oppia.android.app.shim.ViewBindingShimModule -import org.oppia.android.app.splash.DeprecationNoticeActionType import org.oppia.android.app.translation.testing.ActivityRecreatorTestModule import org.oppia.android.data.backends.gae.NetworkConfigProdModule import org.oppia.android.data.backends.gae.NetworkModule @@ -76,6 +76,7 @@ import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.OppiaTestRule import org.oppia.android.testing.TestImageLoaderModule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestCoroutineDispatchers @@ -84,6 +85,7 @@ import org.oppia.android.testing.time.FakeOppiaClockModule import org.oppia.android.util.accessibility.AccessibilityTestModule import org.oppia.android.util.caching.AssetModule import org.oppia.android.util.caching.testing.CachingTestModule +import org.oppia.android.util.extensions.getVersionCode import org.oppia.android.util.gcsresource.GcsResourceModule import org.oppia.android.util.locale.LocaleProdModule import org.oppia.android.util.logging.EventLoggingConfigurationModule @@ -165,7 +167,7 @@ class OptionalAppDeprecationNoticeDialogFragmentTest { clickOnDialogView(withText(R.string.optional_app_update_dialog_update_button_text)) verify(mockDeprecationNoticeActionListener) - .onActionButtonClicked(DeprecationNoticeActionType.UPDATE) + .onActionButtonClicked(DeprecationNoticeActionResponse.Update) } } @@ -183,7 +185,12 @@ class OptionalAppDeprecationNoticeDialogFragmentTest { clickOnDialogView(withText(R.string.optional_app_update_dialog_dismiss_button_text)) verify(mockDeprecationNoticeActionListener) - .onActionButtonClicked(DeprecationNoticeActionType.DISMISS) + .onActionButtonClicked( + DeprecationNoticeActionResponse.Dismiss( + deprecationNoticeType = DeprecationNoticeType.APP_DEPRECATION, + deprecatedVersion = context.getVersionCode() + ) as DeprecationNoticeActionResponse + ) } } @@ -242,7 +249,8 @@ class OptionalAppDeprecationNoticeDialogFragmentTest { ApplicationLifecycleModule::class, SyncStatusModule::class, TestingBuildFlavorModule::class, CachingTestModule::class, MetricLogSchedulerModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) diff --git a/app/src/sharedTest/java/org/oppia/android/app/notice/OsDeprecationNoticeDialogFragmentTest.kt b/app/src/sharedTest/java/org/oppia/android/app/notice/OsDeprecationNoticeDialogFragmentTest.kt index becd031ecdb..16eda2a2b4b 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/notice/OsDeprecationNoticeDialogFragmentTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/notice/OsDeprecationNoticeDialogFragmentTest.kt @@ -36,10 +36,10 @@ import org.oppia.android.app.application.ApplicationStartupListenerModule import org.oppia.android.app.application.testing.TestingBuildFlavorModule import org.oppia.android.app.devoptions.DeveloperOptionsModule import org.oppia.android.app.devoptions.DeveloperOptionsStarterModule +import org.oppia.android.app.model.DeprecationNoticeType import org.oppia.android.app.notice.testing.OsDeprecationNoticeDialogFragmentTestActivity import org.oppia.android.app.player.state.itemviewmodel.SplitScreenInteractionModule import org.oppia.android.app.shim.ViewBindingShimModule -import org.oppia.android.app.splash.DeprecationNoticeActionType import org.oppia.android.app.translation.testing.ActivityRecreatorTestModule import org.oppia.android.data.backends.gae.NetworkConfigProdModule import org.oppia.android.data.backends.gae.NetworkModule @@ -76,6 +76,7 @@ import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.OppiaTestRule import org.oppia.android.testing.TestImageLoaderModule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestCoroutineDispatchers @@ -115,7 +116,8 @@ class OsDeprecationNoticeDialogFragmentTest { @get:Rule val oppiaTestRule = OppiaTestRule() - @field:[Rule JvmField] val mockitoRule: MockitoRule = MockitoJUnit.rule() + @field:[Rule JvmField] + val mockitoRule: MockitoRule = MockitoJUnit.rule() @Inject lateinit var testCoroutineDispatchers: TestCoroutineDispatchers @@ -165,7 +167,12 @@ class OsDeprecationNoticeDialogFragmentTest { clickOnDialogView(withText(R.string.os_deprecation_dialog_dismiss_button_text)) verify(mockDeprecationNoticeActionListener) - .onActionButtonClicked(DeprecationNoticeActionType.DISMISS) + .onActionButtonClicked( + DeprecationNoticeActionResponse.Dismiss( + deprecationNoticeType = DeprecationNoticeType.OS_DEPRECATION, + deprecatedVersion = 19, + ) + ) } } @@ -224,7 +231,8 @@ class OsDeprecationNoticeDialogFragmentTest { ApplicationLifecycleModule::class, SyncStatusModule::class, TestingBuildFlavorModule::class, CachingTestModule::class, MetricLogSchedulerModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) diff --git a/app/src/sharedTest/java/org/oppia/android/app/onboarding/OnboardingActivityTest.kt b/app/src/sharedTest/java/org/oppia/android/app/onboarding/OnboardingActivityTest.kt index 101fbc9d757..10a388f6f4a 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/onboarding/OnboardingActivityTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/onboarding/OnboardingActivityTest.kt @@ -63,6 +63,7 @@ import org.oppia.android.domain.topic.PrimeTopicAssetsControllerModule import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.OppiaTestRule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestDispatcherModule @@ -86,7 +87,6 @@ import org.robolectric.annotation.Config import org.robolectric.annotation.LooperMode import javax.inject.Inject import javax.inject.Singleton - /** Tests for [OnboardingActivity]. */ @RunWith(AndroidJUnit4::class) @LooperMode(LooperMode.Mode.PAUSED) @@ -166,7 +166,8 @@ class OnboardingActivityTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/onboarding/OnboardingFragmentTest.kt b/app/src/sharedTest/java/org/oppia/android/app/onboarding/OnboardingFragmentTest.kt index 53de66687fb..43dc8c7cef0 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/onboarding/OnboardingFragmentTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/onboarding/OnboardingFragmentTest.kt @@ -89,6 +89,7 @@ import org.oppia.android.domain.topic.PrimeTopicAssetsControllerModule import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.OppiaTestRule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.platformparameter.TestPlatformParameterModule import org.oppia.android.testing.robolectric.RobolectricModule @@ -720,7 +721,8 @@ class OnboardingFragmentTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/ongoingtopiclist/OngoingTopicListActivityTest.kt b/app/src/sharedTest/java/org/oppia/android/app/ongoingtopiclist/OngoingTopicListActivityTest.kt index a8f96c78821..d19b037818d 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/ongoingtopiclist/OngoingTopicListActivityTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/ongoingtopiclist/OngoingTopicListActivityTest.kt @@ -83,6 +83,7 @@ import org.oppia.android.domain.topic.RATIOS_TOPIC_ID import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.OppiaTestRule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.story.StoryProgressTestHelper @@ -474,7 +475,8 @@ class OngoingTopicListActivityTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/options/AppLanguageActivityTest.kt b/app/src/sharedTest/java/org/oppia/android/app/options/AppLanguageActivityTest.kt index c54852c2bc3..3a2e401d0c5 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/options/AppLanguageActivityTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/options/AppLanguageActivityTest.kt @@ -64,6 +64,7 @@ import org.oppia.android.domain.topic.PrimeTopicAssetsControllerModule import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.OppiaTestRule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestDispatcherModule @@ -174,7 +175,8 @@ class AppLanguageActivityTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/options/AppLanguageFragmentTest.kt b/app/src/sharedTest/java/org/oppia/android/app/options/AppLanguageFragmentTest.kt index 6ec000c34d5..cdb12ba202c 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/options/AppLanguageFragmentTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/options/AppLanguageFragmentTest.kt @@ -77,6 +77,7 @@ import org.oppia.android.testing.OppiaTestRule import org.oppia.android.testing.RunOn import org.oppia.android.testing.TestLogReportingModule import org.oppia.android.testing.TestPlatform +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.profile.ProfileTestHelper import org.oppia.android.testing.robolectric.RobolectricModule @@ -322,7 +323,8 @@ class AppLanguageFragmentTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/options/AudioLanguageActivityTest.kt b/app/src/sharedTest/java/org/oppia/android/app/options/AudioLanguageActivityTest.kt index 463b847ca30..52be8c16782 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/options/AudioLanguageActivityTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/options/AudioLanguageActivityTest.kt @@ -64,6 +64,7 @@ import org.oppia.android.domain.topic.PrimeTopicAssetsControllerModule import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.OppiaTestRule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestDispatcherModule @@ -165,7 +166,8 @@ class AudioLanguageActivityTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/options/AudioLanguageFragmentTest.kt b/app/src/sharedTest/java/org/oppia/android/app/options/AudioLanguageFragmentTest.kt index 10071c24349..c7b5bfe0d86 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/options/AudioLanguageFragmentTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/options/AudioLanguageFragmentTest.kt @@ -75,6 +75,7 @@ import org.oppia.android.domain.topic.PrimeTopicAssetsControllerModule import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.OppiaTestRule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.profile.ProfileTestHelper import org.oppia.android.testing.robolectric.RobolectricModule @@ -314,7 +315,8 @@ class AudioLanguageFragmentTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/options/OptionsActivityTest.kt b/app/src/sharedTest/java/org/oppia/android/app/options/OptionsActivityTest.kt index b15d9d269d2..dd9d85926e2 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/options/OptionsActivityTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/options/OptionsActivityTest.kt @@ -63,6 +63,7 @@ import org.oppia.android.domain.topic.PrimeTopicAssetsControllerModule import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.OppiaTestRule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestDispatcherModule @@ -168,7 +169,8 @@ class OptionsActivityTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/options/OptionsFragmentTest.kt b/app/src/sharedTest/java/org/oppia/android/app/options/OptionsFragmentTest.kt index a96f83b18fd..8788ead2ab6 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/options/OptionsFragmentTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/options/OptionsFragmentTest.kt @@ -92,6 +92,7 @@ import org.oppia.android.testing.OppiaTestRule import org.oppia.android.testing.RunOn import org.oppia.android.testing.TestLogReportingModule import org.oppia.android.testing.TestPlatform +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.platformparameter.TestPlatformParameterModule import org.oppia.android.testing.profile.ProfileTestHelper @@ -644,7 +645,8 @@ class OptionsFragmentTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/options/ReadingTextSizeActivityTest.kt b/app/src/sharedTest/java/org/oppia/android/app/options/ReadingTextSizeActivityTest.kt index ac5a0cc08be..ee07540d885 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/options/ReadingTextSizeActivityTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/options/ReadingTextSizeActivityTest.kt @@ -63,6 +63,7 @@ import org.oppia.android.domain.topic.PrimeTopicAssetsControllerModule import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.OppiaTestRule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestDispatcherModule @@ -165,7 +166,8 @@ class ReadingTextSizeActivityTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/options/ReadingTextSizeFragmentTest.kt b/app/src/sharedTest/java/org/oppia/android/app/options/ReadingTextSizeFragmentTest.kt index 10760da6b34..df07900e97a 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/options/ReadingTextSizeFragmentTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/options/ReadingTextSizeFragmentTest.kt @@ -78,6 +78,7 @@ import org.oppia.android.domain.topic.PrimeTopicAssetsControllerModule import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.OppiaTestRule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.profile.ProfileTestHelper import org.oppia.android.testing.robolectric.RobolectricModule @@ -317,7 +318,8 @@ class ReadingTextSizeFragmentTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/parser/HtmlParserTest.kt b/app/src/sharedTest/java/org/oppia/android/app/parser/HtmlParserTest.kt index b0e82b25dcd..571ba12ee85 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/parser/HtmlParserTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/parser/HtmlParserTest.kt @@ -105,6 +105,7 @@ import org.oppia.android.testing.RunOn import org.oppia.android.testing.TestImageLoaderModule import org.oppia.android.testing.TestLogReportingModule import org.oppia.android.testing.TestPlatform +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.DefineAppLanguageLocaleContext import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.mockito.capture @@ -913,7 +914,8 @@ class HtmlParserTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/player/audio/AudioFragmentTest.kt b/app/src/sharedTest/java/org/oppia/android/app/player/audio/AudioFragmentTest.kt index bf224018f5e..4f3fb329a19 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/player/audio/AudioFragmentTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/player/audio/AudioFragmentTest.kt @@ -89,6 +89,7 @@ import org.oppia.android.testing.OppiaTestRule import org.oppia.android.testing.RunOn import org.oppia.android.testing.TestLogReportingModule import org.oppia.android.testing.TestPlatform +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.profile.ProfileTestHelper import org.oppia.android.testing.robolectric.IsOnRobolectric @@ -482,7 +483,8 @@ class AudioFragmentTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/player/exploration/BottomSheetOptionsMenuTest.kt b/app/src/sharedTest/java/org/oppia/android/app/player/exploration/BottomSheetOptionsMenuTest.kt index 12668ac7d76..e378c5285bd 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/player/exploration/BottomSheetOptionsMenuTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/player/exploration/BottomSheetOptionsMenuTest.kt @@ -72,6 +72,7 @@ import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.OppiaTestRule import org.oppia.android.testing.TestImageLoaderModule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestCoroutineDispatchers @@ -193,7 +194,8 @@ class BottomSheetOptionsMenuTest { ApplicationLifecycleModule::class, SyncStatusModule::class, TestingBuildFlavorModule::class, CachingTestModule::class, MetricLogSchedulerModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/player/exploration/ExplorationActivityTest.kt b/app/src/sharedTest/java/org/oppia/android/app/player/exploration/ExplorationActivityTest.kt index 18acf05d0c9..800916c4391 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/player/exploration/ExplorationActivityTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/player/exploration/ExplorationActivityTest.kt @@ -134,6 +134,7 @@ import org.oppia.android.testing.TestLogReportingModule import org.oppia.android.testing.TestPlatform import org.oppia.android.testing.data.DataProviderTestMonitor import org.oppia.android.testing.espresso.EditTextInputAction +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.lightweightcheckpointing.ExplorationCheckpointTestHelper import org.oppia.android.testing.lightweightcheckpointing.FRACTIONS_STORY_0_EXPLORATION_1_CURRENT_VERSION @@ -2566,7 +2567,8 @@ class ExplorationActivityTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/player/state/StateFragmentTest.kt b/app/src/sharedTest/java/org/oppia/android/app/player/state/StateFragmentTest.kt index 2888906d8fd..f295bd9c3e5 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/player/state/StateFragmentTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/player/state/StateFragmentTest.kt @@ -157,6 +157,7 @@ import org.oppia.android.testing.TestPlatform import org.oppia.android.testing.data.DataProviderTestMonitor import org.oppia.android.testing.environment.TestEnvironmentConfig import org.oppia.android.testing.espresso.EditTextInputAction +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.lightweightcheckpointing.ExplorationCheckpointTestHelper import org.oppia.android.testing.logging.EventLogSubject.Companion.assertThat @@ -4962,7 +4963,8 @@ class StateFragmentTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/policies/PoliciesActivityTest.kt b/app/src/sharedTest/java/org/oppia/android/app/policies/PoliciesActivityTest.kt index a3c01568fb0..d8d95d2bab1 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/policies/PoliciesActivityTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/policies/PoliciesActivityTest.kt @@ -81,6 +81,7 @@ import org.oppia.android.domain.topic.PrimeTopicAssetsControllerModule import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.TestImageLoaderModule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestCoroutineDispatchers @@ -280,7 +281,8 @@ class PoliciesActivityTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/policies/PoliciesFragmentTest.kt b/app/src/sharedTest/java/org/oppia/android/app/policies/PoliciesFragmentTest.kt index a66658b3875..07790dc33d8 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/policies/PoliciesFragmentTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/policies/PoliciesFragmentTest.kt @@ -93,6 +93,7 @@ import org.oppia.android.domain.topic.PrimeTopicAssetsControllerModule import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.TestImageLoaderModule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestCoroutineDispatchers @@ -360,7 +361,8 @@ class PoliciesFragmentTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/profile/AddProfileActivityTest.kt b/app/src/sharedTest/java/org/oppia/android/app/profile/AddProfileActivityTest.kt index 6ead5d8438b..34dfb5f3b18 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/profile/AddProfileActivityTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/profile/AddProfileActivityTest.kt @@ -101,6 +101,7 @@ import org.oppia.android.testing.espresso.EditTextInputAction import org.oppia.android.testing.espresso.TextInputAction.Companion.hasErrorText import org.oppia.android.testing.espresso.TextInputAction.Companion.hasHelperText import org.oppia.android.testing.espresso.TextInputAction.Companion.hasNoErrorText +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.platformparameter.TestPlatformParameterModule import org.oppia.android.testing.profile.ProfileTestHelper @@ -1796,7 +1797,8 @@ class AddProfileActivityTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/profile/AdminAuthActivityTest.kt b/app/src/sharedTest/java/org/oppia/android/app/profile/AdminAuthActivityTest.kt index 87b7eaa2378..cfabe083384 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/profile/AdminAuthActivityTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/profile/AdminAuthActivityTest.kt @@ -85,6 +85,7 @@ import org.oppia.android.testing.OppiaTestRule import org.oppia.android.testing.TestLogReportingModule import org.oppia.android.testing.espresso.EditTextInputAction import org.oppia.android.testing.espresso.TextInputAction.Companion.hasErrorText +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestCoroutineDispatchers @@ -693,7 +694,8 @@ class AdminAuthActivityTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/profile/AdminPinActivityTest.kt b/app/src/sharedTest/java/org/oppia/android/app/profile/AdminPinActivityTest.kt index 96b1025a35e..b6fdce97344 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/profile/AdminPinActivityTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/profile/AdminPinActivityTest.kt @@ -95,6 +95,7 @@ import org.oppia.android.testing.TestLogReportingModule import org.oppia.android.testing.espresso.EditTextInputAction import org.oppia.android.testing.espresso.TextInputAction.Companion.hasErrorText import org.oppia.android.testing.espresso.TextInputAction.Companion.hasNoErrorText +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.profile.ProfileTestHelper import org.oppia.android.testing.robolectric.RobolectricModule @@ -1110,7 +1111,8 @@ class AdminPinActivityTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/profile/PinPasswordActivityTest.kt b/app/src/sharedTest/java/org/oppia/android/app/profile/PinPasswordActivityTest.kt index 16ce38b184e..90c78003600 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/profile/PinPasswordActivityTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/profile/PinPasswordActivityTest.kt @@ -91,6 +91,7 @@ import org.oppia.android.testing.TestLogReportingModule import org.oppia.android.testing.espresso.EditTextInputAction import org.oppia.android.testing.espresso.TextInputAction.Companion.hasErrorText import org.oppia.android.testing.espresso.TextInputAction.Companion.hasNoErrorText +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.profile.ProfileTestHelper import org.oppia.android.testing.robolectric.RobolectricModule @@ -1217,7 +1218,8 @@ class PinPasswordActivityTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/profile/ProfileChooserActivityTest.kt b/app/src/sharedTest/java/org/oppia/android/app/profile/ProfileChooserActivityTest.kt index 3b8e8cfe439..74d2f607988 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/profile/ProfileChooserActivityTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/profile/ProfileChooserActivityTest.kt @@ -63,6 +63,7 @@ import org.oppia.android.domain.topic.PrimeTopicAssetsControllerModule import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.OppiaTestRule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestCoroutineDispatchers @@ -164,7 +165,8 @@ class ProfileChooserActivityTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/profile/ProfileChooserFragmentTest.kt b/app/src/sharedTest/java/org/oppia/android/app/profile/ProfileChooserFragmentTest.kt index 8dbbf853b9b..5fff9c4006b 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/profile/ProfileChooserFragmentTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/profile/ProfileChooserFragmentTest.kt @@ -85,6 +85,7 @@ import org.oppia.android.domain.topic.PrimeTopicAssetsControllerModule import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.OppiaTestRule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.profile.ProfileTestHelper import org.oppia.android.testing.robolectric.RobolectricModule @@ -529,7 +530,8 @@ class ProfileChooserFragmentTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/profileprogress/ProfilePictureActivityTest.kt b/app/src/sharedTest/java/org/oppia/android/app/profileprogress/ProfilePictureActivityTest.kt index 5c870dc35dc..deb1c56251e 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/profileprogress/ProfilePictureActivityTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/profileprogress/ProfilePictureActivityTest.kt @@ -71,6 +71,7 @@ import org.oppia.android.domain.topic.PrimeTopicAssetsControllerModule import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.OppiaTestRule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.profile.ProfileTestHelper import org.oppia.android.testing.robolectric.RobolectricModule @@ -221,6 +222,7 @@ class ProfilePictureActivityTest { SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/profileprogress/ProfileProgressActivityTest.kt b/app/src/sharedTest/java/org/oppia/android/app/profileprogress/ProfileProgressActivityTest.kt index 0e16912ffb1..1cad2587804 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/profileprogress/ProfileProgressActivityTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/profileprogress/ProfileProgressActivityTest.kt @@ -63,6 +63,7 @@ import org.oppia.android.domain.topic.PrimeTopicAssetsControllerModule import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.OppiaTestRule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestDispatcherModule @@ -171,6 +172,7 @@ class ProfileProgressActivityTest { SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/profileprogress/ProfileProgressFragmentTest.kt b/app/src/sharedTest/java/org/oppia/android/app/profileprogress/ProfileProgressFragmentTest.kt index 9568acdecff..2f83eb95f5d 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/profileprogress/ProfileProgressFragmentTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/profileprogress/ProfileProgressFragmentTest.kt @@ -109,6 +109,7 @@ import org.oppia.android.domain.topic.PrimeTopicAssetsControllerModule import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.OppiaTestRule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.profile.ProfileTestHelper import org.oppia.android.testing.robolectric.RobolectricModule @@ -930,6 +931,7 @@ class ProfileProgressFragmentTest { SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/recyclerview/BindableAdapterTest.kt b/app/src/sharedTest/java/org/oppia/android/app/recyclerview/BindableAdapterTest.kt index 0882da3a400..c85a4d1c524 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/recyclerview/BindableAdapterTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/recyclerview/BindableAdapterTest.kt @@ -99,6 +99,7 @@ import org.oppia.android.domain.topic.PrimeTopicAssetsControllerModule import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.OppiaTestRule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestCoroutineDispatchers @@ -683,7 +684,8 @@ class BindableAdapterTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/resumelesson/ResumeLessonActivityTest.kt b/app/src/sharedTest/java/org/oppia/android/app/resumelesson/ResumeLessonActivityTest.kt index 11effa33a84..e1e8707c853 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/resumelesson/ResumeLessonActivityTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/resumelesson/ResumeLessonActivityTest.kt @@ -84,6 +84,7 @@ import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.OppiaTestRule import org.oppia.android.testing.TestImageLoaderModule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestCoroutineDispatchers @@ -240,7 +241,8 @@ class ResumeLessonActivityTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/resumelesson/ResumeLessonFragmentTest.kt b/app/src/sharedTest/java/org/oppia/android/app/resumelesson/ResumeLessonFragmentTest.kt index e837fba1cfa..cf138d0d1f3 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/resumelesson/ResumeLessonFragmentTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/resumelesson/ResumeLessonFragmentTest.kt @@ -86,6 +86,7 @@ import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.OppiaTestRule import org.oppia.android.testing.TestImageLoaderModule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestCoroutineDispatchers @@ -320,7 +321,8 @@ class ResumeLessonFragmentTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/settings/profile/ProfileEditActivityTest.kt b/app/src/sharedTest/java/org/oppia/android/app/settings/profile/ProfileEditActivityTest.kt index b06938a9be7..1b3a285f095 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/settings/profile/ProfileEditActivityTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/settings/profile/ProfileEditActivityTest.kt @@ -80,6 +80,7 @@ import org.oppia.android.domain.topic.PrimeTopicAssetsControllerModule import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.OppiaTestRule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.profile.ProfileTestHelper import org.oppia.android.testing.robolectric.RobolectricModule @@ -372,7 +373,8 @@ class ProfileEditActivityTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/settings/profile/ProfileEditFragmentTest.kt b/app/src/sharedTest/java/org/oppia/android/app/settings/profile/ProfileEditFragmentTest.kt index 5c28e75d5d9..72346233590 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/settings/profile/ProfileEditFragmentTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/settings/profile/ProfileEditFragmentTest.kt @@ -87,6 +87,7 @@ import org.oppia.android.testing.OppiaTestRule import org.oppia.android.testing.TestImageLoaderModule import org.oppia.android.testing.TestLogReportingModule import org.oppia.android.testing.data.DataProviderTestMonitor +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.platformparameter.TestPlatformParameterModule import org.oppia.android.testing.profile.ProfileTestHelper @@ -487,7 +488,8 @@ class ProfileEditFragmentTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) diff --git a/app/src/sharedTest/java/org/oppia/android/app/settings/profile/ProfileListActivityTest.kt b/app/src/sharedTest/java/org/oppia/android/app/settings/profile/ProfileListActivityTest.kt index 5ab0aa0d058..ec65e61024a 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/settings/profile/ProfileListActivityTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/settings/profile/ProfileListActivityTest.kt @@ -63,6 +63,7 @@ import org.oppia.android.domain.topic.PrimeTopicAssetsControllerModule import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.OppiaTestRule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestDispatcherModule @@ -166,7 +167,8 @@ class ProfileListActivityTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/settings/profile/ProfileListFragmentTest.kt b/app/src/sharedTest/java/org/oppia/android/app/settings/profile/ProfileListFragmentTest.kt index f57ca938ce6..d94a0d75a11 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/settings/profile/ProfileListFragmentTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/settings/profile/ProfileListFragmentTest.kt @@ -77,6 +77,7 @@ import org.oppia.android.domain.topic.PrimeTopicAssetsControllerModule import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.OppiaTestRule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.profile.ProfileTestHelper import org.oppia.android.testing.robolectric.RobolectricModule @@ -395,7 +396,8 @@ class ProfileListFragmentTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/settings/profile/ProfileRenameActivityTest.kt b/app/src/sharedTest/java/org/oppia/android/app/settings/profile/ProfileRenameActivityTest.kt index 32711f2c916..8aff6c18532 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/settings/profile/ProfileRenameActivityTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/settings/profile/ProfileRenameActivityTest.kt @@ -65,6 +65,7 @@ import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.OppiaTestRule import org.oppia.android.testing.TestLogReportingModule import org.oppia.android.testing.espresso.EditTextInputAction +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.profile.ProfileTestHelper import org.oppia.android.testing.robolectric.RobolectricModule @@ -192,7 +193,8 @@ class ProfileRenameActivityTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/settings/profile/ProfileRenameFragmentTest.kt b/app/src/sharedTest/java/org/oppia/android/app/settings/profile/ProfileRenameFragmentTest.kt index b1e253d60f0..77f2aa4d7d0 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/settings/profile/ProfileRenameFragmentTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/settings/profile/ProfileRenameFragmentTest.kt @@ -82,6 +82,7 @@ import org.oppia.android.testing.TestLogReportingModule import org.oppia.android.testing.espresso.EditTextInputAction import org.oppia.android.testing.espresso.TextInputAction.Companion.hasErrorText import org.oppia.android.testing.espresso.TextInputAction.Companion.hasNoErrorText +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.profile.ProfileTestHelper import org.oppia.android.testing.robolectric.RobolectricModule @@ -469,7 +470,8 @@ class ProfileRenameFragmentTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/settings/profile/ProfileResetPinActivityTest.kt b/app/src/sharedTest/java/org/oppia/android/app/settings/profile/ProfileResetPinActivityTest.kt index d0b9021240f..1e473a5e4a9 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/settings/profile/ProfileResetPinActivityTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/settings/profile/ProfileResetPinActivityTest.kt @@ -66,6 +66,7 @@ import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.OppiaTestRule import org.oppia.android.testing.TestLogReportingModule import org.oppia.android.testing.espresso.EditTextInputAction +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.profile.ProfileTestHelper import org.oppia.android.testing.robolectric.RobolectricModule @@ -201,7 +202,8 @@ class ProfileResetPinActivityTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/settings/profile/ProfileResetPinFragmentTest.kt b/app/src/sharedTest/java/org/oppia/android/app/settings/profile/ProfileResetPinFragmentTest.kt index 830f3f885de..a78db5e7ce2 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/settings/profile/ProfileResetPinFragmentTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/settings/profile/ProfileResetPinFragmentTest.kt @@ -83,6 +83,7 @@ import org.oppia.android.testing.TestLogReportingModule import org.oppia.android.testing.espresso.EditTextInputAction import org.oppia.android.testing.espresso.TextInputAction.Companion.hasErrorText import org.oppia.android.testing.espresso.TextInputAction.Companion.hasNoErrorText +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.profile.ProfileTestHelper import org.oppia.android.testing.robolectric.RobolectricModule @@ -1033,7 +1034,8 @@ class ProfileResetPinFragmentTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/splash/SplashActivityTest.kt b/app/src/sharedTest/java/org/oppia/android/app/splash/SplashActivityTest.kt index 4483d5e3e6c..5fa6d2d41eb 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/splash/SplashActivityTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/splash/SplashActivityTest.kt @@ -98,6 +98,7 @@ import org.oppia.android.testing.RunOn import org.oppia.android.testing.TestLogReportingModule import org.oppia.android.testing.TestPlatform import org.oppia.android.testing.data.DataProviderTestMonitor +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.OppiaParameterizedTestRunner import org.oppia.android.testing.junit.OppiaParameterizedTestRunner.Iteration import org.oppia.android.testing.junit.OppiaParameterizedTestRunner.Parameter @@ -1246,7 +1247,8 @@ class SplashActivityTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/spotlight/SpotlightFragmentTest.kt b/app/src/sharedTest/java/org/oppia/android/app/spotlight/SpotlightFragmentTest.kt index 3911274b902..35df5325f0e 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/spotlight/SpotlightFragmentTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/spotlight/SpotlightFragmentTest.kt @@ -74,6 +74,7 @@ import org.oppia.android.domain.topic.PrimeTopicAssetsControllerModule import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.TestImageLoaderModule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.platformparameter.TestPlatformParameterModule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestCoroutineDispatchers @@ -371,7 +372,8 @@ class SpotlightFragmentTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/story/StoryActivityTest.kt b/app/src/sharedTest/java/org/oppia/android/app/story/StoryActivityTest.kt index f0b4d27753b..1dda62f55f4 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/story/StoryActivityTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/story/StoryActivityTest.kt @@ -87,6 +87,7 @@ import org.oppia.android.testing.DisableAccessibilityChecks import org.oppia.android.testing.OppiaTestRule import org.oppia.android.testing.TestImageLoaderModule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestCoroutineDispatchers @@ -279,7 +280,8 @@ class StoryActivityTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/story/StoryFragmentTest.kt b/app/src/sharedTest/java/org/oppia/android/app/story/StoryFragmentTest.kt index 21202b8915d..3a9760cec83 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/story/StoryFragmentTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/story/StoryFragmentTest.kt @@ -117,6 +117,7 @@ import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.DisableAccessibilityChecks import org.oppia.android.testing.OppiaTestRule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.mockito.anyOrNull import org.oppia.android.testing.mockito.capture @@ -1000,7 +1001,8 @@ class StoryFragmentTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/survey/SurveyActivityTest.kt b/app/src/sharedTest/java/org/oppia/android/app/survey/SurveyActivityTest.kt index 158296d3aa2..61ace850d0e 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/survey/SurveyActivityTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/survey/SurveyActivityTest.kt @@ -67,6 +67,7 @@ import org.oppia.android.domain.topic.TEST_TOPIC_ID_0 import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.OppiaTestRule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.platformparameter.TestPlatformParameterModule import org.oppia.android.testing.robolectric.RobolectricModule @@ -193,7 +194,8 @@ class SurveyActivityTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/survey/SurveyFragmentTest.kt b/app/src/sharedTest/java/org/oppia/android/app/survey/SurveyFragmentTest.kt index 4ac59d07d5b..cf4de9db27c 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/survey/SurveyFragmentTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/survey/SurveyFragmentTest.kt @@ -90,6 +90,7 @@ import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.FakeAnalyticsEventLogger import org.oppia.android.testing.OppiaTestRule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.logging.EventLogSubject import org.oppia.android.testing.platformparameter.TestPlatformParameterModule @@ -619,7 +620,8 @@ class SurveyFragmentTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/testing/DragDropTestActivityTest.kt b/app/src/sharedTest/java/org/oppia/android/app/testing/DragDropTestActivityTest.kt index cb81673b016..9e7aa64cd7e 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/testing/DragDropTestActivityTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/testing/DragDropTestActivityTest.kt @@ -73,6 +73,7 @@ import org.oppia.android.domain.topic.PrimeTopicAssetsControllerModule import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.OppiaTestRule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestDispatcherModule @@ -237,7 +238,8 @@ class DragDropTestActivityTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/testing/FractionInputInteractionViewTestActivityTest.kt b/app/src/sharedTest/java/org/oppia/android/app/testing/FractionInputInteractionViewTestActivityTest.kt index 606f7b2f945..fb4b7a677f4 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/testing/FractionInputInteractionViewTestActivityTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/testing/FractionInputInteractionViewTestActivityTest.kt @@ -74,6 +74,7 @@ import org.oppia.android.testing.DisableAccessibilityChecks import org.oppia.android.testing.OppiaTestRule import org.oppia.android.testing.TestLogReportingModule import org.oppia.android.testing.espresso.EditTextInputAction +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestCoroutineDispatchers @@ -578,7 +579,8 @@ class FractionInputInteractionViewTestActivityTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/testing/ImageRegionSelectionInteractionViewTest.kt b/app/src/sharedTest/java/org/oppia/android/app/testing/ImageRegionSelectionInteractionViewTest.kt index 58978aa74b0..a2097b83928 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/testing/ImageRegionSelectionInteractionViewTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/testing/ImageRegionSelectionInteractionViewTest.kt @@ -86,6 +86,7 @@ import org.oppia.android.testing.RunOn import org.oppia.android.testing.TestImageLoaderModule import org.oppia.android.testing.TestLogReportingModule import org.oppia.android.testing.TestPlatform +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.mockito.capture import org.oppia.android.testing.robolectric.RobolectricModule @@ -404,7 +405,8 @@ class ImageRegionSelectionInteractionViewTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/testing/InputInteractionViewTestActivityTest.kt b/app/src/sharedTest/java/org/oppia/android/app/testing/InputInteractionViewTestActivityTest.kt index 0bd03beb6ae..2ce962ee356 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/testing/InputInteractionViewTestActivityTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/testing/InputInteractionViewTestActivityTest.kt @@ -74,6 +74,7 @@ import org.oppia.android.testing.DisableAccessibilityChecks import org.oppia.android.testing.OppiaTestRule import org.oppia.android.testing.TestLogReportingModule import org.oppia.android.testing.espresso.EditTextInputAction +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestCoroutineDispatchers @@ -250,6 +251,24 @@ class InputInteractionViewTestActivityTest { } } + @Test + @DisableAccessibilityChecks // Disabled, as InputInteractionViewTestActivity is a test file and + // will not be used by user + fun testNumericInput_withBlankInput_submit_emptyInputErrorIsDisplayed() { + ActivityScenario.launch(InputInteractionViewTestActivity::class.java).use { + scrollToSubmitButton() + onView(withId(R.id.submit_button)).check(matches(isDisplayed())).perform(click()) + onView(withId(R.id.number_input_error)) + .check( + matches( + withText( + R.string.number_error_empty_input + ) + ) + ) + } + } + @Test @DisableAccessibilityChecks // Disabled, as InputInteractionViewTestActivity is a test file and // will not be used by user @@ -488,7 +507,8 @@ class InputInteractionViewTestActivityTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/testing/NavigationDrawerActivityDebugTest.kt b/app/src/sharedTest/java/org/oppia/android/app/testing/NavigationDrawerActivityDebugTest.kt index 1b25eeb4eba..6ede2fb1889 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/testing/NavigationDrawerActivityDebugTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/testing/NavigationDrawerActivityDebugTest.kt @@ -101,6 +101,7 @@ import org.oppia.android.testing.OppiaTestRule import org.oppia.android.testing.RunOn import org.oppia.android.testing.TestLogReportingModule import org.oppia.android.testing.TestPlatform +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.profile.ProfileTestHelper import org.oppia.android.testing.robolectric.RobolectricModule @@ -457,7 +458,8 @@ class NavigationDrawerActivityDebugTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/testing/NavigationDrawerActivityProdTest.kt b/app/src/sharedTest/java/org/oppia/android/app/testing/NavigationDrawerActivityProdTest.kt index 08512202fb7..2ac71b84993 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/testing/NavigationDrawerActivityProdTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/testing/NavigationDrawerActivityProdTest.kt @@ -109,6 +109,7 @@ import org.oppia.android.testing.OppiaTestRule import org.oppia.android.testing.RunOn import org.oppia.android.testing.TestLogReportingModule import org.oppia.android.testing.TestPlatform +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.profile.ProfileTestHelper import org.oppia.android.testing.robolectric.RobolectricModule @@ -1016,7 +1017,8 @@ class NavigationDrawerActivityProdTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/testing/RatioInputInteractionViewTestActivityTest.kt b/app/src/sharedTest/java/org/oppia/android/app/testing/RatioInputInteractionViewTestActivityTest.kt index 5a8249a9088..3968ee5bda7 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/testing/RatioInputInteractionViewTestActivityTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/testing/RatioInputInteractionViewTestActivityTest.kt @@ -81,6 +81,7 @@ import org.oppia.android.testing.DisableAccessibilityChecks import org.oppia.android.testing.OppiaTestRule import org.oppia.android.testing.TestLogReportingModule import org.oppia.android.testing.espresso.EditTextInputAction +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestCoroutineDispatchers @@ -446,7 +447,8 @@ class RatioInputInteractionViewTestActivityTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/testing/TestFontScaleConfigurationUtilActivityTest.kt b/app/src/sharedTest/java/org/oppia/android/app/testing/TestFontScaleConfigurationUtilActivityTest.kt index 9b8b64c3092..906d24f97a1 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/testing/TestFontScaleConfigurationUtilActivityTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/testing/TestFontScaleConfigurationUtilActivityTest.kt @@ -68,6 +68,7 @@ import org.oppia.android.domain.topic.PrimeTopicAssetsControllerModule import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.OppiaTestRule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestDispatcherModule @@ -212,7 +213,8 @@ class TestFontScaleConfigurationUtilActivityTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/testing/TopicTestActivityForStoryTest.kt b/app/src/sharedTest/java/org/oppia/android/app/testing/TopicTestActivityForStoryTest.kt index e24a5dad28b..f59711ead38 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/testing/TopicTestActivityForStoryTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/testing/TopicTestActivityForStoryTest.kt @@ -72,6 +72,7 @@ import org.oppia.android.domain.topic.PrimeTopicAssetsControllerModule import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.OppiaTestRule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.platformparameter.TestPlatformParameterModule import org.oppia.android.testing.robolectric.RobolectricModule @@ -213,7 +214,8 @@ class TopicTestActivityForStoryTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/thirdparty/LicenseListActivityTest.kt b/app/src/sharedTest/java/org/oppia/android/app/thirdparty/LicenseListActivityTest.kt index 8cf61b1e656..b73ce7a0773 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/thirdparty/LicenseListActivityTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/thirdparty/LicenseListActivityTest.kt @@ -64,6 +64,7 @@ import org.oppia.android.domain.topic.PrimeTopicAssetsControllerModule import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.OppiaTestRule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestDispatcherModule @@ -179,7 +180,8 @@ class LicenseListActivityTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) diff --git a/app/src/sharedTest/java/org/oppia/android/app/thirdparty/LicenseListFragmentTest.kt b/app/src/sharedTest/java/org/oppia/android/app/thirdparty/LicenseListFragmentTest.kt index aec669e81e3..a8dd3ae36fd 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/thirdparty/LicenseListFragmentTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/thirdparty/LicenseListFragmentTest.kt @@ -79,6 +79,7 @@ import org.oppia.android.domain.topic.PrimeTopicAssetsControllerModule import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.OppiaTestRule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestCoroutineDispatchers @@ -379,7 +380,8 @@ class LicenseListFragmentTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) diff --git a/app/src/sharedTest/java/org/oppia/android/app/thirdparty/LicenseTextViewerActivityTest.kt b/app/src/sharedTest/java/org/oppia/android/app/thirdparty/LicenseTextViewerActivityTest.kt index 93dc07a0ade..fb424fd2440 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/thirdparty/LicenseTextViewerActivityTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/thirdparty/LicenseTextViewerActivityTest.kt @@ -72,6 +72,7 @@ import org.oppia.android.domain.topic.PrimeTopicAssetsControllerModule import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.OppiaTestRule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestDispatcherModule @@ -283,7 +284,8 @@ class LicenseTextViewerActivityTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/thirdparty/LicenseTextViewerFragmentTest.kt b/app/src/sharedTest/java/org/oppia/android/app/thirdparty/LicenseTextViewerFragmentTest.kt index 76df5c92384..07bb62e85c9 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/thirdparty/LicenseTextViewerFragmentTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/thirdparty/LicenseTextViewerFragmentTest.kt @@ -69,6 +69,7 @@ import org.oppia.android.domain.topic.PrimeTopicAssetsControllerModule import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.OppiaTestRule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestCoroutineDispatchers @@ -357,7 +358,8 @@ class LicenseTextViewerFragmentTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) diff --git a/app/src/sharedTest/java/org/oppia/android/app/thirdparty/ThirdPartyDependencyListActivityTest.kt b/app/src/sharedTest/java/org/oppia/android/app/thirdparty/ThirdPartyDependencyListActivityTest.kt index ca05cb9ddbc..0a2fd1f4fa4 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/thirdparty/ThirdPartyDependencyListActivityTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/thirdparty/ThirdPartyDependencyListActivityTest.kt @@ -64,6 +64,7 @@ import org.oppia.android.domain.topic.PrimeTopicAssetsControllerModule import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.OppiaTestRule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestDispatcherModule @@ -176,7 +177,8 @@ class ThirdPartyDependencyListActivityTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) diff --git a/app/src/sharedTest/java/org/oppia/android/app/thirdparty/ThirdPartyDependencyListFragmentTest.kt b/app/src/sharedTest/java/org/oppia/android/app/thirdparty/ThirdPartyDependencyListFragmentTest.kt index af563731aa9..419fa4515ef 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/thirdparty/ThirdPartyDependencyListFragmentTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/thirdparty/ThirdPartyDependencyListFragmentTest.kt @@ -78,6 +78,7 @@ import org.oppia.android.domain.topic.PrimeTopicAssetsControllerModule import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.OppiaTestRule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestCoroutineDispatchers @@ -489,7 +490,8 @@ class ThirdPartyDependencyListFragmentTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) diff --git a/app/src/sharedTest/java/org/oppia/android/app/topic/TopicActivityTest.kt b/app/src/sharedTest/java/org/oppia/android/app/topic/TopicActivityTest.kt index a765068fde4..a82efa5f8cb 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/topic/TopicActivityTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/topic/TopicActivityTest.kt @@ -84,6 +84,7 @@ import org.oppia.android.testing.OppiaTestRule import org.oppia.android.testing.RunOn import org.oppia.android.testing.TestLogReportingModule import org.oppia.android.testing.TestPlatform +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.platformparameter.TestPlatformParameterModule import org.oppia.android.testing.robolectric.RobolectricModule @@ -253,7 +254,8 @@ class TopicActivityTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/topic/TopicFragmentTest.kt b/app/src/sharedTest/java/org/oppia/android/app/topic/TopicFragmentTest.kt index 333cab9044e..875d5936cb5 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/topic/TopicFragmentTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/topic/TopicFragmentTest.kt @@ -95,6 +95,7 @@ import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.FakeAnalyticsEventLogger import org.oppia.android.testing.OppiaTestRule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.logging.EventLogSubject.Companion.assertThat import org.oppia.android.testing.platformparameter.TestPlatformParameterModule @@ -1024,7 +1025,8 @@ class TopicFragmentTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/topic/conceptcard/ConceptCardFragmentTest.kt b/app/src/sharedTest/java/org/oppia/android/app/topic/conceptcard/ConceptCardFragmentTest.kt index fcad7bafb88..ac0c6ab72aa 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/topic/conceptcard/ConceptCardFragmentTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/topic/conceptcard/ConceptCardFragmentTest.kt @@ -107,6 +107,7 @@ import org.oppia.android.testing.TestLogReportingModule import org.oppia.android.testing.TestPlatform import org.oppia.android.testing.data.DataProviderTestMonitor import org.oppia.android.testing.environment.TestEnvironmentConfig +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestCoroutineDispatchers @@ -597,7 +598,8 @@ class ConceptCardFragmentTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/topic/info/TopicInfoFragmentTest.kt b/app/src/sharedTest/java/org/oppia/android/app/topic/info/TopicInfoFragmentTest.kt index 0acdf90b1a6..9cfb0cd31d6 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/topic/info/TopicInfoFragmentTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/topic/info/TopicInfoFragmentTest.kt @@ -92,6 +92,7 @@ import org.oppia.android.testing.TestImageLoaderModule import org.oppia.android.testing.TestLogReportingModule import org.oppia.android.testing.TestPlatform import org.oppia.android.testing.espresso.ImageViewMatcher.Companion.hasScaleType +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.platformparameter.TestPlatformParameterModule import org.oppia.android.testing.robolectric.RobolectricModule @@ -498,7 +499,8 @@ class TopicInfoFragmentTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/topic/lessons/TopicLessonsFragmentTest.kt b/app/src/sharedTest/java/org/oppia/android/app/topic/lessons/TopicLessonsFragmentTest.kt index 8ea32a5e1ab..ed64716a398 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/topic/lessons/TopicLessonsFragmentTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/topic/lessons/TopicLessonsFragmentTest.kt @@ -111,6 +111,7 @@ import org.oppia.android.domain.topic.RATIOS_TOPIC_ID import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.OppiaTestRule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.lightweightcheckpointing.ExplorationCheckpointTestHelper import org.oppia.android.testing.lightweightcheckpointing.FRACTIONS_STORY_0_EXPLORATION_0_CURRENT_VERSION @@ -1190,7 +1191,8 @@ class TopicLessonsFragmentTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/topic/practice/TopicPracticeFragmentTest.kt b/app/src/sharedTest/java/org/oppia/android/app/topic/practice/TopicPracticeFragmentTest.kt index 74481e48ebc..c4ec0d84a88 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/topic/practice/TopicPracticeFragmentTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/topic/practice/TopicPracticeFragmentTest.kt @@ -89,6 +89,7 @@ import org.oppia.android.domain.topic.PrimeTopicAssetsControllerModule import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.OppiaTestRule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.platformparameter.TestPlatformParameterModule import org.oppia.android.testing.robolectric.RobolectricModule @@ -462,7 +463,8 @@ class TopicPracticeFragmentTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/topic/questionplayer/QuestionPlayerActivityTest.kt b/app/src/sharedTest/java/org/oppia/android/app/topic/questionplayer/QuestionPlayerActivityTest.kt index b34db800641..03423d24c83 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/topic/questionplayer/QuestionPlayerActivityTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/topic/questionplayer/QuestionPlayerActivityTest.kt @@ -130,6 +130,7 @@ import org.oppia.android.testing.TestLogReportingModule import org.oppia.android.testing.TestPlatform import org.oppia.android.testing.data.DataProviderTestMonitor import org.oppia.android.testing.espresso.EditTextInputAction +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.profile.ProfileTestHelper import org.oppia.android.testing.robolectric.RobolectricModule @@ -811,7 +812,8 @@ class QuestionPlayerActivityTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/topic/revision/TopicRevisionFragmentTest.kt b/app/src/sharedTest/java/org/oppia/android/app/topic/revision/TopicRevisionFragmentTest.kt index 81f405e6f98..de936dccb21 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/topic/revision/TopicRevisionFragmentTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/topic/revision/TopicRevisionFragmentTest.kt @@ -92,6 +92,7 @@ import org.oppia.android.testing.OppiaTestRule import org.oppia.android.testing.TestImageLoaderModule import org.oppia.android.testing.TestLogReportingModule import org.oppia.android.testing.espresso.ImageViewMatcher.Companion.hasScaleType +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.platformparameter.TestPlatformParameterModule import org.oppia.android.testing.robolectric.RobolectricModule @@ -358,7 +359,8 @@ class TopicRevisionFragmentTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/topic/revisioncard/RevisionCardActivityTest.kt b/app/src/sharedTest/java/org/oppia/android/app/topic/revisioncard/RevisionCardActivityTest.kt index d28d3428aa9..d570e4ec204 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/topic/revisioncard/RevisionCardActivityTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/topic/revisioncard/RevisionCardActivityTest.kt @@ -85,6 +85,7 @@ import org.oppia.android.testing.RunOn import org.oppia.android.testing.TestLogReportingModule import org.oppia.android.testing.TestPlatform import org.oppia.android.testing.data.DataProviderTestMonitor +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.logging.EventLogSubject.Companion.assertThat import org.oppia.android.testing.robolectric.RobolectricModule @@ -481,7 +482,8 @@ class RevisionCardActivityTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/topic/revisioncard/RevisionCardFragmentTest.kt b/app/src/sharedTest/java/org/oppia/android/app/topic/revisioncard/RevisionCardFragmentTest.kt index 0f7721cbd58..5831cc043b5 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/topic/revisioncard/RevisionCardFragmentTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/topic/revisioncard/RevisionCardFragmentTest.kt @@ -108,6 +108,7 @@ import org.oppia.android.testing.TestLogReportingModule import org.oppia.android.testing.TestPlatform import org.oppia.android.testing.data.DataProviderTestMonitor import org.oppia.android.testing.environment.TestEnvironmentConfig +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestCoroutineDispatchers @@ -800,7 +801,8 @@ class RevisionCardFragmentTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/utility/RatioExtensionsTest.kt b/app/src/sharedTest/java/org/oppia/android/app/utility/RatioExtensionsTest.kt index 9a306b03e31..fa2d84e008c 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/utility/RatioExtensionsTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/utility/RatioExtensionsTest.kt @@ -61,6 +61,7 @@ import org.oppia.android.domain.topic.PrimeTopicAssetsControllerModule import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.OppiaTestRule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestDispatcherModule @@ -165,7 +166,8 @@ class RatioExtensionsTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/walkthrough/WalkthroughActivityTest.kt b/app/src/sharedTest/java/org/oppia/android/app/walkthrough/WalkthroughActivityTest.kt index d4e5a2afec0..b583e012dc7 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/walkthrough/WalkthroughActivityTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/walkthrough/WalkthroughActivityTest.kt @@ -75,6 +75,7 @@ import org.oppia.android.domain.topic.PrimeTopicAssetsControllerModule import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.OppiaTestRule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestDispatcherModule @@ -254,7 +255,8 @@ class WalkthroughActivityTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/walkthrough/WalkthroughFinalFragmentTest.kt b/app/src/sharedTest/java/org/oppia/android/app/walkthrough/WalkthroughFinalFragmentTest.kt index 0131d060c65..2b6ab7d39bc 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/walkthrough/WalkthroughFinalFragmentTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/walkthrough/WalkthroughFinalFragmentTest.kt @@ -77,6 +77,7 @@ import org.oppia.android.domain.topic.PrimeTopicAssetsControllerModule import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.OppiaTestRule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestCoroutineDispatchers @@ -300,7 +301,8 @@ class WalkthroughFinalFragmentTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/walkthrough/WalkthroughTopicListFragmentTest.kt b/app/src/sharedTest/java/org/oppia/android/app/walkthrough/WalkthroughTopicListFragmentTest.kt index 7d86a720ab6..ee17909aa1d 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/walkthrough/WalkthroughTopicListFragmentTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/walkthrough/WalkthroughTopicListFragmentTest.kt @@ -81,6 +81,7 @@ import org.oppia.android.testing.TestImageLoaderModule import org.oppia.android.testing.TestLogReportingModule import org.oppia.android.testing.environment.TestEnvironmentConfig import org.oppia.android.testing.espresso.GenericViewMatchers.Companion.withOpaqueBackground +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestCoroutineDispatchers @@ -326,7 +327,8 @@ class WalkthroughTopicListFragmentTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/sharedTest/java/org/oppia/android/app/walkthrough/WalkthroughWelcomeFragmentTest.kt b/app/src/sharedTest/java/org/oppia/android/app/walkthrough/WalkthroughWelcomeFragmentTest.kt index 8af2cebfb4c..288fa127272 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/walkthrough/WalkthroughWelcomeFragmentTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/walkthrough/WalkthroughWelcomeFragmentTest.kt @@ -73,6 +73,7 @@ import org.oppia.android.domain.topic.PrimeTopicAssetsControllerModule import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.OppiaTestRule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.profile.ProfileTestHelper import org.oppia.android.testing.robolectric.RobolectricModule @@ -223,7 +224,8 @@ class WalkthroughWelcomeFragmentTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/test/java/org/oppia/android/app/activity/ActivityIntentFactoriesTest.kt b/app/src/test/java/org/oppia/android/app/activity/ActivityIntentFactoriesTest.kt index d10fdafe22e..5d0844289a3 100644 --- a/app/src/test/java/org/oppia/android/app/activity/ActivityIntentFactoriesTest.kt +++ b/app/src/test/java/org/oppia/android/app/activity/ActivityIntentFactoriesTest.kt @@ -64,6 +64,7 @@ import org.oppia.android.domain.question.QuestionModule import org.oppia.android.domain.topic.PrimeTopicAssetsControllerModule import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestDispatcherModule @@ -191,7 +192,8 @@ class ActivityIntentFactoriesTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/test/java/org/oppia/android/app/activity/route/ActivityRouterModuleTest.kt b/app/src/test/java/org/oppia/android/app/activity/route/ActivityRouterModuleTest.kt index b17646fb769..d90f9471261 100644 --- a/app/src/test/java/org/oppia/android/app/activity/route/ActivityRouterModuleTest.kt +++ b/app/src/test/java/org/oppia/android/app/activity/route/ActivityRouterModuleTest.kt @@ -65,6 +65,7 @@ import org.oppia.android.domain.question.QuestionModule import org.oppia.android.domain.topic.PrimeTopicAssetsControllerModule import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestDispatcherModule @@ -161,7 +162,8 @@ class ActivityRouterModuleTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/test/java/org/oppia/android/app/activity/route/ActivityRouterTest.kt b/app/src/test/java/org/oppia/android/app/activity/route/ActivityRouterTest.kt index 97988c9c5b9..f644125b802 100644 --- a/app/src/test/java/org/oppia/android/app/activity/route/ActivityRouterTest.kt +++ b/app/src/test/java/org/oppia/android/app/activity/route/ActivityRouterTest.kt @@ -75,6 +75,7 @@ import org.oppia.android.domain.question.QuestionModule import org.oppia.android.domain.topic.PrimeTopicAssetsControllerModule import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestDispatcherModule @@ -211,7 +212,8 @@ class ActivityRouterTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/test/java/org/oppia/android/app/home/HomeActivityLocalTest.kt b/app/src/test/java/org/oppia/android/app/home/HomeActivityLocalTest.kt index 50527e24b88..d9eb01477ec 100644 --- a/app/src/test/java/org/oppia/android/app/home/HomeActivityLocalTest.kt +++ b/app/src/test/java/org/oppia/android/app/home/HomeActivityLocalTest.kt @@ -65,6 +65,7 @@ import org.oppia.android.domain.topic.PrimeTopicAssetsControllerModule import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.FakeAnalyticsEventLogger import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestCoroutineDispatchers @@ -165,7 +166,8 @@ class HomeActivityLocalTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/test/java/org/oppia/android/app/parser/FractionParsingUiErrorTest.kt b/app/src/test/java/org/oppia/android/app/parser/FractionParsingUiErrorTest.kt index 58b622c0ede..d22af58e95b 100644 --- a/app/src/test/java/org/oppia/android/app/parser/FractionParsingUiErrorTest.kt +++ b/app/src/test/java/org/oppia/android/app/parser/FractionParsingUiErrorTest.kt @@ -59,6 +59,7 @@ import org.oppia.android.domain.question.QuestionModule import org.oppia.android.domain.topic.PrimeTopicAssetsControllerModule import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestDispatcherModule @@ -270,7 +271,8 @@ class FractionParsingUiErrorTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/test/java/org/oppia/android/app/parser/ListItemLeadingMarginSpanTest.kt b/app/src/test/java/org/oppia/android/app/parser/ListItemLeadingMarginSpanTest.kt index 6c59d12202b..d993ffd3de8 100644 --- a/app/src/test/java/org/oppia/android/app/parser/ListItemLeadingMarginSpanTest.kt +++ b/app/src/test/java/org/oppia/android/app/parser/ListItemLeadingMarginSpanTest.kt @@ -87,6 +87,7 @@ import org.oppia.android.testing.RunOn import org.oppia.android.testing.TestImageLoaderModule import org.oppia.android.testing.TestLogReportingModule import org.oppia.android.testing.TestPlatform +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.DefineAppLanguageLocaleContext import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.robolectric.RobolectricModule @@ -1077,7 +1078,8 @@ class ListItemLeadingMarginSpanTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) diff --git a/app/src/test/java/org/oppia/android/app/parser/StringToRatioParserTest.kt b/app/src/test/java/org/oppia/android/app/parser/StringToRatioParserTest.kt index 2b9845c78b8..b7d63c2d909 100644 --- a/app/src/test/java/org/oppia/android/app/parser/StringToRatioParserTest.kt +++ b/app/src/test/java/org/oppia/android/app/parser/StringToRatioParserTest.kt @@ -61,6 +61,7 @@ import org.oppia.android.domain.topic.PrimeTopicAssetsControllerModule import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.TestLogReportingModule import org.oppia.android.testing.assertThrows +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestDispatcherModule @@ -231,7 +232,7 @@ class StringToRatioParserTest { @Test fun testParser_parseRatioOrThrow_ratioWithInvalidRatio_throwsException() { - val exception = assertThrows(IllegalArgumentException::class) { + val exception = assertThrows() { stringToRatioParser.parseRatioOrThrow("a:b:c") } assertThat(exception) @@ -274,7 +275,8 @@ class StringToRatioParserTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/test/java/org/oppia/android/app/player/exploration/ExplorationActivityLocalTest.kt b/app/src/test/java/org/oppia/android/app/player/exploration/ExplorationActivityLocalTest.kt index c3e905658cc..edc6c0a91e3 100644 --- a/app/src/test/java/org/oppia/android/app/player/exploration/ExplorationActivityLocalTest.kt +++ b/app/src/test/java/org/oppia/android/app/player/exploration/ExplorationActivityLocalTest.kt @@ -71,6 +71,7 @@ import org.oppia.android.domain.topic.TEST_TOPIC_ID_0 import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.FakeAnalyticsEventLogger import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestCoroutineDispatchers @@ -224,6 +225,7 @@ class ExplorationActivityLocalTest { SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/test/java/org/oppia/android/app/player/state/StateFragmentLocalTest.kt b/app/src/test/java/org/oppia/android/app/player/state/StateFragmentLocalTest.kt index a90c507ad4b..c5442bff54e 100644 --- a/app/src/test/java/org/oppia/android/app/player/state/StateFragmentLocalTest.kt +++ b/app/src/test/java/org/oppia/android/app/player/state/StateFragmentLocalTest.kt @@ -145,6 +145,7 @@ import org.oppia.android.testing.environment.TestEnvironmentConfig import org.oppia.android.testing.espresso.EditTextInputAction import org.oppia.android.testing.espresso.KonfettiViewMatcher.Companion.hasActiveConfetti import org.oppia.android.testing.espresso.KonfettiViewMatcher.Companion.hasExpectedNumberOfActiveSystems +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.DefineAppLanguageLocaleContext import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.platformparameter.TestPlatformParameterModule @@ -2944,7 +2945,8 @@ class StateFragmentLocalTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/test/java/org/oppia/android/app/profile/ProfileChooserFragmentLocalTest.kt b/app/src/test/java/org/oppia/android/app/profile/ProfileChooserFragmentLocalTest.kt index 787bd9dfd27..9ac373f8edd 100644 --- a/app/src/test/java/org/oppia/android/app/profile/ProfileChooserFragmentLocalTest.kt +++ b/app/src/test/java/org/oppia/android/app/profile/ProfileChooserFragmentLocalTest.kt @@ -62,6 +62,7 @@ import org.oppia.android.domain.topic.PrimeTopicAssetsControllerModule import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.FakeAnalyticsEventLogger import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestCoroutineDispatchers @@ -150,7 +151,8 @@ class ProfileChooserFragmentLocalTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/test/java/org/oppia/android/app/story/StoryActivityLocalTest.kt b/app/src/test/java/org/oppia/android/app/story/StoryActivityLocalTest.kt index 323b25d8a73..2b60ef54096 100644 --- a/app/src/test/java/org/oppia/android/app/story/StoryActivityLocalTest.kt +++ b/app/src/test/java/org/oppia/android/app/story/StoryActivityLocalTest.kt @@ -64,6 +64,7 @@ import org.oppia.android.domain.topic.PrimeTopicAssetsControllerModule import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.FakeAnalyticsEventLogger import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestCoroutineDispatchers @@ -175,7 +176,8 @@ class StoryActivityLocalTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/test/java/org/oppia/android/app/testing/CompletedStoryListSpanTest.kt b/app/src/test/java/org/oppia/android/app/testing/CompletedStoryListSpanTest.kt index 2fda58f0898..b837db394bf 100644 --- a/app/src/test/java/org/oppia/android/app/testing/CompletedStoryListSpanTest.kt +++ b/app/src/test/java/org/oppia/android/app/testing/CompletedStoryListSpanTest.kt @@ -65,6 +65,7 @@ import org.oppia.android.domain.question.QuestionModule import org.oppia.android.domain.topic.PrimeTopicAssetsControllerModule import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestDispatcherModule @@ -183,7 +184,8 @@ class CompletedStoryListSpanTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/test/java/org/oppia/android/app/testing/HomeSpanTest.kt b/app/src/test/java/org/oppia/android/app/testing/HomeSpanTest.kt index 2f550bccad7..1ed839774da 100644 --- a/app/src/test/java/org/oppia/android/app/testing/HomeSpanTest.kt +++ b/app/src/test/java/org/oppia/android/app/testing/HomeSpanTest.kt @@ -65,6 +65,7 @@ import org.oppia.android.domain.question.QuestionModule import org.oppia.android.domain.topic.PrimeTopicAssetsControllerModule import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestDispatcherModule @@ -197,7 +198,8 @@ class HomeSpanTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/test/java/org/oppia/android/app/testing/OngoingTopicListSpanTest.kt b/app/src/test/java/org/oppia/android/app/testing/OngoingTopicListSpanTest.kt index 06eafa277a4..6f4ecf14c9a 100644 --- a/app/src/test/java/org/oppia/android/app/testing/OngoingTopicListSpanTest.kt +++ b/app/src/test/java/org/oppia/android/app/testing/OngoingTopicListSpanTest.kt @@ -66,6 +66,7 @@ import org.oppia.android.domain.question.QuestionModule import org.oppia.android.domain.topic.PrimeTopicAssetsControllerModule import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestDispatcherModule @@ -194,7 +195,8 @@ class OngoingTopicListSpanTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/test/java/org/oppia/android/app/testing/PlatformParameterIntegrationTest.kt b/app/src/test/java/org/oppia/android/app/testing/PlatformParameterIntegrationTest.kt index 4fdae5a1c31..68f5e78c518 100644 --- a/app/src/test/java/org/oppia/android/app/testing/PlatformParameterIntegrationTest.kt +++ b/app/src/test/java/org/oppia/android/app/testing/PlatformParameterIntegrationTest.kt @@ -82,6 +82,7 @@ import org.oppia.android.domain.question.QuestionModule import org.oppia.android.domain.topic.PrimeTopicAssetsControllerModule import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.network.MockPlatformParameterService import org.oppia.android.testing.network.RetrofitTestModule @@ -367,7 +368,8 @@ class PlatformParameterIntegrationTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/test/java/org/oppia/android/app/testing/ProfileChooserSpanTest.kt b/app/src/test/java/org/oppia/android/app/testing/ProfileChooserSpanTest.kt index 3cf5cbffe6b..e0f11812c55 100644 --- a/app/src/test/java/org/oppia/android/app/testing/ProfileChooserSpanTest.kt +++ b/app/src/test/java/org/oppia/android/app/testing/ProfileChooserSpanTest.kt @@ -64,6 +64,7 @@ import org.oppia.android.domain.question.QuestionModule import org.oppia.android.domain.topic.PrimeTopicAssetsControllerModule import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestCoroutineDispatchers @@ -396,7 +397,8 @@ class ProfileChooserSpanTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/test/java/org/oppia/android/app/testing/ProfileProgressSpanCountTest.kt b/app/src/test/java/org/oppia/android/app/testing/ProfileProgressSpanCountTest.kt index c15d270d4e5..4dd699158b9 100644 --- a/app/src/test/java/org/oppia/android/app/testing/ProfileProgressSpanCountTest.kt +++ b/app/src/test/java/org/oppia/android/app/testing/ProfileProgressSpanCountTest.kt @@ -65,6 +65,7 @@ import org.oppia.android.domain.question.QuestionModule import org.oppia.android.domain.topic.PrimeTopicAssetsControllerModule import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestDispatcherModule @@ -180,7 +181,8 @@ class ProfileProgressSpanCountTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/test/java/org/oppia/android/app/testing/RecentlyPlayedSpanTest.kt b/app/src/test/java/org/oppia/android/app/testing/RecentlyPlayedSpanTest.kt index a2c129bc1c6..8d05adc7ebf 100644 --- a/app/src/test/java/org/oppia/android/app/testing/RecentlyPlayedSpanTest.kt +++ b/app/src/test/java/org/oppia/android/app/testing/RecentlyPlayedSpanTest.kt @@ -68,6 +68,7 @@ import org.oppia.android.domain.question.QuestionModule import org.oppia.android.domain.topic.PrimeTopicAssetsControllerModule import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.story.StoryProgressTestHelper @@ -321,7 +322,8 @@ class RecentlyPlayedSpanTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/test/java/org/oppia/android/app/testing/TopicRevisionSpanTest.kt b/app/src/test/java/org/oppia/android/app/testing/TopicRevisionSpanTest.kt index 19a9bd08b35..55574573642 100644 --- a/app/src/test/java/org/oppia/android/app/testing/TopicRevisionSpanTest.kt +++ b/app/src/test/java/org/oppia/android/app/testing/TopicRevisionSpanTest.kt @@ -64,6 +64,7 @@ import org.oppia.android.domain.question.QuestionModule import org.oppia.android.domain.topic.PrimeTopicAssetsControllerModule import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestDispatcherModule @@ -180,7 +181,8 @@ class TopicRevisionSpanTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/test/java/org/oppia/android/app/testing/activity/TestActivityTest.kt b/app/src/test/java/org/oppia/android/app/testing/activity/TestActivityTest.kt index 307db040b61..23e0211298b 100644 --- a/app/src/test/java/org/oppia/android/app/testing/activity/TestActivityTest.kt +++ b/app/src/test/java/org/oppia/android/app/testing/activity/TestActivityTest.kt @@ -61,6 +61,7 @@ import org.oppia.android.domain.question.QuestionModule import org.oppia.android.domain.topic.PrimeTopicAssetsControllerModule import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestDispatcherModule @@ -205,7 +206,8 @@ class TestActivityTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/test/java/org/oppia/android/app/testing/administratorcontrols/AdministratorControlsFragmentTest.kt b/app/src/test/java/org/oppia/android/app/testing/administratorcontrols/AdministratorControlsFragmentTest.kt index cfd5875545f..c9d01ffbce5 100644 --- a/app/src/test/java/org/oppia/android/app/testing/administratorcontrols/AdministratorControlsFragmentTest.kt +++ b/app/src/test/java/org/oppia/android/app/testing/administratorcontrols/AdministratorControlsFragmentTest.kt @@ -71,6 +71,7 @@ import org.oppia.android.domain.question.QuestionModule import org.oppia.android.domain.topic.PrimeTopicAssetsControllerModule import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestCoroutineDispatchers @@ -204,7 +205,8 @@ class AdministratorControlsFragmentTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/test/java/org/oppia/android/app/testing/options/OptionsFragmentTest.kt b/app/src/test/java/org/oppia/android/app/testing/options/OptionsFragmentTest.kt index af0187dfe7f..462d087efd6 100644 --- a/app/src/test/java/org/oppia/android/app/testing/options/OptionsFragmentTest.kt +++ b/app/src/test/java/org/oppia/android/app/testing/options/OptionsFragmentTest.kt @@ -67,6 +67,7 @@ import org.oppia.android.domain.question.QuestionModule import org.oppia.android.domain.topic.PrimeTopicAssetsControllerModule import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.platformparameter.TestPlatformParameterModule import org.oppia.android.testing.profile.ProfileTestHelper @@ -239,7 +240,8 @@ class OptionsFragmentTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/test/java/org/oppia/android/app/testing/player/split/PlayerSplitScreenTest.kt b/app/src/test/java/org/oppia/android/app/testing/player/split/PlayerSplitScreenTest.kt index d5254b8fac9..9e3c3edc499 100644 --- a/app/src/test/java/org/oppia/android/app/testing/player/split/PlayerSplitScreenTest.kt +++ b/app/src/test/java/org/oppia/android/app/testing/player/split/PlayerSplitScreenTest.kt @@ -62,6 +62,7 @@ import org.oppia.android.domain.question.QuestionModule import org.oppia.android.domain.topic.PrimeTopicAssetsControllerModule import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestDispatcherModule @@ -213,7 +214,8 @@ class PlayerSplitScreenTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/test/java/org/oppia/android/app/testing/player/state/StateFragmentAccessibilityTest.kt b/app/src/test/java/org/oppia/android/app/testing/player/state/StateFragmentAccessibilityTest.kt index 12903d92b03..fd39ae0660e 100644 --- a/app/src/test/java/org/oppia/android/app/testing/player/state/StateFragmentAccessibilityTest.kt +++ b/app/src/test/java/org/oppia/android/app/testing/player/state/StateFragmentAccessibilityTest.kt @@ -71,6 +71,7 @@ import org.oppia.android.domain.topic.TEST_STORY_ID_0 import org.oppia.android.domain.topic.TEST_TOPIC_ID_0 import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.profile.ProfileTestHelper import org.oppia.android.testing.robolectric.RobolectricModule @@ -220,7 +221,8 @@ class StateFragmentAccessibilityTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/test/java/org/oppia/android/app/topic/info/TopicInfoFragmentLocalTest.kt b/app/src/test/java/org/oppia/android/app/topic/info/TopicInfoFragmentLocalTest.kt index c4488a87440..f4e4081e436 100644 --- a/app/src/test/java/org/oppia/android/app/topic/info/TopicInfoFragmentLocalTest.kt +++ b/app/src/test/java/org/oppia/android/app/topic/info/TopicInfoFragmentLocalTest.kt @@ -61,6 +61,7 @@ import org.oppia.android.domain.topic.PrimeTopicAssetsControllerModule import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.FakeAnalyticsEventLogger import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.platformparameter.TestPlatformParameterModule import org.oppia.android.testing.robolectric.RobolectricModule @@ -164,7 +165,8 @@ class TopicInfoFragmentLocalTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/test/java/org/oppia/android/app/topic/lessons/TopicLessonsFragmentLocalTest.kt b/app/src/test/java/org/oppia/android/app/topic/lessons/TopicLessonsFragmentLocalTest.kt index 8a04d388eb3..d48ad3f170c 100644 --- a/app/src/test/java/org/oppia/android/app/topic/lessons/TopicLessonsFragmentLocalTest.kt +++ b/app/src/test/java/org/oppia/android/app/topic/lessons/TopicLessonsFragmentLocalTest.kt @@ -61,6 +61,7 @@ import org.oppia.android.domain.topic.PrimeTopicAssetsControllerModule import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.FakeAnalyticsEventLogger import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestCoroutineDispatchers @@ -166,7 +167,8 @@ class TopicLessonsFragmentLocalTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/test/java/org/oppia/android/app/topic/questionplayer/QuestionPlayerActivityLocalTest.kt b/app/src/test/java/org/oppia/android/app/topic/questionplayer/QuestionPlayerActivityLocalTest.kt index 9246d4e81d6..c5cfcca74d3 100644 --- a/app/src/test/java/org/oppia/android/app/topic/questionplayer/QuestionPlayerActivityLocalTest.kt +++ b/app/src/test/java/org/oppia/android/app/topic/questionplayer/QuestionPlayerActivityLocalTest.kt @@ -90,6 +90,7 @@ import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.TestLogReportingModule import org.oppia.android.testing.espresso.EditTextInputAction import org.oppia.android.testing.espresso.KonfettiViewMatcher.Companion.hasActiveConfetti +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.profile.ProfileTestHelper import org.oppia.android.testing.robolectric.RobolectricModule @@ -513,7 +514,8 @@ class QuestionPlayerActivityLocalTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/test/java/org/oppia/android/app/topic/revisioncard/RevisionCardActivityLocalTest.kt b/app/src/test/java/org/oppia/android/app/topic/revisioncard/RevisionCardActivityLocalTest.kt index 343e67f1705..8667a942f21 100644 --- a/app/src/test/java/org/oppia/android/app/topic/revisioncard/RevisionCardActivityLocalTest.kt +++ b/app/src/test/java/org/oppia/android/app/topic/revisioncard/RevisionCardActivityLocalTest.kt @@ -63,6 +63,7 @@ import org.oppia.android.domain.topic.SUBTOPIC_TOPIC_ID import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.FakeAnalyticsEventLogger import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestCoroutineDispatchers @@ -157,7 +158,8 @@ class RevisionCardActivityLocalTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/test/java/org/oppia/android/app/translation/ActivityLanguageLocaleHandlerTest.kt b/app/src/test/java/org/oppia/android/app/translation/ActivityLanguageLocaleHandlerTest.kt index 82ae2bc2ef8..408d7df55fa 100644 --- a/app/src/test/java/org/oppia/android/app/translation/ActivityLanguageLocaleHandlerTest.kt +++ b/app/src/test/java/org/oppia/android/app/translation/ActivityLanguageLocaleHandlerTest.kt @@ -75,6 +75,7 @@ import org.oppia.android.domain.translation.TranslationController import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.TestLogReportingModule import org.oppia.android.testing.data.DataProviderTestMonitor +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.DefineAppLanguageLocaleContext import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.robolectric.RobolectricModule @@ -330,7 +331,8 @@ class ActivityLanguageLocaleHandlerTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) diff --git a/app/src/test/java/org/oppia/android/app/translation/AppLanguageLocaleHandlerTest.kt b/app/src/test/java/org/oppia/android/app/translation/AppLanguageLocaleHandlerTest.kt index 942fb06d5b6..67846ded7ad 100644 --- a/app/src/test/java/org/oppia/android/app/translation/AppLanguageLocaleHandlerTest.kt +++ b/app/src/test/java/org/oppia/android/app/translation/AppLanguageLocaleHandlerTest.kt @@ -73,7 +73,7 @@ class AppLanguageLocaleHandlerTest { @Test fun testGetDisplayLocale_initialState_throwsException() { - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { appLanguageLocaleHandler.getDisplayLocale() } @@ -103,7 +103,7 @@ class AppLanguageLocaleHandlerTest { fun testInitializeLocale_twice_throwsException() { appLanguageLocaleHandler.initializeLocale(computeNewAppLanguageLocale(ENGLISH)) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { appLanguageLocaleHandler.initializeLocale(retrieveAppLanguageLocale()) } @@ -117,7 +117,7 @@ class AppLanguageLocaleHandlerTest { fun testUpdateLocale_uninitialized_throwsException() { setAppLanguage(ENGLISH) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { appLanguageLocaleHandler.updateLocale(retrieveAppLanguageLocale()) } @@ -186,7 +186,7 @@ class AppLanguageLocaleHandlerTest { fun testInitializeLocaleForActivity_uninitialized_throwsException() { val configuration = Configuration() - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { appLanguageLocaleHandler.initializeLocaleForActivity(configuration) } diff --git a/app/src/test/java/org/oppia/android/app/translation/AppLanguageResourceHandlerTest.kt b/app/src/test/java/org/oppia/android/app/translation/AppLanguageResourceHandlerTest.kt index 95db3cf4cd7..e4283fedc76 100644 --- a/app/src/test/java/org/oppia/android/app/translation/AppLanguageResourceHandlerTest.kt +++ b/app/src/test/java/org/oppia/android/app/translation/AppLanguageResourceHandlerTest.kt @@ -69,6 +69,7 @@ import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.TestLogReportingModule import org.oppia.android.testing.assertThrows import org.oppia.android.testing.data.DataProviderTestMonitor +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.junit.OppiaParameterizedTestRunner import org.oppia.android.testing.junit.OppiaParameterizedTestRunner.Iteration @@ -241,7 +242,7 @@ class AppLanguageResourceHandlerTest { updateAppLanguageTo(OppiaLanguage.ENGLISH) val handler = retrieveAppLanguageResourceHandler() - assertThrows(Resources.NotFoundException::class) { handler.getStringInLocale(-1) } + assertThrows() { handler.getStringInLocale(-1) } } @Test @@ -278,7 +279,7 @@ class AppLanguageResourceHandlerTest { updateAppLanguageTo(OppiaLanguage.ENGLISH) val handler = retrieveAppLanguageResourceHandler() - assertThrows(Resources.NotFoundException::class) { handler.getStringInLocaleWithWrapping(-1) } + assertThrows() { handler.getStringInLocaleWithWrapping(-1) } } @Test @@ -315,7 +316,7 @@ class AppLanguageResourceHandlerTest { updateAppLanguageTo(OppiaLanguage.ENGLISH) val handler = retrieveAppLanguageResourceHandler() - assertThrows(Resources.NotFoundException::class) { + assertThrows() { handler.getStringInLocaleWithoutWrapping(-1) } } @@ -335,7 +336,7 @@ class AppLanguageResourceHandlerTest { updateAppLanguageTo(OppiaLanguage.ENGLISH) val handler = retrieveAppLanguageResourceHandler() - assertThrows(Resources.NotFoundException::class) { handler.getStringArrayInLocale(-1) } + assertThrows() { handler.getStringArrayInLocale(-1) } } @Test @@ -365,7 +366,7 @@ class AppLanguageResourceHandlerTest { updateAppLanguageTo(OppiaLanguage.ENGLISH) val handler = retrieveAppLanguageResourceHandler() - assertThrows(Resources.NotFoundException::class) { handler.getQuantityStringInLocale(-1, 0) } + assertThrows() { handler.getQuantityStringInLocale(-1, 0) } } @Test @@ -396,7 +397,7 @@ class AppLanguageResourceHandlerTest { updateAppLanguageTo(OppiaLanguage.ENGLISH) val handler = retrieveAppLanguageResourceHandler() - assertThrows(Resources.NotFoundException::class) { + assertThrows() { handler.getQuantityStringInLocaleWithWrapping(-1, 0) } } @@ -431,7 +432,7 @@ class AppLanguageResourceHandlerTest { updateAppLanguageTo(OppiaLanguage.ENGLISH) val handler = retrieveAppLanguageResourceHandler() - assertThrows(Resources.NotFoundException::class) { + assertThrows() { handler.getQuantityStringInLocaleWithoutWrapping(-1, 0) } } @@ -623,7 +624,8 @@ class AppLanguageResourceHandlerTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/test/java/org/oppia/android/app/translation/AppLanguageWatcherMixinTest.kt b/app/src/test/java/org/oppia/android/app/translation/AppLanguageWatcherMixinTest.kt index dd6be083faf..f3231f3ac7e 100644 --- a/app/src/test/java/org/oppia/android/app/translation/AppLanguageWatcherMixinTest.kt +++ b/app/src/test/java/org/oppia/android/app/translation/AppLanguageWatcherMixinTest.kt @@ -73,6 +73,7 @@ import org.oppia.android.domain.translation.TranslationController import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.TestLogReportingModule import org.oppia.android.testing.data.DataProviderTestMonitor +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.DefineAppLanguageLocaleContext import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.profile.ProfileTestHelper @@ -312,7 +313,8 @@ class AppLanguageWatcherMixinTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/test/java/org/oppia/android/app/utility/datetime/DateTimeUtilTest.kt b/app/src/test/java/org/oppia/android/app/utility/datetime/DateTimeUtilTest.kt index 926ea83dbec..ea9a9d89a34 100644 --- a/app/src/test/java/org/oppia/android/app/utility/datetime/DateTimeUtilTest.kt +++ b/app/src/test/java/org/oppia/android/app/utility/datetime/DateTimeUtilTest.kt @@ -62,6 +62,7 @@ import org.oppia.android.domain.question.QuestionModule import org.oppia.android.domain.topic.PrimeTopicAssetsControllerModule import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestDispatcherModule @@ -229,7 +230,7 @@ class DateTimeUtilTest { SyncStatusModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, CpuPerformanceSnapshotterModule::class, AnalyticsStartupListenerTestModule::class, - ExplorationProgressModule::class, + ExplorationProgressModule::class, TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/app/src/test/java/org/oppia/android/app/utility/math/MathExpressionAccessibilityUtilTest.kt b/app/src/test/java/org/oppia/android/app/utility/math/MathExpressionAccessibilityUtilTest.kt index daf8228b45a..97bff878691 100644 --- a/app/src/test/java/org/oppia/android/app/utility/math/MathExpressionAccessibilityUtilTest.kt +++ b/app/src/test/java/org/oppia/android/app/utility/math/MathExpressionAccessibilityUtilTest.kt @@ -79,6 +79,7 @@ import org.oppia.android.domain.question.QuestionModule import org.oppia.android.domain.topic.PrimeTopicAssetsControllerModule import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule import org.oppia.android.testing.junit.OppiaParameterizedTestRunner import org.oppia.android.testing.junit.OppiaParameterizedTestRunner.Iteration @@ -1340,7 +1341,8 @@ class MathExpressionAccessibilityUtilTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/config/proguard/firebase-components-proguard-rules.pro b/config/proguard/firebase-components-proguard-rules.pro index 2f72d567674..94bd0a15e3f 100644 --- a/config/proguard/firebase-components-proguard-rules.pro +++ b/config/proguard/firebase-components-proguard-rules.pro @@ -1,6 +1,8 @@ # Reference: https://github.com/firebase/firebase-android-sdk/blob/82b02af331/firebase-components/proguard.txt. +# Reference: https://github.com/firebase/firebase-android-sdk/blob/00d4626/firebase-firestore/proguard.txt. -dontwarn com.google.firebase.components.Component$Instantiation -dontwarn com.google.firebase.components.Component$ComponentType +-dontwarn javax.naming.** -keep class * implements com.google.firebase.components.ComponentRegistrar diff --git a/data/src/main/java/org/oppia/android/data/backends/gae/RemoteAuthNetworkInterceptor.kt b/data/src/main/java/org/oppia/android/data/backends/gae/RemoteAuthNetworkInterceptor.kt index c0b7269d2f1..a3839304d7d 100644 --- a/data/src/main/java/org/oppia/android/data/backends/gae/RemoteAuthNetworkInterceptor.kt +++ b/data/src/main/java/org/oppia/android/data/backends/gae/RemoteAuthNetworkInterceptor.kt @@ -4,8 +4,8 @@ import android.content.Context import okhttp3.Interceptor import okhttp3.Request import okhttp3.Response -import org.oppia.android.app.utility.getVersionCode -import org.oppia.android.app.utility.getVersionName +import org.oppia.android.util.extensions.getVersionCode +import org.oppia.android.util.extensions.getVersionName import java.io.IOException import javax.inject.Inject diff --git a/domain/BUILD.bazel b/domain/BUILD.bazel index 79bcd289f08..ebc2daa97ab 100755 --- a/domain/BUILD.bazel +++ b/domain/BUILD.bazel @@ -27,6 +27,7 @@ package_group( # globs here to ensure that new files added to migrated packages don't accidentally get included in the # top-level module library. MIGRATED_PROD_FILES = glob([ + "src/main/java/org/oppia/android/domain/auth/*.kt", "src/main/java/org/oppia/android/domain/feedbackreporting/*.kt", "src/main/java/org/oppia/android/domain/onboarding/**/*.kt", "src/main/java/org/oppia/android/domain/oppialogger/**/*.kt", @@ -176,6 +177,7 @@ TEST_DEPS = [ ":interaction_object_test_builder", "//app:crashlytics", "//app:crashlytics_deps", + "//app:firestore_deps", "//app/src/main/java/org/oppia/android/app/application/testing:testing_build_flavor_module", "//config/src/java/org/oppia/android/config:all_languages_config", "//data/src/main/java/org/oppia/android/data/backends/gae:network_config_prod_module", diff --git a/domain/build.gradle b/domain/build.gradle index f119c351808..4863351dd1b 100644 --- a/domain/build.gradle +++ b/domain/build.gradle @@ -93,9 +93,11 @@ dependencies { 'com.google.dagger:dagger:2.24', 'com.google.firebase:firebase-analytics-ktx:17.5.0', 'com.google.firebase:firebase-crashlytics:17.0.0', + 'com.google.firebase:firebase-firestore-ktx:24.2.1', + 'com.google.firebase:firebase-auth-ktx:19.3.1', 'com.google.guava:guava:28.1-android', 'com.google.protobuf:protobuf-javalite:3.17.3', - "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" + "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version", ) compileOnly( 'jakarta.xml.bind:jakarta.xml.bind-api:2.3.2', diff --git a/domain/src/main/java/org/oppia/android/domain/auth/AuthenticationController.kt b/domain/src/main/java/org/oppia/android/domain/auth/AuthenticationController.kt new file mode 100644 index 00000000000..fadb7c46797 --- /dev/null +++ b/domain/src/main/java/org/oppia/android/domain/auth/AuthenticationController.kt @@ -0,0 +1,49 @@ +package org.oppia.android.domain.auth + +import kotlinx.coroutines.CompletableDeferred +import kotlinx.coroutines.CoroutineDispatcher +import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.TimeoutCancellationException +import kotlinx.coroutines.launch +import kotlinx.coroutines.withTimeout +import org.oppia.android.util.data.AsyncResult +import org.oppia.android.util.threading.BackgroundDispatcher +import javax.inject.Inject + +/** Controller for signing in and retrieving a Firebase user. */ +class AuthenticationController @Inject constructor( + private val firebaseAuthWrapper: FirebaseAuthWrapper, + @BackgroundDispatcher private val backgroundCoroutineDispatcher: CoroutineDispatcher +) { + /** Returns the current signed in user or null if there is no authenticated user. */ + val currentFirebaseUser: FirebaseUserWrapper? = firebaseAuthWrapper.currentUser + + /** Returns the result of an authentication task. */ + fun signInAnonymouslyWithFirebase(): CompletableDeferred> { + val deferredResult = CompletableDeferred>() + CoroutineScope(backgroundCoroutineDispatcher).launch { + try { + withTimeout(AUTHENTICATION_TIMEOUT_MILLIS) { + firebaseAuthWrapper.signInAnonymously( + onSuccess = { + deferredResult.complete(AsyncResult.Success(null)) + }, + onFailure = { exception -> + deferredResult.complete(AsyncResult.Failure(exception)) + } + ) + } + } catch (e: TimeoutCancellationException) { + deferredResult.complete( + AsyncResult.Failure(e) + ) + } + } + return deferredResult + } + + companion object { + /** The amount of time the authentication task should run before timing out. */ + private const val AUTHENTICATION_TIMEOUT_MILLIS = 30_000L + } +} diff --git a/domain/src/main/java/org/oppia/android/domain/auth/AuthenticationModule.kt b/domain/src/main/java/org/oppia/android/domain/auth/AuthenticationModule.kt new file mode 100644 index 00000000000..faafb4c6baf --- /dev/null +++ b/domain/src/main/java/org/oppia/android/domain/auth/AuthenticationModule.kt @@ -0,0 +1,19 @@ +package org.oppia.android.domain.auth + +import dagger.Module +import dagger.Provides +import javax.inject.Singleton + +/** Provides an implementation of [FirebaseAuthWrapper]. */ +@Module +class AuthenticationModule { + @Provides + @Singleton + fun provideFirebaseAuthWrapper(firebaseAuthInstanceWrapper: FirebaseAuthInstanceWrapper): + FirebaseAuthWrapper = FirebaseAuthWrapperImpl(firebaseAuthInstanceWrapper) + + @Provides + @Singleton + fun provideFirebaseAuthInstanceWrapper(): FirebaseAuthInstanceWrapper = + FirebaseAuthInstanceWrapperImpl() +} diff --git a/domain/src/main/java/org/oppia/android/domain/auth/BUILD.bazel b/domain/src/main/java/org/oppia/android/domain/auth/BUILD.bazel new file mode 100644 index 00000000000..d00f97bfb90 --- /dev/null +++ b/domain/src/main/java/org/oppia/android/domain/auth/BUILD.bazel @@ -0,0 +1,75 @@ +""" +Library for providing authentication with Firebase functionality. +""" + +load("@dagger//:workspace_defs.bzl", "dagger_rules") +load("@io_bazel_rules_kotlin//kotlin:kotlin.bzl", "kt_android_library") + +kt_android_library( + name = "authentication_controller", + srcs = [ + "AuthenticationController.kt", + ], + visibility = ["//:oppia_api_visibility"], + deps = [ + ":firebase_auth_wrapper", + "//third_party:javax_inject_javax_inject", + "//third_party:org_jetbrains_kotlinx_kotlinx-coroutines-core", + "//utility/src/main/java/org/oppia/android/util/threading:annotations", + ], +) + +kt_android_library( + name = "firebase_auth_wrapper", + srcs = [ + "FirebaseAuthInstance.kt", + "FirebaseAuthInstanceWrapper.kt", + "FirebaseAuthWrapper.kt", + "FirebaseUserWrapper.kt", + ], + visibility = ["//:oppia_api_visibility"], + deps = [ + "//third_party:com_google_firebase_firebase-auth-ktx", + "//third_party:org_jetbrains_kotlinx_kotlinx-coroutines-core", + "//utility/src/main/java/org/oppia/android/util/data:async_result", + ], +) + +kt_android_library( + name = "auth_module", + srcs = [ + "AuthenticationModule.kt", + ], + visibility = ["//:oppia_prod_module_visibility"], + deps = [ + ":authentication_controller", + ":dagger", + ":firebase_auth_wrapper_impl", + ], +) + +kt_android_library( + name = "firebase_auth_wrapper_impl", + srcs = [ + "FirebaseAuthWrapperImpl.kt", + ], + visibility = ["//:oppia_prod_module_visibility"], + deps = [ + ":dagger", + ":firebase_auth_instance_wrapper_impl", + ], +) + +kt_android_library( + name = "firebase_auth_instance_wrapper_impl", + srcs = [ + "FirebaseAuthInstanceWrapperImpl.kt", + ], + visibility = ["//:oppia_prod_module_visibility"], + deps = [ + ":dagger", + ":firebase_auth_wrapper", + ], +) + +dagger_rules() diff --git a/domain/src/main/java/org/oppia/android/domain/auth/FirebaseAuthInstance.kt b/domain/src/main/java/org/oppia/android/domain/auth/FirebaseAuthInstance.kt new file mode 100644 index 00000000000..a270857b1cd --- /dev/null +++ b/domain/src/main/java/org/oppia/android/domain/auth/FirebaseAuthInstance.kt @@ -0,0 +1,8 @@ +package org.oppia.android.domain.auth + +import com.google.firebase.auth.FirebaseAuth + +/** Wrapper for [FirebaseAuth], used to pass an instance of [FirebaseAuth]. */ +data class FirebaseAuthInstance( + val firebaseAuth: FirebaseAuth +) diff --git a/domain/src/main/java/org/oppia/android/domain/auth/FirebaseAuthInstanceWrapper.kt b/domain/src/main/java/org/oppia/android/domain/auth/FirebaseAuthInstanceWrapper.kt new file mode 100644 index 00000000000..50677af74c3 --- /dev/null +++ b/domain/src/main/java/org/oppia/android/domain/auth/FirebaseAuthInstanceWrapper.kt @@ -0,0 +1,7 @@ +package org.oppia.android.domain.auth + +/** Interface for providing an implementation of [FirebaseAuthInstance]. */ +interface FirebaseAuthInstanceWrapper { + /** Returns a wrapped instance of FirebaseAuth. */ + val firebaseAuthInstance: FirebaseAuthInstance? +} diff --git a/domain/src/main/java/org/oppia/android/domain/auth/FirebaseAuthInstanceWrapperImpl.kt b/domain/src/main/java/org/oppia/android/domain/auth/FirebaseAuthInstanceWrapperImpl.kt new file mode 100644 index 00000000000..f3a8ae2b24d --- /dev/null +++ b/domain/src/main/java/org/oppia/android/domain/auth/FirebaseAuthInstanceWrapperImpl.kt @@ -0,0 +1,11 @@ +package org.oppia.android.domain.auth + +import com.google.firebase.auth.ktx.auth +import com.google.firebase.ktx.Firebase +import javax.inject.Inject + +/** Implementation of [FirebaseAuthInstanceWrapper]. */ +class FirebaseAuthInstanceWrapperImpl @Inject constructor() : FirebaseAuthInstanceWrapper { + override val firebaseAuthInstance: FirebaseAuthInstance + get() = FirebaseAuthInstance(Firebase.auth) +} diff --git a/domain/src/main/java/org/oppia/android/domain/auth/FirebaseAuthWrapper.kt b/domain/src/main/java/org/oppia/android/domain/auth/FirebaseAuthWrapper.kt new file mode 100644 index 00000000000..85c859eb62a --- /dev/null +++ b/domain/src/main/java/org/oppia/android/domain/auth/FirebaseAuthWrapper.kt @@ -0,0 +1,10 @@ +package org.oppia.android.domain.auth + +/** Wrapper for FirebaseAuth. */ +interface FirebaseAuthWrapper { + /** Returns the current signed in user or null if there is no authenticated user. */ + val currentUser: FirebaseUserWrapper? + + /** Returns the authentication result. */ + fun signInAnonymously(onSuccess: () -> Unit, onFailure: (Throwable) -> Unit) +} diff --git a/domain/src/main/java/org/oppia/android/domain/auth/FirebaseAuthWrapperImpl.kt b/domain/src/main/java/org/oppia/android/domain/auth/FirebaseAuthWrapperImpl.kt new file mode 100644 index 00000000000..d85163e3124 --- /dev/null +++ b/domain/src/main/java/org/oppia/android/domain/auth/FirebaseAuthWrapperImpl.kt @@ -0,0 +1,28 @@ +package org.oppia.android.domain.auth + +import javax.inject.Inject +import javax.inject.Singleton + +/** Production implementation of FirebaseAuthWrapper. */ +@Singleton +class FirebaseAuthWrapperImpl @Inject constructor( + private val firebaseWrapper: FirebaseAuthInstanceWrapper +) : FirebaseAuthWrapper { + override val currentUser: FirebaseUserWrapper? + get() = firebaseWrapper.firebaseAuthInstance?.firebaseAuth?.currentUser?.let { + FirebaseUserWrapper(it.uid) + } + + override fun signInAnonymously(onSuccess: () -> Unit, onFailure: (Throwable) -> Unit) { + firebaseWrapper.firebaseAuthInstance?.firebaseAuth?.signInAnonymously() + ?.addOnSuccessListener { + onSuccess.invoke() + } + ?.addOnFailureListener { task -> + val exception = task.cause + if (exception != null) { + onFailure.invoke(exception) + } + } + } +} diff --git a/domain/src/main/java/org/oppia/android/domain/auth/FirebaseUserWrapper.kt b/domain/src/main/java/org/oppia/android/domain/auth/FirebaseUserWrapper.kt new file mode 100644 index 00000000000..16aeb8ebf5b --- /dev/null +++ b/domain/src/main/java/org/oppia/android/domain/auth/FirebaseUserWrapper.kt @@ -0,0 +1,8 @@ +package org.oppia.android.domain.auth + +import com.google.firebase.auth.FirebaseUser + +/** Wrapper for [FirebaseUser]. */ +data class FirebaseUserWrapper( + val uid: String, +) diff --git a/domain/src/main/java/org/oppia/android/domain/exploration/ExplorationActiveTimeController.kt b/domain/src/main/java/org/oppia/android/domain/exploration/ExplorationActiveTimeController.kt index 7354fb2af8f..9d5e59636b8 100644 --- a/domain/src/main/java/org/oppia/android/domain/exploration/ExplorationActiveTimeController.kt +++ b/domain/src/main/java/org/oppia/android/domain/exploration/ExplorationActiveTimeController.kt @@ -19,6 +19,8 @@ import org.oppia.android.util.data.AsyncResult import org.oppia.android.util.data.DataProvider import org.oppia.android.util.data.DataProviders import org.oppia.android.util.data.DataProviders.Companion.transform +import org.oppia.android.util.platformparameter.EnableNpsSurvey +import org.oppia.android.util.platformparameter.PlatformParameterValue import org.oppia.android.util.system.OppiaClock import org.oppia.android.util.threading.BackgroundDispatcher import java.util.UUID @@ -57,7 +59,8 @@ class ExplorationActiveTimeController @Inject constructor( private val dataProviders: DataProviders, private val oppiaLogger: OppiaLogger, private val exceptionsController: ExceptionsController, - @BackgroundDispatcher private val backgroundCoroutineDispatcher: CoroutineDispatcher + @BackgroundDispatcher private val backgroundCoroutineDispatcher: CoroutineDispatcher, + @EnableNpsSurvey private val enableNpsSurvey: PlatformParameterValue ) : ExplorationProgressListener, ApplicationLifecycleListener { private var isAppInForeground: Boolean = false private var explorationStarted: Boolean = false @@ -82,27 +85,35 @@ class ExplorationActiveTimeController @Inject constructor( override fun onExplorationStarted(profileId: ProfileId, topicId: String) { this.explorationStarted = true - startSessionTimer( - profileId = profileId, - topicId = topicId, - isAppInForeground = getIsAppInForeground(), - explorationStarted = true - ) + if (enableNpsSurvey.value) { + startSessionTimer( + profileId = profileId, + topicId = topicId, + isAppInForeground = getIsAppInForeground(), + explorationStarted = true + ) + } } override fun onExplorationEnded() { this.explorationStarted = false - stopSessionTimerAsync(getIsExplorationStarted()) + if (enableNpsSurvey.value) { + stopSessionTimerAsync(getIsExplorationStarted()) + } } override fun onAppInForeground() { this.isAppInForeground = true - resumeSessionTimer(getIsExplorationStarted()) + if (enableNpsSurvey.value) { + resumeSessionTimer(getIsExplorationStarted()) + } } override fun onAppInBackground() { this.isAppInForeground = false - pauseSessionTimerAsync() + if (enableNpsSurvey.value) { + pauseSessionTimerAsync() + } } private fun getIsAppInForeground() = this.isAppInForeground diff --git a/domain/src/main/java/org/oppia/android/domain/onboarding/AppStartupStateController.kt b/domain/src/main/java/org/oppia/android/domain/onboarding/AppStartupStateController.kt index 31b6b203ba7..ee30f69b061 100644 --- a/domain/src/main/java/org/oppia/android/domain/onboarding/AppStartupStateController.kt +++ b/domain/src/main/java/org/oppia/android/domain/onboarding/AppStartupStateController.kt @@ -4,14 +4,18 @@ import org.oppia.android.app.model.AppStartupState import org.oppia.android.app.model.AppStartupState.BuildFlavorNoticeMode import org.oppia.android.app.model.AppStartupState.StartupMode import org.oppia.android.app.model.BuildFlavor +import org.oppia.android.app.model.DeprecationResponseDatabase import org.oppia.android.app.model.OnboardingState import org.oppia.android.data.persistence.PersistentCacheStore import org.oppia.android.domain.oppialogger.OppiaLogger import org.oppia.android.util.data.DataProvider -import org.oppia.android.util.data.DataProviders.Companion.transform +import org.oppia.android.util.data.DataProviders.Companion.combineWith import org.oppia.android.util.extensions.getStringFromBundle import org.oppia.android.util.locale.OppiaLocale +import org.oppia.android.util.platformparameter.EnableAppAndOsDeprecation +import org.oppia.android.util.platformparameter.PlatformParameterValue import javax.inject.Inject +import javax.inject.Provider import javax.inject.Singleton private const val APP_STARTUP_STATE_PROVIDER_ID = "app_startup_state_data_provider_id" @@ -23,7 +27,10 @@ class AppStartupStateController @Inject constructor( private val oppiaLogger: OppiaLogger, private val expirationMetaDataRetriever: ExpirationMetaDataRetriever, private val machineLocale: OppiaLocale.MachineLocale, - private val currentBuildFlavor: BuildFlavor + private val currentBuildFlavor: BuildFlavor, + private val deprecationController: DeprecationController, + @EnableAppAndOsDeprecation + private val enableAppAndOsDeprecation: Provider>, ) { private val onboardingFlowStore by lazy { cacheStoreFactory.create("on_boarding_flow", OnboardingState.getDefaultInstance()) @@ -90,9 +97,14 @@ class AppStartupStateController @Inject constructor( fun getAppStartupState(): DataProvider = appStartupStateDataProvider private fun computeAppStartupStateProvider(): DataProvider { - return onboardingFlowStore.transform(APP_STARTUP_STATE_PROVIDER_ID) { onboardingState -> + val databaseProvider = deprecationController.getDeprecationDatabase() + + return onboardingFlowStore.combineWith( + databaseProvider, + APP_STARTUP_STATE_PROVIDER_ID + ) { onboardingState, deprecationResponseDatabase -> AppStartupState.newBuilder().apply { - startupMode = computeAppStartupMode(onboardingState) + startupMode = computeAppStartupMode(onboardingState, deprecationResponseDatabase) buildFlavorNoticeMode = computeBuildNoticeMode(onboardingState, startupMode) }.build() } @@ -115,12 +127,21 @@ class AppStartupStateController @Inject constructor( } } - private fun computeAppStartupMode(onboardingState: OnboardingState): StartupMode { - return when { - hasAppExpired() -> StartupMode.APP_IS_DEPRECATED - onboardingState.alreadyOnboardedApp -> StartupMode.USER_IS_ONBOARDED - else -> StartupMode.USER_NOT_YET_ONBOARDED + private fun computeAppStartupMode( + onboardingState: OnboardingState, + deprecationResponseDatabase: DeprecationResponseDatabase + ): StartupMode { + // Process and return either a StartupMode.APP_IS_DEPRECATED, StartupMode.USER_IS_ONBOARDED or + // StartupMode.USER_NOT_YET_ONBOARDED if the app and OS deprecation feature flag is not enabled. + if (!enableAppAndOsDeprecation.get().value) { + return when { + hasAppExpired() -> StartupMode.APP_IS_DEPRECATED + onboardingState.alreadyOnboardedApp -> StartupMode.USER_IS_ONBOARDED + else -> StartupMode.USER_NOT_YET_ONBOARDED + } } + + return deprecationController.processStartUpMode(onboardingState, deprecationResponseDatabase) } private fun computeBuildNoticeMode( diff --git a/domain/src/main/java/org/oppia/android/domain/onboarding/BUILD.bazel b/domain/src/main/java/org/oppia/android/domain/onboarding/BUILD.bazel index ae8e6e2d0ef..bf578eb1067 100644 --- a/domain/src/main/java/org/oppia/android/domain/onboarding/BUILD.bazel +++ b/domain/src/main/java/org/oppia/android/domain/onboarding/BUILD.bazel @@ -23,6 +23,7 @@ kt_android_library( "//utility/src/main/java/org/oppia/android/util/data:data_provider", "//utility/src/main/java/org/oppia/android/util/data:data_providers", "//utility/src/main/java/org/oppia/android/util/extensions:bundle_extensions", + "//utility/src/main/java/org/oppia/android/util/extensions:context_extensions", ], ) @@ -75,6 +76,7 @@ kt_android_library( "//utility/src/main/java/org/oppia/android/util/data:data_provider", "//utility/src/main/java/org/oppia/android/util/data:data_providers", "//utility/src/main/java/org/oppia/android/util/extensions:bundle_extensions", + "//utility/src/main/java/org/oppia/android/util/extensions:context_extensions", ], ) diff --git a/domain/src/main/java/org/oppia/android/domain/onboarding/DeprecationController.kt b/domain/src/main/java/org/oppia/android/domain/onboarding/DeprecationController.kt index d798fe83b62..37afcfd0b51 100644 --- a/domain/src/main/java/org/oppia/android/domain/onboarding/DeprecationController.kt +++ b/domain/src/main/java/org/oppia/android/domain/onboarding/DeprecationController.kt @@ -1,16 +1,26 @@ package org.oppia.android.domain.onboarding +import android.content.Context +import android.os.Build import kotlinx.coroutines.Deferred +import org.oppia.android.app.model.AppStartupState.StartupMode import org.oppia.android.app.model.DeprecationNoticeType import org.oppia.android.app.model.DeprecationResponse import org.oppia.android.app.model.DeprecationResponseDatabase +import org.oppia.android.app.model.OnboardingState import org.oppia.android.data.persistence.PersistentCacheStore import org.oppia.android.domain.oppialogger.OppiaLogger import org.oppia.android.util.data.AsyncResult import org.oppia.android.util.data.DataProvider import org.oppia.android.util.data.DataProviders import org.oppia.android.util.data.DataProviders.Companion.transform +import org.oppia.android.util.extensions.getVersionCode +import org.oppia.android.util.platformparameter.ForcedAppUpdateVersionCode +import org.oppia.android.util.platformparameter.LowestSupportedApiLevel +import org.oppia.android.util.platformparameter.OptionalAppUpdateVersionCode +import org.oppia.android.util.platformparameter.PlatformParameterValue import javax.inject.Inject +import javax.inject.Provider import javax.inject.Singleton private const val GET_DEPRECATION_RESPONSE_PROVIDER_ID = "get_deprecation_response_provider_id" @@ -23,8 +33,15 @@ private const val ADD_DEPRECATION_RESPONSE_PROVIDER_ID = "add_deprecation_respon @Singleton class DeprecationController @Inject constructor( cacheStoreFactory: PersistentCacheStore.Factory, + private val context: Context, private val oppiaLogger: OppiaLogger, - private val dataProviders: DataProviders + private val dataProviders: DataProviders, + @OptionalAppUpdateVersionCode + private val optionalAppUpdateVersionCode: Provider>, + @ForcedAppUpdateVersionCode + private val forcedAppUpdateVersionCode: Provider>, + @LowestSupportedApiLevel + private val lowestSupportedApiLevel: Provider> ) { /** Create an instance of [PersistentCacheStore] that contains a [DeprecationResponseDatabase]. */ private val deprecationStore by lazy { @@ -114,4 +131,49 @@ class DeprecationController @Inject constructor( DeprecationResponseActionStatus.SUCCESS -> AsyncResult.Success(null) } } + + /** + * Process and return either a [StartupMode.OS_IS_DEPRECATED], [StartupMode.APP_IS_DEPRECATED], + * [StartupMode.OPTIONAL_UPDATE_AVAILABLE], [StartupMode.USER_IS_ONBOARDED] or + * [StartupMode.USER_NOT_YET_ONBOARDED] based on the values of [lowestSupportedApiLevel], + * [optionalAppUpdateVersionCode], [forcedAppUpdateVersionCode] and [onboardingState]. + */ + fun processStartUpMode( + onboardingState: OnboardingState, + deprecationDatabase: DeprecationResponseDatabase + ): StartupMode { + val previousDeprecatedAppVersion = deprecationDatabase.appDeprecationResponse.deprecatedVersion + val previousDeprecatedOsVersion = deprecationDatabase.osDeprecationResponse.deprecatedVersion + + val appVersionCode = context.getVersionCode() + val currentApiLevel = Build.VERSION.SDK_INT + val osIsDeprecated = lowestSupportedApiLevel.get().value > currentApiLevel + + val osDeprecationDialogHasNotBeenShown = + previousDeprecatedOsVersion < lowestSupportedApiLevel.get().value + + val forcedAppUpdateIsAvailable = forcedAppUpdateVersionCode.get().value > appVersionCode + val optionalAppUpdateIsAvailable = optionalAppUpdateVersionCode.get().value > appVersionCode + + val optionalAppDeprecationDialogHasNotBeenShown = + previousDeprecatedAppVersion < optionalAppUpdateVersionCode.get().value + val forcedAppDeprecationDialogHasNotBeenShown = + previousDeprecatedAppVersion < forcedAppUpdateVersionCode.get().value + + if (onboardingState.alreadyOnboardedApp) { + if (osIsDeprecated && osDeprecationDialogHasNotBeenShown) { + return StartupMode.OS_IS_DEPRECATED + } + + if (forcedAppUpdateIsAvailable && forcedAppDeprecationDialogHasNotBeenShown) { + return StartupMode.APP_IS_DEPRECATED + } + + if (optionalAppUpdateIsAvailable && optionalAppDeprecationDialogHasNotBeenShown) { + return StartupMode.OPTIONAL_UPDATE_AVAILABLE + } + + return StartupMode.USER_IS_ONBOARDED + } else return StartupMode.USER_NOT_YET_ONBOARDED + } } diff --git a/domain/src/main/java/org/oppia/android/domain/oppialogger/LogStorageModule.kt b/domain/src/main/java/org/oppia/android/domain/oppialogger/LogStorageModule.kt index 73fe03a7a3d..7ef560e730e 100644 --- a/domain/src/main/java/org/oppia/android/domain/oppialogger/LogStorageModule.kt +++ b/domain/src/main/java/org/oppia/android/domain/oppialogger/LogStorageModule.kt @@ -13,6 +13,9 @@ annotation class ExceptionLogStorageCacheSize @Qualifier annotation class PerformanceMetricsLogStorageCacheSize +@Qualifier +annotation class FirestoreLogStorageCacheSize + /** Provider to return any constants required during the storage of log reports. */ @Module class LogStorageModule { @@ -46,4 +49,14 @@ class LogStorageModule { @Provides @PerformanceMetricsLogStorageCacheSize fun provideMetricLogStorageCacheSize(): Int = 25_000 + + /** + * Provides the maximum number of firestore-bound event logs that can be cached on disk. + * + * At a configured cache size of 30 records & estimating 376 bytes per record, it's expected that + * no more than 11.1KB will be required for cache disk space. + */ + @Provides + @FirestoreLogStorageCacheSize + fun provideFirestoreLogStorageCacheSize(): Int = 30 } diff --git a/domain/src/main/java/org/oppia/android/domain/oppialogger/LoggingIdentifierController.kt b/domain/src/main/java/org/oppia/android/domain/oppialogger/LoggingIdentifierController.kt index 5ce84fc4bcf..f0e35b7d079 100644 --- a/domain/src/main/java/org/oppia/android/domain/oppialogger/LoggingIdentifierController.kt +++ b/domain/src/main/java/org/oppia/android/domain/oppialogger/LoggingIdentifierController.kt @@ -28,7 +28,15 @@ class LoggingIdentifierController @Inject constructor( private val persistentCacheStoreFactory: PersistentCacheStore.Factory, private val oppiaLogger: OppiaLogger ) { - private val learnerIdRandom by lazy { Random(applicationIdSeed) } + // Use a base random to compute the per-ID random IDs in order so that test behaviors are + // consistent and deterministic when fixing the application ID seed. + private val baseRandom = Random(applicationIdSeed) + private val installationRandomSeed = baseRandom.nextLong() + private val sessionRandomSeed = baseRandom.nextLong() + private val learnerRandomSeed = baseRandom.nextLong() + private val installationIdRandom by lazy { Random(installationRandomSeed) } + private val sessionIdRandom by lazy { Random(sessionRandomSeed) } + private val learnerIdRandom by lazy { Random(learnerRandomSeed) } private val sessionId by lazy { MutableStateFlow(computeSessionId()) } private val sessionIdDataProvider by lazy { @@ -113,12 +121,12 @@ class LoggingIdentifierController @Inject constructor( sessionId.value = computeSessionId() } - private fun computeSessionId(): String = learnerIdRandom.randomUuid().toString() + private fun computeSessionId(): String = sessionIdRandom.randomUuid().toString() private fun computeInstallationId(): String { return machineLocale.run { MessageDigest.getInstance("SHA-1") - .digest(learnerIdRandom.randomUuid().toString().toByteArray()) + .digest(installationIdRandom.randomUuid().toString().toByteArray()) .joinToString("") { "%02x".formatForMachines(it) } .substring(startIndex = 0, endIndex = 12) } diff --git a/domain/src/main/java/org/oppia/android/domain/oppialogger/analytics/BUILD.bazel b/domain/src/main/java/org/oppia/android/domain/oppialogger/analytics/BUILD.bazel index 6b207de01aa..4ca1df4030e 100644 --- a/domain/src/main/java/org/oppia/android/domain/oppialogger/analytics/BUILD.bazel +++ b/domain/src/main/java/org/oppia/android/domain/oppialogger/analytics/BUILD.bazel @@ -196,4 +196,25 @@ kt_android_library( visibility = ["//:oppia_api_visibility"], ) +kt_android_library( + name = "data_controller", + srcs = [ + "FirestoreDataController.kt", + ], + visibility = ["//:oppia_api_visibility"], + deps = [ + ":dagger", + "//data/src/main/java/org/oppia/android/data/persistence:cache_store", + "//domain/src/main/java/org/oppia/android/domain/auth:authentication_controller", + "//domain/src/main/java/org/oppia/android/domain/oppialogger:prod_module", + "//model/src/main/proto:event_logger_java_proto_lite", + "//utility", + "//utility/src/main/java/org/oppia/android/util/logging:console_logger", + "//utility/src/main/java/org/oppia/android/util/logging:exception_logger", + "//utility/src/main/java/org/oppia/android/util/logging/firebase:prod_module", + "//utility/src/main/java/org/oppia/android/util/networking:network_connection_util", + "//utility/src/main/java/org/oppia/android/util/system:oppia_clock", + ], +) + dagger_rules() diff --git a/domain/src/main/java/org/oppia/android/domain/oppialogger/analytics/FirestoreDataController.kt b/domain/src/main/java/org/oppia/android/domain/oppialogger/analytics/FirestoreDataController.kt new file mode 100644 index 00000000000..e68013aff83 --- /dev/null +++ b/domain/src/main/java/org/oppia/android/domain/oppialogger/analytics/FirestoreDataController.kt @@ -0,0 +1,183 @@ +package org.oppia.android.domain.oppialogger.analytics + +import kotlinx.coroutines.CoroutineDispatcher +import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.async +import org.oppia.android.app.model.EventLog +import org.oppia.android.app.model.OppiaEventLogs +import org.oppia.android.app.model.ProfileId +import org.oppia.android.data.persistence.PersistentCacheStore +import org.oppia.android.domain.auth.AuthenticationController +import org.oppia.android.domain.oppialogger.FirestoreLogStorageCacheSize +import org.oppia.android.util.data.AsyncResult +import org.oppia.android.util.data.DataProvider +import org.oppia.android.util.logging.ConsoleLogger +import org.oppia.android.util.logging.ExceptionLogger +import org.oppia.android.util.logging.firebase.FirestoreEventLogger +import org.oppia.android.util.networking.NetworkConnectionUtil +import org.oppia.android.util.system.OppiaClock +import org.oppia.android.util.threading.BlockingDispatcher +import javax.inject.Inject +import javax.inject.Singleton + +/** Controller for handling event logging for Firestore-bound data. */ +@Singleton +class FirestoreDataController @Inject constructor( + cacheStoreFactory: PersistentCacheStore.Factory, + private val consoleLogger: ConsoleLogger, + private val networkConnectionUtil: NetworkConnectionUtil, + private val eventLogger: FirestoreEventLogger, + private val exceptionLogger: ExceptionLogger, + private val oppiaClock: OppiaClock, + private val authenticationController: AuthenticationController, + @BlockingDispatcher private val blockingDispatcher: CoroutineDispatcher, + @FirestoreLogStorageCacheSize private val logStorageCacheSize: Int +) { + private val firestoreEventsStore = + cacheStoreFactory.create("firestore_data", OppiaEventLogs.getDefaultInstance()) + + /** + * Uploads all events pending currently for upload, and blocks until the events are uploaded. An + * error will be thrown if something went wrong during upload. + */ + suspend fun uploadData() { + val eventLogsToUpload = firestoreEventsStore.readDataAsync().await().eventLogsToUploadList + + if (eventLogsToUpload.isNotEmpty()) { + eventLogsToUpload.forEach { eventLog -> + authenticateAndUploadToFirestore(eventLog) + } + } + } + + /** + * Logs an event defined by [eventContext] corresponding to time [timestamp]. + * + * This will schedule a background upload of the event if there's internet connectivity, otherwise + * it will cache the event for a later upload. + */ + fun logEvent( + eventContext: EventLog.Context, + profileId: ProfileId?, + timestamp: Long = oppiaClock.getCurrentTimeMs() + ) { + CoroutineScope(blockingDispatcher).async { + uploadOrCacheEventLog(createEventLog(profileId, timestamp, eventContext)) + }.invokeOnCompletion { failure -> + failure?.let { + consoleLogger.w( + "FirestoreDataController", + "Failed to upload or cache event: $eventContext (at time $timestamp).", + it + ) + } + } + } + + /** Returns an event log containing relevant data for event reporting. */ + private fun createEventLog( + profileId: ProfileId?, + timestamp: Long, + context: EventLog.Context + ): EventLog { + return EventLog.newBuilder().apply { + this.timestamp = timestamp + this.priority = EventLog.Priority.ESSENTIAL + this.context = context + profileId?.let { this.profileId = it } + }.build() + } + + /** Either uploads or caches [eventLog] depending on current internet connectivity. */ + private suspend fun uploadOrCacheEventLog(eventLog: EventLog) { + when (networkConnectionUtil.getCurrentConnectionStatus()) { + NetworkConnectionUtil.ProdConnectionStatus.NONE -> cacheEventForFirestore(eventLog) + else -> authenticateAndUploadToFirestore(eventLog) + } + } + + private suspend fun authenticateAndUploadToFirestore(eventLog: EventLog) { + if (authenticationController.currentFirebaseUser == null) { + when (val signInResult = authenticationController.signInAnonymouslyWithFirebase().await()) { + is AsyncResult.Success -> { + consoleLogger.i("FirestoreDataController", "Sign in succeeded") + uploadLog(eventLog) + } + is AsyncResult.Failure -> { + consoleLogger.e( + "FirestoreDataController", + "Sign in failed with cause ${signInResult.error}" + ) + cacheEventForFirestore(eventLog) + } + is AsyncResult.Pending -> { + consoleLogger.i("FirestoreDataController", "Signing in anonymously to Firebase") + } + } + } else { + uploadLog(eventLog) + } + } + + private fun uploadLog(eventLog: EventLog) { + eventLogger.uploadEvent(eventLog) + removeFirstEventLogFromStore() + } + + /** + * Adds an event to the storage. + * + * The [eventLog] is added to the store if the size of the store isn't exceeding + * [logStorageCacheSize]. If the limit is exceeded then the least recent event is removed from the + * [firestoreEventsStore]. + */ + private fun cacheEventForFirestore(eventLog: EventLog) { + firestoreEventsStore.storeDataAsync(updateInMemoryCache = true) { eventLogs -> + val storeSize = eventLogs.eventLogsToUploadList.size + if (storeSize + 1 > logStorageCacheSize) { + val eventLogRemovalIndex = getLeastRecentEventIndex(eventLogs) + if (eventLogRemovalIndex != null) { + return@storeDataAsync eventLogs.toBuilder() + .removeEventLogsToUpload(eventLogRemovalIndex) + .addEventLogsToUpload(eventLog) + .build() + } else { + val exception = + IllegalStateException( + "Least Recent Event index absent -- FirestoreLogStorageCacheSize is 0" + ) + consoleLogger.e("FirestoreDataController", "Failure while caching event.", exception) + exceptionLogger.logException(exception) + } + } + return@storeDataAsync eventLogs.toBuilder().addEventLogsToUpload(eventLog).build() + }.invokeOnCompletion { + it?.let { consoleLogger.e("FirestoreDataController", "Failed to store event log.", it) } + } + } + + /** + * Returns the index of the least recent event from the existing store on the basis of recency and + * priority. + */ + private fun getLeastRecentEventIndex(oppiaEventLogs: OppiaEventLogs): Int? = + oppiaEventLogs.eventLogsToUploadList.withIndex().minByOrNull { it.value.timestamp }?.index + + /** Returns a data provider for log reports that have been recorded for upload. */ + fun getEventLogStore(): DataProvider = firestoreEventsStore + + /** Removes the first log report that had been recorded for upload. */ + private fun removeFirstEventLogFromStore() { + firestoreEventsStore.storeDataAsync(updateInMemoryCache = true) { oppiaEventLogs -> + if (oppiaEventLogs.eventLogsToUploadCount > 0) { + return@storeDataAsync oppiaEventLogs.toBuilder().removeEventLogsToUpload(0).build() + } else { + return@storeDataAsync oppiaEventLogs // No event logs to remove + } + }.invokeOnCompletion { + it?.let { + consoleLogger.e("FirestoreDataController", "Failed to remove event log", it) + } + } + } +} diff --git a/domain/src/main/java/org/oppia/android/domain/oppialogger/loguploader/BUILD.bazel b/domain/src/main/java/org/oppia/android/domain/oppialogger/loguploader/BUILD.bazel index ac5d1338364..58f18019799 100644 --- a/domain/src/main/java/org/oppia/android/domain/oppialogger/loguploader/BUILD.bazel +++ b/domain/src/main/java/org/oppia/android/domain/oppialogger/loguploader/BUILD.bazel @@ -34,6 +34,7 @@ kt_android_library( ], deps = [ "//domain/src/main/java/org/oppia/android/domain/oppialogger/analytics:controller", + "//domain/src/main/java/org/oppia/android/domain/oppialogger/analytics:data_controller", "//domain/src/main/java/org/oppia/android/domain/oppialogger/analytics:performance_metrics_controller", "//domain/src/main/java/org/oppia/android/domain/oppialogger/exceptions:controller", "//domain/src/main/java/org/oppia/android/domain/util:extensions", diff --git a/domain/src/main/java/org/oppia/android/domain/oppialogger/loguploader/LogReportWorkManagerInitializer.kt b/domain/src/main/java/org/oppia/android/domain/oppialogger/loguploader/LogReportWorkManagerInitializer.kt index 5f40f82caac..ef31a5ab9dc 100644 --- a/domain/src/main/java/org/oppia/android/domain/oppialogger/loguploader/LogReportWorkManagerInitializer.kt +++ b/domain/src/main/java/org/oppia/android/domain/oppialogger/loguploader/LogReportWorkManagerInitializer.kt @@ -55,6 +55,13 @@ class LogReportWorkManagerInitializer @Inject constructor( ) .build() + private val workerCaseForUploadingFirestoreData: Data = Data.Builder() + .putString( + LogUploadWorker.WORKER_CASE_KEY, + LogUploadWorker.FIRESTORE_WORKER + ) + .build() + private val workerCaseForSchedulingPeriodicBackgroundMetricLogs: Data = Data.Builder() .putString( MetricLogSchedulingWorker.WORKER_CASE_KEY, @@ -124,6 +131,12 @@ class LogReportWorkManagerInitializer @Inject constructor( .setConstraints(logReportWorkerConstraints) .build() + private val workRequestForUploadingFireStoreData: PeriodicWorkRequest = + PeriodicWorkRequest.Builder(LogUploadWorker::class.java, 6, TimeUnit.HOURS) + .setInputData(workerCaseForUploadingFirestoreData) + .setConstraints(logReportWorkerConstraints) + .build() + override fun onCreate(workManager: WorkManager) { logUploader.enqueueWorkRequestForEvents(workManager, workRequestForUploadingEvents) logUploader.enqueueWorkRequestForExceptions(workManager, workRequestForUploadingExceptions) @@ -131,6 +144,10 @@ class LogReportWorkManagerInitializer @Inject constructor( workManager, workRequestForUploadingPerformanceMetrics ) + logUploader.enqueueWorkRequestForFirestore( + workManager, + workRequestForUploadingFireStoreData + ) metricLogScheduler.enqueueWorkRequestForPeriodicBackgroundMetrics( workManager, workRequestForSchedulingPeriodicBackgroundMetricLogs @@ -178,6 +195,9 @@ class LogReportWorkManagerInitializer @Inject constructor( fun getWorkRequestForSchedulingPeriodicBackgroundPerformanceMetricLogsId(): UUID = workRequestForSchedulingPeriodicBackgroundMetricLogs.id + /** Returns the [UUID] of the work request that is enqueued for uploading firestore data. */ + fun getWorkRequestForFirestoreId(): UUID = workRequestForUploadingFireStoreData.id + /** * Returns the [Data] that goes into the work request that is enqueued for uploading event logs. */ @@ -212,4 +232,10 @@ class LogReportWorkManagerInitializer @Inject constructor( */ fun getWorkRequestDataForSchedulingPeriodicBackgroundPerformanceMetricLogs(): Data = workerCaseForSchedulingPeriodicBackgroundMetricLogs + + /** + * Returns the [Data] that goes into the work request that is enqueued for uploading firestore + * data. + */ + fun getWorkRequestDataForFirestore(): Data = workerCaseForUploadingFirestoreData } diff --git a/domain/src/main/java/org/oppia/android/domain/oppialogger/loguploader/LogUploadWorker.kt b/domain/src/main/java/org/oppia/android/domain/oppialogger/loguploader/LogUploadWorker.kt index ed860470f56..f31669e153b 100644 --- a/domain/src/main/java/org/oppia/android/domain/oppialogger/loguploader/LogUploadWorker.kt +++ b/domain/src/main/java/org/oppia/android/domain/oppialogger/loguploader/LogUploadWorker.kt @@ -10,6 +10,7 @@ import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.async import org.oppia.android.domain.oppialogger.analytics.AnalyticsController +import org.oppia.android.domain.oppialogger.analytics.FirestoreDataController import org.oppia.android.domain.oppialogger.analytics.PerformanceMetricsController import org.oppia.android.domain.oppialogger.exceptions.ExceptionsController import org.oppia.android.domain.oppialogger.exceptions.toException @@ -29,6 +30,7 @@ class LogUploadWorker private constructor( private val exceptionsController: ExceptionsController, private val performanceMetricsController: PerformanceMetricsController, private val exceptionLogger: ExceptionLogger, + private val dataController: FirestoreDataController, private val performanceMetricsEventLogger: PerformanceMetricsEventLogger, private val consoleLogger: ConsoleLogger, private val syncStatusManager: SyncStatusManager, @@ -41,6 +43,7 @@ class LogUploadWorker private constructor( const val EVENT_WORKER = "event_worker" const val EXCEPTION_WORKER = "exception_worker" const val PERFORMANCE_METRICS_WORKER = "performance_metrics_worker" + const val FIRESTORE_WORKER = "firestore_worker" } @ExperimentalCoroutinesApi @@ -51,6 +54,7 @@ class LogUploadWorker private constructor( EVENT_WORKER -> uploadEvents() EXCEPTION_WORKER -> uploadExceptions() PERFORMANCE_METRICS_WORKER -> uploadPerformanceMetrics() + FIRESTORE_WORKER -> uploadFirestoreData() else -> Result.failure() } } @@ -111,12 +115,24 @@ class LogUploadWorker private constructor( } } + /** Extracts data from offline storage and logs them to the remote service. */ + private suspend fun uploadFirestoreData(): Result { + return try { + dataController.uploadData() + Result.success() + } catch (e: Exception) { + consoleLogger.e(TAG, e.toString(), e) + Result.failure() + } + } + /** Creates an instance of [LogUploadWorker] by properly injecting dependencies. */ class Factory @Inject constructor( private val analyticsController: AnalyticsController, private val exceptionsController: ExceptionsController, private val performanceMetricsController: PerformanceMetricsController, private val exceptionLogger: ExceptionLogger, + private val dataController: FirestoreDataController, private val performanceMetricsEventLogger: PerformanceMetricsEventLogger, private val consoleLogger: ConsoleLogger, private val syncStatusManager: SyncStatusManager, @@ -130,6 +146,7 @@ class LogUploadWorker private constructor( exceptionsController, performanceMetricsController, exceptionLogger, + dataController, performanceMetricsEventLogger, consoleLogger, syncStatusManager, diff --git a/domain/src/main/java/org/oppia/android/domain/oppialogger/survey/SurveyEventsLogger.kt b/domain/src/main/java/org/oppia/android/domain/oppialogger/survey/SurveyEventsLogger.kt index 7e1178b0ca0..b79f75fa081 100644 --- a/domain/src/main/java/org/oppia/android/domain/oppialogger/survey/SurveyEventsLogger.kt +++ b/domain/src/main/java/org/oppia/android/domain/oppialogger/survey/SurveyEventsLogger.kt @@ -6,6 +6,7 @@ import org.oppia.android.app.model.ProfileId import org.oppia.android.app.model.SurveyQuestionName import org.oppia.android.app.model.UserTypeAnswer import org.oppia.android.domain.oppialogger.analytics.AnalyticsController +import org.oppia.android.domain.oppialogger.analytics.FirestoreDataController import javax.inject.Inject import javax.inject.Singleton @@ -17,6 +18,7 @@ import javax.inject.Singleton @Singleton class SurveyEventsLogger @Inject constructor( private val analyticsController: AnalyticsController, + private val dataController: FirestoreDataController ) { /** @@ -50,6 +52,14 @@ class SurveyEventsLogger @Inject constructor( ) } + /** Logs an event representing the response to the optional survey question. */ + fun logOptionalResponse(surveyId: String, profileId: ProfileId?, answer: String) { + dataController.logEvent( + createOptionalSurveyResponseContext(surveyId, profileId, answer), + profileId + ) + } + private fun createMandatorySurveyResponseContext( surveyId: String, profileId: ProfileId, @@ -88,11 +98,27 @@ class SurveyEventsLogger @Inject constructor( private fun createSurveyResponseContext( surveyId: String, - profileId: ProfileId + profileId: ProfileId? ): EventLog.SurveyResponseContext { return EventLog.SurveyResponseContext.newBuilder() - .setProfileId(profileId.internalId.toString()) + .setProfileId(profileId?.internalId.toString()) .setSurveyId(surveyId) .build() } + + private fun createOptionalSurveyResponseContext( + surveyId: String, + profileId: ProfileId?, + answer: String + ): EventLog.Context { + return EventLog.Context.newBuilder() + .setOptionalResponse( + EventLog.OptionalSurveyResponseContext.newBuilder() + .setFeedbackAnswer(answer) + .setSurveyDetails( + createSurveyResponseContext(surveyId, profileId) + ) + ) + .build() + } } diff --git a/domain/src/main/java/org/oppia/android/domain/platformparameter/PlatformParameterAlphaKenyaModule.kt b/domain/src/main/java/org/oppia/android/domain/platformparameter/PlatformParameterAlphaKenyaModule.kt index 01b0f2e8036..634755addb5 100644 --- a/domain/src/main/java/org/oppia/android/domain/platformparameter/PlatformParameterAlphaKenyaModule.kt +++ b/domain/src/main/java/org/oppia/android/domain/platformparameter/PlatformParameterAlphaKenyaModule.kt @@ -3,7 +3,7 @@ package org.oppia.android.domain.platformparameter import android.content.Context import dagger.Module import dagger.Provides -import org.oppia.android.app.utility.getVersionCode +import org.oppia.android.util.extensions.getVersionCode import org.oppia.android.util.platformparameter.APP_AND_OS_DEPRECATION import org.oppia.android.util.platformparameter.CACHE_LATEX_RENDERING import org.oppia.android.util.platformparameter.CACHE_LATEX_RENDERING_DEFAULT_VALUE @@ -15,6 +15,10 @@ import org.oppia.android.util.platformparameter.ENABLE_DOWNLOADS_SUPPORT_DEFAULT import org.oppia.android.util.platformparameter.ENABLE_EDIT_ACCOUNTS_OPTIONS_UI_DEFAULT_VALUE import org.oppia.android.util.platformparameter.ENABLE_EXTRA_TOPIC_TABS_UI_DEFAULT_VALUE import org.oppia.android.util.platformparameter.ENABLE_INTERACTION_CONFIG_CHANGE_STATE_RETENTION_DEFAULT_VALUE +import org.oppia.android.util.platformparameter.ENABLE_NPS_SURVEY +import org.oppia.android.util.platformparameter.ENABLE_NPS_SURVEY_DEFAULT_VALUE +import org.oppia.android.util.platformparameter.ENABLE_ONBOARDING_FLOW_V2 +import org.oppia.android.util.platformparameter.ENABLE_ONBOARDING_FLOW_V2_DEFAULT_VALUE import org.oppia.android.util.platformparameter.ENABLE_PERFORMANCE_METRICS_COLLECTION import org.oppia.android.util.platformparameter.ENABLE_PERFORMANCE_METRICS_COLLECTION_DEFAULT_VALUE import org.oppia.android.util.platformparameter.ENABLE_SPOTLIGHT_UI_DEFAULT_VALUE @@ -27,6 +31,8 @@ import org.oppia.android.util.platformparameter.EnableFastLanguageSwitchingInLes import org.oppia.android.util.platformparameter.EnableInteractionConfigChangeStateRetention import org.oppia.android.util.platformparameter.EnableLearnerStudyAnalytics import org.oppia.android.util.platformparameter.EnableLoggingLearnerStudyIds +import org.oppia.android.util.platformparameter.EnableNpsSurvey +import org.oppia.android.util.platformparameter.EnableOnboardingFlowV2 import org.oppia.android.util.platformparameter.EnablePerformanceMetricsCollection import org.oppia.android.util.platformparameter.EnableSpotlightUi import org.oppia.android.util.platformparameter.FAST_LANGUAGE_SWITCHING_IN_LESSON @@ -307,4 +313,26 @@ class PlatformParameterAlphaKenyaModule { NPS_SURVEY_MINIMUM_AGGREGATE_LEARNING_TIME_IN_A_TOPIC_IN_MINUTES_DEFAULT_VALUE ) } + + @Provides + @EnableNpsSurvey + fun provideEnableNpsSurvey( + platformParameterSingleton: PlatformParameterSingleton + ): PlatformParameterValue { + return platformParameterSingleton.getBooleanPlatformParameter(ENABLE_NPS_SURVEY) + ?: PlatformParameterValue.createDefaultParameter( + ENABLE_NPS_SURVEY_DEFAULT_VALUE + ) + } + + @Provides + @EnableOnboardingFlowV2 + fun provideEnableOnboardingFlowV2( + platformParameterSingleton: PlatformParameterSingleton + ): PlatformParameterValue { + return platformParameterSingleton.getBooleanPlatformParameter(ENABLE_ONBOARDING_FLOW_V2) + ?: PlatformParameterValue.createDefaultParameter( + ENABLE_ONBOARDING_FLOW_V2_DEFAULT_VALUE + ) + } } diff --git a/domain/src/main/java/org/oppia/android/domain/platformparameter/PlatformParameterAlphaModule.kt b/domain/src/main/java/org/oppia/android/domain/platformparameter/PlatformParameterAlphaModule.kt index 1805833253d..8f2b2769bdb 100644 --- a/domain/src/main/java/org/oppia/android/domain/platformparameter/PlatformParameterAlphaModule.kt +++ b/domain/src/main/java/org/oppia/android/domain/platformparameter/PlatformParameterAlphaModule.kt @@ -3,7 +3,7 @@ package org.oppia.android.domain.platformparameter import android.content.Context import dagger.Module import dagger.Provides -import org.oppia.android.app.utility.getVersionCode +import org.oppia.android.util.extensions.getVersionCode import org.oppia.android.util.platformparameter.APP_AND_OS_DEPRECATION import org.oppia.android.util.platformparameter.CACHE_LATEX_RENDERING import org.oppia.android.util.platformparameter.CACHE_LATEX_RENDERING_DEFAULT_VALUE @@ -15,6 +15,10 @@ import org.oppia.android.util.platformparameter.ENABLE_DOWNLOADS_SUPPORT_DEFAULT import org.oppia.android.util.platformparameter.ENABLE_EDIT_ACCOUNTS_OPTIONS_UI_DEFAULT_VALUE import org.oppia.android.util.platformparameter.ENABLE_EXTRA_TOPIC_TABS_UI_DEFAULT_VALUE import org.oppia.android.util.platformparameter.ENABLE_INTERACTION_CONFIG_CHANGE_STATE_RETENTION_DEFAULT_VALUE +import org.oppia.android.util.platformparameter.ENABLE_NPS_SURVEY +import org.oppia.android.util.platformparameter.ENABLE_NPS_SURVEY_DEFAULT_VALUE +import org.oppia.android.util.platformparameter.ENABLE_ONBOARDING_FLOW_V2 +import org.oppia.android.util.platformparameter.ENABLE_ONBOARDING_FLOW_V2_DEFAULT_VALUE import org.oppia.android.util.platformparameter.ENABLE_PERFORMANCE_METRICS_COLLECTION import org.oppia.android.util.platformparameter.ENABLE_PERFORMANCE_METRICS_COLLECTION_DEFAULT_VALUE import org.oppia.android.util.platformparameter.EXTRA_TOPIC_TABS_UI @@ -26,6 +30,8 @@ import org.oppia.android.util.platformparameter.EnableFastLanguageSwitchingInLes import org.oppia.android.util.platformparameter.EnableInteractionConfigChangeStateRetention import org.oppia.android.util.platformparameter.EnableLearnerStudyAnalytics import org.oppia.android.util.platformparameter.EnableLoggingLearnerStudyIds +import org.oppia.android.util.platformparameter.EnableNpsSurvey +import org.oppia.android.util.platformparameter.EnableOnboardingFlowV2 import org.oppia.android.util.platformparameter.EnablePerformanceMetricsCollection import org.oppia.android.util.platformparameter.EnableSpotlightUi import org.oppia.android.util.platformparameter.FAST_LANGUAGE_SWITCHING_IN_LESSON @@ -302,4 +308,26 @@ class PlatformParameterAlphaModule { NPS_SURVEY_MINIMUM_AGGREGATE_LEARNING_TIME_IN_A_TOPIC_IN_MINUTES_DEFAULT_VALUE ) } + + @Provides + @EnableNpsSurvey + fun provideEnableNpsSurvey( + platformParameterSingleton: PlatformParameterSingleton + ): PlatformParameterValue { + return platformParameterSingleton.getBooleanPlatformParameter(ENABLE_NPS_SURVEY) + ?: PlatformParameterValue.createDefaultParameter( + ENABLE_NPS_SURVEY_DEFAULT_VALUE + ) + } + + @Provides + @EnableOnboardingFlowV2 + fun provideEnableOnboardingFlowV2( + platformParameterSingleton: PlatformParameterSingleton + ): PlatformParameterValue { + return platformParameterSingleton.getBooleanPlatformParameter(ENABLE_ONBOARDING_FLOW_V2) + ?: PlatformParameterValue.createDefaultParameter( + ENABLE_ONBOARDING_FLOW_V2_DEFAULT_VALUE + ) + } } diff --git a/domain/src/main/java/org/oppia/android/domain/platformparameter/PlatformParameterModule.kt b/domain/src/main/java/org/oppia/android/domain/platformparameter/PlatformParameterModule.kt index c1de688e0f9..fdca7c4cc41 100644 --- a/domain/src/main/java/org/oppia/android/domain/platformparameter/PlatformParameterModule.kt +++ b/domain/src/main/java/org/oppia/android/domain/platformparameter/PlatformParameterModule.kt @@ -3,7 +3,7 @@ package org.oppia.android.domain.platformparameter import android.content.Context import dagger.Module import dagger.Provides -import org.oppia.android.app.utility.getVersionCode +import org.oppia.android.util.extensions.getVersionCode import org.oppia.android.util.platformparameter.APP_AND_OS_DEPRECATION import org.oppia.android.util.platformparameter.CACHE_LATEX_RENDERING import org.oppia.android.util.platformparameter.CACHE_LATEX_RENDERING_DEFAULT_VALUE @@ -15,6 +15,10 @@ import org.oppia.android.util.platformparameter.ENABLE_DOWNLOADS_SUPPORT_DEFAULT import org.oppia.android.util.platformparameter.ENABLE_EDIT_ACCOUNTS_OPTIONS_UI_DEFAULT_VALUE import org.oppia.android.util.platformparameter.ENABLE_EXTRA_TOPIC_TABS_UI_DEFAULT_VALUE import org.oppia.android.util.platformparameter.ENABLE_INTERACTION_CONFIG_CHANGE_STATE_RETENTION_DEFAULT_VALUE +import org.oppia.android.util.platformparameter.ENABLE_NPS_SURVEY +import org.oppia.android.util.platformparameter.ENABLE_NPS_SURVEY_DEFAULT_VALUE +import org.oppia.android.util.platformparameter.ENABLE_ONBOARDING_FLOW_V2 +import org.oppia.android.util.platformparameter.ENABLE_ONBOARDING_FLOW_V2_DEFAULT_VALUE import org.oppia.android.util.platformparameter.ENABLE_PERFORMANCE_METRICS_COLLECTION import org.oppia.android.util.platformparameter.ENABLE_PERFORMANCE_METRICS_COLLECTION_DEFAULT_VALUE import org.oppia.android.util.platformparameter.ENABLE_SPOTLIGHT_UI_DEFAULT_VALUE @@ -27,6 +31,8 @@ import org.oppia.android.util.platformparameter.EnableFastLanguageSwitchingInLes import org.oppia.android.util.platformparameter.EnableInteractionConfigChangeStateRetention import org.oppia.android.util.platformparameter.EnableLearnerStudyAnalytics import org.oppia.android.util.platformparameter.EnableLoggingLearnerStudyIds +import org.oppia.android.util.platformparameter.EnableNpsSurvey +import org.oppia.android.util.platformparameter.EnableOnboardingFlowV2 import org.oppia.android.util.platformparameter.EnablePerformanceMetricsCollection import org.oppia.android.util.platformparameter.EnableSpotlightUi import org.oppia.android.util.platformparameter.FAST_LANGUAGE_SWITCHING_IN_LESSON @@ -304,4 +310,26 @@ class PlatformParameterModule { NPS_SURVEY_MINIMUM_AGGREGATE_LEARNING_TIME_IN_A_TOPIC_IN_MINUTES_DEFAULT_VALUE ) } + + @Provides + @EnableNpsSurvey + fun provideEnableNpsSurvey( + platformParameterSingleton: PlatformParameterSingleton + ): PlatformParameterValue { + return platformParameterSingleton.getBooleanPlatformParameter(ENABLE_NPS_SURVEY) + ?: PlatformParameterValue.createDefaultParameter( + ENABLE_NPS_SURVEY_DEFAULT_VALUE + ) + } + + @Provides + @EnableOnboardingFlowV2 + fun provideEnableOnboardingFlowV2( + platformParameterSingleton: PlatformParameterSingleton + ): PlatformParameterValue { + return platformParameterSingleton.getBooleanPlatformParameter(ENABLE_ONBOARDING_FLOW_V2) + ?: PlatformParameterValue.createDefaultParameter( + ENABLE_ONBOARDING_FLOW_V2_DEFAULT_VALUE + ) + } } diff --git a/domain/src/main/java/org/oppia/android/domain/platformparameter/syncup/PlatformParameterSyncUpWorker.kt b/domain/src/main/java/org/oppia/android/domain/platformparameter/syncup/PlatformParameterSyncUpWorker.kt index 164f7fea914..04f1337b997 100644 --- a/domain/src/main/java/org/oppia/android/domain/platformparameter/syncup/PlatformParameterSyncUpWorker.kt +++ b/domain/src/main/java/org/oppia/android/domain/platformparameter/syncup/PlatformParameterSyncUpWorker.kt @@ -12,13 +12,13 @@ import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.async import org.oppia.android.app.model.PlatformParameter import org.oppia.android.app.model.PlatformParameter.SyncStatus -import org.oppia.android.app.utility.getVersionName import org.oppia.android.data.backends.gae.api.PlatformParameterService import org.oppia.android.domain.oppialogger.OppiaLogger import org.oppia.android.domain.oppialogger.exceptions.ExceptionsController import org.oppia.android.domain.platformparameter.PlatformParameterController import org.oppia.android.domain.util.getStringFromData import org.oppia.android.util.data.AsyncResult +import org.oppia.android.util.extensions.getVersionName import org.oppia.android.util.threading.BackgroundDispatcher import retrofit2.Response import java.lang.IllegalArgumentException diff --git a/domain/src/main/java/org/oppia/android/domain/survey/SurveyProgressController.kt b/domain/src/main/java/org/oppia/android/domain/survey/SurveyProgressController.kt index b7a612b2c1a..b1c412eca01 100644 --- a/domain/src/main/java/org/oppia/android/domain/survey/SurveyProgressController.kt +++ b/domain/src/main/java/org/oppia/android/domain/survey/SurveyProgressController.kt @@ -312,7 +312,7 @@ class SurveyProgressController @Inject constructor( controllerState.handleUpdatedQuestionsList(message.questionsList) is ControllerMessage.FinishSurveySession -> { try { - controllerState.completeSurveyImpl(message.surveyCompleted, message.callbackFlow) + controllerState.completeSurveyImpl(message.callbackFlow) } finally { // Ensure the actor ends since the session requires no further message processing. break @@ -387,10 +387,11 @@ class SurveyProgressController @Inject constructor( ) } - saveSelectedAnswer(currentQuestionId.toString(), selectedAnswer) - if (!progress.questionDeck.isCurrentQuestionTerminal()) { + saveSelectedAnswer(currentQuestionId.toString(), selectedAnswer) moveToNextQuestion() + } else { + surveyLogger.logOptionalResponse(surveyId, profileId, selectedAnswer.freeFormAnswer) } } } @@ -454,13 +455,12 @@ class SurveyProgressController @Inject constructor( } private suspend fun ControllerState.completeSurveyImpl( - surveyCompleted: Boolean, endSessionResultFlow: MutableStateFlow> ) { checkNotNull(this) { "Cannot stop a survey session which wasn't started." } tryOperation(endSessionResultFlow) { progress.advancePlayStageTo(SurveyProgress.SurveyStage.NOT_IN_SURVEY_SESSION) - finishSurveyAndLog(surveyCompleted) + finishSurveyAndLog() } } @@ -473,19 +473,8 @@ class SurveyProgressController @Inject constructor( convertAsyncToAutomaticDataProvider("${baseId}_$activeSessionId") } - private suspend fun ControllerState.finishSurveyAndLog(surveyIsComplete: Boolean) { + private suspend fun ControllerState.finishSurveyAndLog() { when { - surveyIsComplete -> { - surveyLogger.logMandatoryResponses( - surveyId, - profileId, - getStoredResponse(SurveyQuestionName.USER_TYPE)!!, - getStoredResponse(SurveyQuestionName.MARKET_FIT)!!, - getStoredResponse(SurveyQuestionName.NPS)!! - ) - - // TODO(#5001): Log the optional question response to Firestore - } progress.questionDeck.hasAnsweredAllMandatoryQuestions() -> { surveyLogger.logMandatoryResponses( surveyId, diff --git a/domain/src/main/java/org/oppia/android/domain/testing/oppialogger/loguploader/FakeLogUploader.kt b/domain/src/main/java/org/oppia/android/domain/testing/oppialogger/loguploader/FakeLogUploader.kt index 48783b794d5..a6a3aae43b1 100644 --- a/domain/src/main/java/org/oppia/android/domain/testing/oppialogger/loguploader/FakeLogUploader.kt +++ b/domain/src/main/java/org/oppia/android/domain/testing/oppialogger/loguploader/FakeLogUploader.kt @@ -13,6 +13,7 @@ class FakeLogUploader @Inject constructor() : LogUploader { private val eventRequestIdList = mutableListOf() private val exceptionRequestIdList = mutableListOf() private val performanceMetricsRequestIdList = mutableListOf() + private val firestoreRequestIdList = mutableListOf() override fun enqueueWorkRequestForEvents( workManager: WorkManager, @@ -35,6 +36,13 @@ class FakeLogUploader @Inject constructor() : LogUploader { performanceMetricsRequestIdList.add(workRequest.id) } + override fun enqueueWorkRequestForFirestore( + workManager: WorkManager, + workRequest: PeriodicWorkRequest + ) { + firestoreRequestIdList.add(workRequest.id) + } + /** Returns the most recent work request id that's stored in the [eventRequestIdList]. */ fun getMostRecentEventRequestId() = eventRequestIdList.last() @@ -43,4 +51,7 @@ class FakeLogUploader @Inject constructor() : LogUploader { /** Returns the most recent work request id that's stored in the [performanceMetricsRequestIdList]. */ fun getMostRecentPerformanceMetricsRequestId() = performanceMetricsRequestIdList.last() + + /** Returns the most recent work request id that's stored in the [firestoreRequestIdList]. */ + fun getMostRecentFirestoreRequestId() = firestoreRequestIdList.last() } diff --git a/domain/src/test/java/org/oppia/android/domain/audio/AudioPlayerControllerTest.kt b/domain/src/test/java/org/oppia/android/domain/audio/AudioPlayerControllerTest.kt index 1854ec26330..3f7a3d6b241 100644 --- a/domain/src/test/java/org/oppia/android/domain/audio/AudioPlayerControllerTest.kt +++ b/domain/src/test/java/org/oppia/android/domain/audio/AudioPlayerControllerTest.kt @@ -57,6 +57,7 @@ import org.oppia.android.testing.TestLogReportingModule import org.oppia.android.testing.assertThrows import org.oppia.android.testing.data.AsyncResultSubject.Companion.assertThat import org.oppia.android.testing.data.DataProviderTestMonitor +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.logging.EventLogSubject.Companion.assertThat import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestCoroutineDispatchers @@ -73,6 +74,7 @@ import org.oppia.android.util.logging.SyncStatusModule import org.oppia.android.util.networking.NetworkConnectionUtilDebugModule import org.oppia.android.util.platformparameter.EnableLearnerStudyAnalytics import org.oppia.android.util.platformparameter.EnableLoggingLearnerStudyIds +import org.oppia.android.util.platformparameter.EnableNpsSurvey import org.oppia.android.util.platformparameter.PlatformParameterValue import org.robolectric.Shadows import org.robolectric.annotation.Config @@ -433,7 +435,7 @@ class AudioPlayerControllerTest { @Test fun testController_notInitialized_releasePlayer_fails() { setUpMediaReadyApplication() - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { audioPlayerController.releaseMediaPlayer() } @@ -444,7 +446,7 @@ class AudioPlayerControllerTest { @Test fun testError_notPrepared_invokePlay_fails() { setUpMediaReadyApplication() - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { audioPlayerController.play(isPlayingFromAutoPlay = false, reloadingMainContent = false) } @@ -454,7 +456,7 @@ class AudioPlayerControllerTest { @Test fun testError_notPrepared_invokePause_fails() { setUpMediaReadyApplication() - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { audioPlayerController.pause(isFromExplicitUserAction = true) } @@ -464,7 +466,7 @@ class AudioPlayerControllerTest { @Test fun testError_notPrepared_invokeSeekTo_fails() { setUpMediaReadyApplication() - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { audioPlayerController.seekTo(500) } @@ -856,6 +858,12 @@ class AudioPlayerControllerTest { defaultValue = enableFeature ) } + + @Provides + @EnableNpsSurvey + fun provideEnableNpsSurvey(): PlatformParameterValue { + return PlatformParameterValue.createDefaultParameter(defaultValue = true) + } } // TODO(#89): Move this to a common test application component. @@ -874,6 +882,7 @@ class AudioPlayerControllerTest { NumericExpressionInputModule::class, AlgebraicExpressionInputModule::class, MathEquationInputModule::class, CachingTestModule::class, HintsAndSolutionProdModule::class, HintsAndSolutionConfigModule::class, LoggerModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : DataProvidersInjector { diff --git a/domain/src/test/java/org/oppia/android/domain/auth/AuthenticationControllerTest.kt b/domain/src/test/java/org/oppia/android/domain/auth/AuthenticationControllerTest.kt new file mode 100644 index 00000000000..2b69a7e7c76 --- /dev/null +++ b/domain/src/test/java/org/oppia/android/domain/auth/AuthenticationControllerTest.kt @@ -0,0 +1,156 @@ +package org.oppia.android.domain.auth + +import android.app.Application +import android.content.Context +import androidx.test.core.app.ApplicationProvider +import androidx.test.ext.junit.runners.AndroidJUnit4 +import com.google.common.truth.Truth.assertThat +import dagger.BindsInstance +import dagger.Component +import dagger.Module +import dagger.Provides +import kotlinx.coroutines.CoroutineDispatcher +import org.junit.Before +import org.junit.Rule +import org.junit.Test +import org.junit.runner.RunWith +import org.mockito.ArgumentCaptor +import org.mockito.Captor +import org.mockito.Mock +import org.mockito.Mockito.verify +import org.mockito.Mockito.verifyNoInteractions +import org.mockito.junit.MockitoJUnit +import org.mockito.junit.MockitoRule +import org.oppia.android.domain.oppialogger.analytics.ApplicationLifecycleModule +import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.FakeFirebaseAuthWrapperImpl +import org.oppia.android.testing.firebase.TestAuthenticationModule +import org.oppia.android.testing.mockito.capture +import org.oppia.android.testing.robolectric.RobolectricModule +import org.oppia.android.testing.time.FakeOppiaClockModule +import org.oppia.android.util.data.DataProvidersInjector +import org.oppia.android.util.data.DataProvidersInjectorProvider +import org.oppia.android.util.threading.BackgroundDispatcher +import org.oppia.android.util.threading.DispatcherModule +import org.robolectric.annotation.Config +import org.robolectric.annotation.LooperMode +import javax.inject.Inject +import javax.inject.Singleton + +/** Tests for [AuthenticationController]. */ +// FunctionName: test names are conventionally named with underscores. +@Suppress("FunctionName") +@RunWith(AndroidJUnit4::class) +@LooperMode(LooperMode.Mode.PAUSED) +@Config(application = AuthenticationControllerTest.TestApplication::class) +class AuthenticationControllerTest { + @field:[Rule JvmField] val mockitoRule: MockitoRule = MockitoJUnit.rule() + + @Inject lateinit var firebaseAuthWrapper: FirebaseAuthWrapper + @Inject lateinit var fakeFirebaseAuthWrapperImpl: FakeFirebaseAuthWrapperImpl + @Inject lateinit var authenticationController: AuthenticationController + @field:[Inject BackgroundDispatcher] lateinit var backgroundDispatcher: CoroutineDispatcher + + @Mock lateinit var mockFakeSuccessCallback: FakeSuccessCallback + @Mock lateinit var mockFakeFailureCallback: FakeFailureCallback + @Captor lateinit var throwableCaptor: ArgumentCaptor + + @Before + fun setUp() { + setUpTestApplicationComponent() + } + + @Test + fun testAuthentication_signInAnonymously_onlyOnSuccessCalled() { + fakeFirebaseAuthWrapperImpl.simulateSignInSuccess() + + firebaseAuthWrapper.signInAnonymously( + onSuccess = mockFakeSuccessCallback::onSuccess, + onFailure = mockFakeFailureCallback::onFailure + ) + + // onSuccess should be called. + verify(mockFakeSuccessCallback).onSuccess() + verifyNoInteractions(mockFakeFailureCallback) + } + + @Test + fun testAuthentication_signInAnonymously_onlyOnFailureCalled() { + fakeFirebaseAuthWrapperImpl.simulateSignInFailure() + + firebaseAuthWrapper.signInAnonymously( + onSuccess = mockFakeSuccessCallback::onSuccess, + onFailure = mockFakeFailureCallback::onFailure + ) + + // onFailure should be called with the failure details. + verify(mockFakeFailureCallback).onFailure(capture(throwableCaptor)) + verifyNoInteractions(mockFakeSuccessCallback) + assertThat(throwableCaptor.value).hasMessageThat().contains("Sign-in failure") + } + + @Test + fun testAuthentication_getCurrentUser_userSignedIn_returnsInstanceOfFirebaseUserWrapper() { + fakeFirebaseAuthWrapperImpl.simulateSignInSuccess() + firebaseAuthWrapper.signInAnonymously( + onSuccess = mockFakeSuccessCallback::onSuccess, + onFailure = mockFakeFailureCallback::onFailure + ) + + val user = authenticationController.currentFirebaseUser + + assertThat(user).isInstanceOf(FirebaseUserWrapper::class.java) + } + + private fun setUpTestApplicationComponent() { + ApplicationProvider.getApplicationContext().inject(this) + } + + @Module + class TestModule { + @Provides + @Singleton + fun provideContext(application: Application): Context { + return application + } + } + + // TODO(#89): Move this to a common test application component. + @Singleton + @Component( + modules = [ + TestModule::class, RobolectricModule::class, FakeOppiaClockModule::class, + ApplicationLifecycleModule::class, DispatcherModule::class, + TestLogReportingModule::class, TestAuthenticationModule::class, + ] + ) + interface TestApplicationComponent : DataProvidersInjector { + @Component.Builder + interface Builder { + @BindsInstance + fun setApplication(application: Application): Builder + + fun build(): TestApplicationComponent + } + + fun inject(test: AuthenticationControllerTest) + } + + class TestApplication : Application(), DataProvidersInjectorProvider { + private val component: TestApplicationComponent by lazy { + DaggerAuthenticationControllerTest_TestApplicationComponent.builder() + .setApplication(this) + .build() + } + + fun inject(test: AuthenticationControllerTest) { + component.inject(test) + } + + override fun getDataProvidersInjector(): DataProvidersInjector = component + } + + interface FakeSuccessCallback { fun onSuccess() } + + interface FakeFailureCallback { fun onFailure(failure: Throwable) } +} diff --git a/domain/src/test/java/org/oppia/android/domain/auth/AuthenticationModuleTest.kt b/domain/src/test/java/org/oppia/android/domain/auth/AuthenticationModuleTest.kt new file mode 100644 index 00000000000..c8ee88e7bd6 --- /dev/null +++ b/domain/src/test/java/org/oppia/android/domain/auth/AuthenticationModuleTest.kt @@ -0,0 +1,92 @@ +package org.oppia.android.domain.auth + +import android.app.Application +import android.content.Context +import androidx.test.core.app.ApplicationProvider +import androidx.test.ext.junit.runners.AndroidJUnit4 +import com.google.common.truth.Truth.assertThat +import dagger.BindsInstance +import dagger.Component +import dagger.Module +import dagger.Provides +import org.junit.Before +import org.junit.Test +import org.junit.runner.RunWith +import org.oppia.android.testing.robolectric.RobolectricModule +import org.oppia.android.testing.threading.TestDispatcherModule +import org.oppia.android.util.data.DataProvidersInjector +import org.oppia.android.util.data.DataProvidersInjectorProvider +import org.oppia.android.util.logging.firebase.DebugLogReportingModule +import org.robolectric.annotation.Config +import org.robolectric.annotation.LooperMode +import javax.inject.Inject +import javax.inject.Singleton + +/** Tests for [AuthenticationModule]. */ +// FunctionName: test names are conventionally named with underscores. +@Suppress("FunctionName") +@RunWith(AndroidJUnit4::class) +@LooperMode(LooperMode.Mode.PAUSED) +@Config(application = AuthenticationModuleTest.TestApplication::class) +class AuthenticationModuleTest { + + @Inject + lateinit var firebaseAuthWrapper: FirebaseAuthWrapper + + @Before + fun setUp() { + setUpTestApplicationComponent() + } + + @Test + fun testModule_injectsProductionImplementationOfFirebaseAuthWrapper() { + assertThat(firebaseAuthWrapper).isInstanceOf(FirebaseAuthWrapperImpl::class.java) + } + + private fun setUpTestApplicationComponent() { + ApplicationProvider.getApplicationContext().inject(this) + } + + // TODO(#89): Move this to a common test application component. + @Module + class TestModule { + @Provides + @Singleton + fun provideContext(application: Application): Context { + return application + } + } + + @Singleton + @Component( + modules = [ + TestModule::class, TestDispatcherModule::class, AuthenticationModule::class, + RobolectricModule::class, DebugLogReportingModule::class + ] + ) + interface TestApplicationComponent : DataProvidersInjector { + @Component.Builder + interface Builder { + @BindsInstance + fun setApplication(application: Application): Builder + + fun build(): TestApplicationComponent + } + + fun inject(test: AuthenticationModuleTest) + } + + class TestApplication : Application(), DataProvidersInjectorProvider { + private val component: TestApplicationComponent by lazy { + DaggerAuthenticationModuleTest_TestApplicationComponent.builder() + .setApplication(this) + .build() + } + + fun inject(test: AuthenticationModuleTest) { + component.inject(test) + } + + override fun getDataProvidersInjector(): DataProvidersInjector = component + } +} diff --git a/domain/src/test/java/org/oppia/android/domain/auth/BUILD.bazel b/domain/src/test/java/org/oppia/android/domain/auth/BUILD.bazel new file mode 100644 index 00000000000..7b549aa2c45 --- /dev/null +++ b/domain/src/test/java/org/oppia/android/domain/auth/BUILD.bazel @@ -0,0 +1,76 @@ +""" +Tests for libraries providing authentication with Firebase functionality. +""" + +load("@dagger//:workspace_defs.bzl", "dagger_rules") +load("//:oppia_android_test.bzl", "oppia_android_test") + +oppia_android_test( + name = "AuthenticationControllerTest", + srcs = ["AuthenticationControllerTest.kt"], + custom_package = "org.oppia.android.domain.auth", + test_class = "org.oppia.android.domain.auth.AuthenticationControllerTest", + test_manifest = "//domain:test_manifest", + deps = [ + ":dagger", + "//domain/src/main/java/org/oppia/android/domain/auth:auth_module", + "//domain/src/main/java/org/oppia/android/domain/oppialogger/analytics:prod_module", + "//testing", + "//testing/src/main/java/org/oppia/android/testing/robolectric:test_module", + "//testing/src/main/java/org/oppia/android/testing/threading:test_module", + "//testing/src/main/java/org/oppia/android/testing/time:test_module", + "//third_party:androidx_test_ext_junit", + "//third_party:com_google_truth_truth", + "//third_party:junit_junit", + "//third_party:org_mockito_mockito-core", + "//third_party:org_robolectric_robolectric", + "//third_party:robolectric_android-all", + ], +) + +oppia_android_test( + name = "AuthenticationModuleTest", + srcs = ["AuthenticationModuleTest.kt"], + custom_package = "org.oppia.android.domain.auth", + test_class = "org.oppia.android.domain.auth.AuthenticationModuleTest", + test_manifest = "//domain:test_manifest", + deps = [ + ":dagger", + "//domain/src/main/java/org/oppia/android/domain/auth:auth_module", + "//testing", + "//testing/src/main/java/org/oppia/android/testing/robolectric:test_module", + "//testing/src/main/java/org/oppia/android/testing/threading:test_module", + "//third_party:androidx_test_ext_junit", + "//third_party:com_google_truth_truth", + "//third_party:junit_junit", + "//third_party:org_mockito_mockito-core", + "//third_party:org_robolectric_robolectric", + "//third_party:robolectric_android-all", + "//utility/src/main/java/org/oppia/android/util/logging/firebase:debug_module", + ], +) + +oppia_android_test( + name = "FirebaseAuthWrapperImplTest", + srcs = ["FirebaseAuthWrapperImplTest.kt"], + custom_package = "org.oppia.android.domain.auth", + test_class = "org.oppia.android.domain.auth.FirebaseAuthWrapperImplTest", + test_manifest = "//domain:test_manifest", + deps = [ + ":dagger", + "//domain/src/main/java/org/oppia/android/domain/auth:auth_module", + "//domain/src/main/java/org/oppia/android/domain/oppialogger/analytics:prod_module", + "//testing", + "//testing/src/main/java/org/oppia/android/testing/robolectric:test_module", + "//testing/src/main/java/org/oppia/android/testing/threading:test_module", + "//testing/src/main/java/org/oppia/android/testing/time:test_module", + "//third_party:androidx_test_ext_junit", + "//third_party:com_google_truth_truth", + "//third_party:junit_junit", + "//third_party:org_mockito_mockito-core", + "//third_party:org_robolectric_robolectric", + "//third_party:robolectric_android-all", + ], +) + +dagger_rules() diff --git a/domain/src/test/java/org/oppia/android/domain/auth/FirebaseAuthWrapperImplTest.kt b/domain/src/test/java/org/oppia/android/domain/auth/FirebaseAuthWrapperImplTest.kt new file mode 100644 index 00000000000..8983ae92125 --- /dev/null +++ b/domain/src/test/java/org/oppia/android/domain/auth/FirebaseAuthWrapperImplTest.kt @@ -0,0 +1,112 @@ +package org.oppia.android.domain.auth + +import android.app.Application +import android.content.Context +import androidx.test.core.app.ApplicationProvider +import androidx.test.ext.junit.runners.AndroidJUnit4 +import com.google.common.truth.Truth.assertThat +import dagger.BindsInstance +import dagger.Component +import dagger.Module +import dagger.Provides +import org.junit.Before +import org.junit.Test +import org.junit.runner.RunWith +import org.oppia.android.domain.oppialogger.analytics.ApplicationLifecycleModule +import org.oppia.android.testing.FakeFirebaseAuthInstanceWrapperImpl +import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.robolectric.RobolectricModule +import org.oppia.android.testing.threading.TestDispatcherModule +import org.oppia.android.testing.time.FakeOppiaClockModule +import org.oppia.android.util.data.DataProvidersInjector +import org.oppia.android.util.data.DataProvidersInjectorProvider +import org.robolectric.annotation.Config +import org.robolectric.annotation.LooperMode +import javax.inject.Inject +import javax.inject.Singleton + +/** Tests for [firebaseAuthWrapperImpl]. */ +// FunctionName: test names are conventionally named with underscores. +@Suppress("FunctionName") +@RunWith(AndroidJUnit4::class) +@LooperMode(LooperMode.Mode.PAUSED) +@Config(application = FirebaseAuthWrapperImplTest.TestApplication::class) +class FirebaseAuthWrapperImplTest { + + @Inject + lateinit var firebaseAuthWrapperImpl: FirebaseAuthWrapperImpl + + @Before + fun setUp() { + setUpTestApplicationComponent() + } + + @Test + fun testAuthWrapperImpl_getCurrentSignedInUser_userIsNotSignedIn_returnsNull() { + val user = firebaseAuthWrapperImpl.currentUser + + assertThat(user).isNull() + } + + private fun setUpTestApplicationComponent() { + ApplicationProvider.getApplicationContext() + .inject(this) + } + + @Module + class TestModule { + @Provides + @Singleton + fun provideContext(application: Application): Context { + return application + } + } + + @Module + class AuthenticationModule { + @Provides + @Singleton + fun provideFirebaseAuthWrapper(firebaseAuthInstanceWrapper: FirebaseAuthInstanceWrapper): + FirebaseAuthWrapper = FirebaseAuthWrapperImpl(firebaseAuthInstanceWrapper) + + @Provides + @Singleton + fun provideFirebaseAuthInstanceWrapper(): FirebaseAuthInstanceWrapper = + FakeFirebaseAuthInstanceWrapperImpl() + } + + // TODO(#89): Move this to a common test application component. + @Singleton + @Component( + modules = [ + TestModule::class, RobolectricModule::class, FakeOppiaClockModule::class, + ApplicationLifecycleModule::class, TestDispatcherModule::class, + AuthenticationModule::class, TestLogReportingModule::class, + ] + ) + interface TestApplicationComponent : DataProvidersInjector { + @Component.Builder + interface Builder { + @BindsInstance + fun setApplication(application: Application): Builder + + fun build(): TestApplicationComponent + } + + fun inject(test: FirebaseAuthWrapperImplTest) + } + + class TestApplication : Application(), DataProvidersInjectorProvider { + private val component: TestApplicationComponent by lazy { + DaggerFirebaseAuthWrapperImplTest_TestApplicationComponent.builder() + .setApplication(this) + .build() + } + + fun inject(test: FirebaseAuthWrapperImplTest) { + component.inject(test) + } + + override fun getDataProvidersInjector(): DataProvidersInjector = component + } +} diff --git a/domain/src/test/java/org/oppia/android/domain/classify/AnswerClassificationControllerTest.kt b/domain/src/test/java/org/oppia/android/domain/classify/AnswerClassificationControllerTest.kt index 712ad585e86..8553d8d1f99 100644 --- a/domain/src/test/java/org/oppia/android/domain/classify/AnswerClassificationControllerTest.kt +++ b/domain/src/test/java/org/oppia/android/domain/classify/AnswerClassificationControllerTest.kt @@ -152,7 +152,7 @@ class AnswerClassificationControllerTest { fun testClassify_forUnknownInteraction_throwsException() { val interaction = Interaction.getDefaultInstance() - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { answerClassificationController.classify( interaction, TEST_STRING_0, @@ -170,7 +170,7 @@ class AnswerClassificationControllerTest { .addAnswerGroups(AnswerGroup.newBuilder().addRuleSpecs(RuleSpec.getDefaultInstance())) .build() - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { answerClassificationController.classify( interaction, TEST_STRING_0, diff --git a/domain/src/test/java/org/oppia/android/domain/classify/rules/dragAndDropSortInput/DragDropSortInputHasElementXAtPositionYRuleClassifierProviderTest.kt b/domain/src/test/java/org/oppia/android/domain/classify/rules/dragAndDropSortInput/DragDropSortInputHasElementXAtPositionYRuleClassifierProviderTest.kt index 53be477a285..c7d224753c4 100644 --- a/domain/src/test/java/org/oppia/android/domain/classify/rules/dragAndDropSortInput/DragDropSortInputHasElementXAtPositionYRuleClassifierProviderTest.kt +++ b/domain/src/test/java/org/oppia/android/domain/classify/rules/dragAndDropSortInput/DragDropSortInputHasElementXAtPositionYRuleClassifierProviderTest.kt @@ -55,7 +55,7 @@ class DragDropSortInputHasElementXAtPositionYRuleClassifierProviderTest { // Reverse the x and y parameters to ensure both have the incorrect type. val inputs = mapOf("x" to NON_NEGATIVE_VALUE_1, "y" to VALID_CONTENT_ID_2) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { hasElementXAtPositionYRuleClassifier.matches( answer = LIST_OF_SETS_OF_CONTENT_IDS, inputs = inputs, @@ -75,7 +75,7 @@ class DragDropSortInputHasElementXAtPositionYRuleClassifierProviderTest { "y" to NON_NEGATIVE_VALUE_1 ) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { hasElementXAtPositionYRuleClassifier.matches( answer = LIST_OF_SETS_OF_CONTENT_IDS, inputs = inputs, @@ -92,7 +92,7 @@ class DragDropSortInputHasElementXAtPositionYRuleClassifierProviderTest { fun testAnswer_nonNegativeInput_testString_yInputWithIncorrectType_throwsException() { val inputs = mapOf("x" to VALID_CONTENT_ID_2, "y" to VALID_CONTENT_ID_2) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { hasElementXAtPositionYRuleClassifier.matches( answer = LIST_OF_SETS_OF_CONTENT_IDS, inputs = inputs, @@ -109,7 +109,7 @@ class DragDropSortInputHasElementXAtPositionYRuleClassifierProviderTest { fun testAnswer_testString_missingInputX_throwsException() { val inputs = mapOf("y" to VALID_CONTENT_ID_2) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { hasElementXAtPositionYRuleClassifier.matches( answer = LIST_OF_SETS_OF_CONTENT_IDS, inputs = inputs, @@ -126,7 +126,7 @@ class DragDropSortInputHasElementXAtPositionYRuleClassifierProviderTest { fun testAnswer_nonNegativeInput_missingInputY_throwsException() { val inputs = mapOf("x" to VALID_CONTENT_ID_2) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { hasElementXAtPositionYRuleClassifier.matches( answer = LIST_OF_SETS_OF_CONTENT_IDS, inputs = inputs, @@ -143,7 +143,7 @@ class DragDropSortInputHasElementXAtPositionYRuleClassifierProviderTest { fun testAnswer_bothInputsMissing_throwsException() { val inputs = mapOf("z" to VALID_CONTENT_ID_2) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { hasElementXAtPositionYRuleClassifier.matches( answer = LIST_OF_SETS_OF_CONTENT_IDS, inputs = inputs, diff --git a/domain/src/test/java/org/oppia/android/domain/classify/rules/dragAndDropSortInput/DragDropSortInputHasElementXBeforeElementYRuleClassifierProviderTest.kt b/domain/src/test/java/org/oppia/android/domain/classify/rules/dragAndDropSortInput/DragDropSortInputHasElementXBeforeElementYRuleClassifierProviderTest.kt index c706db71f64..a40e47d06f4 100644 --- a/domain/src/test/java/org/oppia/android/domain/classify/rules/dragAndDropSortInput/DragDropSortInputHasElementXBeforeElementYRuleClassifierProviderTest.kt +++ b/domain/src/test/java/org/oppia/android/domain/classify/rules/dragAndDropSortInput/DragDropSortInputHasElementXBeforeElementYRuleClassifierProviderTest.kt @@ -56,7 +56,7 @@ class DragDropSortInputHasElementXBeforeElementYRuleClassifierProviderTest { "y" to NON_NEGATIVE_VALUE_1 ) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { hasElementXBeforeElementYRuleClassifier.matches( answer = LIST_OF_SETS_OF_CONTENT_IDS, inputs = inputs, @@ -73,7 +73,7 @@ class DragDropSortInputHasElementXBeforeElementYRuleClassifierProviderTest { fun testAnswer_nonNegativeInput_testString_xInputWithIncorrectType_throwsException() { val inputs = mapOf("x" to NON_NEGATIVE_VALUE_1, "y" to VALID_CONTENT_ID_2) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { hasElementXBeforeElementYRuleClassifier.matches( answer = LIST_OF_SETS_OF_CONTENT_IDS, inputs = inputs, @@ -90,7 +90,7 @@ class DragDropSortInputHasElementXBeforeElementYRuleClassifierProviderTest { fun testAnswer_nonNegativeInput_testString_yInputWithIncorrectType_throwsException() { val inputs = mapOf("x" to VALID_CONTENT_ID_2, "y" to NON_NEGATIVE_VALUE_1) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { hasElementXBeforeElementYRuleClassifier.matches( answer = LIST_OF_SETS_OF_CONTENT_IDS, inputs = inputs, @@ -107,7 +107,7 @@ class DragDropSortInputHasElementXBeforeElementYRuleClassifierProviderTest { fun testAnswer_testString_missingInputX_throwsException() { val inputs = mapOf("y" to VALID_CONTENT_ID_2) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { hasElementXBeforeElementYRuleClassifier.matches( answer = LIST_OF_SETS_OF_CONTENT_IDS, inputs = inputs, @@ -124,7 +124,7 @@ class DragDropSortInputHasElementXBeforeElementYRuleClassifierProviderTest { fun testAnswer_nonNegativeInput_missingInputY_throwsException() { val inputs = mapOf("x" to VALID_CONTENT_ID_2) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { hasElementXBeforeElementYRuleClassifier.matches( answer = LIST_OF_SETS_OF_CONTENT_IDS, inputs = inputs, @@ -141,7 +141,7 @@ class DragDropSortInputHasElementXBeforeElementYRuleClassifierProviderTest { fun testAnswer_bothInputsMissing_throwsException() { val inputs = mapOf("z" to VALID_CONTENT_ID_2) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { hasElementXBeforeElementYRuleClassifier.matches( answer = LIST_OF_SETS_OF_CONTENT_IDS, inputs = inputs, diff --git a/domain/src/test/java/org/oppia/android/domain/classify/rules/dragAndDropSortInput/DragDropSortInputIsEqualToOrderingClassifierProviderTest.kt b/domain/src/test/java/org/oppia/android/domain/classify/rules/dragAndDropSortInput/DragDropSortInputIsEqualToOrderingClassifierProviderTest.kt index 2c65122884d..c6783f37ca1 100644 --- a/domain/src/test/java/org/oppia/android/domain/classify/rules/dragAndDropSortInput/DragDropSortInputIsEqualToOrderingClassifierProviderTest.kt +++ b/domain/src/test/java/org/oppia/android/domain/classify/rules/dragAndDropSortInput/DragDropSortInputIsEqualToOrderingClassifierProviderTest.kt @@ -137,7 +137,7 @@ class DragDropSortInputIsEqualToOrderingClassifierProviderTest { fun testAnswer_testLisOfSetsOfHtmlString_incorrectInputMap_throwsException() { val inputs = mapOf("y" to LIST_OF_SETS_12_3_4) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { isEqualToOrderingClassifierProvider.matches( answer = LIST_OF_SETS_12_3_4, inputs = inputs, diff --git a/domain/src/test/java/org/oppia/android/domain/classify/rules/dragAndDropSortInput/DragDropSortInputIsEqualToOrderingWithOneItemAtIncorrectPositionClassifierProviderTest.kt b/domain/src/test/java/org/oppia/android/domain/classify/rules/dragAndDropSortInput/DragDropSortInputIsEqualToOrderingWithOneItemAtIncorrectPositionClassifierProviderTest.kt index d62690db395..9da1c50711e 100644 --- a/domain/src/test/java/org/oppia/android/domain/classify/rules/dragAndDropSortInput/DragDropSortInputIsEqualToOrderingWithOneItemAtIncorrectPositionClassifierProviderTest.kt +++ b/domain/src/test/java/org/oppia/android/domain/classify/rules/dragAndDropSortInput/DragDropSortInputIsEqualToOrderingWithOneItemAtIncorrectPositionClassifierProviderTest.kt @@ -69,7 +69,7 @@ class DragDropSortInputIsEqualToOrderingWithOneItemAtIncorrectPositionClassifier fun testAnswer_nonNegativeInput_inputWithIncorrectType_throwsException() { val inputs = mapOf("x" to NON_NEGATIVE_VALUE_0) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { isEqualToOrderingWithOneItemIncorrectClassifier.matches( answer = LIST_OF_SETS_12_4_5, inputs = inputs, @@ -144,7 +144,7 @@ class DragDropSortInputIsEqualToOrderingWithOneItemAtIncorrectPositionClassifier fun testAnswer_testLisOfSetsOfHtmlString_incorrectInputMap_throwsException() { val inputs = mapOf("y" to LIST_OF_SETS_12_4_5) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { isEqualToOrderingWithOneItemIncorrectClassifier.matches( answer = LIST_OF_SETS_12_4_5, inputs = inputs, diff --git a/domain/src/test/java/org/oppia/android/domain/classify/rules/fractioninput/FractionInputHasDenominatorEqualToRuleClassifierProviderTest.kt b/domain/src/test/java/org/oppia/android/domain/classify/rules/fractioninput/FractionInputHasDenominatorEqualToRuleClassifierProviderTest.kt index a4641cc64ad..c0be3182da6 100644 --- a/domain/src/test/java/org/oppia/android/domain/classify/rules/fractioninput/FractionInputHasDenominatorEqualToRuleClassifierProviderTest.kt +++ b/domain/src/test/java/org/oppia/android/domain/classify/rules/fractioninput/FractionInputHasDenominatorEqualToRuleClassifierProviderTest.kt @@ -124,7 +124,7 @@ class FractionInputHasDenominatorEqualToRuleClassifierProviderTest { fun testDenominatorEquals_nonNegativeInput_inputWithIncorrectType_throwsException() { val inputs = mapOf("x" to FRACTION_VALUE_TEST_2_OVER_4) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { denominatorIsEqualClassifierProvider.matches( answer = FRACTION_VALUE_TEST_2_OVER_4, inputs = inputs, @@ -143,7 +143,7 @@ class FractionInputHasDenominatorEqualToRuleClassifierProviderTest { fun testDenominatorEquals_missingInputF_throwsException() { val inputs = mapOf("y" to NON_NEGATIVE_VALUE_TEST_1) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { denominatorIsEqualClassifierProvider.matches( answer = FRACTION_VALUE_TEST_2_OVER_4, inputs = inputs, diff --git a/domain/src/test/java/org/oppia/android/domain/classify/rules/fractioninput/FractionInputHasFractionalPartExactlyEqualToRuleClassifierProviderTest.kt b/domain/src/test/java/org/oppia/android/domain/classify/rules/fractioninput/FractionInputHasFractionalPartExactlyEqualToRuleClassifierProviderTest.kt index 56212d736d9..d5d95ca9253 100644 --- a/domain/src/test/java/org/oppia/android/domain/classify/rules/fractioninput/FractionInputHasFractionalPartExactlyEqualToRuleClassifierProviderTest.kt +++ b/domain/src/test/java/org/oppia/android/domain/classify/rules/fractioninput/FractionInputHasFractionalPartExactlyEqualToRuleClassifierProviderTest.kt @@ -208,7 +208,7 @@ class FractionInputHasFractionalPartExactlyEqualToRuleClassifierProviderTest { fun testFractionalEquals_nonNegativeInput_inputWithIncorrectType_throwsException() { val inputs = mapOf("f" to NON_NEGATIVE_VALUE_TEST_0) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { fractionalPartIsExactlyEqualClassifierProvider.matches( answer = FRACTION_VALUE_TEST_2_OVER_4, inputs = inputs, @@ -227,7 +227,7 @@ class FractionInputHasFractionalPartExactlyEqualToRuleClassifierProviderTest { fun testFractionalEquals_missingInputF_throwsException() { val inputs = mapOf("y" to FRACTION_VALUE_TEST_2_OVER_4) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { fractionalPartIsExactlyEqualClassifierProvider.matches( answer = FRACTION_VALUE_TEST_2_OVER_4, inputs = inputs, diff --git a/domain/src/test/java/org/oppia/android/domain/classify/rules/fractioninput/FractionInputHasIntegerPartEqualToRuleClassifierProviderTest.kt b/domain/src/test/java/org/oppia/android/domain/classify/rules/fractioninput/FractionInputHasIntegerPartEqualToRuleClassifierProviderTest.kt index 3d58861f475..c1212a3a082 100644 --- a/domain/src/test/java/org/oppia/android/domain/classify/rules/fractioninput/FractionInputHasIntegerPartEqualToRuleClassifierProviderTest.kt +++ b/domain/src/test/java/org/oppia/android/domain/classify/rules/fractioninput/FractionInputHasIntegerPartEqualToRuleClassifierProviderTest.kt @@ -405,7 +405,7 @@ class FractionInputHasIntegerPartEqualToRuleClassifierProviderTest { fun testAnswer1Over2_inputMissing_throwsException() { val inputs = mapOf("y" to WHOLE_NUMBER_VALUE_TEST_0) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { inputHasIntegerPartEqualToRuleClassifier .matches( answer = FRACTION_VALUE_TEST_1_OVER_2, @@ -423,7 +423,7 @@ class FractionInputHasIntegerPartEqualToRuleClassifierProviderTest { fun testAnswer1Over2_inputString_throwsException() { val inputs = mapOf("x" to STRING_VALUE_TEST_LOWERCASE) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { inputHasIntegerPartEqualToRuleClassifier .matches( answer = FRACTION_VALUE_TEST_1_OVER_2, diff --git a/domain/src/test/java/org/oppia/android/domain/classify/rules/fractioninput/FractionInputHasNumeratorEqualToRuleClassifierProviderTest.kt b/domain/src/test/java/org/oppia/android/domain/classify/rules/fractioninput/FractionInputHasNumeratorEqualToRuleClassifierProviderTest.kt index 647d37cbdd3..bc4bb343c03 100644 --- a/domain/src/test/java/org/oppia/android/domain/classify/rules/fractioninput/FractionInputHasNumeratorEqualToRuleClassifierProviderTest.kt +++ b/domain/src/test/java/org/oppia/android/domain/classify/rules/fractioninput/FractionInputHasNumeratorEqualToRuleClassifierProviderTest.kt @@ -145,7 +145,7 @@ class FractionInputHasNumeratorEqualToRuleClassifierProviderTest { fun testNumeratorEquals_nonNegativeInput_inputWithIncorrectType_throwsException() { val inputs = mapOf("x" to NON_NEGATIVE_VALUE_TEST_0) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { numeratorIsEqualClassifierProvider.matches( answer = FRACTION_VALUE_TEST_2_OVER_4, inputs = inputs, @@ -164,7 +164,7 @@ class FractionInputHasNumeratorEqualToRuleClassifierProviderTest { fun testNumeratorEquals_missingInputF_throwsException() { val inputs = mapOf("y" to FRACTION_VALUE_TEST_2_OVER_4) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { numeratorIsEqualClassifierProvider.matches( answer = FRACTION_VALUE_TEST_2_OVER_4, inputs = inputs, diff --git a/domain/src/test/java/org/oppia/android/domain/classify/rules/fractioninput/FractionInputIsEquivalentToAndInSimplestFormRuleClassifierProviderTest.kt b/domain/src/test/java/org/oppia/android/domain/classify/rules/fractioninput/FractionInputIsEquivalentToAndInSimplestFormRuleClassifierProviderTest.kt index 1afbb516319..8a2d65bf340 100644 --- a/domain/src/test/java/org/oppia/android/domain/classify/rules/fractioninput/FractionInputIsEquivalentToAndInSimplestFormRuleClassifierProviderTest.kt +++ b/domain/src/test/java/org/oppia/android/domain/classify/rules/fractioninput/FractionInputIsEquivalentToAndInSimplestFormRuleClassifierProviderTest.kt @@ -288,7 +288,7 @@ class FractionInputIsEquivalentToAndInSimplestFormRuleClassifierProviderTest { val inputs = mapOf("y" to FRACTION_VALUE_TEST_1_OVER_2) val answer = FRACTION_VALUE_TEST_1_OVER_2 - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { inputIsEquivalentToAndInSimplestFormRuleClassifier.matches( answer = answer, inputs = inputs, @@ -306,7 +306,7 @@ class FractionInputIsEquivalentToAndInSimplestFormRuleClassifierProviderTest { val inputs = mapOf("f" to FRACTION_VALUE_TEST_1_OVER_2) val answer = STRING_VALUE_TEST - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { inputIsEquivalentToAndInSimplestFormRuleClassifier.matches( answer = answer, inputs = inputs, @@ -324,7 +324,7 @@ class FractionInputIsEquivalentToAndInSimplestFormRuleClassifierProviderTest { val inputs = mapOf("f" to STRING_VALUE_TEST) val answer = FRACTION_VALUE_TEST_1_OVER_2 - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { inputIsEquivalentToAndInSimplestFormRuleClassifier.matches( answer = answer, inputs = inputs, diff --git a/domain/src/test/java/org/oppia/android/domain/classify/rules/fractioninput/FractionInputIsEquivalentToRuleClassifierProviderTest.kt b/domain/src/test/java/org/oppia/android/domain/classify/rules/fractioninput/FractionInputIsEquivalentToRuleClassifierProviderTest.kt index a61d6a03b41..4788fa0e9d9 100644 --- a/domain/src/test/java/org/oppia/android/domain/classify/rules/fractioninput/FractionInputIsEquivalentToRuleClassifierProviderTest.kt +++ b/domain/src/test/java/org/oppia/android/domain/classify/rules/fractioninput/FractionInputIsEquivalentToRuleClassifierProviderTest.kt @@ -250,7 +250,7 @@ class FractionInputIsEquivalentToRuleClassifierProviderTest { fun testEquivalence_missingInput_throwsException() { val inputs = mapOf("y" to FRACTION_VALUE_TEST_2_OVER_8) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { inputIsEquivalentToRuleClassifier.matches( answer = FRACTION_VALUE_TEST_2_OVER_8, inputs = inputs, diff --git a/domain/src/test/java/org/oppia/android/domain/classify/rules/fractioninput/FractionInputIsExactlyEqualToRuleClassifierProviderTest.kt b/domain/src/test/java/org/oppia/android/domain/classify/rules/fractioninput/FractionInputIsExactlyEqualToRuleClassifierProviderTest.kt index 5280da48f8a..67f4cdba623 100644 --- a/domain/src/test/java/org/oppia/android/domain/classify/rules/fractioninput/FractionInputIsExactlyEqualToRuleClassifierProviderTest.kt +++ b/domain/src/test/java/org/oppia/android/domain/classify/rules/fractioninput/FractionInputIsExactlyEqualToRuleClassifierProviderTest.kt @@ -235,7 +235,7 @@ class FractionInputIsExactlyEqualToRuleClassifierProviderTest { fun testEquals_nonNegativeInput_inputWithIncorrectType_throwsException() { val inputs = mapOf("f" to NON_NEGATIVE_VALUE_TEST_0) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { isExactlyEqualClassifierProvider.matches( answer = FRACTION_VALUE_TEST_2_OVER_4, inputs = inputs, @@ -254,7 +254,7 @@ class FractionInputIsExactlyEqualToRuleClassifierProviderTest { fun testEquals_missingInputF_throwsException() { val inputs = mapOf("y" to FRACTION_VALUE_TEST_2_OVER_4) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { isExactlyEqualClassifierProvider.matches( answer = FRACTION_VALUE_TEST_2_OVER_4, inputs = inputs, diff --git a/domain/src/test/java/org/oppia/android/domain/classify/rules/fractioninput/FractionInputIsGreaterThanRuleClassifierProviderTest.kt b/domain/src/test/java/org/oppia/android/domain/classify/rules/fractioninput/FractionInputIsGreaterThanRuleClassifierProviderTest.kt index b14d9993e06..aecd631ac68 100644 --- a/domain/src/test/java/org/oppia/android/domain/classify/rules/fractioninput/FractionInputIsGreaterThanRuleClassifierProviderTest.kt +++ b/domain/src/test/java/org/oppia/android/domain/classify/rules/fractioninput/FractionInputIsGreaterThanRuleClassifierProviderTest.kt @@ -409,7 +409,7 @@ class FractionInputIsGreaterThanRuleClassifierProviderTest { fun testFractionalAnswer_missingInput_throwsException() { val inputs = mapOf("y" to FRACTION_VALUE_TEST_1_OVER_2) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { inputGreaterThanRuleClassifier .matches( answer = FRACTION_VALUE_TEST_1_OVER_2, @@ -427,7 +427,7 @@ class FractionInputIsGreaterThanRuleClassifierProviderTest { fun testFractionalAnswer_stringInput_throwsException() { val inputs = mapOf("x" to STRING_VALUE_TEST_LOWERCASE) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { inputGreaterThanRuleClassifier .matches( answer = FRACTION_VALUE_TEST_1_OVER_2, diff --git a/domain/src/test/java/org/oppia/android/domain/classify/rules/fractioninput/FractionInputIsLessThanRuleClassifierProviderTest.kt b/domain/src/test/java/org/oppia/android/domain/classify/rules/fractioninput/FractionInputIsLessThanRuleClassifierProviderTest.kt index 1dda20b3d7c..03a00646b82 100644 --- a/domain/src/test/java/org/oppia/android/domain/classify/rules/fractioninput/FractionInputIsLessThanRuleClassifierProviderTest.kt +++ b/domain/src/test/java/org/oppia/android/domain/classify/rules/fractioninput/FractionInputIsLessThanRuleClassifierProviderTest.kt @@ -409,7 +409,7 @@ class FractionInputIsLessThanRuleClassifierProviderTest { fun testAnswer1Over2_inputMissing_throwsException() { val inputs = mapOf("y" to FRACTION_VALUE_TEST_1_OVER_2) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { inputLessThanRuleClassifier .matches( answer = FRACTION_VALUE_TEST_1_OVER_2, @@ -427,7 +427,7 @@ class FractionInputIsLessThanRuleClassifierProviderTest { fun testAnswer1Over2_inputString_throwsException() { val inputs = mapOf("x" to STRING_VALUE_TEST_LOWERCASE) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { inputLessThanRuleClassifier .matches( answer = FRACTION_VALUE_TEST_1_OVER_2, diff --git a/domain/src/test/java/org/oppia/android/domain/classify/rules/imageClickInput/ImageClickInputIsInRegionRuleClassifierProviderTest.kt b/domain/src/test/java/org/oppia/android/domain/classify/rules/imageClickInput/ImageClickInputIsInRegionRuleClassifierProviderTest.kt index 0694388d0c9..565da313100 100644 --- a/domain/src/test/java/org/oppia/android/domain/classify/rules/imageClickInput/ImageClickInputIsInRegionRuleClassifierProviderTest.kt +++ b/domain/src/test/java/org/oppia/android/domain/classify/rules/imageClickInput/ImageClickInputIsInRegionRuleClassifierProviderTest.kt @@ -89,7 +89,7 @@ class ImageClickInputIsInRegionRuleClassifierProviderTest { fun testAnswer_nonNegativeInput_inputWithIncorrectType_throwsException() { val inputs = mapOf("x" to NON_NEGATIVE_VALUE_0) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { isInRegionClassifierProvider.matches( answer = IMAGE_REGION_ABC_POSITION_1, inputs = inputs, @@ -108,7 +108,7 @@ class ImageClickInputIsInRegionRuleClassifierProviderTest { fun testAnswer_testString_missingInputX_throwsException() { val inputs = mapOf("y" to createString(ITEM_REGION_A)) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { isInRegionClassifierProvider.matches( answer = IMAGE_REGION_ABC_POSITION_1, inputs = inputs, diff --git a/domain/src/test/java/org/oppia/android/domain/classify/rules/itemselectioninput/ItemSelectionInputDoesNotContainAtLeastOneOfRuleClassifierProviderTest.kt b/domain/src/test/java/org/oppia/android/domain/classify/rules/itemselectioninput/ItemSelectionInputDoesNotContainAtLeastOneOfRuleClassifierProviderTest.kt index 99be995d0bc..b6eedff3056 100644 --- a/domain/src/test/java/org/oppia/android/domain/classify/rules/itemselectioninput/ItemSelectionInputDoesNotContainAtLeastOneOfRuleClassifierProviderTest.kt +++ b/domain/src/test/java/org/oppia/android/domain/classify/rules/itemselectioninput/ItemSelectionInputDoesNotContainAtLeastOneOfRuleClassifierProviderTest.kt @@ -156,7 +156,7 @@ class ItemSelectionInputDoesNotContainAtLeastOneOfRuleClassifierProviderTest { fun testItemSet_inputIsMissing_throwsException() { val inputs = mapOf("y" to ITEM_SET_1) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { inputDoesNotContainAtLeastOneOfRuleClassifier.matches( answer = ITEM_SET_12345, inputs = inputs, @@ -173,7 +173,7 @@ class ItemSelectionInputDoesNotContainAtLeastOneOfRuleClassifierProviderTest { fun testItemSet_inputHasTheWrongType_throwsException() { val inputs = mapOf("x" to DIFFERENT_INTERACTION_OBJECT_TYPE) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { inputDoesNotContainAtLeastOneOfRuleClassifier.matches( answer = ITEM_SET_12345, inputs = inputs, @@ -190,7 +190,7 @@ class ItemSelectionInputDoesNotContainAtLeastOneOfRuleClassifierProviderTest { fun testItemSet_answerHasTheWrongType_throwsException() { val inputs = mapOf("x" to ITEM_SET_12345) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { inputDoesNotContainAtLeastOneOfRuleClassifier.matches( answer = DIFFERENT_INTERACTION_OBJECT_TYPE, inputs = inputs, diff --git a/domain/src/test/java/org/oppia/android/domain/classify/rules/itemselectioninput/ItemSelectionInputEqualsRuleClassifierProviderTest.kt b/domain/src/test/java/org/oppia/android/domain/classify/rules/itemselectioninput/ItemSelectionInputEqualsRuleClassifierProviderTest.kt index 927dcdc5f3f..a3c467dcbdc 100644 --- a/domain/src/test/java/org/oppia/android/domain/classify/rules/itemselectioninput/ItemSelectionInputEqualsRuleClassifierProviderTest.kt +++ b/domain/src/test/java/org/oppia/android/domain/classify/rules/itemselectioninput/ItemSelectionInputEqualsRuleClassifierProviderTest.kt @@ -162,7 +162,7 @@ class ItemSelectionInputEqualsRuleClassifierProviderTest { fun testLowercaseAnswer_missingInput_throwsException() { val inputs = mapOf("y" to TEST_HTML_STRING_SET_LOWERCASE) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { inputEqualsRuleClassifierProvider.matches( answer = TEST_HTML_STRING_SET_LOWERCASE, inputs = inputs, diff --git a/domain/src/test/java/org/oppia/android/domain/classify/rules/itemselectioninput/ItemSelectionInputIsProperSubsetOfRuleClassifierProviderTest.kt b/domain/src/test/java/org/oppia/android/domain/classify/rules/itemselectioninput/ItemSelectionInputIsProperSubsetOfRuleClassifierProviderTest.kt index 8997d85c434..a4d3a9fadb4 100644 --- a/domain/src/test/java/org/oppia/android/domain/classify/rules/itemselectioninput/ItemSelectionInputIsProperSubsetOfRuleClassifierProviderTest.kt +++ b/domain/src/test/java/org/oppia/android/domain/classify/rules/itemselectioninput/ItemSelectionInputIsProperSubsetOfRuleClassifierProviderTest.kt @@ -169,7 +169,7 @@ class ItemSelectionInputIsProperSubsetOfRuleClassifierProviderTest() { fun testIsProperSubset_withInvalidInput_forAnswer12345_throwsException() { val inputs = mapOf("x" to ITEM_SELECTION_INVAILD) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { inputContainsAtLeastOneOfRuleClassifier.matches( answer = ITEM_SELECTION_12345, inputs = inputs, @@ -186,7 +186,7 @@ class ItemSelectionInputIsProperSubsetOfRuleClassifierProviderTest() { fun testIsProperSubset_withInput12345_forInvalidAnswer_throwsException() { val inputs = mapOf("x" to ITEM_SELECTION_12345) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { inputContainsAtLeastOneOfRuleClassifier.matches( answer = ITEM_SELECTION_INVAILD, inputs = inputs, @@ -203,7 +203,7 @@ class ItemSelectionInputIsProperSubsetOfRuleClassifierProviderTest() { fun testIsProperSubset_missingInputX_throwsException() { val inputs = mapOf("a" to ITEM_SELECTION_12345) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { inputContainsAtLeastOneOfRuleClassifier.matches( answer = ITEM_SELECTION_12345, inputs = inputs, diff --git a/domain/src/test/java/org/oppia/android/domain/classify/rules/multiplechoiceinput/MultipleChoiceInputEqualsRuleClassifierProviderTest.kt b/domain/src/test/java/org/oppia/android/domain/classify/rules/multiplechoiceinput/MultipleChoiceInputEqualsRuleClassifierProviderTest.kt index d193f4c795b..c66ab000848 100644 --- a/domain/src/test/java/org/oppia/android/domain/classify/rules/multiplechoiceinput/MultipleChoiceInputEqualsRuleClassifierProviderTest.kt +++ b/domain/src/test/java/org/oppia/android/domain/classify/rules/multiplechoiceinput/MultipleChoiceInputEqualsRuleClassifierProviderTest.kt @@ -72,7 +72,7 @@ class MultipleChoiceInputEqualsRuleClassifierProviderTest { fun testNonNegativeAnswer_missingInput_throwsException() { val inputs = mapOf("y" to NON_NEGATIVE_VALUE_TEST_0) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { inputEqualsRuleClassifier.matches( answer = NON_NEGATIVE_VALUE_TEST_0, inputs = inputs, @@ -89,7 +89,7 @@ class MultipleChoiceInputEqualsRuleClassifierProviderTest { fun testUnexpectedStringAnswer_nonNegativeIntInput_throwsException() { val inputs = mapOf("x" to NON_NEGATIVE_VALUE_TEST_0) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { inputEqualsRuleClassifier.matches( answer = STRING_VALUE_TEST, inputs = inputs, @@ -106,7 +106,7 @@ class MultipleChoiceInputEqualsRuleClassifierProviderTest { fun testNonNegativeAnswer_stringInput_throwsException() { val inputs = mapOf("x" to STRING_VALUE_TEST) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { inputEqualsRuleClassifier.matches( answer = NON_NEGATIVE_VALUE_TEST_0, inputs = inputs, diff --git a/domain/src/test/java/org/oppia/android/domain/classify/rules/numberwithunits/NumberWithUnitsIsEqualToRuleClassifierProviderTest.kt b/domain/src/test/java/org/oppia/android/domain/classify/rules/numberwithunits/NumberWithUnitsIsEqualToRuleClassifierProviderTest.kt index 048e5574066..ee150667497 100644 --- a/domain/src/test/java/org/oppia/android/domain/classify/rules/numberwithunits/NumberWithUnitsIsEqualToRuleClassifierProviderTest.kt +++ b/domain/src/test/java/org/oppia/android/domain/classify/rules/numberwithunits/NumberWithUnitsIsEqualToRuleClassifierProviderTest.kt @@ -185,7 +185,7 @@ class NumberWithUnitsIsEqualToRuleClassifierProviderTest { fun testWholeNumberInputValue_withRealAnswerNumWithUnits_throwsException() { val inputs = mapOf("f" to WHOLE_NUMBER_VALUE_9) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { unitsIsEqualsRuleClassifier.matches( answer = DOUBLE_VALUE_TEST_DIFFERENT_TYPE, diff --git a/domain/src/test/java/org/oppia/android/domain/classify/rules/numberwithunits/NumberWithUnitsIsEquivalentToRuleClassifierProviderTest.kt b/domain/src/test/java/org/oppia/android/domain/classify/rules/numberwithunits/NumberWithUnitsIsEquivalentToRuleClassifierProviderTest.kt index d53553b9d79..4e6ed68a7e7 100644 --- a/domain/src/test/java/org/oppia/android/domain/classify/rules/numberwithunits/NumberWithUnitsIsEquivalentToRuleClassifierProviderTest.kt +++ b/domain/src/test/java/org/oppia/android/domain/classify/rules/numberwithunits/NumberWithUnitsIsEquivalentToRuleClassifierProviderTest.kt @@ -179,7 +179,7 @@ class NumberWithUnitsIsEquivalentToRuleClassifierProviderTest { fun testInputNumberWithUnits_testAnswer_inputWithIncorrectType_verifyThrowsException() { val inputs = mapOf("f" to INPUT_TEST_NUMBER_WITH_UNITS) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { unitIsEquivalentRuleClassifier.matches( answer = DOUBLE_VALUE_TEST_DIFFERENT_TYPE, inputs = inputs, @@ -198,7 +198,7 @@ class NumberWithUnitsIsEquivalentToRuleClassifierProviderTest { fun testInputNumberWithUnits_testAnswerNumberWithUnits_withXMapping_verifyThrowsException() { val inputs = mapOf("x" to INPUT_TEST_NUMBER_WITH_UNITS) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { unitIsEquivalentRuleClassifier.matches( answer = ANSWER_TEST_NUMBER_WITH_UNITS, inputs = inputs, diff --git a/domain/src/test/java/org/oppia/android/domain/classify/rules/numericinput/NumericInputEqualsRuleClassifierProviderTest.kt b/domain/src/test/java/org/oppia/android/domain/classify/rules/numericinput/NumericInputEqualsRuleClassifierProviderTest.kt index 1a4c4c8b07a..daa27f53145 100644 --- a/domain/src/test/java/org/oppia/android/domain/classify/rules/numericinput/NumericInputEqualsRuleClassifierProviderTest.kt +++ b/domain/src/test/java/org/oppia/android/domain/classify/rules/numericinput/NumericInputEqualsRuleClassifierProviderTest.kt @@ -144,7 +144,7 @@ class NumericInputEqualsRuleClassifierProviderTest { fun testRealAnswer_missingInput_throwsException() { val inputs = mapOf("y" to POSITIVE_REAL_VALUE_1_5) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { inputEqualsRuleClassifier.matches( answer = POSITIVE_REAL_VALUE_1_5, inputs = inputs, @@ -161,7 +161,7 @@ class NumericInputEqualsRuleClassifierProviderTest { fun testRealAnswer_stringInput_throwsException() { val inputs = mapOf("x" to STRING_VALUE) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { inputEqualsRuleClassifier.matches( answer = POSITIVE_REAL_VALUE_1_5, inputs = inputs, diff --git a/domain/src/test/java/org/oppia/android/domain/classify/rules/numericinput/NumericInputIsGreaterThanOrEqualToRuleClassifierProviderTest.kt b/domain/src/test/java/org/oppia/android/domain/classify/rules/numericinput/NumericInputIsGreaterThanOrEqualToRuleClassifierProviderTest.kt index b7298602e46..95bab873ae0 100644 --- a/domain/src/test/java/org/oppia/android/domain/classify/rules/numericinput/NumericInputIsGreaterThanOrEqualToRuleClassifierProviderTest.kt +++ b/domain/src/test/java/org/oppia/android/domain/classify/rules/numericinput/NumericInputIsGreaterThanOrEqualToRuleClassifierProviderTest.kt @@ -199,7 +199,7 @@ class NumericInputIsGreaterThanOrEqualToRuleClassifierProviderTest { fun testRealAnswer_missingInput_throwsException() { val inputs = mapOf("y" to POSITIVE_REAL_VALUE_1_5) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { inputIsGreaterThanOrEqualToRuleClassifier.matches( answer = POSITIVE_REAL_VALUE_1_5, inputs = inputs, @@ -216,7 +216,7 @@ class NumericInputIsGreaterThanOrEqualToRuleClassifierProviderTest { fun testRealAnswer_stringInput_throwsException() { val inputs = mapOf("x" to STRING_VALUE) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { inputIsGreaterThanOrEqualToRuleClassifier.matches( answer = POSITIVE_REAL_VALUE_1_5, inputs = inputs, diff --git a/domain/src/test/java/org/oppia/android/domain/classify/rules/numericinput/NumericInputIsGreaterThanRuleClassifierProviderTest.kt b/domain/src/test/java/org/oppia/android/domain/classify/rules/numericinput/NumericInputIsGreaterThanRuleClassifierProviderTest.kt index aa4f78a021d..d488eba6b5a 100644 --- a/domain/src/test/java/org/oppia/android/domain/classify/rules/numericinput/NumericInputIsGreaterThanRuleClassifierProviderTest.kt +++ b/domain/src/test/java/org/oppia/android/domain/classify/rules/numericinput/NumericInputIsGreaterThanRuleClassifierProviderTest.kt @@ -200,7 +200,7 @@ class NumericInputIsGreaterThanRuleClassifierProviderTest { fun testRealAnswer_missingInput_throwsException() { val inputs = mapOf("y" to POSITIVE_REAL_VALUE_1_5) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { inputIsGreaterThanRuleClassifier.matches( answer = POSITIVE_REAL_VALUE_1_5, inputs = inputs, @@ -217,7 +217,7 @@ class NumericInputIsGreaterThanRuleClassifierProviderTest { fun testRealAnswer_stringInput_throwsException() { val inputs = mapOf("x" to STRING_VALUE) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { inputIsGreaterThanRuleClassifier.matches( answer = POSITIVE_REAL_VALUE_1_5, inputs = inputs, diff --git a/domain/src/test/java/org/oppia/android/domain/classify/rules/numericinput/NumericInputIsInclusivelyBetweenRuleClassifierProviderTest.kt b/domain/src/test/java/org/oppia/android/domain/classify/rules/numericinput/NumericInputIsInclusivelyBetweenRuleClassifierProviderTest.kt index 504117c488e..948327a4ec9 100644 --- a/domain/src/test/java/org/oppia/android/domain/classify/rules/numericinput/NumericInputIsInclusivelyBetweenRuleClassifierProviderTest.kt +++ b/domain/src/test/java/org/oppia/android/domain/classify/rules/numericinput/NumericInputIsInclusivelyBetweenRuleClassifierProviderTest.kt @@ -231,7 +231,7 @@ class NumericInputIsInclusivelyBetweenRuleClassifierProviderTest { "c" to NEGATIVE_REAL_VALUE_3_5, "b" to POSITIVE_REAL_VALUE_3_5 ) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { inputIsInclusivelyBetweenRuleClassifier.matches( answer = POSITIVE_REAL_VALUE_1_5, inputs = inputs, @@ -250,7 +250,7 @@ class NumericInputIsInclusivelyBetweenRuleClassifierProviderTest { "a" to NEGATIVE_REAL_VALUE_3_5, "c" to POSITIVE_REAL_VALUE_1_5 ) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { inputIsInclusivelyBetweenRuleClassifier.matches( answer = POSITIVE_REAL_VALUE_1_5, inputs = inputs, @@ -269,7 +269,7 @@ class NumericInputIsInclusivelyBetweenRuleClassifierProviderTest { "a" to STRING_VALUE_1, "b" to NEGATIVE_REAL_VALUE_3_5 ) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { inputIsInclusivelyBetweenRuleClassifier.matches( answer = POSITIVE_REAL_VALUE_1_5, inputs = inputs, @@ -288,7 +288,7 @@ class NumericInputIsInclusivelyBetweenRuleClassifierProviderTest { "a" to POSITIVE_REAL_VALUE_1_5, "b" to STRING_VALUE_2 ) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { inputIsInclusivelyBetweenRuleClassifier.matches( answer = POSITIVE_REAL_VALUE_1_5, inputs = inputs, @@ -307,7 +307,7 @@ class NumericInputIsInclusivelyBetweenRuleClassifierProviderTest { "c" to POSITIVE_INT_VALUE_1, "b" to POSITIVE_INT_VALUE_3 ) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { inputIsInclusivelyBetweenRuleClassifier.matches( answer = POSITIVE_INT_VALUE_2, inputs = inputs, @@ -326,7 +326,7 @@ class NumericInputIsInclusivelyBetweenRuleClassifierProviderTest { "a" to POSITIVE_INT_VALUE_1, "c" to POSITIVE_INT_VALUE_3 ) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { inputIsInclusivelyBetweenRuleClassifier.matches( answer = POSITIVE_INT_VALUE_2, inputs = inputs, @@ -345,7 +345,7 @@ class NumericInputIsInclusivelyBetweenRuleClassifierProviderTest { "a" to STRING_VALUE_1, "b" to POSITIVE_INT_VALUE_3 ) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { inputIsInclusivelyBetweenRuleClassifier.matches( answer = POSITIVE_INT_VALUE_1, inputs = inputs, @@ -364,7 +364,7 @@ class NumericInputIsInclusivelyBetweenRuleClassifierProviderTest { "a" to NEGATIVE_INT_VALUE_3, "b" to STRING_VALUE_2 ) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { inputIsInclusivelyBetweenRuleClassifier.matches( answer = POSITIVE_INT_VALUE_2, inputs = inputs, diff --git a/domain/src/test/java/org/oppia/android/domain/classify/rules/numericinput/NumericInputIsLessThanOrEqualToRuleClassifierProviderTest.kt b/domain/src/test/java/org/oppia/android/domain/classify/rules/numericinput/NumericInputIsLessThanOrEqualToRuleClassifierProviderTest.kt index 1bcc688f8c3..90cba1612af 100644 --- a/domain/src/test/java/org/oppia/android/domain/classify/rules/numericinput/NumericInputIsLessThanOrEqualToRuleClassifierProviderTest.kt +++ b/domain/src/test/java/org/oppia/android/domain/classify/rules/numericinput/NumericInputIsLessThanOrEqualToRuleClassifierProviderTest.kt @@ -199,7 +199,7 @@ class NumericInputIsLessThanOrEqualToRuleClassifierProviderTest { fun testRealAnswer_missingInput_throwsException() { val inputs = mapOf("y" to POSITIVE_REAL_VALUE_1_5) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { inputIsLessThanOrEqualToRuleClassifier.matches( answer = POSITIVE_REAL_VALUE_1_5, inputs = inputs, @@ -216,7 +216,7 @@ class NumericInputIsLessThanOrEqualToRuleClassifierProviderTest { fun testRealAnswer_stringInput_throwsException() { val inputs = mapOf("x" to STRING_VALUE) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { inputIsLessThanOrEqualToRuleClassifier.matches( answer = POSITIVE_REAL_VALUE_1_5, inputs = inputs, @@ -233,7 +233,7 @@ class NumericInputIsLessThanOrEqualToRuleClassifierProviderTest { fun testIntAnswer_missingInput_throwsException() { val inputs = mapOf("y" to POSITIVE_INT_VALUE_1) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { inputIsLessThanOrEqualToRuleClassifier.matches( answer = POSITIVE_INT_VALUE_1, inputs = inputs, @@ -250,7 +250,7 @@ class NumericInputIsLessThanOrEqualToRuleClassifierProviderTest { fun testIntAnswer_stringInput_throwsException() { val inputs = mapOf("x" to STRING_VALUE) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { inputIsLessThanOrEqualToRuleClassifier.matches( answer = POSITIVE_INT_VALUE_1, inputs = inputs, diff --git a/domain/src/test/java/org/oppia/android/domain/classify/rules/numericinput/NumericInputIsLessThanRuleClassifierProviderTest.kt b/domain/src/test/java/org/oppia/android/domain/classify/rules/numericinput/NumericInputIsLessThanRuleClassifierProviderTest.kt index 97d152ce3e4..e1819859a89 100644 --- a/domain/src/test/java/org/oppia/android/domain/classify/rules/numericinput/NumericInputIsLessThanRuleClassifierProviderTest.kt +++ b/domain/src/test/java/org/oppia/android/domain/classify/rules/numericinput/NumericInputIsLessThanRuleClassifierProviderTest.kt @@ -199,7 +199,7 @@ class NumericInputIsLessThanRuleClassifierProviderTest { fun testRealAnswer_missingInput_throwsException() { val inputs = mapOf("y" to POSITIVE_REAL_VALUE_1_5) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { inputIsLessThanRuleClassifier.matches( answer = POSITIVE_REAL_VALUE_1_5, inputs = inputs, @@ -216,7 +216,7 @@ class NumericInputIsLessThanRuleClassifierProviderTest { fun testRealAnswer_stringInput_throwsException() { val inputs = mapOf("x" to STRING_VALUE) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { inputIsLessThanRuleClassifier.matches( answer = POSITIVE_REAL_VALUE_1_5, inputs = inputs, @@ -233,7 +233,7 @@ class NumericInputIsLessThanRuleClassifierProviderTest { fun testIntAnswer_missingInput_throwsException() { val inputs = mapOf("y" to POSITIVE_INT_VALUE_1) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { inputIsLessThanRuleClassifier.matches( answer = POSITIVE_INT_VALUE_3, inputs = inputs, @@ -250,7 +250,7 @@ class NumericInputIsLessThanRuleClassifierProviderTest { fun testIntAnswer_stringInput_throwsException() { val inputs = mapOf("x" to STRING_VALUE) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { inputIsLessThanRuleClassifier.matches( answer = NEGATIVE_INT_VALUE_1, inputs = inputs, diff --git a/domain/src/test/java/org/oppia/android/domain/classify/rules/numericinput/NumericInputIsWithinToleranceRuleClassifierProviderTest.kt b/domain/src/test/java/org/oppia/android/domain/classify/rules/numericinput/NumericInputIsWithinToleranceRuleClassifierProviderTest.kt index d5481c0ac89..710210dcc39 100644 --- a/domain/src/test/java/org/oppia/android/domain/classify/rules/numericinput/NumericInputIsWithinToleranceRuleClassifierProviderTest.kt +++ b/domain/src/test/java/org/oppia/android/domain/classify/rules/numericinput/NumericInputIsWithinToleranceRuleClassifierProviderTest.kt @@ -393,7 +393,7 @@ class NumericInputIsWithinToleranceRuleClassifierProviderTest { val inputs = mapOf( "tol" to POSITIVE_REAL_VALUE_3_5 ) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { inputIsWithinToleranceRuleClassifier.matches( answer = POSITIVE_REAL_VALUE_1_5, inputs = inputs, @@ -411,7 +411,7 @@ class NumericInputIsWithinToleranceRuleClassifierProviderTest { val inputs = mapOf( "x" to NEGATIVE_REAL_VALUE_3_5 ) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { inputIsWithinToleranceRuleClassifier.matches( answer = POSITIVE_REAL_VALUE_1_5, inputs = inputs, @@ -430,7 +430,7 @@ class NumericInputIsWithinToleranceRuleClassifierProviderTest { "c" to NEGATIVE_REAL_VALUE_3_5, "tol" to POSITIVE_REAL_VALUE_3_5 ) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { inputIsWithinToleranceRuleClassifier.matches( answer = POSITIVE_REAL_VALUE_1_5, inputs = inputs, @@ -449,7 +449,7 @@ class NumericInputIsWithinToleranceRuleClassifierProviderTest { "x" to NEGATIVE_REAL_VALUE_3_5, "c" to POSITIVE_REAL_VALUE_1_5 ) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { inputIsWithinToleranceRuleClassifier.matches( answer = POSITIVE_REAL_VALUE_1_5, inputs = inputs, @@ -468,7 +468,7 @@ class NumericInputIsWithinToleranceRuleClassifierProviderTest { "x" to STRING_VALUE_1, "tol" to NEGATIVE_REAL_VALUE_3_5 ) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { inputIsWithinToleranceRuleClassifier.matches( answer = POSITIVE_REAL_VALUE_1_5, inputs = inputs, @@ -486,7 +486,7 @@ class NumericInputIsWithinToleranceRuleClassifierProviderTest { val inputs = mapOf( "tol" to POSITIVE_INT_VALUE_3 ) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { inputIsWithinToleranceRuleClassifier.matches( answer = POSITIVE_INT_VALUE_2, inputs = inputs, @@ -504,7 +504,7 @@ class NumericInputIsWithinToleranceRuleClassifierProviderTest { val inputs = mapOf( "x" to POSITIVE_INT_VALUE_1 ) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { inputIsWithinToleranceRuleClassifier.matches( answer = POSITIVE_INT_VALUE_2, inputs = inputs, @@ -523,7 +523,7 @@ class NumericInputIsWithinToleranceRuleClassifierProviderTest { "c" to POSITIVE_INT_VALUE_1, "tol" to POSITIVE_INT_VALUE_3 ) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { inputIsWithinToleranceRuleClassifier.matches( answer = POSITIVE_INT_VALUE_2, inputs = inputs, @@ -542,7 +542,7 @@ class NumericInputIsWithinToleranceRuleClassifierProviderTest { "x" to POSITIVE_INT_VALUE_1, "c" to POSITIVE_INT_VALUE_3 ) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { inputIsWithinToleranceRuleClassifier.matches( answer = POSITIVE_INT_VALUE_2, inputs = inputs, @@ -561,7 +561,7 @@ class NumericInputIsWithinToleranceRuleClassifierProviderTest { "x" to STRING_VALUE_1, "tol" to POSITIVE_INT_VALUE_3 ) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { inputIsWithinToleranceRuleClassifier.matches( answer = POSITIVE_INT_VALUE_1, inputs = inputs, diff --git a/domain/src/test/java/org/oppia/android/domain/classify/rules/ratioinput/RatioInputEqualsRuleClassifierProviderTest.kt b/domain/src/test/java/org/oppia/android/domain/classify/rules/ratioinput/RatioInputEqualsRuleClassifierProviderTest.kt index 244cb981571..07945a20691 100644 --- a/domain/src/test/java/org/oppia/android/domain/classify/rules/ratioinput/RatioInputEqualsRuleClassifierProviderTest.kt +++ b/domain/src/test/java/org/oppia/android/domain/classify/rules/ratioinput/RatioInputEqualsRuleClassifierProviderTest.kt @@ -100,7 +100,7 @@ class RatioInputEqualsRuleClassifierProviderTest { fun testAnswer_nonNegativeInput_inputWithIncorrectType_throwsException() { val inputs = mapOf("x" to NON_NEGATIVE_VALUE_TEST_0) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { equalsClassifierProvider.matches( answer = RATIO_VALUE_TEST_1_2_3, inputs = inputs, @@ -119,7 +119,7 @@ class RatioInputEqualsRuleClassifierProviderTest { fun testAnswer_testRatio_missingInputX_throwsException() { val inputs = mapOf("y" to RATIO_VALUE_TEST_1_2_3) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { equalsClassifierProvider.matches( answer = RATIO_VALUE_TEST_1_2_3, inputs = inputs, diff --git a/domain/src/test/java/org/oppia/android/domain/classify/rules/ratioinput/RatioInputHasNumberOfTermsEqualToClassifierProviderTest.kt b/domain/src/test/java/org/oppia/android/domain/classify/rules/ratioinput/RatioInputHasNumberOfTermsEqualToClassifierProviderTest.kt index 2cbb3b324a4..a8c1b27243c 100644 --- a/domain/src/test/java/org/oppia/android/domain/classify/rules/ratioinput/RatioInputHasNumberOfTermsEqualToClassifierProviderTest.kt +++ b/domain/src/test/java/org/oppia/android/domain/classify/rules/ratioinput/RatioInputHasNumberOfTermsEqualToClassifierProviderTest.kt @@ -82,7 +82,7 @@ class RatioInputHasNumberOfTermsEqualToClassifierProviderTest { fun testAnswer_nonNegativeInput_inputWithIncorrectType_throwsException() { val inputs = mapOf("y" to RATIO_VALUE_TEST_1_2_3) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { hasNumberOfTermsEqualToClassifierProvider.matches( answer = RATIO_VALUE_TEST_1_2_3, inputs = inputs, @@ -101,7 +101,7 @@ class RatioInputHasNumberOfTermsEqualToClassifierProviderTest { fun testAnswer_testRatio_missingInputY_throwsException() { val inputs = mapOf("x" to NON_NEGATIVE_VALUE_TEST_4) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { hasNumberOfTermsEqualToClassifierProvider.matches( answer = RATIO_VALUE_TEST_1_2_3, inputs = inputs, diff --git a/domain/src/test/java/org/oppia/android/domain/classify/rules/ratioinput/RatioInputHasSpecificTermEqualToRuleClassifierProviderTest.kt b/domain/src/test/java/org/oppia/android/domain/classify/rules/ratioinput/RatioInputHasSpecificTermEqualToRuleClassifierProviderTest.kt index 81968647149..14101f1d79e 100644 --- a/domain/src/test/java/org/oppia/android/domain/classify/rules/ratioinput/RatioInputHasSpecificTermEqualToRuleClassifierProviderTest.kt +++ b/domain/src/test/java/org/oppia/android/domain/classify/rules/ratioinput/RatioInputHasSpecificTermEqualToRuleClassifierProviderTest.kt @@ -198,7 +198,7 @@ class RatioInputHasSpecificTermEqualToRuleClassifierProviderTest { fun testAnswer_threeTerms_indexInputWithIncorrectType_throwsException() { val inputs = mapOf("x" to STRING_VALUE, "y" to NON_NEGATIVE_VALUE_TEST_3) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { hasSpecificTermEqualToClassifierProvider.matches( answer = RATIO_VALUE_TEST_1_2_3, inputs = inputs, @@ -215,7 +215,7 @@ class RatioInputHasSpecificTermEqualToRuleClassifierProviderTest { fun testAnswer_threeTerms_valueInputWithIncorrectType_throwsException() { val inputs = mapOf("x" to NON_NEGATIVE_VALUE_TEST_4, "y" to STRING_VALUE) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { hasSpecificTermEqualToClassifierProvider.matches( answer = RATIO_VALUE_TEST_1_2_3, inputs = inputs, @@ -232,7 +232,7 @@ class RatioInputHasSpecificTermEqualToRuleClassifierProviderTest { fun testAnswer_threeTerms_missingIndexInput_throwsException() { val inputs = mapOf("y" to NON_NEGATIVE_VALUE_TEST_3) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { hasSpecificTermEqualToClassifierProvider.matches( answer = RATIO_VALUE_TEST_1_2_3, inputs = inputs, @@ -249,7 +249,7 @@ class RatioInputHasSpecificTermEqualToRuleClassifierProviderTest { fun testAnswer_threeTerms_missingValueInput_throwsException() { val inputs = mapOf("x" to NON_NEGATIVE_VALUE_TEST_4) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { hasSpecificTermEqualToClassifierProvider.matches( answer = RATIO_VALUE_TEST_1_2_3, inputs = inputs, @@ -264,7 +264,7 @@ class RatioInputHasSpecificTermEqualToRuleClassifierProviderTest { @Test fun testAnswer_threeTerms_missingBothInputs_throwsException() { - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { hasSpecificTermEqualToClassifierProvider.matches( answer = RATIO_VALUE_TEST_1_2_3, inputs = mapOf(), diff --git a/domain/src/test/java/org/oppia/android/domain/classify/rules/ratioinput/RatioInputIsEquivalentRuleClassifierProviderTest.kt b/domain/src/test/java/org/oppia/android/domain/classify/rules/ratioinput/RatioInputIsEquivalentRuleClassifierProviderTest.kt index c93b44f8dc2..09fdeb952bb 100644 --- a/domain/src/test/java/org/oppia/android/domain/classify/rules/ratioinput/RatioInputIsEquivalentRuleClassifierProviderTest.kt +++ b/domain/src/test/java/org/oppia/android/domain/classify/rules/ratioinput/RatioInputIsEquivalentRuleClassifierProviderTest.kt @@ -146,7 +146,7 @@ class RatioInputIsEquivalentRuleClassifierProviderTest { fun testAnswer_nonNegativeInput_inputWithIncorrectType_throwsException() { val inputs = mapOf("x" to NON_NEGATIVE_VALUE_TEST_0) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { isEquivalentClassifierProvider.matches( answer = RATIO_VALUE_TEST_1_2_3, inputs = inputs, @@ -165,7 +165,7 @@ class RatioInputIsEquivalentRuleClassifierProviderTest { fun testAnswer_testRatio_missingInputX_throwsException() { val inputs = mapOf("y" to RATIO_VALUE_TEST_1_2_3) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { isEquivalentClassifierProvider.matches( answer = RATIO_VALUE_TEST_1_2_3, inputs = inputs, diff --git a/domain/src/test/java/org/oppia/android/domain/classify/rules/textinput/TextInputContainsRuleClassifierProviderTest.kt b/domain/src/test/java/org/oppia/android/domain/classify/rules/textinput/TextInputContainsRuleClassifierProviderTest.kt index 6f4fc9013b1..1c258aec94e 100644 --- a/domain/src/test/java/org/oppia/android/domain/classify/rules/textinput/TextInputContainsRuleClassifierProviderTest.kt +++ b/domain/src/test/java/org/oppia/android/domain/classify/rules/textinput/TextInputContainsRuleClassifierProviderTest.kt @@ -268,7 +268,7 @@ class TextInputContainsRuleClassifierProviderTest { fun testStringAnswer_missingInput_throwsException() { val inputs = mapOf("y" to STRING_VALUE_TEST_ANSWER_INPUT_SET) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { inputContainsRuleClassifier.matches( answer = STRING_VALUE_TEST_ANSWER, inputs = inputs, @@ -285,7 +285,7 @@ class TextInputContainsRuleClassifierProviderTest { fun testStringAnswer_nonNegativeIntInput_throwsException() { val inputs = mapOf("x" to NON_NEGATIVE_VALUE_TEST_1) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { inputContainsRuleClassifier.matches( answer = STRING_VALUE_TEST_ANSWER, inputs = inputs, diff --git a/domain/src/test/java/org/oppia/android/domain/classify/rules/textinput/TextInputEqualsRuleClassifierProviderTest.kt b/domain/src/test/java/org/oppia/android/domain/classify/rules/textinput/TextInputEqualsRuleClassifierProviderTest.kt index 3b658cca5df..6c5c53471c2 100644 --- a/domain/src/test/java/org/oppia/android/domain/classify/rules/textinput/TextInputEqualsRuleClassifierProviderTest.kt +++ b/domain/src/test/java/org/oppia/android/domain/classify/rules/textinput/TextInputEqualsRuleClassifierProviderTest.kt @@ -210,7 +210,7 @@ class TextInputEqualsRuleClassifierProviderTest { fun testStringAnswer_missingInput_throwsException() { val inputs = mapOf("y" to STRING_VALUE_TEST_LOWERCASE_INPUT_SET) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { inputEqualsRuleClassifier.matches( answer = STRING_VALUE_TEST_LOWERCASE, inputs = inputs, @@ -227,7 +227,7 @@ class TextInputEqualsRuleClassifierProviderTest { fun testStringAnswer_nonNegativeIntInput_throwsException() { val inputs = mapOf("x" to INT_VALUE_TEST_NON_NEGATIVE) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { inputEqualsRuleClassifier.matches( answer = STRING_VALUE_TEST_UPPERCASE, inputs = inputs, diff --git a/domain/src/test/java/org/oppia/android/domain/classify/rules/textinput/TextInputFuzzyEqualsRuleClassifierProviderTest.kt b/domain/src/test/java/org/oppia/android/domain/classify/rules/textinput/TextInputFuzzyEqualsRuleClassifierProviderTest.kt index 67c7874d515..3bb592d1499 100644 --- a/domain/src/test/java/org/oppia/android/domain/classify/rules/textinput/TextInputFuzzyEqualsRuleClassifierProviderTest.kt +++ b/domain/src/test/java/org/oppia/android/domain/classify/rules/textinput/TextInputFuzzyEqualsRuleClassifierProviderTest.kt @@ -267,7 +267,7 @@ class TextInputFuzzyEqualsRuleClassifierProviderTest { fun testStringAnswer_nonNegativeIntInput_verifyThrowsException() { val inputs = mapOf("x" to NON_NEGATIVE_TEST_VALUE_1) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { inputFuzzyEqualsRuleClassifier.matches( answer = STRING_VALUE_TEST_ANSWER_UPPERCASE, inputs = inputs, diff --git a/domain/src/test/java/org/oppia/android/domain/classify/rules/textinput/TextInputStartsWithRuleClassifierProviderTest.kt b/domain/src/test/java/org/oppia/android/domain/classify/rules/textinput/TextInputStartsWithRuleClassifierProviderTest.kt index c88983ed5fc..60ea011ad34 100644 --- a/domain/src/test/java/org/oppia/android/domain/classify/rules/textinput/TextInputStartsWithRuleClassifierProviderTest.kt +++ b/domain/src/test/java/org/oppia/android/domain/classify/rules/textinput/TextInputStartsWithRuleClassifierProviderTest.kt @@ -292,7 +292,7 @@ class TextInputStartsWithRuleClassifierProviderTest { fun testStringAns_missingInput_throwsException() { val inputs = mapOf("y" to STRING_VALUE_TEST_STRING_LOWERCASE_INPUT_SET) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { inputStartsWithRuleClassifier.matches( answer = STRING_VALUE_TEST_STRING_LOWERCASE, inputs = inputs, @@ -309,7 +309,7 @@ class TextInputStartsWithRuleClassifierProviderTest { fun testStringAns_nonNegativeIntInput_throwsException() { val inputs = mapOf("x" to NON_NEGATIVE_TEST_VALUE_1) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { inputStartsWithRuleClassifier.matches( answer = STRING_VALUE_TEST_STRING_LOWERCASE, inputs = inputs, diff --git a/domain/src/test/java/org/oppia/android/domain/exploration/ExplorationActiveTimeControllerTest.kt b/domain/src/test/java/org/oppia/android/domain/exploration/ExplorationActiveTimeControllerTest.kt index 39414c42791..7f33cbe96ab 100644 --- a/domain/src/test/java/org/oppia/android/domain/exploration/ExplorationActiveTimeControllerTest.kt +++ b/domain/src/test/java/org/oppia/android/domain/exploration/ExplorationActiveTimeControllerTest.kt @@ -9,6 +9,7 @@ import dagger.BindsInstance import dagger.Component import dagger.Module import dagger.Provides +import org.junit.Before import org.junit.Test import org.junit.runner.RunWith import org.oppia.android.app.model.ProfileId @@ -96,6 +97,11 @@ class ExplorationActiveTimeControllerTest { private val firstTestProfile = ProfileId.newBuilder().setInternalId(0).build() private val secondTestProfile = ProfileId.newBuilder().setInternalId(1).build() + @Before + fun setUp() { + TestPlatformParameterModule.forceEnableNpsSurvey(true) + } + @Test fun testSessionTimer_explorationStartedCallbackReceived_startsSessionTimer() { setUpTestApplicationComponent() @@ -223,7 +229,7 @@ class ExplorationActiveTimeControllerTest { fun testStopTimer_beforeStarting_isFailure() { setUpTestApplicationComponent() - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { stopExploration() } assertThat(exception) diff --git a/domain/src/test/java/org/oppia/android/domain/exploration/ExplorationDataControllerTest.kt b/domain/src/test/java/org/oppia/android/domain/exploration/ExplorationDataControllerTest.kt index 70fdb3df2b9..deee65f9f9a 100644 --- a/domain/src/test/java/org/oppia/android/domain/exploration/ExplorationDataControllerTest.kt +++ b/domain/src/test/java/org/oppia/android/domain/exploration/ExplorationDataControllerTest.kt @@ -53,6 +53,7 @@ import org.oppia.android.testing.FakeExceptionLogger import org.oppia.android.testing.TestLogReportingModule import org.oppia.android.testing.data.DataProviderTestMonitor import org.oppia.android.testing.environment.TestEnvironmentConfig +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestCoroutineDispatchers import org.oppia.android.testing.threading.TestDispatcherModule @@ -401,7 +402,8 @@ class ExplorationDataControllerTest { AlgebraicExpressionInputModule::class, MathEquationInputModule::class, LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, PlatformParameterModule::class, - PlatformParameterSingletonModule::class, ExplorationProgressModule::class + PlatformParameterSingletonModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : DataProvidersInjector { diff --git a/domain/src/test/java/org/oppia/android/domain/exploration/ExplorationProgressControllerTest.kt b/domain/src/test/java/org/oppia/android/domain/exploration/ExplorationProgressControllerTest.kt index ed37c3bc9b8..b75654bcdf7 100644 --- a/domain/src/test/java/org/oppia/android/domain/exploration/ExplorationProgressControllerTest.kt +++ b/domain/src/test/java/org/oppia/android/domain/exploration/ExplorationProgressControllerTest.kt @@ -87,6 +87,7 @@ import org.oppia.android.testing.TestLogReportingModule import org.oppia.android.testing.assertThrows import org.oppia.android.testing.data.DataProviderTestMonitor import org.oppia.android.testing.environment.TestEnvironmentConfig +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.logging.EventLogSubject import org.oppia.android.testing.logging.EventLogSubject.Companion.assertThat import org.oppia.android.testing.robolectric.RobolectricModule @@ -109,6 +110,7 @@ import org.oppia.android.util.logging.SyncStatusModule import org.oppia.android.util.networking.NetworkConnectionUtilDebugModule import org.oppia.android.util.platformparameter.EnableLearnerStudyAnalytics import org.oppia.android.util.platformparameter.EnableLoggingLearnerStudyIds +import org.oppia.android.util.platformparameter.EnableNpsSurvey import org.oppia.android.util.platformparameter.PlatformParameterValue import org.robolectric.annotation.Config import org.robolectric.annotation.LooperMode @@ -165,7 +167,7 @@ class ExplorationProgressControllerTest { @Test fun testGetCurrentState_noExploration_throwsException() { // Can't retrieve the current state until the play session is started. - assertThrows(UninitializedPropertyAccessException::class) { + assertThrows() { explorationProgressController.getCurrentState() } } @@ -3189,6 +3191,12 @@ class ExplorationProgressControllerTest { // Enable study IDs by default in tests. return PlatformParameterValue.createDefaultParameter(defaultValue = true) } + + @Provides + @EnableNpsSurvey + fun provideEnableNpsSurvey(): PlatformParameterValue { + return PlatformParameterValue.createDefaultParameter(defaultValue = true) + } } // TODO(#89): Move this to a common test application component. @@ -3207,7 +3215,7 @@ class ExplorationProgressControllerTest { AlgebraicExpressionInputModule::class, MathEquationInputModule::class, LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, PlatformParameterSingletonModule::class, - ExplorationProgressModule::class + ExplorationProgressModule::class, TestAuthenticationModule::class ] ) interface TestApplicationComponent : DataProvidersInjector { diff --git a/domain/src/test/java/org/oppia/android/domain/exploration/ExplorationProgressModuleTest.kt b/domain/src/test/java/org/oppia/android/domain/exploration/ExplorationProgressModuleTest.kt index d97bb864d99..cf7eef40556 100644 --- a/domain/src/test/java/org/oppia/android/domain/exploration/ExplorationProgressModuleTest.kt +++ b/domain/src/test/java/org/oppia/android/domain/exploration/ExplorationProgressModuleTest.kt @@ -17,6 +17,7 @@ import org.junit.runner.RunWith import org.oppia.android.domain.exploration.testing.ExplorationStorageTestModule import org.oppia.android.domain.oppialogger.LogStorageModule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.platformparameter.TestPlatformParameterModule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestDispatcherModule import org.oppia.android.testing.time.FakeOppiaClockModule @@ -92,7 +93,8 @@ class ExplorationProgressModuleTest { TestModule::class, TestLogModule::class, RobolectricModule::class, FakeOppiaClockModule::class, ExplorationProgressModule::class, TestDispatcherModule::class, LocaleProdModule::class, TestLogReportingModule::class, LogStorageModule::class, - NetworkConnectionUtilDebugModule::class, ExplorationStorageTestModule::class + NetworkConnectionUtilDebugModule::class, ExplorationStorageTestModule::class, + TestPlatformParameterModule::class ] ) interface TestApplicationComponent : DataProvidersInjector { diff --git a/domain/src/test/java/org/oppia/android/domain/exploration/lightweightcheckpointing/ExplorationCheckpointControllerTest.kt b/domain/src/test/java/org/oppia/android/domain/exploration/lightweightcheckpointing/ExplorationCheckpointControllerTest.kt index cb189de92ba..bfef2cedd25 100644 --- a/domain/src/test/java/org/oppia/android/domain/exploration/lightweightcheckpointing/ExplorationCheckpointControllerTest.kt +++ b/domain/src/test/java/org/oppia/android/domain/exploration/lightweightcheckpointing/ExplorationCheckpointControllerTest.kt @@ -52,6 +52,7 @@ import org.oppia.android.domain.topic.FRACTIONS_EXPLORATION_ID_1 import org.oppia.android.testing.TestLogReportingModule import org.oppia.android.testing.data.DataProviderTestMonitor import org.oppia.android.testing.environment.TestEnvironmentConfig +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.lightweightcheckpointing.ExplorationCheckpointTestHelper import org.oppia.android.testing.lightweightcheckpointing.FRACTIONS_EXPLORATION_0_TITLE import org.oppia.android.testing.lightweightcheckpointing.FRACTIONS_STORY_0_EXPLORATION_0_CURRENT_VERSION @@ -1000,7 +1001,7 @@ class ExplorationCheckpointControllerTest { AlgebraicExpressionInputModule::class, MathEquationInputModule::class, RatioInputModule::class, ImageClickInputModule::class, InteractionsModule::class, HintsAndSolutionConfigModule::class, HintsAndSolutionProdModule::class, - ExplorationProgressModule::class, + ExplorationProgressModule::class, TestAuthenticationModule::class ] ) interface TestApplicationComponent : DataProvidersInjector { diff --git a/domain/src/test/java/org/oppia/android/domain/exploration/testing/FakeExplorationRetrieverTest.kt b/domain/src/test/java/org/oppia/android/domain/exploration/testing/FakeExplorationRetrieverTest.kt index ae53ac8a2e0..6d8ed9c82fa 100644 --- a/domain/src/test/java/org/oppia/android/domain/exploration/testing/FakeExplorationRetrieverTest.kt +++ b/domain/src/test/java/org/oppia/android/domain/exploration/testing/FakeExplorationRetrieverTest.kt @@ -58,7 +58,7 @@ class FakeExplorationRetrieverTest { @Test fun testLoadExploration_noProxySet_fakeExpId_throwsException() { - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { runBlocking { fakeExplorationRetriever.loadExploration("fake_id") } } @@ -83,7 +83,7 @@ class FakeExplorationRetrieverTest { expIdToLoad = TEST_EXPLORATION_ID_2, expIdToLoadInstead = "fake_id" ) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { runBlocking { fakeExplorationRetriever.loadExploration(TEST_EXPLORATION_ID_2) } } @@ -120,7 +120,7 @@ class FakeExplorationRetrieverTest { expIdToLoad = "fake_id", expIdToLoadInstead = "other_fake_id" ) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { runBlocking { fakeExplorationRetriever.loadExploration("fake_id") } } @@ -133,7 +133,7 @@ class FakeExplorationRetrieverTest { expIdToLoad = TEST_EXPLORATION_ID_2, expIdToLoadInstead = TEST_EXPLORATION_ID_5 ) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { runBlocking { fakeExplorationRetriever.loadExploration("fake_id") } } @@ -175,7 +175,7 @@ class FakeExplorationRetrieverTest { ) fakeExplorationRetriever.clearExplorationProxy("fake_id") - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { runBlocking { fakeExplorationRetriever.loadExploration("fake_id") } } diff --git a/domain/src/test/java/org/oppia/android/domain/hintsandsolution/HintHandlerProdImplTest.kt b/domain/src/test/java/org/oppia/android/domain/hintsandsolution/HintHandlerProdImplTest.kt index faa4e98c9f2..c66cc01efe6 100644 --- a/domain/src/test/java/org/oppia/android/domain/hintsandsolution/HintHandlerProdImplTest.kt +++ b/domain/src/test/java/org/oppia/android/domain/hintsandsolution/HintHandlerProdImplTest.kt @@ -976,7 +976,7 @@ class HintHandlerProdImplTest { val state = expWithHintsAndSolution.getInitialState() hintHandler.startWatchingForHintsInNewStateSync(state) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { hintHandler.viewHintSync(hintIndex = 0) } @@ -1157,7 +1157,7 @@ class HintHandlerProdImplTest { hintHandler.startWatchingForHintsInNewStateSync(state) triggerAndRevealFirstHint() - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { hintHandler.viewHintSync(hintIndex = 0) } @@ -1172,7 +1172,7 @@ class HintHandlerProdImplTest { triggerAndRevealFirstHint() triggerAndRevealSecondHint() - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { hintHandler.viewHintSync(hintIndex = 0) } @@ -1188,7 +1188,7 @@ class HintHandlerProdImplTest { triggerAndRevealSecondHint() triggerAndRevealSolution() - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { hintHandler.viewHintSync(hintIndex = 0) } @@ -1203,7 +1203,7 @@ class HintHandlerProdImplTest { val state = expWithHintsAndSolution.getInitialState() hintHandler.startWatchingForHintsInNewStateSync(state) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { hintHandler.viewSolutionSync() } @@ -1217,7 +1217,7 @@ class HintHandlerProdImplTest { hintHandler.startWatchingForHintsInNewStateSync(state) triggerFirstHint() - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { hintHandler.viewSolutionSync() } @@ -1231,7 +1231,7 @@ class HintHandlerProdImplTest { hintHandler.startWatchingForHintsInNewStateSync(state) triggerAndRevealFirstHint() - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { hintHandler.viewSolutionSync() } @@ -1247,7 +1247,7 @@ class HintHandlerProdImplTest { triggerAndRevealFirstHint() triggerAndRevealSecondHint() - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { hintHandler.viewSolutionSync() } @@ -1344,7 +1344,7 @@ class HintHandlerProdImplTest { triggerAndRevealSecondHint() triggerAndRevealSolution() - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { hintHandler.viewSolutionSync() } diff --git a/domain/src/test/java/org/oppia/android/domain/locale/LocaleControllerTest.kt b/domain/src/test/java/org/oppia/android/domain/locale/LocaleControllerTest.kt index 098fcde27de..30467ee6263 100644 --- a/domain/src/test/java/org/oppia/android/domain/locale/LocaleControllerTest.kt +++ b/domain/src/test/java/org/oppia/android/domain/locale/LocaleControllerTest.kt @@ -775,7 +775,7 @@ class LocaleControllerTest { @Test fun testSetAsDefault_customLocaleImpl_throwsException() { - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { localeController.setAsDefault(mockDisplayLocale, Configuration()) } diff --git a/domain/src/test/java/org/oppia/android/domain/onboarding/AppStartupStateControllerTest.kt b/domain/src/test/java/org/oppia/android/domain/onboarding/AppStartupStateControllerTest.kt index 9f924f394dd..813e82f1827 100644 --- a/domain/src/test/java/org/oppia/android/domain/onboarding/AppStartupStateControllerTest.kt +++ b/domain/src/test/java/org/oppia/android/domain/onboarding/AppStartupStateControllerTest.kt @@ -19,14 +19,26 @@ import org.oppia.android.app.model.AppStartupState.BuildFlavorNoticeMode.NO_NOTI import org.oppia.android.app.model.AppStartupState.BuildFlavorNoticeMode.SHOW_BETA_NOTICE import org.oppia.android.app.model.AppStartupState.BuildFlavorNoticeMode.SHOW_UPGRADE_TO_GENERAL_AVAILABILITY_NOTICE import org.oppia.android.app.model.AppStartupState.StartupMode.APP_IS_DEPRECATED +import org.oppia.android.app.model.AppStartupState.StartupMode.OPTIONAL_UPDATE_AVAILABLE +import org.oppia.android.app.model.AppStartupState.StartupMode.OS_IS_DEPRECATED import org.oppia.android.app.model.AppStartupState.StartupMode.USER_IS_ONBOARDED import org.oppia.android.app.model.AppStartupState.StartupMode.USER_NOT_YET_ONBOARDED import org.oppia.android.app.model.BuildFlavor +import org.oppia.android.app.model.DeprecationNoticeType +import org.oppia.android.app.model.DeprecationResponse import org.oppia.android.app.model.OnboardingState +import org.oppia.android.app.model.PlatformParameter import org.oppia.android.data.persistence.PersistentCacheStore +import org.oppia.android.domain.onboarding.AppStartupStateControllerTest.TestModule.Companion.appDeprecationResponse +import org.oppia.android.domain.onboarding.AppStartupStateControllerTest.TestModule.Companion.enableAppAndOsDeprecation +import org.oppia.android.domain.onboarding.AppStartupStateControllerTest.TestModule.Companion.forcedAppUpdateVersion +import org.oppia.android.domain.onboarding.AppStartupStateControllerTest.TestModule.Companion.lowestApiLevel +import org.oppia.android.domain.onboarding.AppStartupStateControllerTest.TestModule.Companion.optionalAppUpdateVersion +import org.oppia.android.domain.onboarding.AppStartupStateControllerTest.TestModule.Companion.osDeprecationResponse import org.oppia.android.domain.oppialogger.LogStorageModule import org.oppia.android.domain.oppialogger.LoggingIdentifierModule import org.oppia.android.domain.oppialogger.analytics.ApplicationLifecycleModule +import org.oppia.android.domain.platformparameter.PlatformParameterController import org.oppia.android.domain.platformparameter.PlatformParameterModule import org.oppia.android.domain.platformparameter.PlatformParameterSingletonModule import org.oppia.android.testing.TestLogReportingModule @@ -49,6 +61,10 @@ import org.oppia.android.util.logging.GlobalLogLevel import org.oppia.android.util.logging.LogLevel import org.oppia.android.util.logging.SyncStatusModule import org.oppia.android.util.networking.NetworkConnectionUtilDebugModule +import org.oppia.android.util.platformparameter.APP_AND_OS_DEPRECATION +import org.oppia.android.util.platformparameter.FORCED_APP_UPDATE_VERSION_CODE +import org.oppia.android.util.platformparameter.LOWEST_SUPPORTED_API_LEVEL +import org.oppia.android.util.platformparameter.OPTIONAL_APP_UPDATE_VERSION_CODE import org.oppia.android.util.system.OppiaClockModule import org.robolectric.Shadows.shadowOf import org.robolectric.annotation.Config @@ -69,6 +85,7 @@ import javax.inject.Singleton class AppStartupStateControllerTest { @Inject lateinit var context: Context @Inject lateinit var appStartupStateController: AppStartupStateController + @Inject lateinit var platformParameterController: PlatformParameterController @Inject lateinit var testCoroutineDispatchers: TestCoroutineDispatchers @Inject lateinit var monitorFactory: DataProviderTestMonitor.Factory @Parameter lateinit var initialFlavorName: String @@ -765,6 +782,112 @@ class AppStartupStateControllerTest { assertThat(mode.buildFlavorNoticeMode).isEqualTo(NO_NOTICE) } + @Test + fun testController_appAndOsDeprecationEnabled_initialLaunch_startupModeIsUserNotOnboarded() { + executeInPreviousAppInstance { testComponent -> + testComponent.getPlatformParameterController().updatePlatformParameterDatabase( + listOf(enableAppAndOsDeprecation) + ) + testComponent.getTestCoroutineDispatchers().runCurrent() + } + setUpDefaultTestApplicationComponent() + + monitorFactory.ensureDataProviderExecutes(platformParameterController.getParameterDatabase()) + testCoroutineDispatchers.runCurrent() + + val appStartupState = appStartupStateController.getAppStartupState() + + val startupMode = monitorFactory.waitForNextSuccessfulResult(appStartupState) + assertThat(startupMode.startupMode).isEqualTo(USER_NOT_YET_ONBOARDED) + } + + @Test + fun testController_appAndOsDeprecationEnabled_userIsOnboarded_returnsUserOnboardedStartupMode() { + setUpTestApplicationWithAppAndOSDeprecationEnabled() + + val appStartupState = appStartupStateController.getAppStartupState() + + val startupMode = monitorFactory.waitForNextSuccessfulResult(appStartupState) + assertThat(startupMode.startupMode).isEqualTo(USER_IS_ONBOARDED) + } + + @Test + fun testController_osIsDeprecated_returnsOsDeprecatedStartupMode() { + setUpTestApplicationWithAppAndOSDeprecationEnabled( + platformParameterToEnable = lowestApiLevel + ) + + val appStartupState = appStartupStateController.getAppStartupState() + + val startupMode = monitorFactory.waitForNextSuccessfulResult(appStartupState) + assertThat(startupMode.startupMode).isEqualTo(OS_IS_DEPRECATED) + } + + @Test + fun testController_osIsDeprecated_previousResponseExists_returnsUserOnboardedStartupMode() { + setUpTestApplicationWithAppAndOSDeprecationEnabled( + previousResponses = listOf(osDeprecationResponse), + platformParameterToEnable = lowestApiLevel + ) + + val appStartupState = appStartupStateController.getAppStartupState() + + val startupMode = monitorFactory.waitForNextSuccessfulResult(appStartupState) + assertThat(startupMode.startupMode).isEqualTo(USER_IS_ONBOARDED) + } + + @Test + fun testController_optionalUpdateAvailable_returnsOptionalUpdateStartupMode() { + setUpTestApplicationWithAppAndOSDeprecationEnabled( + platformParameterToEnable = optionalAppUpdateVersion + ) + + val appStartupState = appStartupStateController.getAppStartupState() + + val startupMode = monitorFactory.waitForNextSuccessfulResult(appStartupState) + assertThat(startupMode.startupMode).isEqualTo(OPTIONAL_UPDATE_AVAILABLE) + } + + @Test + fun testController_optionalUpdateAvailable_previousResponseExists_returnsUserOnboardedStartupMode + () { + setUpTestApplicationWithAppAndOSDeprecationEnabled( + previousResponses = listOf(appDeprecationResponse), + platformParameterToEnable = optionalAppUpdateVersion + ) + + val appStartupState = appStartupStateController.getAppStartupState() + + val startupMode = monitorFactory.waitForNextSuccessfulResult(appStartupState) + assertThat(startupMode.startupMode).isEqualTo(USER_IS_ONBOARDED) + } + + @Test + fun testController_forcedUpdateAvailable_returnsAppDeprecatedStartupMode() { + setUpTestApplicationWithAppAndOSDeprecationEnabled( + platformParameterToEnable = forcedAppUpdateVersion + ) + + val appStartupState = appStartupStateController.getAppStartupState() + + val startupMode = monitorFactory.waitForNextSuccessfulResult(appStartupState) + assertThat(startupMode.startupMode).isEqualTo(APP_IS_DEPRECATED) + } + + @Test + fun testController_forcedUpdateAvailable_previousResponseExists_returnsUserOnboardedStartupMode + () { + setUpTestApplicationWithAppAndOSDeprecationEnabled( + previousResponses = listOf(appDeprecationResponse), + platformParameterToEnable = forcedAppUpdateVersion + ) + + val appStartupState = appStartupStateController.getAppStartupState() + + val startupMode = monitorFactory.waitForNextSuccessfulResult(appStartupState) + assertThat(startupMode.startupMode).isEqualTo(USER_IS_ONBOARDED) + } + private fun setUpTestApplicationComponent() { ApplicationProvider.getApplicationContext().inject(this) } @@ -776,6 +899,32 @@ class AppStartupStateControllerTest { setUpOppiaApplication(expirationEnabled = false, expDate = "9999-12-31") } + private fun setUpTestApplicationWithAppAndOSDeprecationEnabled( + previousResponses: List = emptyList(), + platformParameterToEnable: PlatformParameter? = null + ) { + executeInPreviousAppInstance { testComponent -> + testComponent.getAppStartupStateController().markOnboardingFlowCompleted() + testComponent.getTestCoroutineDispatchers().runCurrent() + + previousResponses.forEach { + testComponent.getDeprecationController().saveDeprecationResponse(it) + testComponent.getTestCoroutineDispatchers().runCurrent() + } + + testComponent.getPlatformParameterController().updatePlatformParameterDatabase( + platformParameterToEnable?.let { listOf(it, enableAppAndOsDeprecation) } + ?: listOf(enableAppAndOsDeprecation) + ) + testComponent.getTestCoroutineDispatchers().runCurrent() + } + + setUpTestApplicationComponent() + + monitorFactory.ensureDataProviderExecutes(platformParameterController.getParameterDatabase()) + testCoroutineDispatchers.runCurrent() + } + /** * Creates a separate test application component and executes the specified block. This should be * called before [setUpTestApplicationComponent] to avoid undefined behavior in production code. @@ -850,6 +999,40 @@ class AppStartupStateControllerTest { class TestModule { companion object { var buildFlavor = BuildFlavor.BUILD_FLAVOR_UNSPECIFIED + + val lowestApiLevel: PlatformParameter = PlatformParameter.newBuilder() + .setName(LOWEST_SUPPORTED_API_LEVEL) + .setInteger(Int.MAX_VALUE) + .setSyncStatus(PlatformParameter.SyncStatus.SYNCED_FROM_SERVER) + .build() + + val optionalAppUpdateVersion: PlatformParameter = PlatformParameter.newBuilder() + .setName(OPTIONAL_APP_UPDATE_VERSION_CODE) + .setInteger(Int.MAX_VALUE) + .setSyncStatus(PlatformParameter.SyncStatus.SYNCED_FROM_SERVER) + .build() + + val forcedAppUpdateVersion: PlatformParameter = PlatformParameter.newBuilder() + .setName(FORCED_APP_UPDATE_VERSION_CODE) + .setInteger(Int.MAX_VALUE) + .setSyncStatus(PlatformParameter.SyncStatus.SYNCED_FROM_SERVER) + .build() + + val enableAppAndOsDeprecation: PlatformParameter = PlatformParameter.newBuilder() + .setName(APP_AND_OS_DEPRECATION) + .setBoolean(true) + .setSyncStatus(PlatformParameter.SyncStatus.SYNCED_FROM_SERVER) + .build() + + val osDeprecationResponse: DeprecationResponse = DeprecationResponse.newBuilder() + .setDeprecationNoticeType(DeprecationNoticeType.OS_DEPRECATION) + .setDeprecatedVersion(Int.MAX_VALUE) + .build() + + val appDeprecationResponse: DeprecationResponse = DeprecationResponse.newBuilder() + .setDeprecationNoticeType(DeprecationNoticeType.APP_DEPRECATION) + .setDeprecatedVersion(Int.MAX_VALUE) + .build() } @Provides @@ -907,6 +1090,10 @@ class AppStartupStateControllerTest { fun getContext(): Context + fun getPlatformParameterController(): PlatformParameterController + + fun getDeprecationController(): DeprecationController + fun inject(appStartupStateControllerTest: AppStartupStateControllerTest) } diff --git a/domain/src/test/java/org/oppia/android/domain/onboarding/DeprecationControllerTest.kt b/domain/src/test/java/org/oppia/android/domain/onboarding/DeprecationControllerTest.kt index 3ef5714961d..ddec4a04d86 100644 --- a/domain/src/test/java/org/oppia/android/domain/onboarding/DeprecationControllerTest.kt +++ b/domain/src/test/java/org/oppia/android/domain/onboarding/DeprecationControllerTest.kt @@ -13,14 +13,19 @@ import dagger.Module import dagger.Provides import org.junit.Test import org.junit.runner.RunWith +import org.oppia.android.app.model.AppStartupState.StartupMode import org.oppia.android.app.model.BuildFlavor import org.oppia.android.app.model.DeprecationNoticeType import org.oppia.android.app.model.DeprecationResponse import org.oppia.android.app.model.DeprecationResponseDatabase +import org.oppia.android.app.model.OnboardingState +import org.oppia.android.app.model.PlatformParameter +import org.oppia.android.app.model.PlatformParameter.SyncStatus import org.oppia.android.data.persistence.PersistentCacheStore import org.oppia.android.domain.oppialogger.LogStorageModule import org.oppia.android.domain.oppialogger.LoggingIdentifierModule import org.oppia.android.domain.oppialogger.analytics.ApplicationLifecycleModule +import org.oppia.android.domain.platformparameter.PlatformParameterController import org.oppia.android.domain.platformparameter.PlatformParameterModule import org.oppia.android.domain.platformparameter.PlatformParameterSingletonModule import org.oppia.android.testing.TestLogReportingModule @@ -40,10 +45,19 @@ import org.oppia.android.util.logging.GlobalLogLevel import org.oppia.android.util.logging.LogLevel import org.oppia.android.util.logging.SyncStatusModule import org.oppia.android.util.networking.NetworkConnectionUtilDebugModule +import org.oppia.android.util.platformparameter.FORCED_APP_UPDATE_VERSION_CODE +import org.oppia.android.util.platformparameter.ForcedAppUpdateVersionCode +import org.oppia.android.util.platformparameter.LOWEST_SUPPORTED_API_LEVEL +import org.oppia.android.util.platformparameter.LowestSupportedApiLevel +import org.oppia.android.util.platformparameter.OPTIONAL_APP_UPDATE_VERSION_CODE +import org.oppia.android.util.platformparameter.OptionalAppUpdateVersionCode +import org.oppia.android.util.platformparameter.PlatformParameterSingleton +import org.oppia.android.util.platformparameter.PlatformParameterValue import org.oppia.android.util.system.OppiaClockModule import org.robolectric.Shadows import org.robolectric.annotation.Config import javax.inject.Inject +import javax.inject.Provider import javax.inject.Singleton /** Tests for [DeprecationController]. */ @@ -57,85 +71,162 @@ class DeprecationControllerTest { @Inject lateinit var deprecationController: DeprecationController @Inject lateinit var testCoroutineDispatchers: TestCoroutineDispatchers @Inject lateinit var monitorFactory: DataProviderTestMonitor.Factory + @Inject lateinit var platformParameterSingleton: PlatformParameterSingleton + @Inject lateinit var platformParameterController: PlatformParameterController - @Test - fun testController_providesInitialState_indicatesNoUpdatesReceivedFromGatingConsole() { - val defaultDeprecationResponseDatabase = DeprecationResponseDatabase - .getDefaultInstance() + @field:[Inject LowestSupportedApiLevel] + lateinit var lowestSupportedApiLevelProvider: Provider> - setUpDefaultTestApplicationComponent() + @field:[Inject OptionalAppUpdateVersionCode] + lateinit var optionalAppUpdateVersionProvider: Provider> + + @field:[Inject ForcedAppUpdateVersionCode] + lateinit var forcedAppUpdateVersionProvider: Provider> - val deprecationDataProvider = deprecationController - .getDeprecationDatabase() + @Test + fun testController_initialAppLaunch_returnsDefaultDeprecationResponseDatabase() { + setUpDefaultTestApplicationComponent() + val deprecationDataProvider = deprecationController.getDeprecationDatabase() val deprecationResponseDatabase = monitorFactory .waitForNextSuccessfulResult(deprecationDataProvider) assertThat(deprecationResponseDatabase.osDeprecationResponse) .isEqualTo(defaultDeprecationResponseDatabase.osDeprecationResponse) - assertThat(deprecationResponseDatabase.appDeprecationResponse) .isEqualTo(defaultDeprecationResponseDatabase.appDeprecationResponse) } @Test - fun testController_observedAfterSettingAppDeprecation_providesUpdatedDeprecationResponse() { + fun testController_previousResponseSaved_providesDeprecationDatabaseWithAppResponse() { executeInPreviousAppInstance { testComponent -> - val appDeprecationResponse = DeprecationResponse.newBuilder().apply { - deprecatedVersion = 5 - deprecationNoticeType = DeprecationNoticeType.APP_DEPRECATION - }.build() - testComponent.getDeprecationController().saveDeprecationResponse(appDeprecationResponse) testComponent.getTestCoroutineDispatchers().runCurrent() } - // Create the application after previous arrangement to simulate a re-creation. setUpDefaultTestApplicationComponent() - val deprecationDataProvider = deprecationController - .getDeprecationDatabase() - + val deprecationDataProvider = deprecationController.getDeprecationDatabase() val deprecationResponseDatabase = monitorFactory .waitForNextSuccessfulResult(deprecationDataProvider) assertThat(deprecationResponseDatabase.appDeprecationResponse) - .isEqualTo( - DeprecationResponse.newBuilder().apply { - deprecatedVersion = 5 - deprecationNoticeType = DeprecationNoticeType.APP_DEPRECATION - }.build() - ) + .isEqualTo(appDeprecationResponse) } @Test - fun testController_observedAfterSettingOsDeprecation_providesUpdatedDeprecationResponse() { + fun testController_previousResponseSaved_providesDeprecationDatabaseWithOsResponse() { executeInPreviousAppInstance { testComponent -> - val osDeprecationResponse = DeprecationResponse.newBuilder().apply { - deprecatedVersion = 5 - deprecationNoticeType = DeprecationNoticeType.OS_DEPRECATION - }.build() - testComponent.getDeprecationController().saveDeprecationResponse(osDeprecationResponse) testComponent.getTestCoroutineDispatchers().runCurrent() } - // Create the application after previous arrangement to simulate a re-creation. setUpDefaultTestApplicationComponent() - val deprecationDataProvider = deprecationController - .getDeprecationDatabase() - + val deprecationDataProvider = deprecationController.getDeprecationDatabase() val deprecationResponseDatabase = monitorFactory .waitForNextSuccessfulResult(deprecationDataProvider) - assertThat(deprecationResponseDatabase.osDeprecationResponse) - .isEqualTo( - DeprecationResponse.newBuilder().apply { - deprecatedVersion = 5 - deprecationNoticeType = DeprecationNoticeType.OS_DEPRECATION - }.build() - ) + assertThat(deprecationResponseDatabase.osDeprecationResponse).isEqualTo(osDeprecationResponse) + } + + @Test + fun testController_userNotOnboarded_returnsUserNotOnboardedStartUpMode() { + setUpDefaultTestApplicationComponent() + + val onboardingState = OnboardingState.newBuilder().build() + val startUpMode = deprecationController.processStartUpMode( + onboardingState, defaultDeprecationResponseDatabase + ) + + assertThat(startUpMode).isEqualTo(StartupMode.USER_NOT_YET_ONBOARDED) + } + + @Test + fun testController_userIsOnboarded_returnsUserIsOnboardedStartUpMode() { + setUpDefaultTestApplicationComponent() + + val startupMode = deprecationController.processStartUpMode( + alreadyOnboardedOnboardingState, defaultDeprecationResponseDatabase + ) + + assertThat(startupMode).isEqualTo(StartupMode.USER_IS_ONBOARDED) + } + + @Test + fun testController_osIsDeprecated_returnsOsIsDeprecatedStartUpMode() { + setUpTestApplicationComponentWithParameters( + platformParameters = listOf(lowestApiLevel) + ) + + val startupMode = deprecationController.processStartUpMode( + alreadyOnboardedOnboardingState, defaultDeprecationResponseDatabase + ) + + assertThat(startupMode).isEqualTo(StartupMode.OS_IS_DEPRECATED) + } + + @Test + fun testController_osIsDeprecated_previousResponseExists_returnsUserIsOnboardedStartUpMode() { + setUpTestApplicationComponentWithParameters( + platformParameters = listOf(lowestApiLevel) + ) + + val startupMode = deprecationController.processStartUpMode( + alreadyOnboardedOnboardingState, deprecationResponseDatabaseWithPreviousResponses + ) + assertThat(startupMode).isEqualTo(StartupMode.USER_IS_ONBOARDED) + } + + @Test + fun testController_hasOptionalUpdate_returnsOptionalUpdateAvailableStartupMode() { + setUpTestApplicationComponentWithParameters( + platformParameters = listOf(optionalAppUpdateVersion) + ) + + val startupMode = deprecationController.processStartUpMode( + alreadyOnboardedOnboardingState, defaultDeprecationResponseDatabase + ) + assertThat(startupMode).isEqualTo(StartupMode.OPTIONAL_UPDATE_AVAILABLE) + } + + @Test + fun testController_hasOptionalUpdate_previousResponseExists_returnsUserIsOnboardedStartupMode() { + setUpTestApplicationComponentWithParameters( + platformParameters = listOf(optionalAppUpdateVersion) + ) + + val startupMode = deprecationController.processStartUpMode( + alreadyOnboardedOnboardingState, deprecationResponseDatabaseWithPreviousResponses + ) + assertThat(startupMode).isEqualTo(StartupMode.USER_IS_ONBOARDED) + } + + @Test + fun testController_hasForcedUpdate_returnsAppIsDeprecatedStartupMode() { + setUpTestApplicationComponentWithParameters( + platformParameters = listOf(forcedAppUpdateVersion) + ) + + monitorFactory.ensureDataProviderExecutes(platformParameterController.getParameterDatabase()) + testCoroutineDispatchers.runCurrent() + + val startupMode = deprecationController.processStartUpMode( + alreadyOnboardedOnboardingState, defaultDeprecationResponseDatabase + ) + assertThat(startupMode).isEqualTo(StartupMode.APP_IS_DEPRECATED) + } + + @Test + fun testController_hasForcedUpdate_previousResponseExists_returnsUserIsOnboardedStartupMode() { + setUpTestApplicationComponentWithParameters( + platformParameters = listOf(forcedAppUpdateVersion) + ) + + val startupMode = deprecationController.processStartUpMode( + alreadyOnboardedOnboardingState, deprecationResponseDatabaseWithPreviousResponses + ) + assertThat(startupMode).isEqualTo(StartupMode.USER_IS_ONBOARDED) } private fun setUpTestApplicationComponent() { @@ -146,6 +237,22 @@ class DeprecationControllerTest { setUpOppiaApplicationForContext(context, expirationEnabled, expDate) } + private fun setUpTestApplicationComponentWithParameters( + platformParameters: List + ) { + executeInPreviousAppInstance { testComponent -> + testComponent.getPlatformParameterController().updatePlatformParameterDatabase( + platformParameters + ) + testComponent.getTestCoroutineDispatchers().runCurrent() + } + + setUpDefaultTestApplicationComponent() + + monitorFactory.ensureDataProviderExecutes(platformParameterController.getParameterDatabase()) + testCoroutineDispatchers.runCurrent() + } + /** * Creates a separate test application component and executes the specified block. This should be * called before [setUpTestApplicationComponent] to avoid undefined behavior in production code. @@ -250,6 +357,12 @@ class DeprecationControllerTest { fun getDeprecationController(): DeprecationController + fun getDataProviderTestMonitor(): DataProviderTestMonitor.Factory + + fun getPlatformParameterSingleton(): PlatformParameterSingleton + + fun getPlatformParameterController(): PlatformParameterController + fun getCacheFactory(): PersistentCacheStore.Factory fun getTestCoroutineDispatchers(): TestCoroutineDispatchers @@ -276,4 +389,47 @@ class DeprecationControllerTest { override fun getDataProvidersInjector(): DataProvidersInjector = component } + + companion object { + val alreadyOnboardedOnboardingState: OnboardingState = OnboardingState.newBuilder() + .setAlreadyOnboardedApp(true) + .build() + + val lowestApiLevel: PlatformParameter = PlatformParameter.newBuilder() + .setName(LOWEST_SUPPORTED_API_LEVEL) + .setInteger(Int.MAX_VALUE) + .setSyncStatus(SyncStatus.SYNCED_FROM_SERVER) + .build() + + val optionalAppUpdateVersion: PlatformParameter = PlatformParameter.newBuilder() + .setName(OPTIONAL_APP_UPDATE_VERSION_CODE) + .setInteger(Int.MAX_VALUE) + .setSyncStatus(SyncStatus.SYNCED_FROM_SERVER) + .build() + + val forcedAppUpdateVersion: PlatformParameter = PlatformParameter.newBuilder() + .setName(FORCED_APP_UPDATE_VERSION_CODE) + .setInteger(Int.MAX_VALUE) + .setSyncStatus(SyncStatus.SYNCED_FROM_SERVER) + .build() + + val osDeprecationResponse: DeprecationResponse = DeprecationResponse.newBuilder() + .setDeprecationNoticeType(DeprecationNoticeType.OS_DEPRECATION) + .setDeprecatedVersion(Int.MAX_VALUE) + .build() + + val appDeprecationResponse: DeprecationResponse = DeprecationResponse.newBuilder() + .setDeprecationNoticeType(DeprecationNoticeType.APP_DEPRECATION) + .setDeprecatedVersion(Int.MAX_VALUE) + .build() + + val defaultDeprecationResponseDatabase: DeprecationResponseDatabase = + DeprecationResponseDatabase.getDefaultInstance() + + val deprecationResponseDatabaseWithPreviousResponses: DeprecationResponseDatabase = + DeprecationResponseDatabase.newBuilder() + .setOsDeprecationResponse(osDeprecationResponse) + .setAppDeprecationResponse(appDeprecationResponse) + .build() + } } diff --git a/domain/src/test/java/org/oppia/android/domain/oppialogger/LoggingIdentifierControllerTest.kt b/domain/src/test/java/org/oppia/android/domain/oppialogger/LoggingIdentifierControllerTest.kt index 303d6f466ac..b2c74d34ad0 100644 --- a/domain/src/test/java/org/oppia/android/domain/oppialogger/LoggingIdentifierControllerTest.kt +++ b/domain/src/test/java/org/oppia/android/domain/oppialogger/LoggingIdentifierControllerTest.kt @@ -52,7 +52,6 @@ import org.robolectric.annotation.LooperMode import java.io.File import java.io.FileOutputStream import java.lang.IllegalStateException -import java.util.Random import javax.inject.Inject import javax.inject.Singleton @@ -77,17 +76,6 @@ class LoggingIdentifierControllerTest { setUpTestApplicationComponent() } - @Test - fun testCreateLearnerId_verifyCreatesCorrectRandomValue() { - val randomLearnerId = loggingIdentifierController.createLearnerId() - - val testLearnerId = machineLocale.run { - "%08x".formatForMachines(Random(TestLoggingIdentifierModule.applicationIdSeed).nextInt()) - } - assertThat(randomLearnerId).isEqualTo(testLearnerId) - assertThat(randomLearnerId.length).isEqualTo(8) - } - @Test fun testCreateLearnerId_twice_bothAreDifferent() { val learnerId1 = loggingIdentifierController.createLearnerId() @@ -104,7 +92,7 @@ class LoggingIdentifierControllerTest { val installationId = monitorFactory.waitForNextSuccessfulResult(loggingIdentifierController.getInstallationId()) - assertThat(installationId).isEqualTo("bc1f80ab5d8c") + assertThat(installationId).isEqualTo("1d079efe67ee") assertThat(installationId.length).isEqualTo(12) } @@ -117,7 +105,7 @@ class LoggingIdentifierControllerTest { monitorFactory.waitForNextSuccessfulResult(loggingIdentifierController.getInstallationId()) // The same value should return for the second instance of the controller. - assertThat(installationId).isEqualTo("bc1f80ab5d8c") + assertThat(installationId).isEqualTo("1d079efe67ee") } @Test @@ -135,7 +123,7 @@ class LoggingIdentifierControllerTest { fun testFetchInstallationId_initialAppState_returnsNewInstallationIdValue() { val installationId = fetchSuccessfulAsyncValue(loggingIdentifierController::fetchInstallationId) - assertThat(installationId).isEqualTo("bc1f80ab5d8c") + assertThat(installationId).isEqualTo("1d079efe67ee") assertThat(installationId?.length).isEqualTo(12) } @@ -147,7 +135,7 @@ class LoggingIdentifierControllerTest { val installationId = fetchSuccessfulAsyncValue(loggingIdentifierController::fetchInstallationId) // The same value should return for the second instance of the controller. - assertThat(installationId).isEqualTo("bc1f80ab5d8c") + assertThat(installationId).isEqualTo("1d079efe67ee") } @Test @@ -165,7 +153,7 @@ class LoggingIdentifierControllerTest { val sessionIdProvider = loggingIdentifierController.getSessionId() val sessionId = monitorFactory.waitForNextSuccessfulResult(sessionIdProvider) - assertThat(sessionId).isEqualTo("1c46e9d5-5902-311a-bbba-a75973c3ccd2") + assertThat(sessionId).isEqualTo("4d0a66f3-82b6-3aa9-8f61-140bdd5f49d3") } @Test @@ -176,7 +164,7 @@ class LoggingIdentifierControllerTest { // The second call should return the same ID (since the ID doesn't automatically change). val sessionId = monitorFactory.waitForNextSuccessfulResult(sessionIdProvider) - assertThat(sessionId).isEqualTo("1c46e9d5-5902-311a-bbba-a75973c3ccd2") + assertThat(sessionId).isEqualTo("4d0a66f3-82b6-3aa9-8f61-140bdd5f49d3") } @Test @@ -184,7 +172,7 @@ class LoggingIdentifierControllerTest { val sessionIdFlow = loggingIdentifierController.getSessionIdFlow() val sessionId = sessionIdFlow.waitForLatestValue() - assertThat(sessionId).isEqualTo("1c46e9d5-5902-311a-bbba-a75973c3ccd2") + assertThat(sessionId).isEqualTo("4d0a66f3-82b6-3aa9-8f61-140bdd5f49d3") } @Test @@ -195,7 +183,7 @@ class LoggingIdentifierControllerTest { // The second call should return the same ID (since the ID doesn't automatically change). val sessionId = sessionIdFlow.waitForLatestValue() - assertThat(sessionId).isEqualTo("1c46e9d5-5902-311a-bbba-a75973c3ccd2") + assertThat(sessionId).isEqualTo("4d0a66f3-82b6-3aa9-8f61-140bdd5f49d3") } @Test @@ -207,7 +195,7 @@ class LoggingIdentifierControllerTest { // The session ID should be changed since updateSessionId() was called. val sessionId = monitorFactory.waitForNextSuccessfulResult(sessionIdProvider) - assertThat(sessionId).isEqualTo("8808493e-6576-3e26-9cbf-d1008051b253") + assertThat(sessionId).isEqualTo("59aea8d4-af4b-3249-b889-dfeba06d0495") } @Test @@ -221,7 +209,7 @@ class LoggingIdentifierControllerTest { // The existing provider should've been notified of the changed session ID. val sessionId = monitor.ensureNextResultIsSuccess() - assertThat(sessionId).isEqualTo("8808493e-6576-3e26-9cbf-d1008051b253") + assertThat(sessionId).isEqualTo("59aea8d4-af4b-3249-b889-dfeba06d0495") } @Test @@ -236,7 +224,7 @@ class LoggingIdentifierControllerTest { // The session ID should be changed yet again due to updateSessionId() being called twice. val sessionId = monitorFactory.waitForNextSuccessfulResult(sessionIdProvider) - assertThat(sessionId).isEqualTo("8aeabb00-af70-39e4-89b3-c47c9900ec4f") + assertThat(sessionId).isEqualTo("8cbd31f7-bb52-3129-9fac-78dcb5cb857a") } @Test @@ -248,7 +236,7 @@ class LoggingIdentifierControllerTest { // The session ID should be changed since updateSessionId() was called. val sessionId = sessionIdFlow.waitForLatestValue() - assertThat(sessionId).isEqualTo("8808493e-6576-3e26-9cbf-d1008051b253") + assertThat(sessionId).isEqualTo("59aea8d4-af4b-3249-b889-dfeba06d0495") } @Test @@ -260,7 +248,7 @@ class LoggingIdentifierControllerTest { testCoroutineDispatchers.runCurrent() // The current value of the exist flow should be changed now since the session ID was updated. - assertThat(sessionIdFlow.value).isEqualTo("8808493e-6576-3e26-9cbf-d1008051b253") + assertThat(sessionIdFlow.value).isEqualTo("59aea8d4-af4b-3249-b889-dfeba06d0495") } private fun writeFileCache(cacheName: String, value: T) { diff --git a/domain/src/test/java/org/oppia/android/domain/oppialogger/analytics/CpuPerformanceSnapshotterTest.kt b/domain/src/test/java/org/oppia/android/domain/oppialogger/analytics/CpuPerformanceSnapshotterTest.kt index 1641eb00223..adf3376b77d 100644 --- a/domain/src/test/java/org/oppia/android/domain/oppialogger/analytics/CpuPerformanceSnapshotterTest.kt +++ b/domain/src/test/java/org/oppia/android/domain/oppialogger/analytics/CpuPerformanceSnapshotterTest.kt @@ -426,7 +426,7 @@ class CpuPerformanceSnapshotterTest { @Test fun testSnapshotter_initializeOnce_initializeAgain_throwsErrorOnReinitialization() { cpuPerformanceSnapshotter.initialiseSnapshotter() - val exception = assertThrows(IllegalArgumentException::class) { + val exception = assertThrows() { cpuPerformanceSnapshotter.initialiseSnapshotter() } diff --git a/domain/src/test/java/org/oppia/android/domain/oppialogger/analytics/FirestoreDataControllerTest.kt b/domain/src/test/java/org/oppia/android/domain/oppialogger/analytics/FirestoreDataControllerTest.kt new file mode 100644 index 00000000000..2de079ee3c0 --- /dev/null +++ b/domain/src/test/java/org/oppia/android/domain/oppialogger/analytics/FirestoreDataControllerTest.kt @@ -0,0 +1,486 @@ +package org.oppia.android.domain.oppialogger.analytics + +import android.app.Application +import android.content.Context +import androidx.test.core.app.ApplicationProvider +import androidx.test.ext.junit.runners.AndroidJUnit4 +import com.google.common.truth.Truth.assertThat +import dagger.BindsInstance +import dagger.Component +import dagger.Module +import dagger.Provides +import kotlinx.coroutines.CoroutineDispatcher +import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.Deferred +import kotlinx.coroutines.async +import kotlinx.coroutines.flow.MutableStateFlow +import kotlinx.coroutines.flow.StateFlow +import org.junit.Before +import org.junit.Test +import org.junit.runner.RunWith +import org.oppia.android.app.model.EventLog +import org.oppia.android.app.model.OppiaEventLogs +import org.oppia.android.app.model.ProfileId +import org.oppia.android.app.model.SurveyQuestionName +import org.oppia.android.data.persistence.PersistentCacheStore +import org.oppia.android.domain.oppialogger.FirestoreLogStorageCacheSize +import org.oppia.android.domain.platformparameter.PlatformParameterModule +import org.oppia.android.domain.platformparameter.PlatformParameterSingletonModule +import org.oppia.android.testing.FakeFirestoreEventLogger +import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.data.DataProviderTestMonitor +import org.oppia.android.testing.firebase.TestAuthenticationModule +import org.oppia.android.testing.logging.EventLogSubject.Companion.assertThat +import org.oppia.android.testing.robolectric.RobolectricModule +import org.oppia.android.testing.threading.TestCoroutineDispatchers +import org.oppia.android.testing.threading.TestDispatcherModule +import org.oppia.android.testing.time.FakeOppiaClock +import org.oppia.android.testing.time.FakeOppiaClockModule +import org.oppia.android.util.data.AsyncResult +import org.oppia.android.util.data.DataProvidersInjector +import org.oppia.android.util.data.DataProvidersInjectorProvider +import org.oppia.android.util.locale.LocaleProdModule +import org.oppia.android.util.logging.EnableConsoleLog +import org.oppia.android.util.logging.EnableFileLog +import org.oppia.android.util.logging.GlobalLogLevel +import org.oppia.android.util.logging.LogLevel +import org.oppia.android.util.logging.SyncStatusModule +import org.oppia.android.util.networking.NetworkConnectionDebugUtil +import org.oppia.android.util.networking.NetworkConnectionUtil +import org.oppia.android.util.networking.NetworkConnectionUtilDebugModule +import org.oppia.android.util.threading.BackgroundDispatcher +import org.robolectric.annotation.Config +import org.robolectric.annotation.LooperMode +import javax.inject.Inject +import javax.inject.Provider +import javax.inject.Singleton + +@Suppress("FunctionName", "SameParameterValue") +@RunWith(AndroidJUnit4::class) +@LooperMode(LooperMode.Mode.PAUSED) +@Config(application = FirestoreDataControllerTest.TestApplication::class) +class FirestoreDataControllerTest { + @Inject + lateinit var dataControllerProvider: Provider + + @Inject + lateinit var testCoroutineDispatchers: TestCoroutineDispatchers + + @Inject + lateinit var oppiaClock: FakeOppiaClock + + @Inject + lateinit var fakeFirestoreEventLogger: FakeFirestoreEventLogger + + @Inject + lateinit var networkConnectionUtil: NetworkConnectionDebugUtil + + @Inject + lateinit var monitorFactory: DataProviderTestMonitor.Factory + + @field:[Inject BackgroundDispatcher] + lateinit var backgroundDispatcher: CoroutineDispatcher + + @Inject + lateinit var persistentCacheStoryFactory: PersistentCacheStore.Factory + + private val profileId by lazy { ProfileId.newBuilder().apply { internalId = 0 }.build() } + + private val dataController by lazy { dataControllerProvider.get() } + + @Before + fun setUp() { + setUpTestApplicationComponent() + } + + @Test + fun testController_logEvent_withOptionalSurveyQuestionContext_checkLogsEvent() { + logOptionalSurveyResponseEvent() + + val eventLog = fakeFirestoreEventLogger.getMostRecentEvent() + + assertThat(eventLog).hasTimestampThat().isEqualTo(TEST_TIMESTAMP) + assertThat(eventLog).isEssentialPriority() + assertThat(eventLog).hasOptionalSurveyResponseContext() + } + + @Test + fun testController_logEvent_noProfile_hasNoProfileId() { + dataController.logEvent( + createOptionalSurveyResponseContext( + surveyId = TEST_SURVEY_ID, + profileId = null, + answer = TEST_ANSWER + ), + profileId = null, + TEST_TIMESTAMP + ) + testCoroutineDispatchers.runCurrent() + + val eventLog = fakeFirestoreEventLogger.getMostRecentEvent() + assertThat(eventLog.hasProfileId()).isFalse() + } + + @Test + fun testController_logEvent_withProfile_includesProfileId() { + logOptionalSurveyResponseEvent() + + val eventLog = fakeFirestoreEventLogger.getMostRecentEvent() + assertThat(eventLog.hasProfileId()).isTrue() + assertThat(eventLog).hasProfileIdThat().isEqualTo(profileId) + } + + @Test + fun testController_logEvent_withNoNetwork_exceedLimit_checkEventLogStoreSize() { + networkConnectionUtil.setCurrentConnectionStatus( + NetworkConnectionUtil.ProdConnectionStatus.NONE + ) + logFourEvents() + + val eventLogsProvider = dataController.getEventLogStore() + + val eventLogs = monitorFactory.waitForNextSuccessfulResult(eventLogsProvider) + assertThat(eventLogs.eventLogsToUploadList).hasSize(2) + assertThat(eventLogs.uploadedEventLogsList).isEmpty() + } + + @Test + fun testController_logEvents_exceedLimit_withNoNetwork_checkCorrectEventIsEvicted() { + networkConnectionUtil.setCurrentConnectionStatus( + NetworkConnectionUtil.ProdConnectionStatus.NONE + ) + logFourEvents() + + val logsProvider = dataController.getEventLogStore() + + val eventLogs = monitorFactory.waitForNextSuccessfulResult(logsProvider) + val firstEventLog = eventLogs.getEventLogsToUpload(0) + val secondEventLog = eventLogs.getEventLogsToUpload(1) + assertThat(eventLogs.eventLogsToUploadList).hasSize(2) + + // The pruning will be purely based on timestamp of the event as all the event logs have + // ESSENTIAL priority. + assertThat(firstEventLog).hasTimestampThat().isEqualTo(1556094120000) + assertThat(secondEventLog).hasTimestampThat().isEqualTo(1556094100000) + } + + @Test + fun testController_uploadEventLogs_noLogs_cacheUnchanged() { + setUpTestApplicationComponent() + val monitor = monitorFactory.createMonitor(dataController.getEventLogStore()) + + runSynchronously { dataController.uploadData() } + + val logs = monitor.ensureNextResultIsSuccess() + assertThat(logs.eventLogsToUploadList).isEmpty() + assertThat(logs.uploadedEventLogsList).isEmpty() + } + + @Test + fun testController_uploadEventLogs_withPreviousLogs_recordsEventsAsUploaded() { + setUpTestApplicationComponent() + logTwoEvents() + + runSynchronously { dataController.uploadData() } + + assertThat(fakeFirestoreEventLogger.getEventListCount()).isEqualTo(2) + } + + @Test + fun testController_uploadEventLogs_withLogs_recordsEventsAsUploaded() { + setUpTestApplicationComponent() + logTwoEventsOffline() + + runSynchronously { dataController.uploadData() } + + assertThat(fakeFirestoreEventLogger.getEventListCount()).isEqualTo(2) + } + + @Test + fun testController_uploadEventLogsAndWait_noLogs_cacheUnchanged() { + setUpTestApplicationComponent() + val monitor = monitorFactory.createMonitor(dataController.getEventLogStore()) + + runSynchronously { dataController.uploadData() } + + val logs = monitor.ensureNextResultIsSuccess() + assertThat(logs.eventLogsToUploadList).isEmpty() + assertThat(logs.uploadedEventLogsList).isEmpty() + } + + @Test + fun testController_cachedEventsFromLastAppInstance_logNewEvent_thenForceSync_everythingUploads() { + // Simulate events being logged in a previous instance of the app. + logTwoCachedEventsDirectlyOnDisk() + + dataController.logEvent( + createAbandonSurveyContext( + TEST_SURVEY_ID, + profileId, + SurveyQuestionName.MARKET_FIT + ), + profileId = profileId + ) + + runSynchronously { dataController.uploadData() } + + testCoroutineDispatchers.runCurrent() + + // The force sync should ensure everything is uploaded. NOTE TO DEVELOPER: If this test is + // failing, it may be due to FirestoreDataController being created before + // logTwoCachedEventsDirectlyOnDisk is called above. If that's the case, use the indirect + // injection pattern at the top of the test suite (for FirestoreDataController itself) to ensure + // whichever dependency is injecting FirestoreDataController is also only injected when needed + // (i.e. using a Provider). + assertThat(fakeFirestoreEventLogger.getEventListCount()).isEqualTo(3) + } + + @Test + fun testController_uploadEventLogs_onNetworkRestore_removesAllEventLogsFromStore() { + setUpTestApplicationComponent() + + logTwoEventsOffline() + + runSynchronously { dataController.uploadData() } + + val logsProvider = dataController.getEventLogStore() + + val eventLogs = monitorFactory.waitForNextSuccessfulResult(logsProvider) + + assertThat(eventLogs.eventLogsToUploadList).hasSize(0) + } + + @Test + fun testController_uploadEventLogs_withNetworkConnection_removesAllEventLogsFromStore() { + setUpTestApplicationComponent() + + logTwoEvents() + + runSynchronously { dataController.uploadData() } + + val logsProvider = dataController.getEventLogStore() + + val eventLogs = monitorFactory.waitForNextSuccessfulResult(logsProvider) + + assertThat(eventLogs.eventLogsToUploadList).hasSize(0) + } + + private fun createAbandonSurveyContext( + surveyId: String, + profileId: ProfileId, + questionName: SurveyQuestionName + ): EventLog.Context { + return EventLog.Context.newBuilder() + .setAbandonSurvey( + EventLog.AbandonSurveyContext.newBuilder() + .setQuestionName(questionName) + .setSurveyDetails( + createSurveyResponseContext(surveyId, profileId) + ) + ) + .build() + } + + private fun runSynchronously(operation: suspend () -> Unit) = + CoroutineScope(backgroundDispatcher).async { operation() }.waitForSuccessfulResult() + + private fun logTwoEvents() { + logOptionalSurveyResponseEvent() + logOptionalSurveyResponseEvent(timestamp = 1556094110000) + } + + private fun logTwoEventsOffline() { + networkConnectionUtil.setCurrentConnectionStatus( + NetworkConnectionUtil.ProdConnectionStatus.NONE + ) + logTwoEvents() + networkConnectionUtil.setCurrentConnectionStatus( + NetworkConnectionUtil.ProdConnectionStatus.LOCAL + ) + } + + private fun logTwoCachedEventsDirectlyOnDisk() { + persistentCacheStoryFactory.create( + "firestore_data", OppiaEventLogs.getDefaultInstance() + ).storeDataAsync { + OppiaEventLogs.newBuilder().apply { + addEventLogsToUpload( + createEventLog( + context = createOptionalSurveyResponseContext( + surveyId = TEST_SURVEY_ID, + profileId = profileId, + answer = TEST_ANSWER + ) + ) + ) + addEventLogsToUpload( + createEventLog( + context = createOptionalSurveyResponseContext( + surveyId = TEST_SURVEY_ID, + profileId = profileId, + answer = TEST_ANSWER + ) + ) + ) + }.build() + }.waitForSuccessfulResult() + } + + private fun Deferred.waitForSuccessfulResult() { + return when (val result = waitForResult()) { + is AsyncResult.Pending -> error("Deferred never finished.") + is AsyncResult.Success -> {} // Nothing to do; the result succeeded. + is AsyncResult.Failure -> throw IllegalStateException("Deferred failed", result.error) + } + } + + private fun Deferred.waitForResult() = toStateFlow().waitForLatestValue() + + private fun Deferred.toStateFlow(): StateFlow> { + val deferred = this + return MutableStateFlow>(value = AsyncResult.Pending()).also { flow -> + CoroutineScope(backgroundDispatcher).async { + flow.emit(AsyncResult.Success(deferred.await())) + }.invokeOnCompletion { + it?.let { flow.tryEmit(AsyncResult.Failure(it)) } + } + } + } + + private fun StateFlow.waitForLatestValue(): T = + also { testCoroutineDispatchers.runCurrent() }.value + + private fun createEventLog( + context: EventLog.Context, + priority: EventLog.Priority = EventLog.Priority.ESSENTIAL, + timestamp: Long = oppiaClock.getCurrentTimeMs() + ) = EventLog.newBuilder().apply { + this.timestamp = timestamp + this.priority = priority + this.context = context + }.build() + + private fun logFourEvents() { + logOptionalSurveyResponseEvent(timestamp = 1556094120000) + logOptionalSurveyResponseEvent(timestamp = 1556094110000) + logOptionalSurveyResponseEvent(timestamp = 1556093100000) + logOptionalSurveyResponseEvent(timestamp = 1556094100000) + } + + private fun logOptionalSurveyResponseEvent(timestamp: Long = TEST_TIMESTAMP) { + dataController.logEvent( + createOptionalSurveyResponseContext( + surveyId = TEST_SURVEY_ID, + profileId = profileId, + answer = TEST_ANSWER + ), + profileId, + timestamp + ) + testCoroutineDispatchers.runCurrent() + } + + private fun createOptionalSurveyResponseContext( + surveyId: String, + profileId: ProfileId?, + answer: String + ): EventLog.Context { + return EventLog.Context.newBuilder() + .setOptionalResponse( + EventLog.OptionalSurveyResponseContext.newBuilder() + .setFeedbackAnswer(answer) + .setSurveyDetails( + createSurveyResponseContext(surveyId, profileId) + ) + ) + .build() + } + + private fun createSurveyResponseContext( + surveyId: String, + profileId: ProfileId? + ): EventLog.SurveyResponseContext { + return EventLog.SurveyResponseContext.newBuilder() + .setProfileId(profileId?.internalId.toString()) + .setSurveyId(surveyId) + .build() + } + + private fun setUpTestApplicationComponent() { + ApplicationProvider.getApplicationContext().inject(this) + } + + private companion object { + private const val TEST_SURVEY_ID = "test_survey_id" + private const val TEST_ANSWER = "Some text response" + private const val TEST_TIMESTAMP = 1556094120000 + } + + // TODO(#89): Move this to a common test application component. + @Module + class TestModule { + @Provides + @Singleton + fun provideContext(application: Application): Context { + return application + } + + // TODO(#59): Either isolate these to their own shared test module, or use the real logging + // module in tests to avoid needing to specify these settings for tests. + @EnableConsoleLog + @Provides + fun provideEnableConsoleLog(): Boolean = true + + @EnableFileLog + @Provides + fun provideEnableFileLog(): Boolean = false + + @GlobalLogLevel + @Provides + fun provideGlobalLogLevel(): LogLevel = LogLevel.VERBOSE + } + + @Module + class TestLogStorageModule { + @Provides + @FirestoreLogStorageCacheSize + fun provideFirestoreLogStorageCacheSize(): Int = 2 + } + + // TODO(#89): Move this to a common test application component. + @Singleton + @Component( + modules = [ + TestModule::class, TestLogReportingModule::class, TestLogStorageModule::class, + TestDispatcherModule::class, RobolectricModule::class, FakeOppiaClockModule::class, + NetworkConnectionUtilDebugModule::class, LocaleProdModule::class, + PlatformParameterSingletonModule::class, SyncStatusModule::class, + ApplicationLifecycleModule::class, PlatformParameterModule::class, + CpuPerformanceSnapshotterModule::class, TestAuthenticationModule::class, + ] + ) + interface TestApplicationComponent : DataProvidersInjector { + @Component.Builder + interface Builder { + @BindsInstance + fun setApplication(application: Application): Builder + fun build(): TestApplicationComponent + } + + fun inject(dataControllerTest: FirestoreDataControllerTest) + } + + class TestApplication : Application(), DataProvidersInjectorProvider { + private val component: TestApplicationComponent by lazy { + DaggerFirestoreDataControllerTest_TestApplicationComponent.builder() + .setApplication(this) + .build() + } + + fun inject(dataControllerTest: FirestoreDataControllerTest) { + component.inject(dataControllerTest) + } + + override fun getDataProvidersInjector(): DataProvidersInjector = component + } +} diff --git a/domain/src/test/java/org/oppia/android/domain/oppialogger/analytics/LearnerAnalyticsLoggerTest.kt b/domain/src/test/java/org/oppia/android/domain/oppialogger/analytics/LearnerAnalyticsLoggerTest.kt index 462dd3f04ad..80368c18df9 100644 --- a/domain/src/test/java/org/oppia/android/domain/oppialogger/analytics/LearnerAnalyticsLoggerTest.kt +++ b/domain/src/test/java/org/oppia/android/domain/oppialogger/analytics/LearnerAnalyticsLoggerTest.kt @@ -45,6 +45,7 @@ import org.oppia.android.domain.topic.TEST_EXPLORATION_ID_5 import org.oppia.android.testing.FakeAnalyticsEventLogger import org.oppia.android.testing.TestLogReportingModule import org.oppia.android.testing.data.DataProviderTestMonitor +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.junit.OppiaParameterizedTestRunner import org.oppia.android.testing.junit.OppiaParameterizedTestRunner.Iteration import org.oppia.android.testing.junit.OppiaParameterizedTestRunner.Parameter @@ -86,7 +87,7 @@ class LearnerAnalyticsLoggerTest { private const val TEST_STORY_ID = "test_story_id" private const val TEST_EXP_5_STATE_THREE_NAME = "NumericExpressionInput.IsEquivalentTo" private const val TEST_EXP_5_STATE_FOUR_NAME = "AlgebraicExpressionInput.MatchesExactlyWith" - private const val DEFAULT_INITIAL_SESSION_ID = "e6eacc69-e636-3c90-ba29-32bf3dd17161" + private const val DEFAULT_INITIAL_SESSION_ID = "ab4532d6-476c-3727-bc5a-ad84e5dae60f" } @Inject @@ -1838,6 +1839,7 @@ class LearnerAnalyticsLoggerTest { MathEquationInputModule::class, ImageClickInputModule::class, AssetModule::class, HintsAndSolutionConfigModule::class, HintsAndSolutionProdModule::class, CachingTestModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : DataProvidersInjector { diff --git a/domain/src/test/java/org/oppia/android/domain/oppialogger/analytics/SurveyEventsLoggerTest.kt b/domain/src/test/java/org/oppia/android/domain/oppialogger/analytics/SurveyEventsLoggerTest.kt index 4a5e3723f33..a8962bb0af4 100644 --- a/domain/src/test/java/org/oppia/android/domain/oppialogger/analytics/SurveyEventsLoggerTest.kt +++ b/domain/src/test/java/org/oppia/android/domain/oppialogger/analytics/SurveyEventsLoggerTest.kt @@ -17,11 +17,14 @@ import org.oppia.android.app.model.SurveyQuestionName import org.oppia.android.app.model.UserTypeAnswer import org.oppia.android.domain.oppialogger.EventLogStorageCacheSize import org.oppia.android.domain.oppialogger.ExceptionLogStorageCacheSize +import org.oppia.android.domain.oppialogger.FirestoreLogStorageCacheSize import org.oppia.android.domain.oppialogger.LoggingIdentifierModule import org.oppia.android.domain.oppialogger.survey.SurveyEventsLogger import org.oppia.android.domain.platformparameter.PlatformParameterSingletonModule import org.oppia.android.testing.FakeAnalyticsEventLogger +import org.oppia.android.testing.FakeFirestoreEventLogger import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.logging.EventLogSubject.Companion.assertThat import org.oppia.android.testing.logging.SyncStatusTestModule import org.oppia.android.testing.platformparameter.TestPlatformParameterModule @@ -52,6 +55,7 @@ import javax.inject.Singleton class SurveyEventsLoggerTest { private companion object { private const val TEST_SURVEY_ID = "test_survey_id" + private const val TEST_ANSWER = "Some text response" } @Inject @@ -60,6 +64,9 @@ class SurveyEventsLoggerTest { @Inject lateinit var fakeAnalyticsEventLogger: FakeAnalyticsEventLogger + @Inject + lateinit var fakeFirestoreEventLogger: FakeFirestoreEventLogger + @Inject lateinit var testCoroutineDispatchers: TestCoroutineDispatchers @@ -110,6 +117,26 @@ class SurveyEventsLoggerTest { } } + @Test + fun testLogOptionalResponse_logsEventWithCorrectValues() { + surveyEventsLogger.logOptionalResponse( + TEST_SURVEY_ID, + profileId, + TEST_ANSWER + ) + testCoroutineDispatchers.runCurrent() + + val eventLog = fakeFirestoreEventLogger.getMostRecentEvent() + + assertThat(eventLog).hasOptionalSurveyResponseContextThat { + hasSurveyDetailsThat { + hasSurveyIdThat().isNotEmpty() + hasInternalProfileIdThat().isEqualTo("0") + } + hasFeedbackAnswerThat().isEqualTo(TEST_ANSWER) + } + } + private fun setUpTestApplicationComponent() { DaggerSurveyEventsLoggerTest_TestApplicationComponent.builder() .setApplication(ApplicationProvider.getApplicationContext()) @@ -150,6 +177,10 @@ class SurveyEventsLoggerTest { @Provides @ExceptionLogStorageCacheSize fun provideExceptionLogStorageCacheSize(): Int = 2 + + @Provides + @FirestoreLogStorageCacheSize + fun provideFirestoreLogStorageCacheSize(): Int = 2 } // TODO(#89): Move this to a common test application component. @@ -161,7 +192,7 @@ class SurveyEventsLoggerTest { NetworkConnectionUtilDebugModule::class, LocaleProdModule::class, FakeOppiaClockModule::class, TestPlatformParameterModule::class, PlatformParameterSingletonModule::class, LoggingIdentifierModule::class, SyncStatusTestModule::class, - ApplicationLifecycleModule::class, AssetModule::class + ApplicationLifecycleModule::class, AssetModule::class, TestAuthenticationModule::class, ] ) interface TestApplicationComponent : DataProvidersInjector { diff --git a/domain/src/test/java/org/oppia/android/domain/oppialogger/loguploader/LogReportWorkManagerInitializerTest.kt b/domain/src/test/java/org/oppia/android/domain/oppialogger/loguploader/LogReportWorkManagerInitializerTest.kt index cded74aa82b..9f9443e1708 100644 --- a/domain/src/test/java/org/oppia/android/domain/oppialogger/loguploader/LogReportWorkManagerInitializerTest.kt +++ b/domain/src/test/java/org/oppia/android/domain/oppialogger/loguploader/LogReportWorkManagerInitializerTest.kt @@ -24,6 +24,7 @@ import org.junit.Test import org.junit.runner.RunWith import org.oppia.android.domain.oppialogger.EventLogStorageCacheSize import org.oppia.android.domain.oppialogger.ExceptionLogStorageCacheSize +import org.oppia.android.domain.oppialogger.FirestoreLogStorageCacheSize import org.oppia.android.domain.oppialogger.LoggingIdentifierModule import org.oppia.android.domain.oppialogger.OppiaLogger import org.oppia.android.domain.oppialogger.PerformanceMetricsLogStorageCacheSize @@ -38,6 +39,7 @@ import org.oppia.android.domain.platformparameter.PlatformParameterSingletonModu import org.oppia.android.domain.testing.oppialogger.loguploader.FakeLogUploader import org.oppia.android.testing.FakeExceptionLogger import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestCoroutineDispatchers import org.oppia.android.testing.threading.TestDispatcherModule @@ -131,6 +133,8 @@ class LogReportWorkManagerInitializerTest { val enqueuedSchedulingPeriodicBackgroundPerformanceMetricWorkRequestId = logReportWorkManagerInitializer .getWorkRequestForSchedulingPeriodicBackgroundPerformanceMetricLogsId() + val enqueuedFirestoreWorkRequestId = + logReportWorkManagerInitializer.getWorkRequestForFirestoreId() assertThat(fakeLogUploader.getMostRecentEventRequestId()).isEqualTo(enqueuedEventWorkRequestId) assertThat(fakeLogUploader.getMostRecentExceptionRequestId()).isEqualTo( @@ -148,6 +152,9 @@ class LogReportWorkManagerInitializerTest { assertThat(fakeLogScheduler.getMostRecentPeriodicBackgroundMetricLoggingRequestId()).isEqualTo( enqueuedSchedulingPeriodicBackgroundPerformanceMetricWorkRequestId ) + assertThat(fakeLogUploader.getMostRecentFirestoreRequestId()).isEqualTo( + enqueuedFirestoreWorkRequestId + ) } @Test @@ -248,6 +255,20 @@ class LogReportWorkManagerInitializerTest { ).isEqualTo(workerCaseForSchedulingMemoryUsageMetricLogs) } + @Test + fun testWorkRequest_verifyWorkRequestData_forSchedulingFirestoreUpload() { + val workerCaseForUploadingFirestoreData: Data = Data.Builder() + .putString( + LogUploadWorker.WORKER_CASE_KEY, + LogUploadWorker.FIRESTORE_WORKER + ) + .build() + + assertThat( + logReportWorkManagerInitializer.getWorkRequestDataForFirestore() + ).isEqualTo(workerCaseForUploadingFirestoreData) + } + private fun setUpTestApplicationComponent() { ApplicationProvider.getApplicationContext().inject(this) } @@ -276,6 +297,10 @@ class LogReportWorkManagerInitializerTest { @Provides @PerformanceMetricsLogStorageCacheSize fun providePerformanceMetricsLogStorageCacheSize(): Int = 2 + + @Provides + @FirestoreLogStorageCacheSize + fun provideFirestoreLogStorageCacheSize(): Int = 2 } @Module @@ -299,7 +324,7 @@ class LogReportWorkManagerInitializerTest { LoggerModule::class, AssetModule::class, LoggerModule::class, PlatformParameterModule::class, PlatformParameterSingletonModule::class, LoggingIdentifierModule::class, SyncStatusModule::class, ApplicationLifecycleModule::class, - CpuPerformanceSnapshotterModule::class + CpuPerformanceSnapshotterModule::class, TestAuthenticationModule::class, ] ) interface TestApplicationComponent : DataProvidersInjector { diff --git a/domain/src/test/java/org/oppia/android/domain/oppialogger/loguploader/LogUploadWorkerTest.kt b/domain/src/test/java/org/oppia/android/domain/oppialogger/loguploader/LogUploadWorkerTest.kt index 4f4b2a1ca65..6ecf7a83e28 100644 --- a/domain/src/test/java/org/oppia/android/domain/oppialogger/loguploader/LogUploadWorkerTest.kt +++ b/domain/src/test/java/org/oppia/android/domain/oppialogger/loguploader/LogUploadWorkerTest.kt @@ -29,19 +29,23 @@ import org.oppia.android.app.model.OppiaMetricLog import org.oppia.android.app.model.ScreenName.SCREEN_NAME_UNSPECIFIED import org.oppia.android.domain.oppialogger.EventLogStorageCacheSize import org.oppia.android.domain.oppialogger.ExceptionLogStorageCacheSize +import org.oppia.android.domain.oppialogger.FirestoreLogStorageCacheSize import org.oppia.android.domain.oppialogger.LoggingIdentifierModule import org.oppia.android.domain.oppialogger.OppiaLogger import org.oppia.android.domain.oppialogger.PerformanceMetricsLogStorageCacheSize import org.oppia.android.domain.oppialogger.analytics.AnalyticsController import org.oppia.android.domain.oppialogger.analytics.ApplicationLifecycleModule +import org.oppia.android.domain.oppialogger.analytics.FirestoreDataController import org.oppia.android.domain.oppialogger.analytics.PerformanceMetricsController import org.oppia.android.domain.oppialogger.exceptions.ExceptionsController import org.oppia.android.domain.platformparameter.PlatformParameterSingletonModule import org.oppia.android.domain.testing.oppialogger.loguploader.FakeLogUploader import org.oppia.android.testing.FakeAnalyticsEventLogger import org.oppia.android.testing.FakeExceptionLogger +import org.oppia.android.testing.FakeFirestoreEventLogger import org.oppia.android.testing.FakePerformanceMetricsEventLogger import org.oppia.android.testing.data.DataProviderTestMonitor +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.logging.SyncStatusTestModule import org.oppia.android.testing.logging.TestSyncStatusManager import org.oppia.android.testing.mockito.anyOrNull @@ -64,6 +68,7 @@ import org.oppia.android.util.logging.SyncStatusManager.SyncStatus.DATA_UPLOADIN import org.oppia.android.util.logging.SyncStatusManager.SyncStatus.INITIAL_UNKNOWN import org.oppia.android.util.logging.SyncStatusManager.SyncStatus.NO_CONNECTIVITY import org.oppia.android.util.logging.SyncStatusManager.SyncStatus.UPLOAD_ERROR +import org.oppia.android.util.logging.firebase.FirestoreEventLogger import org.oppia.android.util.logging.performancemetrics.PerformanceMetricsAssessorModule import org.oppia.android.util.logging.performancemetrics.PerformanceMetricsConfigurationsModule import org.oppia.android.util.logging.performancemetrics.PerformanceMetricsEventLogger @@ -92,8 +97,10 @@ class LogUploadWorkerTest { @Inject lateinit var fakeAnalyticsEventLogger: FakeAnalyticsEventLogger @Inject lateinit var fakeExceptionLogger: FakeExceptionLogger @Inject lateinit var fakePerformanceMetricsEventLogger: FakePerformanceMetricsEventLogger + @Inject lateinit var fakeFirestoreEventLogger: FakeFirestoreEventLogger @Inject lateinit var oppiaLogger: OppiaLogger @Inject lateinit var analyticsController: AnalyticsController + @Inject lateinit var dataController: FirestoreDataController @Inject lateinit var exceptionsController: ExceptionsController @Inject lateinit var performanceMetricsController: PerformanceMetricsController @Inject lateinit var logUploadWorkerFactory: LogUploadWorkerFactory @@ -102,6 +109,8 @@ class LogUploadWorkerTest { @Inject lateinit var testSyncStatusManager: TestSyncStatusManager @Inject lateinit var monitorFactory: DataProviderTestMonitor.Factory @field:[Inject MockEventLogger] lateinit var mockAnalyticsEventLogger: AnalyticsEventLogger + @field:[Inject MockFirestoreEventLogger] + lateinit var mockFirestoreEventLogger: FirestoreEventLogger private lateinit var context: Context @@ -402,6 +411,95 @@ class LogUploadWorkerTest { assertThat(currentStatus).isEqualTo(NO_CONNECTIVITY) } + @Test + fun testWorker_logFirestoreEvent_withNetwork_enqueueRequest_verifySuccess() { + setUpTestApplicationComponent() + networkConnectionUtil.setCurrentConnectionStatus(NONE) + dataController.logEvent( + createOptionalSurveyResponseContext(), + profileId = null, + 1556094120000 + ) + networkConnectionUtil.setCurrentConnectionStatus(LOCAL) + testCoroutineDispatchers.runCurrent() + + val workManager = WorkManager.getInstance(ApplicationProvider.getApplicationContext()) + + val inputData = Data.Builder().putString( + LogUploadWorker.WORKER_CASE_KEY, + LogUploadWorker.FIRESTORE_WORKER + ).build() + + val request: OneTimeWorkRequest = OneTimeWorkRequestBuilder() + .setInputData(inputData) + .build() + + workManager.enqueue(request) + testCoroutineDispatchers.runCurrent() + val workInfo = workManager.getWorkInfoById(request.id) + + assertThat(workInfo.get().state).isEqualTo(WorkInfo.State.SUCCEEDED) + assertThat(fakeFirestoreEventLogger.getMostRecentEvent()).isEqualTo( + optionalSurveyResponseEventLog + ) + } + + @Test + fun testWorker_logFirestoreEvent_withoutNetwork_enqueueRequest_writeFails_verifyFailure() { + setUpTestApplicationComponent() + networkConnectionUtil.setCurrentConnectionStatus(NONE) + dataController.logEvent( + createOptionalSurveyResponseContext(), + profileId = null, + 1556094120000 + ) + testCoroutineDispatchers.runCurrent() + + val workManager = WorkManager.getInstance(ApplicationProvider.getApplicationContext()) + + val inputData = Data.Builder().putString( + LogUploadWorker.WORKER_CASE_KEY, + LogUploadWorker.FIRESTORE_WORKER + ).build() + + val request: OneTimeWorkRequest = OneTimeWorkRequestBuilder() + .setInputData(inputData) + .build() + + setUpFirestoreEventLoggerToFail() + workManager.enqueue(request) + testCoroutineDispatchers.runCurrent() + val workInfo = workManager.getWorkInfoById(request.id) + + assertThat(workInfo.get().state).isEqualTo(WorkInfo.State.FAILED) + assertThat(fakeFirestoreEventLogger.noEventsPresent()).isTrue() + } + + private val optionalSurveyResponseEventLog = EventLog.newBuilder().apply { + this.context = createOptionalSurveyResponseContext() + this.timestamp = TEST_TIMESTAMP + this.priority = EventLog.Priority.ESSENTIAL + } + .build() + + private fun createOptionalSurveyResponseContext(): EventLog.Context { + return EventLog.Context.newBuilder() + .setOptionalResponse( + EventLog.OptionalSurveyResponseContext.newBuilder() + .setFeedbackAnswer("answer") + .setSurveyDetails( + createSurveyResponseContext() + ) + ) + .build() + } + + private fun createSurveyResponseContext(): EventLog.SurveyResponseContext { + return EventLog.SurveyResponseContext.newBuilder() + .setSurveyId("test_survey_id") + .build() + } + private fun setUpEventLoggerToFail() { // Simulate the log attempt itself failing during the job. Note that the reset is necessary here // to remove the default stubbing for the mock so that it can properly trigger a failure. @@ -410,6 +508,14 @@ class LogUploadWorkerTest { .thenThrow(IllegalStateException("Failure.")) } + private fun setUpFirestoreEventLoggerToFail() { + // Simulate the log attempt itself failing during the job. Note that the reset is necessary here + // to remove the default stubbing for the mock so that it can properly trigger a failure. + reset(mockFirestoreEventLogger) + `when`(mockFirestoreEventLogger.uploadEvent(anyOrNull())) + .thenThrow(IllegalStateException("Failure.")) + } + /** * Returns a list of lists of each relevant element of a [StackTraceElement] to be used for * comparison in a way that's consistent across JDK versions. @@ -431,6 +537,9 @@ class LogUploadWorkerTest { @Qualifier annotation class MockEventLogger + @Qualifier + annotation class MockFirestoreEventLogger + // TODO(#89): Move this to a common test application component. @Module class TestModule { @@ -451,6 +560,21 @@ class LogUploadWorkerTest { } } + @Provides + @Singleton + @MockFirestoreEventLogger + fun bindMockFirestoreEventLogger(fakeFirestoreLogger: FakeFirestoreEventLogger): + FirestoreEventLogger { + return mock(FirestoreEventLogger::class.java).also { + `when`(it.uploadEvent(anyOrNull())).then { answer -> + fakeFirestoreLogger.uploadEvent( + answer.getArgument(/* index= */ 0, /* clazz= */ EventLog::class.java) + ) + return@then null + } + } + } + @Provides fun bindFakeEventLogger(@MockEventLogger delegate: AnalyticsEventLogger): AnalyticsEventLogger = delegate @@ -462,6 +586,11 @@ class LogUploadWorkerTest { fun bindFakePerformanceMetricsLogger( fakePerformanceMetricsEventLogger: FakePerformanceMetricsEventLogger ): PerformanceMetricsEventLogger = fakePerformanceMetricsEventLogger + + @Provides + fun bindFakeFirestoreEventLogger( + @MockFirestoreEventLogger delegate: FirestoreEventLogger + ): FirestoreEventLogger = delegate } @Module @@ -478,6 +607,10 @@ class LogUploadWorkerTest { @Provides @PerformanceMetricsLogStorageCacheSize fun providePerformanceMetricsLogStorageCacheSize(): Int = 2 + + @Provides + @FirestoreLogStorageCacheSize + fun provideFirestoreLogStorageCacheSize(): Int = 2 } @Module @@ -498,7 +631,8 @@ class LogUploadWorkerTest { AssetModule::class, TestPlatformParameterModule::class, PlatformParameterSingletonModule::class, LoggingIdentifierModule::class, SyncStatusTestModule::class, PerformanceMetricsAssessorModule::class, - ApplicationLifecycleModule::class, PerformanceMetricsConfigurationsModule::class + ApplicationLifecycleModule::class, PerformanceMetricsConfigurationsModule::class, + TestAuthenticationModule::class, ] ) interface TestApplicationComponent : DataProvidersInjector { diff --git a/domain/src/test/java/org/oppia/android/domain/platformparameter/PlatformParameterModuleTest.kt b/domain/src/test/java/org/oppia/android/domain/platformparameter/PlatformParameterModuleTest.kt index 1601eafc8c4..53ccda14f55 100644 --- a/domain/src/test/java/org/oppia/android/domain/platformparameter/PlatformParameterModuleTest.kt +++ b/domain/src/test/java/org/oppia/android/domain/platformparameter/PlatformParameterModuleTest.kt @@ -14,7 +14,6 @@ import dagger.Provides import org.junit.Test import org.junit.runner.RunWith import org.oppia.android.app.model.PlatformParameter -import org.oppia.android.app.utility.getVersionCode import org.oppia.android.testing.platformparameter.TEST_BOOLEAN_PARAM_DEFAULT_VALUE import org.oppia.android.testing.platformparameter.TEST_BOOLEAN_PARAM_NAME import org.oppia.android.testing.platformparameter.TEST_BOOLEAN_PARAM_SERVER_VALUE @@ -28,6 +27,7 @@ import org.oppia.android.testing.platformparameter.TestBooleanParam import org.oppia.android.testing.platformparameter.TestIntegerParam import org.oppia.android.testing.platformparameter.TestPlatformParameterModule import org.oppia.android.testing.platformparameter.TestStringParam +import org.oppia.android.util.extensions.getVersionCode import org.oppia.android.util.platformparameter.EnableAppAndOsDeprecation import org.oppia.android.util.platformparameter.ForcedAppUpdateVersionCode import org.oppia.android.util.platformparameter.LowestSupportedApiLevel diff --git a/domain/src/test/java/org/oppia/android/domain/profile/ProfileManagementControllerTest.kt b/domain/src/test/java/org/oppia/android/domain/profile/ProfileManagementControllerTest.kt index e95142771be..ae98ccd5ae1 100644 --- a/domain/src/test/java/org/oppia/android/domain/profile/ProfileManagementControllerTest.kt +++ b/domain/src/test/java/org/oppia/android/domain/profile/ProfileManagementControllerTest.kt @@ -156,7 +156,7 @@ class ProfileManagementControllerTest { val profileDatabase = readProfileDatabase() val profile = profileDatabase.profilesMap[0]!! - assertThat(profile.learnerId).isEqualTo("bb1ad573") + assertThat(profile.learnerId).isEqualTo("26504347") } @Test @@ -255,7 +255,7 @@ class ProfileManagementControllerTest { val profileProvider = profileManagementController.getProfile(profileId) val profile = monitorFactory.waitForNextSuccessfulResult(profileProvider) - assertThat(profile.learnerId).isEqualTo("68fb0e6f") + assertThat(profile.learnerId).isEqualTo("a625db55") } @Test @@ -430,7 +430,7 @@ class ProfileManagementControllerTest { val learnerId = fetchSuccessfulAsyncValue(profileManagementController::fetchCurrentLearnerId) - assertThat(learnerId).isEqualTo("19b89cd8") + assertThat(learnerId).isEqualTo("02308fa0") } @Test @@ -465,7 +465,7 @@ class ProfileManagementControllerTest { profileManagementController.fetchLearnerId(PROFILE_ID_2) } - assertThat(learnerId).isEqualTo("68fb0e6f") + assertThat(learnerId).isEqualTo("a625db55") } @Test diff --git a/domain/src/test/java/org/oppia/android/domain/question/QuestionAssessmentProgressControllerTest.kt b/domain/src/test/java/org/oppia/android/domain/question/QuestionAssessmentProgressControllerTest.kt index f5aad0432a1..0c686230064 100644 --- a/domain/src/test/java/org/oppia/android/domain/question/QuestionAssessmentProgressControllerTest.kt +++ b/domain/src/test/java/org/oppia/android/domain/question/QuestionAssessmentProgressControllerTest.kt @@ -134,7 +134,7 @@ class QuestionAssessmentProgressControllerTest { setUpTestApplicationWithSeed(questionSeed = 0) // Can't retrieve the current question until the training session is started. - assertThrows(UninitializedPropertyAccessException::class) { + assertThrows() { questionAssessmentProgressController.getCurrentQuestion() } } diff --git a/domain/src/test/java/org/oppia/android/domain/survey/SurveyControllerTest.kt b/domain/src/test/java/org/oppia/android/domain/survey/SurveyControllerTest.kt index eb9e43ab83a..8ea319426f5 100644 --- a/domain/src/test/java/org/oppia/android/domain/survey/SurveyControllerTest.kt +++ b/domain/src/test/java/org/oppia/android/domain/survey/SurveyControllerTest.kt @@ -21,6 +21,7 @@ import org.oppia.android.domain.oppialogger.analytics.ApplicationLifecycleModule import org.oppia.android.testing.FakeExceptionLogger import org.oppia.android.testing.TestLogReportingModule import org.oppia.android.testing.data.DataProviderTestMonitor +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestCoroutineDispatchers import org.oppia.android.testing.threading.TestDispatcherModule @@ -211,7 +212,7 @@ class SurveyControllerTest { ApplicationLifecycleModule::class, TestDispatcherModule::class, LocaleProdModule::class, ExplorationProgressModule::class, TestLogReportingModule::class, AssetModule::class, NetworkConnectionUtilDebugModule::class, SyncStatusModule::class, LogStorageModule::class, - TestLoggingIdentifierModule::class, + TestLoggingIdentifierModule::class, TestAuthenticationModule::class, ] ) interface TestApplicationComponent : DataProvidersInjector { diff --git a/domain/src/test/java/org/oppia/android/domain/survey/SurveyGatingControllerTest.kt b/domain/src/test/java/org/oppia/android/domain/survey/SurveyGatingControllerTest.kt index 07655569168..df46b018821 100644 --- a/domain/src/test/java/org/oppia/android/domain/survey/SurveyGatingControllerTest.kt +++ b/domain/src/test/java/org/oppia/android/domain/survey/SurveyGatingControllerTest.kt @@ -81,6 +81,7 @@ class SurveyGatingControllerTest { @Before fun setUp() { + TestPlatformParameterModule.forceEnableNpsSurvey(true) setUpTestApplicationComponent() profileTestHelper.initializeProfiles() } diff --git a/domain/src/test/java/org/oppia/android/domain/survey/SurveyProgressControllerTest.kt b/domain/src/test/java/org/oppia/android/domain/survey/SurveyProgressControllerTest.kt index 865120fb089..ea336df027a 100644 --- a/domain/src/test/java/org/oppia/android/domain/survey/SurveyProgressControllerTest.kt +++ b/domain/src/test/java/org/oppia/android/domain/survey/SurveyProgressControllerTest.kt @@ -24,8 +24,10 @@ import org.oppia.android.domain.oppialogger.LogStorageModule import org.oppia.android.domain.oppialogger.analytics.ApplicationLifecycleModule import org.oppia.android.testing.FakeAnalyticsEventLogger import org.oppia.android.testing.FakeExceptionLogger +import org.oppia.android.testing.FakeFirestoreEventLogger import org.oppia.android.testing.TestLogReportingModule import org.oppia.android.testing.data.DataProviderTestMonitor +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.logging.EventLogSubject import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestCoroutineDispatchers @@ -72,6 +74,9 @@ class SurveyProgressControllerTest { @Inject lateinit var fakeAnalyticsEventLogger: FakeAnalyticsEventLogger + @Inject + lateinit var fakeFirestoreEventLogger: FakeFirestoreEventLogger + private val profileId = ProfileId.newBuilder().setInternalId(1).build() @Before @@ -397,7 +402,26 @@ class SurveyProgressControllerTest { } } - // TODO(#5001): Add tests for Optional responses logging to Firestore + @Test + fun testEndSurvey_afterCompletingAllQuestions_logsOptionalSurveyResponseEvent() { + startSuccessfulSurveySession() + waitForGetCurrentQuestionSuccessfulLoad() + submitUserTypeAnswer(UserTypeAnswer.PARENT) + submitMarketFitAnswer(MarketFitAnswer.VERY_DISAPPOINTED) + submitNpsAnswer(10) + submitTextInputAnswer(SurveyQuestionName.PROMOTER_FEEDBACK, TEXT_ANSWER) + stopSurveySession(surveyCompleted = true) + + val eventLog = fakeFirestoreEventLogger.getMostRecentEvent() + + EventLogSubject.assertThat(eventLog).hasOptionalSurveyResponseContextThat { + hasSurveyDetailsThat { + hasSurveyIdThat().isNotEmpty() + hasInternalProfileIdThat().isEqualTo("1") + } + hasFeedbackAnswerThat().isEqualTo(TEXT_ANSWER) + } + } private fun stopSurveySession(surveyCompleted: Boolean) { val stopProvider = surveyController.stopSurveySession(surveyCompleted) @@ -542,7 +566,7 @@ class SurveyProgressControllerTest { ApplicationLifecycleModule::class, TestDispatcherModule::class, LocaleProdModule::class, ExplorationProgressModule::class, TestLogReportingModule::class, AssetModule::class, NetworkConnectionUtilDebugModule::class, SyncStatusModule::class, LogStorageModule::class, - TestLoggingIdentifierModule::class + TestLoggingIdentifierModule::class, TestAuthenticationModule::class, ] ) diff --git a/instrumentation/BUILD.bazel b/instrumentation/BUILD.bazel index 03c56337516..f6ffffcdc8a 100644 --- a/instrumentation/BUILD.bazel +++ b/instrumentation/BUILD.bazel @@ -6,6 +6,8 @@ Note that: of the test suite. """ +load("@bazel_skylib//rules:build_test.bzl", "build_test") + exports_files(["src/javatests/AndroidManifest.xml"]) # Used for end-to-end tests @@ -29,3 +31,8 @@ android_binary( "//instrumentation/src/java/org/oppia/android/instrumentation/application:oppia_test_application", ], ) + +build_test( + name = "oppia_test_binary_smoke_test", + targets = [":oppia_test"], +) diff --git a/instrumentation/oppia_instrumentation_test.bzl b/instrumentation/oppia_instrumentation_test.bzl index 63d8413cd2c..6319bbf0ba3 100644 --- a/instrumentation/oppia_instrumentation_test.bzl +++ b/instrumentation/oppia_instrumentation_test.bzl @@ -2,6 +2,7 @@ Instrumentation macros to define up end-to-end tests. """ +load("@bazel_skylib//rules:build_test.bzl", "build_test") load("@io_bazel_rules_kotlin//kotlin:kotlin.bzl", "kt_android_library") def oppia_instrumentation_test( @@ -16,26 +17,34 @@ def oppia_instrumentation_test( srcs: list of str. List of test files corresponding to this test suite. deps: list of str. The list of dependencies needed to build and run the test. """ + test_lib_name = "%s_lib" % name + test_binary_name = "%sBinary" % name + kt_android_library( - name = "%s_lib" % name, + name = test_lib_name, testonly = True, srcs = srcs, deps = deps, ) native.android_binary( - name = "%sBinary" % name, + name = test_binary_name, testonly = True, custom_package = "org.oppia.android", instruments = "//instrumentation:oppia_test", manifest = "//instrumentation:src/javatests/AndroidManifest.xml", - deps = [":%s_lib" % name], + deps = [test_lib_name], ) # TODO(#3617): Target isn't supported yet. Remove the manual tag once fixed. native.android_instrumentation_test( name = name, target_device = "@android_test_support//tools/android/emulated_devices/generic_phone:android_23_x86_qemu2", - test_app = ":%sBinary" % name, + test_app = test_binary_name, tags = ["manual"], ) + + build_test( + name = "%s_smoke_test" % name, + targets = [name, test_binary_name], + ) diff --git a/instrumentation/src/java/org/oppia/android/instrumentation/application/BUILD.bazel b/instrumentation/src/java/org/oppia/android/instrumentation/application/BUILD.bazel index 97be8252f41..5e9c6382d77 100644 --- a/instrumentation/src/java/org/oppia/android/instrumentation/application/BUILD.bazel +++ b/instrumentation/src/java/org/oppia/android/instrumentation/application/BUILD.bazel @@ -25,6 +25,7 @@ kt_android_library( "//app/src/main/java/org/oppia/android/app/application/testing:testing_build_flavor_module", "//data/src/main/java/org/oppia/android/data/backends/gae:network_config_annotations", "//domain", + "//testing/src/main/java/org/oppia/android/testing/firebase:test_authentication_module", "//utility", "//utility/src/main/java/org/oppia/android/util/logging:standard_event_logging_configuration_module", "//utility/src/main/java/org/oppia/android/util/logging/firebase:debug_module", diff --git a/instrumentation/src/java/org/oppia/android/instrumentation/application/TestApplicationComponent.kt b/instrumentation/src/java/org/oppia/android/instrumentation/application/TestApplicationComponent.kt index 25f666f4029..fe588b21105 100644 --- a/instrumentation/src/java/org/oppia/android/instrumentation/application/TestApplicationComponent.kt +++ b/instrumentation/src/java/org/oppia/android/instrumentation/application/TestApplicationComponent.kt @@ -45,6 +45,7 @@ import org.oppia.android.domain.platformparameter.syncup.PlatformParameterSyncUp import org.oppia.android.domain.question.QuestionModule import org.oppia.android.domain.topic.PrimeTopicAssetsControllerModule import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.util.accessibility.AccessibilityProdModule import org.oppia.android.util.caching.AssetModule import org.oppia.android.util.caching.CachingModule @@ -101,7 +102,8 @@ import javax.inject.Singleton MetricLogSchedulerModule::class, ActivityRouterModule::class, PerformanceMetricsAssessorModule::class, PerformanceMetricsConfigurationsModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, - ExplorationProgressModule::class, CpuPerformanceSnapshotterModule::class + ExplorationProgressModule::class, CpuPerformanceSnapshotterModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/model/src/main/proto/BUILD.bazel b/model/src/main/proto/BUILD.bazel index a168e981191..e512512b10f 100644 --- a/model/src/main/proto/BUILD.bazel +++ b/model/src/main/proto/BUILD.bazel @@ -273,7 +273,10 @@ java_lite_proto_library( oppia_proto_library( name = "feedback_reporting_proto", srcs = ["feedback_reporting.proto"], - deps = [":profile_proto"], + deps = [ + ":languages_proto", + ":profile_proto", + ], ) java_lite_proto_library( diff --git a/scripts/assets/file_content_validation_checks.textproto b/scripts/assets/file_content_validation_checks.textproto index a53a46416f4..67116fbd5a2 100644 --- a/scripts/assets/file_content_validation_checks.textproto +++ b/scripts/assets/file_content_validation_checks.textproto @@ -511,3 +511,90 @@ file_content_checks { failure_message: "Badly formatted KDoc. Single-line KDocs should end with punctuation." exempted_file_name: "scripts/src/javatests/org/oppia/android/scripts/regex/RegexPatternValidationCheckTest.kt" } +file_content_checks { + file_path_regex: ".+?Test\\.kt" + prohibited_content_regex: "androidx.test.rule.ActivityTestRule" + failure_message: "ActivityTestRule is deprecated since it operates test activities in sometimes unsafe situations. Use ActivityScenario, instead." + exempted_file_name: "app/src/sharedTest/java/org/oppia/android/app/administratorcontrols/AdministratorControlsActivityTest.kt" + exempted_file_name: "app/src/sharedTest/java/org/oppia/android/app/administratorcontrols/AppVersionActivityTest.kt" + exempted_file_name: "app/src/sharedTest/java/org/oppia/android/app/completedstorylist/CompletedStoryListActivityTest.kt" + exempted_file_name: "app/src/sharedTest/java/org/oppia/android/app/customview/LessonThumbnailImageViewTest.kt" + exempted_file_name: "app/src/sharedTest/java/org/oppia/android/app/devoptions/DeveloperOptionsActivityTest.kt" + exempted_file_name: "app/src/sharedTest/java/org/oppia/android/app/devoptions/DeveloperOptionsFragmentTest.kt" + exempted_file_name: "app/src/sharedTest/java/org/oppia/android/app/devoptions/MarkChaptersCompletedActivityTest.kt" + exempted_file_name: "app/src/sharedTest/java/org/oppia/android/app/devoptions/MarkStoriesCompletedActivityTest.kt" + exempted_file_name: "app/src/sharedTest/java/org/oppia/android/app/devoptions/MarkStoriesCompletedFragmentTest.kt" + exempted_file_name: "app/src/sharedTest/java/org/oppia/android/app/devoptions/MarkTopicsCompletedActivityTest.kt" + exempted_file_name: "app/src/sharedTest/java/org/oppia/android/app/devoptions/MarkTopicsCompletedFragmentTest.kt" + exempted_file_name: "app/src/sharedTest/java/org/oppia/android/app/devoptions/ViewEventLogsActivityTest.kt" + exempted_file_name: "app/src/sharedTest/java/org/oppia/android/app/devoptions/forcenetworktype/ForceNetworkTypeActivityTest.kt" + exempted_file_name: "app/src/sharedTest/java/org/oppia/android/app/faq/FAQSingleActivityTest.kt" + exempted_file_name: "app/src/sharedTest/java/org/oppia/android/app/faq/FaqListActivityTest.kt" + exempted_file_name: "app/src/sharedTest/java/org/oppia/android/app/help/HelpActivityTest.kt" + exempted_file_name: "app/src/sharedTest/java/org/oppia/android/app/home/RecentlyPlayedFragmentTest.kt" + exempted_file_name: "app/src/sharedTest/java/org/oppia/android/app/onboarding/OnboardingActivityTest.kt" + exempted_file_name: "app/src/sharedTest/java/org/oppia/android/app/ongoingtopiclist/OngoingTopicListActivityTest.kt" + exempted_file_name: "app/src/sharedTest/java/org/oppia/android/app/options/AppLanguageActivityTest.kt" + exempted_file_name: "app/src/sharedTest/java/org/oppia/android/app/options/AudioLanguageActivityTest.kt" + exempted_file_name: "app/src/sharedTest/java/org/oppia/android/app/options/OptionsActivityTest.kt" + exempted_file_name: "app/src/sharedTest/java/org/oppia/android/app/options/OptionsFragmentTest.kt" + exempted_file_name: "app/src/sharedTest/java/org/oppia/android/app/options/ReadingTextSizeActivityTest.kt" + exempted_file_name: "app/src/sharedTest/java/org/oppia/android/app/player/exploration/ExplorationActivityTest.kt" + exempted_file_name: "app/src/sharedTest/java/org/oppia/android/app/profile/AddProfileActivityTest.kt" + exempted_file_name: "app/src/sharedTest/java/org/oppia/android/app/profile/AdminAuthActivityTest.kt" + exempted_file_name: "app/src/sharedTest/java/org/oppia/android/app/profile/AdminPinActivityTest.kt" + exempted_file_name: "app/src/sharedTest/java/org/oppia/android/app/profile/PinPasswordActivityTest.kt" + exempted_file_name: "app/src/sharedTest/java/org/oppia/android/app/profile/ProfileChooserActivityTest.kt" + exempted_file_name: "app/src/sharedTest/java/org/oppia/android/app/profile/ProfileChooserFragmentTest.kt" + exempted_file_name: "app/src/sharedTest/java/org/oppia/android/app/profileprogress/ProfileProgressActivityTest.kt" + exempted_file_name: "app/src/sharedTest/java/org/oppia/android/app/resumelesson/ResumeLessonActivityTest.kt" + exempted_file_name: "app/src/sharedTest/java/org/oppia/android/app/resumelesson/ResumeLessonFragmentTest.kt" + exempted_file_name: "app/src/sharedTest/java/org/oppia/android/app/settings/profile/ProfileListActivityTest.kt" + exempted_file_name: "app/src/sharedTest/java/org/oppia/android/app/settings/profile/ProfileRenameActivityTest.kt" + exempted_file_name: "app/src/sharedTest/java/org/oppia/android/app/settings/profile/ProfileRenameFragmentTest.kt" + exempted_file_name: "app/src/sharedTest/java/org/oppia/android/app/settings/profile/ProfileResetPinActivityTest.kt" + exempted_file_name: "app/src/sharedTest/java/org/oppia/android/app/settings/profile/ProfileResetPinFragmentTest.kt" + exempted_file_name: "app/src/sharedTest/java/org/oppia/android/app/story/StoryActivityTest.kt" + exempted_file_name: "app/src/sharedTest/java/org/oppia/android/app/story/StoryFragmentTest.kt" + exempted_file_name: "app/src/sharedTest/java/org/oppia/android/app/survey/SurveyActivityTest.kt" + exempted_file_name: "app/src/sharedTest/java/org/oppia/android/app/survey/SurveyFragmentTest.kt" + exempted_file_name: "app/src/sharedTest/java/org/oppia/android/app/thirdparty/LicenseListActivityTest.kt" + exempted_file_name: "app/src/sharedTest/java/org/oppia/android/app/thirdparty/LicenseTextViewerActivityTest.kt" + exempted_file_name: "app/src/sharedTest/java/org/oppia/android/app/thirdparty/ThirdPartyDependencyListActivityTest.kt" + exempted_file_name: "app/src/sharedTest/java/org/oppia/android/app/topic/TopicFragmentTest.kt" + exempted_file_name: "app/src/sharedTest/java/org/oppia/android/app/topic/info/TopicInfoFragmentTest.kt" + exempted_file_name: "app/src/sharedTest/java/org/oppia/android/app/topic/questionplayer/QuestionPlayerActivityTest.kt" + exempted_file_name: "scripts/src/javatests/org/oppia/android/scripts/regex/RegexPatternValidationCheckTest.kt" +} +file_content_checks { + file_path_regex: ".+?Test\\.kt" + prohibited_content_regex: "androidx.test.ext.junit.rules.ActivityScenarioRule" + failure_message: "ActivityScenarioRule can result in order dependence when static state leaks across tests (such as static module variables), and can make staging much more difficult for platform parameters. Use ActivityScenario directly, instead." + exempted_file_name: "app/src/sharedTest/java/org/oppia/android/app/administratorcontrols/learneranalytics/ProfileAndDeviceIdActivityTest.kt" + exempted_file_name: "app/src/sharedTest/java/org/oppia/android/app/databinding/AppCompatCheckBoxBindingAdaptersTest.kt" + exempted_file_name: "app/src/sharedTest/java/org/oppia/android/app/databinding/CircularProgressIndicatorAdaptersTest.kt" + exempted_file_name: "app/src/sharedTest/java/org/oppia/android/app/databinding/DrawableBindingAdaptersTest.kt" + exempted_file_name: "app/src/sharedTest/java/org/oppia/android/app/databinding/ImageViewBindingAdaptersTest.kt" + exempted_file_name: "app/src/sharedTest/java/org/oppia/android/app/databinding/MarginBindingAdaptersTest.kt" + exempted_file_name: "app/src/sharedTest/java/org/oppia/android/app/databinding/StateAssemblerMarginBindingAdaptersTest.kt" + exempted_file_name: "app/src/sharedTest/java/org/oppia/android/app/databinding/StateAssemblerPaddingBindingAdaptersTest.kt" + exempted_file_name: "app/src/sharedTest/java/org/oppia/android/app/databinding/TextViewBindingAdaptersTest.kt" + exempted_file_name: "app/src/sharedTest/java/org/oppia/android/app/databinding/ViewBindingAdaptersTest.kt" + exempted_file_name: "app/src/sharedTest/java/org/oppia/android/app/devoptions/mathexpressionparser/MathExpressionParserFragmentTest.kt" + exempted_file_name: "app/src/sharedTest/java/org/oppia/android/app/parser/HtmlParserTest.kt" + exempted_file_name: "app/src/sharedTest/java/org/oppia/android/app/policies/PoliciesFragmentTest.kt" + exempted_file_name: "app/src/sharedTest/java/org/oppia/android/app/utility/RatioExtensionsTest.kt" + exempted_file_name: "app/src/test/java/org/oppia/android/app/activity/ActivityIntentFactoriesTest.kt" + exempted_file_name: "app/src/test/java/org/oppia/android/app/activity/route/ActivityRouterModuleTest.kt" + exempted_file_name: "app/src/test/java/org/oppia/android/app/activity/route/ActivityRouterTest.kt" + exempted_file_name: "app/src/test/java/org/oppia/android/app/parser/FractionParsingUiErrorTest.kt" + exempted_file_name: "app/src/test/java/org/oppia/android/app/parser/ListItemLeadingMarginSpanTest.kt" + exempted_file_name: "app/src/test/java/org/oppia/android/app/parser/StringToRatioParserTest.kt" + exempted_file_name: "app/src/test/java/org/oppia/android/app/translation/ActivityLanguageLocaleHandlerTest.kt" + exempted_file_name: "app/src/test/java/org/oppia/android/app/translation/AppLanguageResourceHandlerTest.kt" + exempted_file_name: "app/src/test/java/org/oppia/android/app/utility/datetime/DateTimeUtilTest.kt" + exempted_file_name: "app/src/test/java/org/oppia/android/app/utility/math/MathExpressionAccessibilityUtilTest.kt" + exempted_file_name: "domain/src/test/java/org/oppia/android/domain/oppialogger/analytics/ApplicationLifecycleObserverTest.kt" + exempted_file_name: "scripts/src/javatests/org/oppia/android/scripts/regex/RegexPatternValidationCheckTest.kt" + exempted_file_name: "testing/src/test/java/org/oppia/android/testing/espresso/TextInputActionTest.kt" +} diff --git a/scripts/assets/maven_dependencies.textproto b/scripts/assets/maven_dependencies.textproto index ddb692a40f3..841c9c94fa0 100644 --- a/scripts/assets/maven_dependencies.textproto +++ b/scripts/assets/maven_dependencies.textproto @@ -514,6 +514,17 @@ maven_dependency { } } } +maven_dependency { + artifact_name: "com.google.android:annotations:4.1.1.4" + artifact_version: "4.1.1.4" + license { + license_name: "Apache 2.0" + original_link: "https://www.apache.org/licenses/LICENSE-2.0" + extracted_copy_link { + url: "https://www.apache.org/licenses/LICENSE-2.0.txt" + } + } +} maven_dependency { artifact_name: "com.google.auto.service:auto-service-annotations:1.0-rc7" artifact_version: "1.0-rc7" @@ -529,6 +540,7 @@ maven_dependency { artifact_version: "1.8.1" license { license_name: "The Apache Software License, Version 2.0" + original_link: "https://www.apache.org/licenses/LICENSE-2.0.txt" scrapable_link { url: "https://www.apache.org/licenses/LICENSE-2.0.txt" } @@ -545,6 +557,16 @@ maven_dependency { } } } +maven_dependency { + artifact_name: "com.google.code.gson:gson:2.8.9" + artifact_version: "2.8.9" + license { + license_name: "Apache 2.0" + scrapable_link { + url: "https://www.apache.org/licenses/LICENSE-2.0.txt" + } + } +} maven_dependency { artifact_name: "com.google.dagger:dagger:2.28.1" artifact_version: "2.28.1" @@ -557,8 +579,8 @@ maven_dependency { } } maven_dependency { - artifact_name: "com.google.errorprone:error_prone_annotations:2.7.1" - artifact_version: "2.7.1" + artifact_name: "com.google.errorprone:error_prone_annotations:2.9.0" + artifact_version: "2.9.0" license { license_name: "Apache 2.0" original_link: "https://www.apache.org/licenses/LICENSE-2.0.txt" @@ -579,8 +601,52 @@ maven_dependency { } } maven_dependency { - artifact_name: "com.google.firebase:firebase-common:19.3.0" - artifact_version: "19.3.0" + artifact_name: "com.google.firebase:firebase-appcheck-debug:16.0.0" + artifact_version: "16.0.0" + license { + license_name: "The Apache Software License, Version 2.0" + original_link: "https://www.apache.org/licenses/LICENSE-2.0.txt" + scrapable_link { + url: "https://www.apache.org/licenses/LICENSE-2.0.txt" + } + } +} +maven_dependency { + artifact_name: "com.google.firebase:firebase-appcheck-playintegrity:16.0.0" + artifact_version: "16.0.0" + license { + license_name: "The Apache Software License, Version 2.0" + original_link: "https://www.apache.org/licenses/LICENSE-2.0.txt" + scrapable_link { + url: "https://www.apache.org/licenses/LICENSE-2.0.txt" + } + } +} +maven_dependency { + artifact_name: "com.google.firebase:firebase-appcheck:16.0.0" + artifact_version: "16.0.0" + license { + license_name: "The Apache Software License, Version 2.0" + original_link: "https://www.apache.org/licenses/LICENSE-2.0.txt" + scrapable_link { + url: "https://www.apache.org/licenses/LICENSE-2.0.txt" + } + } +} +maven_dependency { + artifact_name: "com.google.firebase:firebase-auth-ktx:19.3.1" + artifact_version: "19.3.1" + license { + license_name: "Android Software Development Kit License" + original_link: "https://developer.android.com/studio/terms.html" + direct_link_only { + url: "https://developer.android.com/studio/terms.html" + } + } +} +maven_dependency { + artifact_name: "com.google.firebase:firebase-common:20.1.1" + artifact_version: "20.1.1" license { license_name: "The Apache Software License, Version 2.0" original_link: "https://www.apache.org/licenses/LICENSE-2.0.txt" @@ -600,6 +666,17 @@ maven_dependency { } } } +maven_dependency { + artifact_name: "com.google.firebase:firebase-firestore-ktx:24.2.1" + artifact_version: "24.2.1" + license { + license_name: "The Apache Software License, Version 2.0" + original_link: "https://www.apache.org/licenses/LICENSE-2.0.txt" + scrapable_link { + url: "https://www.apache.org/licenses/LICENSE-2.0.txt" + } + } +} maven_dependency { artifact_name: "com.google.guava:failureaccess:1.0.1" artifact_version: "1.0.1" @@ -642,12 +719,12 @@ maven_dependency { } } maven_dependency { - artifact_name: "com.google.protobuf:protobuf-javalite:3.17.3" - artifact_version: "3.17.3" + artifact_name: "com.google.protobuf:protobuf-javalite:3.19.2" + artifact_version: "3.19.2" license { - license_name: "Simplified BSD License" + license_name: "BSD 3-clause" extracted_copy_link { - url: "https://raw.githubusercontent.com/oppia/oppia-android-licenses/develop/simplified-bsd-license.txt" + url: "https://opensource.org/license/bsd-3-clause" } } } @@ -695,6 +772,16 @@ maven_dependency { } } } +maven_dependency { + artifact_name: "com.squareup.okhttp:okhttp:2.7.5" + artifact_version: "2.7.5" + license { + license_name: "The Apache Software License, Version 2.0" + scrapable_link { + url: "https://www.apache.org/licenses/LICENSE-2.0.txt" + } + } +} maven_dependency { artifact_name: "com.squareup.okio:okio:2.6.0" artifact_version: "2.6.0" @@ -768,6 +855,50 @@ maven_dependency { } } } +maven_dependency { + artifact_name: "io.grpc:grpc-api:1.44.1" + artifact_version: "1.44.1" + license { + license_name: "Apache 2.0" + original_link: "https://opensource.org/licenses/Apache-2.0" + scrapable_link { + url: "https://www.apache.org/licenses/LICENSE-2.0.txt" + } + } +} +maven_dependency { + artifact_name: "io.grpc:grpc-context:1.44.1" + artifact_version: "1.44.1" + license { + license_name: "Apache 2.0" + original_link: "https://opensource.org/licenses/Apache-2.0" + scrapable_link { + url: "https://www.apache.org/licenses/LICENSE-2.0.txt" + } + } +} +maven_dependency { + artifact_name: "io.grpc:grpc-core:1.44.1" + artifact_version: "1.44.1" + license { + license_name: "Apache 2.0" + original_link: "https://opensource.org/licenses/Apache-2.0" + scrapable_link { + url: "https://www.apache.org/licenses/LICENSE-2.0.txt" + } + } +} +maven_dependency { + artifact_name: "io.perfmark:perfmark-api:0.23.0" + artifact_version: "0.23.0" + license { + license_name: "Apache 2.0" + original_link: "https://opensource.org/licenses/Apache-2.0" + scrapable_link { + url: "https://www.apache.org/licenses/LICENSE-2.0.txt" + } + } +} maven_dependency { artifact_name: "javax.annotation:javax.annotation-api:1.3.2" artifact_version: "1.3.2" @@ -830,6 +961,28 @@ maven_dependency { } } } +maven_dependency { + artifact_name: "org.checkerframework:checker-qual:3.13.0" + artifact_version: "3.13.0" + license { + license_name: "The MIT License" + original_link: "https://opensource.org/licenses/MIT" + extracted_copy_link { + url: "https://raw.githubusercontent.com/oppia/oppia-android-licenses/develop/mit-license.txt" + } + } +} +maven_dependency { + artifact_name: "org.codehaus.mojo:animal-sniffer-annotations:1.19" + artifact_version: "1.19" + license { + license_name: "The MIT License" + original_link: "https://opensource.org/licenses/MIT" + extracted_copy_link { + url: "https://raw.githubusercontent.com/oppia/oppia-android-licenses/develop/mit-license.txt" + } + } +} maven_dependency { artifact_name: "org.jetbrains.kotlin:kotlin-reflect:1.5.0" artifact_version: "1.5.0" diff --git a/scripts/assets/test_file_exemptions.textproto b/scripts/assets/test_file_exemptions.textproto index dac453e5d9b..8a58df32b31 100644 --- a/scripts/assets/test_file_exemptions.textproto +++ b/scripts/assets/test_file_exemptions.textproto @@ -652,6 +652,11 @@ exempted_file_path: "data/src/main/java/org/oppia/android/data/backends/gae/mode exempted_file_path: "data/src/main/java/org/oppia/android/data/backends/gae/model/GaeVoiceover.kt" exempted_file_path: "data/src/main/java/org/oppia/android/data/backends/gae/model/GaeWrittenTranslation.kt" exempted_file_path: "data/src/main/java/org/oppia/android/data/backends/gae/model/GaeWrittenTranslations.kt" +exempted_file_path: "domain/src/main/java/org/oppia/android/domain/auth/FirebaseAuthInstance.kt" +exempted_file_path: "domain/src/main/java/org/oppia/android/domain/auth/FirebaseAuthInstanceWrapper.kt" +exempted_file_path: "domain/src/main/java/org/oppia/android/domain/auth/FirebaseAuthInstanceWrapperImpl.kt" +exempted_file_path: "domain/src/main/java/org/oppia/android/domain/auth/FirebaseAuthWrapper.kt" +exempted_file_path: "domain/src/main/java/org/oppia/android/domain/auth/FirebaseUserWrapper.kt" exempted_file_path: "domain/src/main/java/org/oppia/android/domain/classify/ClassificationContext.kt" exempted_file_path: "domain/src/main/java/org/oppia/android/domain/classify/ClassificationResult.kt" exempted_file_path: "domain/src/main/java/org/oppia/android/domain/classify/GenericInteractionClassifier.kt" @@ -754,6 +759,8 @@ exempted_file_path: "scripts/src/java/org/oppia/android/scripts/todo/model/Todo. exempted_file_path: "testing/src/main/java/org/oppia/android/testing/AccessibilityTestRule.kt" exempted_file_path: "testing/src/main/java/org/oppia/android/testing/AssertionHelpers.kt" exempted_file_path: "testing/src/main/java/org/oppia/android/testing/DisableAccessibilityChecks.kt" +exempted_file_path: "testing/src/main/java/org/oppia/android/testing/FakeFirebaseAuthInstanceWrapperImpl.kt" +exempted_file_path: "testing/src/main/java/org/oppia/android/testing/FakeFirestoreInstanceWrapperImpl.kt" exempted_file_path: "testing/src/main/java/org/oppia/android/testing/OppiaTestAnnotations.kt" exempted_file_path: "testing/src/main/java/org/oppia/android/testing/OppiaTestRule.kt" exempted_file_path: "testing/src/main/java/org/oppia/android/testing/OppiaTestRunner.kt" @@ -850,8 +857,13 @@ exempted_file_path: "utility/src/main/java/org/oppia/android/util/logging/fireba exempted_file_path: "utility/src/main/java/org/oppia/android/util/logging/firebase/DebugLogReportingModule.kt" exempted_file_path: "utility/src/main/java/org/oppia/android/util/logging/firebase/FirebaseAnalyticsEventLogger.kt" exempted_file_path: "utility/src/main/java/org/oppia/android/util/logging/firebase/FirebaseExceptionLogger.kt" +exempted_file_path: "utility/src/main/java/org/oppia/android/util/logging/firebase/FirestoreInstance.kt" +exempted_file_path: "utility/src/main/java/org/oppia/android/util/logging/firebase/FirestoreInstanceWrapper.kt" +exempted_file_path: "utility/src/main/java/org/oppia/android/util/logging/firebase/FirestoreInstanceWrapperImpl.kt" exempted_file_path: "utility/src/main/java/org/oppia/android/util/logging/firebase/FirebaseLogUploader.kt" exempted_file_path: "utility/src/main/java/org/oppia/android/util/logging/firebase/FirebaseLogUploaderModule.kt" +exempted_file_path: "utility/src/main/java/org/oppia/android/util/logging/firebase/FirestoreEventLogger.kt" +exempted_file_path: "utility/src/main/java/org/oppia/android/util/logging/firebase/FirestoreEventLoggerProdImpl.kt" exempted_file_path: "utility/src/main/java/org/oppia/android/util/logging/firebase/LogReportingModule.kt" exempted_file_path: "utility/src/main/java/org/oppia/android/util/math/FloatExtensions.kt" exempted_file_path: "utility/src/main/java/org/oppia/android/util/math/FractionExtensions.kt" diff --git a/scripts/assets/todo_open_exemptions.textproto b/scripts/assets/todo_open_exemptions.textproto index cb81317adae..8b201928380 100644 --- a/scripts/assets/todo_open_exemptions.textproto +++ b/scripts/assets/todo_open_exemptions.textproto @@ -1,37 +1,37 @@ todo_open_exemption { exempted_file_path: "scripts/src/javatests/org/oppia/android/scripts/todo/TodoOpenCheckTest.kt" - line_number: 67 - line_number: 68 + line_number: 65 + line_number: 66 + line_number: 72 line_number: 74 - line_number: 76 + line_number: 96 + line_number: 97 line_number: 98 line_number: 99 line_number: 100 - line_number: 101 - line_number: 102 + line_number: 132 + line_number: 133 line_number: 136 - line_number: 137 - line_number: 140 - line_number: 173 + line_number: 167 + line_number: 168 + line_number: 169 line_number: 174 - line_number: 175 - line_number: 180 - line_number: 182 - line_number: 221 + line_number: 176 + line_number: 213 + line_number: 214 + line_number: 215 + line_number: 220 line_number: 222 - line_number: 223 line_number: 228 - line_number: 230 - line_number: 236 - line_number: 275 - line_number: 279 - line_number: 317 - line_number: 318 - line_number: 322 - line_number: 371 - line_number: 372 - line_number: 373 - line_number: 377 + line_number: 265 + line_number: 269 + line_number: 307 + line_number: 308 + line_number: 312 + line_number: 359 + line_number: 360 + line_number: 361 + line_number: 365 } todo_open_exemption { exempted_file_path: "scripts/src/javatests/org/oppia/android/scripts/todo/TodoCollectorTest.kt" diff --git a/scripts/src/java/org/oppia/android/scripts/ci/ComputeAffectedTests.kt b/scripts/src/java/org/oppia/android/scripts/ci/ComputeAffectedTests.kt index f7cc482c72a..5437874f191 100644 --- a/scripts/src/java/org/oppia/android/scripts/ci/ComputeAffectedTests.kt +++ b/scripts/src/java/org/oppia/android/scripts/ci/ComputeAffectedTests.kt @@ -1,6 +1,8 @@ package org.oppia.android.scripts.ci import org.oppia.android.scripts.common.BazelClient +import org.oppia.android.scripts.common.CommandExecutor +import org.oppia.android.scripts.common.CommandExecutorImpl import org.oppia.android.scripts.common.GitClient import org.oppia.android.scripts.common.ProtoStringEncoder.Companion.toCompressedBase64 import org.oppia.android.scripts.proto.AffectedTestsBucket @@ -73,9 +75,10 @@ private fun String.toBooleanStrictOrNull(): Boolean? { /** Utility used to compute affected test targets. */ class ComputeAffectedTests( - val maxTestCountPerLargeShard: Int = MAX_TEST_COUNT_PER_LARGE_SHARD, - val maxTestCountPerMediumShard: Int = MAX_TEST_COUNT_PER_MEDIUM_SHARD, - val maxTestCountPerSmallShard: Int = MAX_TEST_COUNT_PER_SMALL_SHARD + private val maxTestCountPerLargeShard: Int = MAX_TEST_COUNT_PER_LARGE_SHARD, + private val maxTestCountPerMediumShard: Int = MAX_TEST_COUNT_PER_MEDIUM_SHARD, + private val maxTestCountPerSmallShard: Int = MAX_TEST_COUNT_PER_SMALL_SHARD, + private val commandExecutor: CommandExecutor = CommandExecutorImpl() ) { private companion object { private const val GENERIC_TEST_BUCKET_NAME = "generic" @@ -106,7 +109,7 @@ class ComputeAffectedTests( println("Running from directory root: $rootDirectory") val gitClient = GitClient(rootDirectory, baseDevelopBranchReference) - val bazelClient = BazelClient(rootDirectory) + val bazelClient = BazelClient(rootDirectory, commandExecutor) println("Current branch: ${gitClient.currentBranch}") println("Most recent common commit: ${gitClient.branchMergeBase}") diff --git a/scripts/src/java/org/oppia/android/scripts/testing/TestBazelWorkspace.kt b/scripts/src/java/org/oppia/android/scripts/testing/TestBazelWorkspace.kt index 68487b6062b..7bec4b85889 100644 --- a/scripts/src/java/org/oppia/android/scripts/testing/TestBazelWorkspace.kt +++ b/scripts/src/java/org/oppia/android/scripts/testing/TestBazelWorkspace.kt @@ -4,6 +4,9 @@ import com.google.common.truth.Truth.assertThat import org.junit.rules.TemporaryFolder import java.io.File +/** The version of Bazel to use in tests that set up Bazel workspaces. */ +const val BAZEL_VERSION = "4.0.0" + /** * Test utility for generating various test & library targets in the specified [TemporaryFolder]. * This is meant to be used to arrange the local test filesystem for use with a real Bazel @@ -23,6 +26,13 @@ class TestBazelWorkspace(private val temporaryRootFolder: TemporaryFolder) { */ val rootBuildFile: File by lazy { temporaryRootFolder.newFile("BUILD.bazel") } + private val bazelVersionFile by lazy { + temporaryRootFolder.newFile(".bazelversion").also { it.writeText(BAZEL_VERSION) } + } + private val bazelRcFile by lazy { + temporaryRootFolder.newFile(".bazelrc").also { it.writeText("--noenable_bzlmod") } + } + private val testFileMap = mutableMapOf() private val libraryFileMap = mutableMapOf() private val testDependencyNameMap = mutableMapOf() @@ -33,9 +43,11 @@ class TestBazelWorkspace(private val temporaryRootFolder: TemporaryFolder) { /** Initializes the local Bazel workspace by introducing a new, empty WORKSPACE file. */ fun initEmptyWorkspace() { - // Sanity check, but in reality this is just initializing workspaceFile to ensure that it + // Sanity checks, but in reality this is just initializing workspaceFile to ensure that it // exists. assertThat(workspaceFile.exists()).isTrue() + assertThat(bazelVersionFile.exists()).isTrue() + assertThat(bazelRcFile.exists()).isTrue() } /** @@ -61,6 +73,8 @@ class TestBazelWorkspace(private val temporaryRootFolder: TemporaryFolder) { withExtraDependency: String? = null, subpackage: String? = null ): Iterable { + initEmptyWorkspace() // Ensure the workspace is at least initialized. + check(testName !in testFileMap) { "Test '$testName' already set up" } val prereqFiles = ensureWorkspaceIsConfiguredForKotlin() val (dependencyTargetName, libPrereqFiles) = if (withGeneratedDependency) { @@ -109,6 +123,9 @@ class TestBazelWorkspace(private val temporaryRootFolder: TemporaryFolder) { withExtraDependency: String? = null, subpackage: String? = null ): Iterable { + // Note that the workspace doesn't need to be explicitly initialized here since the call below + // to addTestToBuildFile() will initialize it. + check(testName !in testFileMap) { "Test '$testName' already exists" } val testFile = if (subpackage != null) { if (!File(temporaryRootFolder.root, subpackage.replace(".", "/")).exists()) { @@ -137,6 +154,8 @@ class TestBazelWorkspace(private val temporaryRootFolder: TemporaryFolder) { * iterable of files that were changed as part of generating this library */ fun createLibrary(dependencyName: String): Pair> { + initEmptyWorkspace() // Ensure the workspace is at least initialized. + val libTargetName = "${dependencyName}_lib" check("//:$libTargetName" !in libraryFileMap) { "Library '$dependencyName' already exists" } val prereqFiles = ensureWorkspaceIsConfiguredForKotlin() @@ -187,6 +206,7 @@ class TestBazelWorkspace(private val temporaryRootFolder: TemporaryFolder) { /** Appends rules_jvm_external configuration to the WORKSPACE file if not done already. */ fun setUpWorkspaceForRulesJvmExternal(depsList: List) { if (!isConfiguredForRulesJvmExternal) { + initEmptyWorkspace() workspaceFile.appendText("artifactsList = [") for (dep in depsList) { workspaceFile.appendText("\"$dep\",\n") @@ -198,23 +218,23 @@ class TestBazelWorkspace(private val temporaryRootFolder: TemporaryFolder) { RULES_JVM_EXTERNAL_TAG = "4.0" RULES_JVM_EXTERNAL_SHA = "31701ad93dbfe544d597dbe62c9a1fdd76d81d8a9150c2bf1ecf928ecdf97169" - + http_archive( name = "rules_jvm_external", strip_prefix = "rules_jvm_external-%s" % RULES_JVM_EXTERNAL_TAG, sha256 = RULES_JVM_EXTERNAL_SHA, url = "https://github.com/bazelbuild/rules_jvm_external/archive/%s.zip" % RULES_JVM_EXTERNAL_TAG, ) - + load("@rules_jvm_external//:defs.bzl", "maven_install") - + maven_install( artifacts = artifactsList, repositories = [ "https://maven.google.com", "https://repo1.maven.org/maven2", ], - ) + ) """.trimIndent() + "\n" ) diff --git a/scripts/src/java/org/oppia/android/scripts/testing/TestGitRepository.kt b/scripts/src/java/org/oppia/android/scripts/testing/TestGitRepository.kt index 61d5c055992..2de94e3fc1f 100644 --- a/scripts/src/java/org/oppia/android/scripts/testing/TestGitRepository.kt +++ b/scripts/src/java/org/oppia/android/scripts/testing/TestGitRepository.kt @@ -19,20 +19,29 @@ class TestGitRepository( private val commandExecutor: CommandExecutor ) { private val rootDirectory by lazy { temporaryRootFolder.root } + private val gitDirectory: File get() = File(rootDirectory, ".git") + private val userEmail: String? + get() = maybeExecuteGitCommand("config", "--local", "--get", "user.email")?.joinOutput()?.trim() + private val userName: String? + get() = maybeExecuteGitCommand("config", "--local", "--get", "user.name")?.joinOutput()?.trim() /** Creates the repository using git init. */ fun init() { + verifyNotInGitRepository() executeSuccessfulGitCommand("init") } /** Sets the user's [email] and [name] using git config. */ fun setUser(email: String, name: String) { - executeSuccessfulGitCommand("config", "user.email", email) - executeSuccessfulGitCommand("config", "user.name", name) + verifyInGitRepository() + verifyUserIsNotSet() + executeSuccessfulGitCommand("config", "--local", "user.email", email) + executeSuccessfulGitCommand("config", "--local", "user.name", name) } /** Creates a new branch with the specified name, and switches to it. */ fun checkoutNewBranch(branchName: String) { + verifyInGitRepository() executeSuccessfulGitCommand("checkout", "-b", branchName) } @@ -42,6 +51,7 @@ class TestGitRepository( * This does not perform a commit. See [commit] for actually committing the change. */ fun stageFileForCommit(file: File) { + verifyInGitRepository() executeSuccessfulGitCommand("add", file.toRelativeString(rootDirectory)) } @@ -57,6 +67,7 @@ class TestGitRepository( * This does not perform a commit. See [commit] for actually committing the change. */ fun removeFileForCommit(file: File) { + verifyInGitRepository() executeSuccessfulGitCommand("rm", file.toRelativeString(rootDirectory)) } @@ -67,6 +78,7 @@ class TestGitRepository( * This does not perform a commit. See [commit] for actually committing the change. */ fun moveFileForCommit(oldFile: File, newFile: File) { + verifyInGitRepository() executeSuccessfulGitCommand( "mv", oldFile.toRelativeString(rootDirectory), @@ -81,25 +93,59 @@ class TestGitRepository( * @param allowEmpty whether to allow empty commits (i.e. committing with no staged files) */ fun commit(message: String, allowEmpty: Boolean = false) { + verifyInGitRepository() + verifyUserIsSet() val arguments = mutableListOf("commit", "-m", message) if (allowEmpty) arguments += "--allow-empty" executeSuccessfulGitCommand(*arguments.toTypedArray()) } /** Returns the result of git status. */ - fun status(): String { - return commandExecutor.executeCommand(rootDirectory, "git", "status").output.joinOutputString() + fun status(checkForGitRepository: Boolean = true): String { + if (checkForGitRepository) verifyInGitRepository() + return executeGitCommand("status").joinOutput() } - private fun executeSuccessfulGitCommand(vararg arguments: String) { - verifySuccessfulCommand(commandExecutor.executeCommand(rootDirectory, "git", *arguments)) - } + private fun executeGitCommand(vararg arguments: String): CommandResult = + commandExecutor.executeCommand(rootDirectory, "git", *arguments) + + private fun maybeExecuteGitCommand(vararg arguments: String): CommandResult? = + executeGitCommand(*arguments).takeIf { it.exitCode == 0 } + + private fun executeSuccessfulGitCommand(vararg arguments: String) = + verifySuccessfulCommand(executeGitCommand(*arguments)) private fun verifySuccessfulCommand(result: CommandResult) { - assertWithMessage("Output: ${result.output.joinOutputString()}") + assertWithMessage("Output: ${result.joinOutput()}") .that(result.exitCode) .isEqualTo(0) } - private fun List.joinOutputString(): String = joinToString(separator = "\n") { " $it" } + private fun verifyInGitRepository() { + failUnless(gitDirectory.exists()) { "Not operating in an initialized Git repository." } + } + + private fun verifyNotInGitRepository() { + failUnless(!gitDirectory.exists()) { "Git repository is already initialized." } + } + + private fun verifyUserIsNotSet() { + verifyIsNotSet(name = "User email", userEmail) + verifyIsNotSet(name = "User name", userName) + } + + private fun verifyUserIsSet() { + failUnless(userEmail != null) { "User email has not yet been set." } + failUnless(userName != null) { "User name has not yet been set." } + } + + private fun verifyIsNotSet(name: String, value: String?) { + failUnless(value == null) { "$name has already been set: $value." } + } + + private fun failUnless(condition: Boolean, lazyMessage: () -> String) { + if (!condition) throw AssertionError(lazyMessage()) + } + + private fun CommandResult.joinOutput(): String = output.joinToString(separator = "\n") { " $it" } } diff --git a/scripts/src/javatests/org/oppia/android/scripts/build/FilterPerLanguageResourcesTest.kt b/scripts/src/javatests/org/oppia/android/scripts/build/FilterPerLanguageResourcesTest.kt index 8c217740d10..511b07f37e9 100644 --- a/scripts/src/javatests/org/oppia/android/scripts/build/FilterPerLanguageResourcesTest.kt +++ b/scripts/src/javatests/org/oppia/android/scripts/build/FilterPerLanguageResourcesTest.kt @@ -86,21 +86,21 @@ class FilterPerLanguageResourcesTest { @Test fun testUtility_noArgs_failsWithUsageString() { - val error = assertThrows(IllegalArgumentException::class) { runScript() } + val error = assertThrows() { runScript() } assertThat(error).hasMessageThat().contains(USAGE_STRING) } @Test fun testUtility_oneArg_failsWithUsageString() { - val error = assertThrows(IllegalArgumentException::class) { runScript("first_file.zip") } + val error = assertThrows() { runScript("first_file.zip") } assertThat(error).hasMessageThat().contains(USAGE_STRING) } @Test fun testUtility_threeArgs_failsWithUsageString() { - val error = assertThrows(IllegalArgumentException::class) { + val error = assertThrows() { runScript( tempFolder.getFilePath("input.zip"), tempFolder.getFilePath("output.zip"), "extra_param" ) @@ -114,7 +114,7 @@ class FilterPerLanguageResourcesTest { // Create an empty zip file. ZipOutputStream(File(tempFolder.root, "input.zip").outputStream()).close() - val error = assertThrows(IllegalStateException::class) { + val error = assertThrows() { runScript(tempFolder.getFilePath("input.zip"), tempFolder.getFilePath("output.zip")) } @@ -129,7 +129,7 @@ class FilterPerLanguageResourcesTest { ResourceTable.getDefaultInstance().writeTo(outputStream) } - val error = assertThrows(IllegalStateException::class) { + val error = assertThrows() { runScript(tempFolder.getFilePath("input.zip"), tempFolder.getFilePath("output.zip")) } @@ -147,7 +147,7 @@ class FilterPerLanguageResourcesTest { supportedLanguages = SUPPORTED_LANGUAGES_EN ) - val error = assertThrows(IllegalStateException::class) { + val error = assertThrows() { runScript(tempFolder.getFilePath("input.zip"), tempFolder.getFilePath("output.zip")) } diff --git a/scripts/src/javatests/org/oppia/android/scripts/build/TransformAndroidManifestTest.kt b/scripts/src/javatests/org/oppia/android/scripts/build/TransformAndroidManifestTest.kt index 424d22b661f..5d197b04615 100644 --- a/scripts/src/javatests/org/oppia/android/scripts/build/TransformAndroidManifestTest.kt +++ b/scripts/src/javatests/org/oppia/android/scripts/build/TransformAndroidManifestTest.kt @@ -70,7 +70,7 @@ class TransformAndroidManifestTest { fun testUtility_noArgs_failsWithUsageString() { initializeEmptyGitRepository() - val exception = assertThrows(IllegalStateException::class) { runScript() } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(USAGE_STRING) } @@ -79,7 +79,7 @@ class TransformAndroidManifestTest { fun testUtility_oneArg_failsWithUsageString() { initializeEmptyGitRepository() - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { runScript(tempFolder.root.absolutePath) } @@ -91,7 +91,7 @@ class TransformAndroidManifestTest { initializeEmptyGitRepository() val manifestFile = tempFolder.newFile(TEST_MANIFEST_FILE_NAME) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { runScript(tempFolder.root.absolutePath, manifestFile.absolutePath) } @@ -103,7 +103,7 @@ class TransformAndroidManifestTest { initializeEmptyGitRepository() val manifestFile = tempFolder.newFile(TEST_MANIFEST_FILE_NAME) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { runScript( tempFolder.root.absolutePath, manifestFile.absolutePath, @@ -119,7 +119,7 @@ class TransformAndroidManifestTest { initializeEmptyGitRepository() val manifestFile = tempFolder.newFile(TEST_MANIFEST_FILE_NAME) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { runScript( tempFolder.root.absolutePath, manifestFile.absolutePath, @@ -136,7 +136,7 @@ class TransformAndroidManifestTest { initializeEmptyGitRepository() val manifestFile = tempFolder.newFile(TEST_MANIFEST_FILE_NAME) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { runScript( tempFolder.root.absolutePath, manifestFile.absolutePath, @@ -154,7 +154,7 @@ class TransformAndroidManifestTest { initializeEmptyGitRepository() val manifestFile = tempFolder.newFile(TEST_MANIFEST_FILE_NAME) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { runScript( tempFolder.root.absolutePath, manifestFile.absolutePath, @@ -173,7 +173,7 @@ class TransformAndroidManifestTest { initializeEmptyGitRepository() val manifestFile = tempFolder.newFile(TEST_MANIFEST_FILE_NAME) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { runScript( tempFolder.root.absolutePath, manifestFile.absolutePath, @@ -193,7 +193,7 @@ class TransformAndroidManifestTest { initializeEmptyGitRepository() val manifestFile = tempFolder.newFile(TEST_MANIFEST_FILE_NAME) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { runScript( tempFolder.root.absolutePath, manifestFile.absolutePath, @@ -214,7 +214,7 @@ class TransformAndroidManifestTest { initializeEmptyGitRepository() val manifestFile = tempFolder.newFile(TEST_MANIFEST_FILE_NAME) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { runScript( tempFolder.root.absolutePath, manifestFile.absolutePath, @@ -236,7 +236,7 @@ class TransformAndroidManifestTest { initializeEmptyGitRepository() val manifestFile = tempFolder.newFile(TEST_MANIFEST_FILE_NAME) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { runScript( tempFolder.root.absolutePath, manifestFile.absolutePath, @@ -258,7 +258,7 @@ class TransformAndroidManifestTest { initializeEmptyGitRepository() val manifestFile = tempFolder.newFile(TEST_MANIFEST_FILE_NAME) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { runScript( tempFolder.root.absolutePath, manifestFile.absolutePath, @@ -280,7 +280,7 @@ class TransformAndroidManifestTest { initializeEmptyGitRepository() val manifestFile = tempFolder.newFile(TEST_MANIFEST_FILE_NAME) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { runScript( "nowhere", manifestFile.absolutePath, @@ -301,7 +301,7 @@ class TransformAndroidManifestTest { fun testUtility_allArgs_manifestDoesNotExist_failsWithError() { initializeEmptyGitRepository() - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { runScript( tempFolder.root.absolutePath, "fake_manifest_file", @@ -325,7 +325,7 @@ class TransformAndroidManifestTest { writeText(TEST_MANIFEST_CONTENT_WITHOUT_VERSIONS_AND_APPLICATION) } - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { runScript( tempFolder.root.absolutePath, manifestFile.absolutePath, diff --git a/scripts/src/javatests/org/oppia/android/scripts/ci/BUILD.bazel b/scripts/src/javatests/org/oppia/android/scripts/ci/BUILD.bazel index cb9eafb6d21..fcdb77f2f1d 100644 --- a/scripts/src/javatests/org/oppia/android/scripts/ci/BUILD.bazel +++ b/scripts/src/javatests/org/oppia/android/scripts/ci/BUILD.bazel @@ -8,7 +8,7 @@ kt_jvm_test( name = "ComputeAffectedTestsTest", size = "large", srcs = ["ComputeAffectedTestsTest.kt"], - shard_count = 4, + shard_count = 24, deps = [ "//scripts/src/java/org/oppia/android/scripts/ci:compute_affected_tests_lib", "//scripts/src/java/org/oppia/android/scripts/common:proto_string_encoder", diff --git a/scripts/src/javatests/org/oppia/android/scripts/ci/ComputeAffectedTestsTest.kt b/scripts/src/javatests/org/oppia/android/scripts/ci/ComputeAffectedTestsTest.kt index 654e42425c8..2bf59212f66 100644 --- a/scripts/src/javatests/org/oppia/android/scripts/ci/ComputeAffectedTestsTest.kt +++ b/scripts/src/javatests/org/oppia/android/scripts/ci/ComputeAffectedTestsTest.kt @@ -16,6 +16,7 @@ import java.io.ByteArrayOutputStream import java.io.File import java.io.OutputStream import java.io.PrintStream +import java.util.concurrent.TimeUnit /** * Tests for the compute_affected_tests utility. @@ -28,13 +29,12 @@ import java.io.PrintStream // Function name: test names are conventionally named with underscores. @Suppress("SameParameterValue", "FunctionName") class ComputeAffectedTestsTest { - @Rule - @JvmField - var tempFolder = TemporaryFolder() + @field:[Rule JvmField] val tempFolder = TemporaryFolder() + + private val commandExecutor by lazy { initiazeCommandExecutorWithLongProcessWaitTime() } private lateinit var testBazelWorkspace: TestBazelWorkspace private lateinit var testGitRepository: TestGitRepository - private lateinit var pendingOutputStream: ByteArrayOutputStream private lateinit var originalStandardOutputStream: OutputStream @@ -57,12 +57,12 @@ class ComputeAffectedTestsTest { // Print the status of the git repository to help with debugging in the cases of test failures // and to help manually verify the expect git state at the end of each test. println("git status (at end of test):") - println(testGitRepository.status()) + println(testGitRepository.status(checkForGitRepository = false)) } @Test fun testUtility_noArguments_printsUsageStringAndExits() { - val exception = assertThrows(SecurityException::class) { main(arrayOf()) } + val exception = assertThrows() { main(arrayOf()) } // Bazel catches the System.exit() call and throws a SecurityException. This is a bit hacky way // to verify that System.exit() is called, but it's helpful. @@ -72,7 +72,7 @@ class ComputeAffectedTestsTest { @Test fun testUtility_oneArgument_printsUsageStringAndExits() { - val exception = assertThrows(SecurityException::class) { main(arrayOf("first")) } + val exception = assertThrows() { main(arrayOf("first")) } // Bazel catches the System.exit() call and throws a SecurityException. This is a bit hacky way // to verify that System.exit() is called, but it's helpful. @@ -82,7 +82,7 @@ class ComputeAffectedTestsTest { @Test fun testUtility_twoArguments_printsUsageStringAndExits() { - val exception = assertThrows(SecurityException::class) { main(arrayOf("first", "second")) } + val exception = assertThrows() { main(arrayOf("first", "second")) } // Bazel catches the System.exit() call and throws a SecurityException. This is a bit hacky way // to verify that System.exit() is called, but it's helpful. @@ -92,7 +92,7 @@ class ComputeAffectedTestsTest { @Test fun testUtility_threeArguments_printsUsageStringAndExits() { - val exception = assertThrows(SecurityException::class) { + val exception = assertThrows() { main(arrayOf("first", "second", "third")) } @@ -104,7 +104,7 @@ class ComputeAffectedTestsTest { @Test fun testUtility_directoryRootDoesNotExist_throwsException() { - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { main(arrayOf("fake", "alsofake", "andstillfake", "compute_all_tests=false")) } @@ -113,7 +113,7 @@ class ComputeAffectedTestsTest { @Test fun testUtility_invalid_lastArgument_throwsException() { - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { main(arrayOf("fake", "alsofake", "andstillfake", "compute_all_testss=false")) } @@ -123,7 +123,7 @@ class ComputeAffectedTestsTest { @Test fun testUtility_invalid_lastArgumentValue_throwsException() { - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { main(arrayOf("fake", "alsofake", "andstillfake", "compute_all_tests=blah")) } @@ -133,7 +133,7 @@ class ComputeAffectedTestsTest { @Test fun testUtility_emptyDirectory_throwsException() { - val exception = assertThrows(IllegalStateException::class) { runScript() } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains("run from the workspace's root directory") } @@ -724,7 +724,8 @@ class ComputeAffectedTestsTest { ComputeAffectedTests( maxTestCountPerLargeShard = maxTestCountPerLargeShard, maxTestCountPerMediumShard = maxTestCountPerMediumShard, - maxTestCountPerSmallShard = maxTestCountPerSmallShard + maxTestCountPerSmallShard = maxTestCountPerSmallShard, + commandExecutor = commandExecutor ).compute( pathToRoot = tempFolder.root.absolutePath, pathToOutputFile = outputLog.absolutePath, @@ -862,4 +863,8 @@ class ComputeAffectedTestsTest { testGitRepository.stageFileForCommit(libFile) testGitRepository.commit(message = "Modified library $name") } + + private fun initiazeCommandExecutorWithLongProcessWaitTime(): CommandExecutorImpl { + return CommandExecutorImpl(processTimeout = 5, processTimeoutUnit = TimeUnit.MINUTES) + } } diff --git a/scripts/src/javatests/org/oppia/android/scripts/ci/RetrieveAffectedTestsTest.kt b/scripts/src/javatests/org/oppia/android/scripts/ci/RetrieveAffectedTestsTest.kt index d43a7055f51..e449b856a6f 100644 --- a/scripts/src/javatests/org/oppia/android/scripts/ci/RetrieveAffectedTestsTest.kt +++ b/scripts/src/javatests/org/oppia/android/scripts/ci/RetrieveAffectedTestsTest.kt @@ -45,7 +45,7 @@ class RetrieveAffectedTestsTest { @Test fun testUtility_noArguments_printsUsageStringAndExits() { - val exception = assertThrows(SecurityException::class) { runScript() } + val exception = assertThrows() { runScript() } // Bazel catches the System.exit() call and throws a SecurityException. This is a bit hacky way // to verify that System.exit() is called, but it's helpful. @@ -55,7 +55,7 @@ class RetrieveAffectedTestsTest { @Test fun testUtility_oneArgument_printsUsageStringAndExits() { - val exception = assertThrows(SecurityException::class) { runScript("arg1") } + val exception = assertThrows() { runScript("arg1") } // Bazel catches the System.exit() call and throws a SecurityException. This is a bit hacky way // to verify that System.exit() is called, but it's helpful. @@ -65,7 +65,7 @@ class RetrieveAffectedTestsTest { @Test fun testUtility_twoArguments_printsUsageStringAndExits() { - val exception = assertThrows(SecurityException::class) { runScript("arg1", "arg2") } + val exception = assertThrows() { runScript("arg1", "arg2") } // Bazel catches the System.exit() call and throws a SecurityException. This is a bit hacky way // to verify that System.exit() is called, but it's helpful. @@ -75,7 +75,7 @@ class RetrieveAffectedTestsTest { @Test fun testUtility_invalidBase64_throwsException() { - assertThrows(IllegalArgumentException::class) { runScript("badbase64", "file1", "file2") } + assertThrows() { runScript("badbase64", "file1", "file2") } } @Test diff --git a/scripts/src/javatests/org/oppia/android/scripts/common/BUILD.bazel b/scripts/src/javatests/org/oppia/android/scripts/common/BUILD.bazel index e47fc741ab6..bceb5cfe864 100644 --- a/scripts/src/javatests/org/oppia/android/scripts/common/BUILD.bazel +++ b/scripts/src/javatests/org/oppia/android/scripts/common/BUILD.bazel @@ -8,6 +8,7 @@ load("@io_bazel_rules_kotlin//kotlin:kotlin.bzl", "kt_jvm_test") kt_jvm_test( name = "BazelClientTest", srcs = ["BazelClientTest.kt"], + shard_count = 4, deps = [ "//scripts/src/java/org/oppia/android/scripts/common:bazel_client", "//scripts/src/java/org/oppia/android/scripts/testing:test_bazel_workspace", diff --git a/scripts/src/javatests/org/oppia/android/scripts/common/BazelClientTest.kt b/scripts/src/javatests/org/oppia/android/scripts/common/BazelClientTest.kt index f2e7914682c..2109155025f 100644 --- a/scripts/src/javatests/org/oppia/android/scripts/common/BazelClientTest.kt +++ b/scripts/src/javatests/org/oppia/android/scripts/common/BazelClientTest.kt @@ -25,20 +25,14 @@ import java.util.concurrent.TimeUnit // Function name: test names are conventionally named with underscores. @Suppress("SameParameterValue", "FunctionName") class BazelClientTest { - @Rule - @JvmField - var tempFolder = TemporaryFolder() + @field:[Rule JvmField] val tempFolder = TemporaryFolder() + @field:[Rule JvmField] val mockitoRule: MockitoRule = MockitoJUnit.rule() - @Rule - @JvmField - val mockitoRule: MockitoRule = MockitoJUnit.rule() + @Mock lateinit var mockCommandExecutor: CommandExecutor private val commandExecutor by lazy { initiazeCommandExecutorWithLongProcessWaitTime() } private lateinit var testBazelWorkspace: TestBazelWorkspace - @Mock - lateinit var mockCommandExecutor: CommandExecutor - @Before fun setUp() { testBazelWorkspace = TestBazelWorkspace(tempFolder) @@ -46,9 +40,9 @@ class BazelClientTest { @Test fun testRetrieveTestTargets_emptyFolder_fails() { - val bazelClient = BazelClient(tempFolder.root) + val bazelClient = BazelClient(tempFolder.root, commandExecutor) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { bazelClient.retrieveAllTestTargets() } @@ -59,10 +53,10 @@ class BazelClientTest { @Test fun testRetrieveTestTargets_emptyWorkspace_fails() { - val bazelClient = BazelClient(tempFolder.root) + val bazelClient = BazelClient(tempFolder.root, commandExecutor) testBazelWorkspace.initEmptyWorkspace() - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { bazelClient.retrieveAllTestTargets() } @@ -73,7 +67,7 @@ class BazelClientTest { @Test fun testRetrieveTestTargets_workspaceWithTest_returnsTestTarget() { - val bazelClient = BazelClient(tempFolder.root) + val bazelClient = BazelClient(tempFolder.root, commandExecutor) testBazelWorkspace.initEmptyWorkspace() testBazelWorkspace.createTest("ExampleTest") @@ -84,7 +78,7 @@ class BazelClientTest { @Test fun testRetrieveTestTargets_workspaceWithMultipleTests_returnsTestTargets() { - val bazelClient = BazelClient(tempFolder.root) + val bazelClient = BazelClient(tempFolder.root, commandExecutor) testBazelWorkspace.initEmptyWorkspace() testBazelWorkspace.createTest("FirstTest") testBazelWorkspace.createTest("SecondTest") @@ -106,7 +100,7 @@ class BazelClientTest { @Test fun testRetrieveBazelTargets_forFileNotInBuildGraph_returnsEmptyList() { - val bazelClient = BazelClient(tempFolder.root) + val bazelClient = BazelClient(tempFolder.root, commandExecutor) testBazelWorkspace.initEmptyWorkspace() tempFolder.newFile("filenotingraph") @@ -117,7 +111,7 @@ class BazelClientTest { @Test fun testRetrieveBazelTargets_forTestFile_returnsBazelTarget() { - val bazelClient = BazelClient(tempFolder.root) + val bazelClient = BazelClient(tempFolder.root, commandExecutor) testBazelWorkspace.initEmptyWorkspace() testBazelWorkspace.createTest("FirstTest") @@ -128,7 +122,7 @@ class BazelClientTest { @Test fun testRetrieveBazelTargets_forMultipleMixedFiles_returnsBazelTargets() { - val bazelClient = BazelClient(tempFolder.root) + val bazelClient = BazelClient(tempFolder.root, commandExecutor) testBazelWorkspace.initEmptyWorkspace() testBazelWorkspace.createTest("FirstTest") testBazelWorkspace.createTest("SecondTest", withGeneratedDependency = true) @@ -157,7 +151,7 @@ class BazelClientTest { @Test fun testRetrieveRelatedTestTargets_forTargetWithNoTestDependency_returnsNoTargets() { - val bazelClient = BazelClient(tempFolder.root) + val bazelClient = BazelClient(tempFolder.root, commandExecutor) testBazelWorkspace.initEmptyWorkspace() testBazelWorkspace.createLibrary("SomeDependency") testBazelWorkspace.createTest("FirstTest") @@ -170,7 +164,7 @@ class BazelClientTest { @Test fun testRetrieveRelatedTestTargets_forTestFileTarget_returnsTestTarget() { - val bazelClient = BazelClient(tempFolder.root) + val bazelClient = BazelClient(tempFolder.root, commandExecutor) testBazelWorkspace.initEmptyWorkspace() testBazelWorkspace.createTest("FirstTest") @@ -181,7 +175,7 @@ class BazelClientTest { @Test fun testRetrieveRelatedTestTargets_forDependentFileTarget_returnsTestTarget() { - val bazelClient = BazelClient(tempFolder.root) + val bazelClient = BazelClient(tempFolder.root, commandExecutor) testBazelWorkspace.initEmptyWorkspace() testBazelWorkspace.createTest("FirstTest", withGeneratedDependency = true) @@ -192,7 +186,7 @@ class BazelClientTest { @Test fun testRetrieveRelatedTestTargets_forMixedFileTargets_returnsRelatedTestTargets() { - val bazelClient = BazelClient(tempFolder.root) + val bazelClient = BazelClient(tempFolder.root, commandExecutor) testBazelWorkspace.initEmptyWorkspace() testBazelWorkspace.createLibrary("ExtraDep") testBazelWorkspace.createTest("FirstTest", withExtraDependency = "//:ExtraDep_lib") @@ -227,7 +221,7 @@ class BazelClientTest { @Test fun testRetrieveTransitiveTestTargets_forNoFiles_returnsEmptyList() { - val bazelClient = BazelClient(tempFolder.root) + val bazelClient = BazelClient(tempFolder.root, commandExecutor) testBazelWorkspace.initEmptyWorkspace() val testTargets = bazelClient.retrieveTransitiveTestTargets(listOf()) @@ -238,7 +232,7 @@ class BazelClientTest { @Test fun testRetrieveTransitiveTestTargets_forBuildFile_returnsAllTestsInThatBuildFile() { - val bazelClient = BazelClient(tempFolder.root) + val bazelClient = BazelClient(tempFolder.root, commandExecutor) testBazelWorkspace.initEmptyWorkspace() testBazelWorkspace.createTest("FirstTest") testBazelWorkspace.createTest("SecondTest") @@ -253,7 +247,7 @@ class BazelClientTest { @Test fun testRetrieveTransitiveTestTargets_forMultipleBuildFiles_returnsAllRelatedTests() { - val bazelClient = BazelClient(tempFolder.root) + val bazelClient = BazelClient(tempFolder.root, commandExecutor) testBazelWorkspace.initEmptyWorkspace() testBazelWorkspace.createTest("FirstTest") testBazelWorkspace.createTest("SecondTest", subpackage = "two") @@ -269,7 +263,7 @@ class BazelClientTest { @Test fun testRetrieveTransitiveTestTargets_forBzlFile_returnsRelatedTests() { - val bazelClient = BazelClient(tempFolder.root) + val bazelClient = BazelClient(tempFolder.root, commandExecutor) testBazelWorkspace.initEmptyWorkspace() // Generate tests. testBazelWorkspace.createTest("FirstTest") @@ -298,7 +292,7 @@ class BazelClientTest { @Test fun testRetrieveTransitiveTestTargets_forWorkspace_returnsAllTests() { - val bazelClient = BazelClient(tempFolder.root) + val bazelClient = BazelClient(tempFolder.root, commandExecutor) testBazelWorkspace.initEmptyWorkspace() testBazelWorkspace.createTest("FirstTest") testBazelWorkspace.createTest("SecondTest", subpackage = "two") diff --git a/scripts/src/javatests/org/oppia/android/scripts/common/CommandExecutorImplTest.kt b/scripts/src/javatests/org/oppia/android/scripts/common/CommandExecutorImplTest.kt index e04c0954b85..78dc945dff6 100644 --- a/scripts/src/javatests/org/oppia/android/scripts/common/CommandExecutorImplTest.kt +++ b/scripts/src/javatests/org/oppia/android/scripts/common/CommandExecutorImplTest.kt @@ -37,7 +37,7 @@ class CommandExecutorImplTest { fun testExecute_echo_invalidDirectory_throwsException() { val commandExecutor = CommandExecutorImpl() - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { commandExecutor.executeCommand(File("invaliddirectory"), "echo", "value") } @@ -53,7 +53,7 @@ class CommandExecutorImplTest { // Produce a large output so that echo takes a bit longer to reduce the likelihood of this test // flaking on faster machines. val largeOutput = "a".repeat(100_000) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { commandExecutor.executeCommand(tempFolder.root, "echo", largeOutput) } @@ -65,7 +65,7 @@ class CommandExecutorImplTest { fun testExecute_nonexistentCommand_throwsException() { val commandExecutor = CommandExecutorImpl() - val exception = assertThrows(IOException::class) { + val exception = assertThrows() { commandExecutor.executeCommand(tempFolder.root, "commanddoesnotexist") } diff --git a/scripts/src/javatests/org/oppia/android/scripts/common/GitClientTest.kt b/scripts/src/javatests/org/oppia/android/scripts/common/GitClientTest.kt index 9362d7dd006..c3126339eca 100644 --- a/scripts/src/javatests/org/oppia/android/scripts/common/GitClientTest.kt +++ b/scripts/src/javatests/org/oppia/android/scripts/common/GitClientTest.kt @@ -35,16 +35,16 @@ class GitClientTest { @After fun tearDown() { // Print the status of the git repository to help with debugging in the cases of test failures - // and to help manually verify the expect git state at the end of each test. + // and to help manually verify the expected git state at the end of each test. println("git status (at end of test):") - println(testGitRepository.status()) + println(testGitRepository.status(checkForGitRepository = false)) } @Test fun testCurrentCommit_forNonRepository_throwsException() { val gitClient = GitClient(tempFolder.root, "develop") - val exception = assertThrows(IllegalStateException::class) { gitClient.currentCommit } + val exception = assertThrows() { gitClient.currentCommit } assertThat(exception).hasMessageThat().contains("Expected non-zero exit code") assertThat(exception).hasMessageThat().ignoringCase().contains("not a git repository") @@ -80,7 +80,7 @@ class GitClientTest { fun testCurrentBranch_forNonRepository_throwsException() { val gitClient = GitClient(tempFolder.root, "develop") - val exception = assertThrows(IllegalStateException::class) { gitClient.currentBranch } + val exception = assertThrows() { gitClient.currentBranch } assertThat(exception).hasMessageThat().contains("Expected non-zero exit code") assertThat(exception).hasMessageThat().ignoringCase().contains("not a git repository") diff --git a/scripts/src/javatests/org/oppia/android/scripts/common/ProtoStringEncoderTest.kt b/scripts/src/javatests/org/oppia/android/scripts/common/ProtoStringEncoderTest.kt index b03c106500a..bed9db19a1b 100644 --- a/scripts/src/javatests/org/oppia/android/scripts/common/ProtoStringEncoderTest.kt +++ b/scripts/src/javatests/org/oppia/android/scripts/common/ProtoStringEncoderTest.kt @@ -34,14 +34,14 @@ class ProtoStringEncoderTest { @Test fun testDecode_emptyString_throwsException() { - assertThrows(EOFException::class) { + assertThrows() { TestMessage.getDefaultInstance().mergeFromCompressedBase64(base64 = "") } } @Test fun testDecode_badString_throwsException() { - assertThrows(ZipException::class) { + assertThrows() { TestMessage.getDefaultInstance().mergeFromCompressedBase64(base64 = "asdf") } } diff --git a/scripts/src/javatests/org/oppia/android/scripts/docs/KdocValidityCheckTest.kt b/scripts/src/javatests/org/oppia/android/scripts/docs/KdocValidityCheckTest.kt index 9a7b61faa6a..6850c951041 100644 --- a/scripts/src/javatests/org/oppia/android/scripts/docs/KdocValidityCheckTest.kt +++ b/scripts/src/javatests/org/oppia/android/scripts/docs/KdocValidityCheckTest.kt @@ -46,7 +46,7 @@ class KdocValidityCheckTest { val testContent = """ /** - * Returns the string corresponding to this error's string resources, or null if there + * Returns the string corresponding to this error's string resources, or null if there * is none. */ fun getErrorMessageFromStringRes(context: Context): String? { @@ -260,7 +260,7 @@ class KdocValidityCheckTest { val testContent = """ val testVal = "testContent" - + fun provideContext(application: Application): Context """.trimIndent() val tempFile = tempFolder.newFile("testfiles/TempFileTest.kt") @@ -281,16 +281,14 @@ class KdocValidityCheckTest { val tempFile = tempFolder.newFile("testfiles/TempFile.kt") tempFile.writeText(testContent) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(KDOC_CHECK_FAILED_OUTPUT_INDICATOR) val failureMessage = """ KDoc missing for files: - ${retrieveTestFilesDirectoryPath()}/TempFile.kt:2 - + $wikiReferenceNote """.trimIndent() assertThat(outContent.toString().trim()).isEqualTo(failureMessage) @@ -352,21 +350,19 @@ class KdocValidityCheckTest { fun testKdoc_class_withoutKdoc_checkShouldFail() { val testContent = """ - class TestClass {} + class TestClass {} """.trimIndent() val tempFile = tempFolder.newFile("testfiles/TempFile.kt") tempFile.writeText(testContent) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(KDOC_CHECK_FAILED_OUTPUT_INDICATOR) val failureMessage = """ KDoc missing for files: - ${retrieveTestFilesDirectoryPath()}/TempFile.kt:1 - + $wikiReferenceNote """.trimIndent() assertThat(outContent.toString().trim()).isEqualTo(failureMessage) @@ -382,21 +378,19 @@ class KdocValidityCheckTest { class NestedClass { class NestedLevel2Class {} } - } + } """.trimIndent() val tempFile = tempFolder.newFile("testfiles/TempFile.kt") tempFile.writeText(testContent) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(KDOC_CHECK_FAILED_OUTPUT_INDICATOR) val failureMessage = """ KDoc missing for files: - ${retrieveTestFilesDirectoryPath()}/TempFile.kt:5 - + $wikiReferenceNote """.trimIndent() assertThat(outContent.toString().trim()).isEqualTo(failureMessage) @@ -409,16 +403,14 @@ class KdocValidityCheckTest { /** Test KDoc 1. */ class TestClass { val testVal = "test" - + fun testFunc(){} - } + } """.trimIndent() val tempFile = tempFolder.newFile("testfiles/TempFile.kt") tempFile.writeText(testContent) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(KDOC_CHECK_FAILED_OUTPUT_INDICATOR) val failureMessage = @@ -426,7 +418,7 @@ class KdocValidityCheckTest { KDoc missing for files: - ${retrieveTestFilesDirectoryPath()}/TempFile.kt:3 - ${retrieveTestFilesDirectoryPath()}/TempFile.kt:5 - + $wikiReferenceNote """.trimIndent() assertThat(outContent.toString().trim()).isEqualTo(failureMessage) @@ -442,9 +434,7 @@ class KdocValidityCheckTest { val tempFile = tempFolder.newFile("testfiles/TempFile.kt") tempFile.writeText(testContent) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(KDOC_CHECK_FAILED_OUTPUT_INDICATOR) val failureMessage = @@ -452,7 +442,7 @@ class KdocValidityCheckTest { KDoc missing for files: - ${retrieveTestFilesDirectoryPath()}/TempFile.kt:1 - ${retrieveTestFilesDirectoryPath()}/TempFile.kt:2 - + $wikiReferenceNote """.trimIndent() assertThat(outContent.toString().trim()).isEqualTo(failureMessage) @@ -468,16 +458,14 @@ class KdocValidityCheckTest { val tempFile = tempFolder.newFile("testfiles/TempFile.kt") tempFile.writeText(testContent) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(KDOC_CHECK_FAILED_OUTPUT_INDICATOR) val failureMessage = """ KDoc missing for files: - ${retrieveTestFilesDirectoryPath()}/TempFile.kt:2 - + $wikiReferenceNote """.trimIndent() assertThat(outContent.toString().trim()).isEqualTo(failureMessage) @@ -495,16 +483,14 @@ class KdocValidityCheckTest { val tempFile = tempFolder.newFile("testfiles/TempFile.kt") tempFile.writeText(testContent) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(KDOC_CHECK_FAILED_OUTPUT_INDICATOR) val failureMessage = """ KDoc missing for files: - ${retrieveTestFilesDirectoryPath()}/TempFile.kt:4 - + $wikiReferenceNote """.trimIndent() assertThat(outContent.toString().trim()).isEqualTo(failureMessage) @@ -522,9 +508,7 @@ class KdocValidityCheckTest { val tempFile = tempFolder.newFile("testfiles/TempFile.kt") tempFile.writeText(testContent) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(KDOC_CHECK_FAILED_OUTPUT_INDICATOR) val failureMessage = @@ -533,7 +517,7 @@ class KdocValidityCheckTest { - ${retrieveTestFilesDirectoryPath()}/TempFile.kt:1 - ${retrieveTestFilesDirectoryPath()}/TempFile.kt:2 - ${retrieveTestFilesDirectoryPath()}/TempFile.kt:3 - + $wikiReferenceNote """.trimIndent() assertThat(outContent.toString().trim()).isEqualTo(failureMessage) @@ -544,15 +528,13 @@ class KdocValidityCheckTest { val testContent = """ const val TABLE_USER_ATTRIBUTE_EMPID = "_id" - + const val TABLE_USER_ATTRIBUTE_DATA = "data" """.trimIndent() val tempFile = tempFolder.newFile("testfiles/TempFile.kt") tempFile.writeText(testContent) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(KDOC_CHECK_FAILED_OUTPUT_INDICATOR) val failureMessage = @@ -560,7 +542,7 @@ class KdocValidityCheckTest { KDoc missing for files: - ${retrieveTestFilesDirectoryPath()}/TempFile.kt:1 - ${retrieveTestFilesDirectoryPath()}/TempFile.kt:3 - + $wikiReferenceNote """.trimIndent() assertThat(outContent.toString().trim()).isEqualTo(failureMessage) @@ -572,21 +554,19 @@ class KdocValidityCheckTest { """ fun getErrorMessageFromStringRes(context: Context): String? { return error?.let(context::getString) - } + } """.trimIndent() val tempFile = tempFolder.newFile("testfiles/TempFile.kt") tempFile.writeText(testContent) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(KDOC_CHECK_FAILED_OUTPUT_INDICATOR) val failureMessage = """ KDoc missing for files: - ${retrieveTestFilesDirectoryPath()}/TempFile.kt:1 - + $wikiReferenceNote """.trimIndent() assertThat(outContent.toString().trim()).isEqualTo(failureMessage) @@ -604,16 +584,14 @@ class KdocValidityCheckTest { val tempFile = tempFolder.newFile("testfiles/TempFile.kt") tempFile.writeText(testContent) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(KDOC_CHECK_FAILED_OUTPUT_INDICATOR) val failureMessage = """ KDoc missing for files: - ${retrieveTestFilesDirectoryPath()}/TempFile.kt:3 - + $wikiReferenceNote """.trimIndent() assertThat(outContent.toString().trim()).isEqualTo(failureMessage) @@ -627,14 +605,12 @@ class KdocValidityCheckTest { WELCOME(0), TOPIC_LIST(1), FINAL(2) - } + } """.trimIndent() val tempFile = tempFolder.newFile("testfiles/TempFile.kt") tempFile.writeText(testContent) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(KDOC_CHECK_FAILED_OUTPUT_INDICATOR) val failureMessage = @@ -644,7 +620,7 @@ class KdocValidityCheckTest { - ${retrieveTestFilesDirectoryPath()}/TempFile.kt:2 - ${retrieveTestFilesDirectoryPath()}/TempFile.kt:3 - ${retrieveTestFilesDirectoryPath()}/TempFile.kt:4 - + $wikiReferenceNote """.trimIndent() assertThat(outContent.toString().trim()).isEqualTo(failureMessage) @@ -655,22 +631,20 @@ class KdocValidityCheckTest { val testContent = """ interface ChapterSelector { - + fun chapterSelected(chapterIndex: Int, nextStoryIndex: Int, explorationId: String) - + fun chapterUnselected(chapterIndex: Int, nextStoryIndex: Int) - + interface ChildInterface { fun testFunction() } - } + } """.trimIndent() val tempFile = tempFolder.newFile("testfiles/TempFile.kt") tempFile.writeText(testContent) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(KDOC_CHECK_FAILED_OUTPUT_INDICATOR) val failureMessage = @@ -681,7 +655,7 @@ class KdocValidityCheckTest { - ${retrieveTestFilesDirectoryPath()}/TempFile.kt:5 - ${retrieveTestFilesDirectoryPath()}/TempFile.kt:7 - ${retrieveTestFilesDirectoryPath()}/TempFile.kt:8 - + $wikiReferenceNote """.trimIndent() assertThat(outContent.toString().trim()).isEqualTo(failureMessage) @@ -695,11 +669,11 @@ class KdocValidityCheckTest { class TestClass { companion object { val pos = 1 - + fun incrementedPosition(position: Int): Int { return position+1 } - + fun decrementedPosition(position: Int): Int { return position-1 } @@ -709,9 +683,7 @@ class KdocValidityCheckTest { val tempFile = tempFolder.newFile("testfiles/TempFile.kt") tempFile.writeText(testContent) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(KDOC_CHECK_FAILED_OUTPUT_INDICATOR) val failureMessage = @@ -720,7 +692,7 @@ class KdocValidityCheckTest { - ${retrieveTestFilesDirectoryPath()}/TempFile.kt:4 - ${retrieveTestFilesDirectoryPath()}/TempFile.kt:6 - ${retrieveTestFilesDirectoryPath()}/TempFile.kt:10 - + $wikiReferenceNote """.trimIndent() assertThat(outContent.toString().trim()).isEqualTo(failureMessage) @@ -748,23 +720,21 @@ class KdocValidityCheckTest { val testContent = """ import javax.inject.Qualifier - + @Qualifier annotation class DelayShowAdditionalHintsFromWrongAnswerMillis """.trimIndent() val tempFile = tempFolder.newFile("testfiles/TempFile.kt") tempFile.writeText(testContent) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(KDOC_CHECK_FAILED_OUTPUT_INDICATOR) val failureMessage = """ KDoc missing for files: - ${retrieveTestFilesDirectoryPath()}/TempFile.kt:4 - + $wikiReferenceNote """.trimIndent() assertThat(outContent.toString().trim()).isEqualTo(failureMessage) @@ -775,7 +745,7 @@ class KdocValidityCheckTest { val testContent1 = """ import javax.inject.Qualifier - + @Qualifier annotation class DelayShowAdditionalHintsFromWrongAnswerMillis """.trimIndent() @@ -783,9 +753,9 @@ class KdocValidityCheckTest { """ class TestClass { fun testFunc(){} - + private val testVal = "test" - + val testVal2 = "test2" } """.trimIndent() @@ -800,9 +770,7 @@ class KdocValidityCheckTest { tempFile2.writeText(testContent2) tempFile3.writeText(testContent3) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(KDOC_CHECK_FAILED_OUTPUT_INDICATOR) val failureMessage = @@ -813,7 +781,7 @@ class KdocValidityCheckTest { - ${retrieveTestFilesDirectoryPath()}/TempFile2.kt:2 - ${retrieveTestFilesDirectoryPath()}/TempFile2.kt:6 - ${retrieveTestFilesDirectoryPath()}/TempFile3.kt:1 - + $wikiReferenceNote """.trimIndent() assertThat(outContent.toString().trim()).isEqualTo(failureMessage) @@ -825,9 +793,9 @@ class KdocValidityCheckTest { """ /** test kdoc. */ val testVal1 = "test content" - + val testVal2 = "test content" - + fun getErrorMessageFromStringRes(context: Context): String? { return error?.let(context::getString) } @@ -858,7 +826,7 @@ class KdocValidityCheckTest { """ /** test Kdoc1. */ val testVal = "test content" - + /** test Kdoc2. */ fun getErrorMessageFromStringRes(context: Context): String? { return error?.let(context::getString) @@ -879,9 +847,7 @@ class KdocValidityCheckTest { }.build() exemptions.writeTo(exemptionFile.outputStream()) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(KDOC_CHECK_FAILED_OUTPUT_INDICATOR) val failureMessage = @@ -913,9 +879,7 @@ class KdocValidityCheckTest { }.build() exemptions.writeTo(exemptionFile.outputStream()) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(KDOC_CHECK_FAILED_OUTPUT_INDICATOR) val failureMessage = @@ -923,10 +887,10 @@ class KdocValidityCheckTest { Redundant exemptions: - app/src/main/java/org/oppia/android/app/splash/SplashActivity.kt Please remove them from scripts/assets/kdoc_validity_exemptions.textproto - + KDoc missing for files: - ${retrieveTestFilesDirectoryPath()}/HomeActivity.kt:1 - + $wikiReferenceNote """.trimIndent() assertThat(outContent.toString().trim()).isEqualTo(failureMessage) diff --git a/scripts/src/javatests/org/oppia/android/scripts/label/AccessibilityLabelCheckTest.kt b/scripts/src/javatests/org/oppia/android/scripts/label/AccessibilityLabelCheckTest.kt index a1410b3ead2..900140e93f7 100644 --- a/scripts/src/javatests/org/oppia/android/scripts/label/AccessibilityLabelCheckTest.kt +++ b/scripts/src/javatests/org/oppia/android/scripts/label/AccessibilityLabelCheckTest.kt @@ -92,7 +92,7 @@ class AccessibilityLabelCheckTest { val manifestFile = tempFolder.newFile("testfiles/$tempFileRelativePath") manifestFile.writeText(testContent) - val exception = assertThrows(Exception::class) { + val exception = assertThrows() { main( retrieveTestFilesDirectoryPath(), "${tempFolder.root}/$pathToProtoBinary", @@ -134,7 +134,7 @@ class AccessibilityLabelCheckTest { val manifestFile = tempFolder.newFile("testfiles/$tempFileRelativePath") manifestFile.writeText(testContent) - val exception = assertThrows(Exception::class) { + val exception = assertThrows() { main( retrieveTestFilesDirectoryPath(), "${tempFolder.root}/$pathToProtoBinary", @@ -244,7 +244,7 @@ class AccessibilityLabelCheckTest { appManifestFile.writeText(testContent1) splashManifestFile.writeText(testContent2) - val exception = assertThrows(Exception::class) { + val exception = assertThrows() { main( retrieveTestFilesDirectoryPath(), "${tempFolder.root}/$pathToProtoBinary", @@ -308,7 +308,7 @@ class AccessibilityLabelCheckTest { appManifestFile.writeText(testContent1) splashManifestFile.writeText(testContent2) - val exception = assertThrows(Exception::class) { + val exception = assertThrows() { main( retrieveTestFilesDirectoryPath(), "${tempFolder.root}/$pathToProtoBinary", @@ -393,7 +393,7 @@ class AccessibilityLabelCheckTest { }.build() exemptions.writeTo(exemptionFile.outputStream()) - val exception = assertThrows(Exception::class) { + val exception = assertThrows() { main( retrieveTestFilesDirectoryPath(), "${tempFolder.root}/$pathToProtoBinary", @@ -436,7 +436,7 @@ class AccessibilityLabelCheckTest { }.build() exemptions.writeTo(exemptionFile.outputStream()) - val exception = assertThrows(Exception::class) { + val exception = assertThrows() { main( retrieveTestFilesDirectoryPath(), "${tempFolder.root}/$pathToProtoBinary", diff --git a/scripts/src/javatests/org/oppia/android/scripts/license/BUILD.bazel b/scripts/src/javatests/org/oppia/android/scripts/license/BUILD.bazel index 707ec3e8081..ab6b739a3b8 100644 --- a/scripts/src/javatests/org/oppia/android/scripts/license/BUILD.bazel +++ b/scripts/src/javatests/org/oppia/android/scripts/license/BUILD.bazel @@ -19,6 +19,7 @@ kt_jvm_test( name = "MavenDependenciesListCheckTest", size = "large", srcs = ["MavenDependenciesListCheckTest.kt"], + shard_count = 4, deps = [ "//scripts/src/java/org/oppia/android/scripts/license:maven_dependencies_list_check_lib", "//scripts/src/java/org/oppia/android/scripts/testing:test_bazel_workspace", diff --git a/scripts/src/javatests/org/oppia/android/scripts/license/LicenseTextsCheckTest.kt b/scripts/src/javatests/org/oppia/android/scripts/license/LicenseTextsCheckTest.kt index 8a70436c6c7..baf034a9095 100644 --- a/scripts/src/javatests/org/oppia/android/scripts/license/LicenseTextsCheckTest.kt +++ b/scripts/src/javatests/org/oppia/android/scripts/license/LicenseTextsCheckTest.kt @@ -41,7 +41,7 @@ class LicenseTextsCheckTest { val thirdPartyDepsXmlFile = tempFolder.newFile("values/third_party_dependencies.xml") thirdPartyDepsXmlFile.writeText(WARNING_COMMENT) - val exception = assertThrows(Exception::class) { + val exception = assertThrows() { main(arrayOf()) } @@ -53,7 +53,7 @@ class LicenseTextsCheckTest { val thirdPartyDepsXmlFile = tempFolder.newFile("values/third_party_dependencies.xml") thirdPartyDepsXmlFile.writeText("") - val exception = assertThrows(Exception::class) { + val exception = assertThrows() { main(arrayOf("${tempFolder.root}/values/third_party_dependencies.xml")) } @@ -72,7 +72,7 @@ class LicenseTextsCheckTest { """.trimIndent() ) - val exception = assertThrows(Exception::class) { + val exception = assertThrows() { main(arrayOf("${tempFolder.root}/values/third_party_dependencies.xml")) } @@ -110,7 +110,7 @@ class LicenseTextsCheckTest { @Test fun testLicenseTexsCheck_xmlFileNotPresent_checkFailsWithFileNotFoundException() { val pathToThirdPartyDepsXml = "${tempFolder.root}/values/third_party_dependencies.xml" - val exception = assertThrows(Exception::class) { + val exception = assertThrows() { main(arrayOf("${tempFolder.root}/values/third_party_dependencies.xml")) } diff --git a/scripts/src/javatests/org/oppia/android/scripts/license/MavenDependenciesListCheckTest.kt b/scripts/src/javatests/org/oppia/android/scripts/license/MavenDependenciesListCheckTest.kt index f30b261f53a..5fdc807e3db 100644 --- a/scripts/src/javatests/org/oppia/android/scripts/license/MavenDependenciesListCheckTest.kt +++ b/scripts/src/javatests/org/oppia/android/scripts/license/MavenDependenciesListCheckTest.kt @@ -110,7 +110,7 @@ class MavenDependenciesListCheckTest { val coordsList = listOf(DATA_BINDING_DEP, FIREBASE_ANALYTICS_DEP) setUpBazelEnvironment(coordsList) - val exception = assertThrows(Exception::class) { + val exception = assertThrows() { MavenDependenciesListCheck( mockLicenseFetcher, commandExecutor @@ -186,7 +186,7 @@ class MavenDependenciesListCheckTest { ) setUpBazelEnvironment(coordsList) - val exception = assertThrows(Exception::class) { + val exception = assertThrows() { MavenDependenciesListCheck( mockLicenseFetcher, commandExecutor @@ -250,7 +250,7 @@ class MavenDependenciesListCheckTest { ) setUpBazelEnvironment(coordsList) - val exception = assertThrows(Exception::class) { + val exception = assertThrows() { MavenDependenciesListCheck( mockLicenseFetcher, commandExecutor @@ -326,7 +326,7 @@ class MavenDependenciesListCheckTest { val coordsList = listOf(GLIDE_DEP) setUpBazelEnvironment(coordsList) - val exception = assertThrows(Exception::class) { + val exception = assertThrows() { MavenDependenciesListCheck( mockLicenseFetcher, commandExecutor @@ -405,7 +405,7 @@ class MavenDependenciesListCheckTest { val coordsList = listOf(GLIDE_DEP) setUpBazelEnvironment(coordsList) - val exception = assertThrows(Exception::class) { + val exception = assertThrows() { MavenDependenciesListCheck( mockLicenseFetcher, commandExecutor @@ -481,7 +481,7 @@ class MavenDependenciesListCheckTest { ) setUpBazelEnvironment(coordsList) - val exception = assertThrows(Exception::class) { + val exception = assertThrows() { MavenDependenciesListCheck( mockLicenseFetcher, commandExecutor @@ -559,7 +559,7 @@ class MavenDependenciesListCheckTest { ) setUpBazelEnvironmentWithUpdatedFirebaseDependency(coordsList) - val exception = assertThrows(Exception::class) { + val exception = assertThrows() { MavenDependenciesListCheck( mockLicenseFetcher, commandExecutor @@ -637,7 +637,7 @@ class MavenDependenciesListCheckTest { ) setUpBazelEnvironment(coordsList) - val exception = assertThrows(Exception::class) { + val exception = assertThrows() { MavenDependenciesListCheck( mockLicenseFetcher, commandExecutor @@ -770,7 +770,7 @@ class MavenDependenciesListCheckTest { ) setUpBazelEnvironment(coordsList) - val exception = assertThrows(Exception::class) { + val exception = assertThrows() { MavenDependenciesListCheck( mockLicenseFetcher, commandExecutor @@ -819,7 +819,7 @@ class MavenDependenciesListCheckTest { ) setUpBazelEnvironment(coordsList) - val exception = assertThrows(Exception::class) { + val exception = assertThrows() { MavenDependenciesListCheck( mockLicenseFetcher, commandExecutor @@ -874,7 +874,7 @@ class MavenDependenciesListCheckTest { ) setUpBazelEnvironment(coordsList) - val exception = assertThrows(Exception::class) { + val exception = assertThrows() { MavenDependenciesListCheck( mockLicenseFetcher, commandExecutor diff --git a/scripts/src/javatests/org/oppia/android/scripts/maven/BUILD.bazel b/scripts/src/javatests/org/oppia/android/scripts/maven/BUILD.bazel index a46ee7ad500..68b0d6fad28 100644 --- a/scripts/src/javatests/org/oppia/android/scripts/maven/BUILD.bazel +++ b/scripts/src/javatests/org/oppia/android/scripts/maven/BUILD.bazel @@ -9,6 +9,7 @@ kt_jvm_test( name = "GenerateMavenDependenciesListTest", size = "large", srcs = ["GenerateMavenDependenciesListTest.kt"], + shard_count = 4, deps = [ "//scripts/src/java/org/oppia/android/scripts/common:command_executor", "//scripts/src/java/org/oppia/android/scripts/maven:generate_maven_dependencies_list_lib", diff --git a/scripts/src/javatests/org/oppia/android/scripts/maven/GenerateMavenDependenciesListTest.kt b/scripts/src/javatests/org/oppia/android/scripts/maven/GenerateMavenDependenciesListTest.kt index 6d63a6e9c6d..4507d76a5dc 100644 --- a/scripts/src/javatests/org/oppia/android/scripts/maven/GenerateMavenDependenciesListTest.kt +++ b/scripts/src/javatests/org/oppia/android/scripts/maven/GenerateMavenDependenciesListTest.kt @@ -96,7 +96,7 @@ class GenerateMavenDependenciesListTest { val coordsList = listOf(DEP_WITH_SCRAPABLE_LICENSE, DEP_WITH_DIRECT_LINK_ONLY_LICENSE) setUpBazelEnvironment(coordsList) - val exception = assertThrows(Exception::class) { + val exception = assertThrows() { GenerateMavenDependenciesList( mockLicenseFetcher, commandExecutor @@ -180,7 +180,7 @@ class GenerateMavenDependenciesListTest { ) setUpBazelEnvironment(coordsList) - val exception = assertThrows(Exception::class) { + val exception = assertThrows() { GenerateMavenDependenciesList( mockLicenseFetcher, commandExecutor @@ -204,7 +204,7 @@ class GenerateMavenDependenciesListTest { val coordsList = listOf(DEP_WITH_DIRECT_LINK_ONLY_LICENSE) setUpBazelEnvironment(coordsList) - val exception = assertThrows(Exception::class) { + val exception = assertThrows() { GenerateMavenDependenciesList( mockLicenseFetcher, commandExecutor @@ -246,7 +246,7 @@ class GenerateMavenDependenciesListTest { val coordsList = listOf(DEP_WITH_SCRAPABLE_AND_EXTRACTED_COPY_LICENSES) setUpBazelEnvironment(coordsList) - val exception = assertThrows(Exception::class) { + val exception = assertThrows() { GenerateMavenDependenciesList( mockLicenseFetcher, commandExecutor @@ -313,7 +313,7 @@ class GenerateMavenDependenciesListTest { val coordsList = listOf(DEP_WITH_INVALID_LINKS) setUpBazelEnvironment(coordsList) - val exception = assertThrows(Exception::class) { + val exception = assertThrows() { GenerateMavenDependenciesList( mockLicenseFetcher, commandExecutor @@ -355,7 +355,7 @@ class GenerateMavenDependenciesListTest { val coordsList = listOf(DEP_WITH_NO_LICENSE) setUpBazelEnvironment(coordsList) - val exception = assertThrows(Exception::class) { + val exception = assertThrows() { GenerateMavenDependenciesList( mockLicenseFetcher, commandExecutor @@ -614,7 +614,7 @@ class GenerateMavenDependenciesListTest { ) setUpBazelEnvironment(coordsList) - val exception = assertThrows(Exception::class) { + val exception = assertThrows() { GenerateMavenDependenciesList( mockLicenseFetcher, commandExecutor @@ -790,7 +790,7 @@ class GenerateMavenDependenciesListTest { ) setUpBazelEnvironment(coordsList) - val exception = assertThrows(Exception::class) { + val exception = assertThrows() { GenerateMavenDependenciesList( mockLicenseFetcher, commandExecutor @@ -915,7 +915,7 @@ class GenerateMavenDependenciesListTest { ) setUpBazelEnvironment(coordsList) - val exception = assertThrows(Exception::class) { + val exception = assertThrows() { GenerateMavenDependenciesList( mockLicenseFetcher, commandExecutor @@ -1028,7 +1028,7 @@ class GenerateMavenDependenciesListTest { ) setUpBazelEnvironment(coordsList) - val exception = assertThrows(Exception::class) { + val exception = assertThrows() { GenerateMavenDependenciesList( mockLicenseFetcher, commandExecutor diff --git a/scripts/src/javatests/org/oppia/android/scripts/maven/RetrieveLicenseTextsTest.kt b/scripts/src/javatests/org/oppia/android/scripts/maven/RetrieveLicenseTextsTest.kt index 6be3f9c0d71..d889d6ede2b 100644 --- a/scripts/src/javatests/org/oppia/android/scripts/maven/RetrieveLicenseTextsTest.kt +++ b/scripts/src/javatests/org/oppia/android/scripts/maven/RetrieveLicenseTextsTest.kt @@ -63,7 +63,7 @@ class RetrieveLicenseTextsTest { @Test fun testScript_oneArgument_printsUsageStringAndThrowsException() { - val exception = assertThrows(Exception::class) { + val exception = assertThrows() { RetrieveLicenseTexts(mockLicenseFetcher).main(arrayOf()) } @@ -73,7 +73,7 @@ class RetrieveLicenseTextsTest { @Test fun testScript_oneArguments_printsUsageStringAndThrowsException() { - val exception = assertThrows(Exception::class) { + val exception = assertThrows() { RetrieveLicenseTexts(mockLicenseFetcher).main( arrayOf( "${tempFolder.root}/values" @@ -92,7 +92,7 @@ class RetrieveLicenseTextsTest { val pbFile = tempFolder.newFile("scripts/assets/maven_dependencies.pb") pbFile.outputStream().use { mavenDependencyList.writeTo(it) } - val exception = assertThrows(Exception::class) { + val exception = assertThrows() { RetrieveLicenseTexts(mockLicenseFetcher).main( arrayOf( "${tempFolder.root}/values", @@ -111,7 +111,7 @@ class RetrieveLicenseTextsTest { val pbFile = tempFolder.newFile("scripts/assets/maven_dependencies.pb") pbFile.outputStream().use { mavenDependencyList.writeTo(it) } - val exception = assertThrows(Exception::class) { + val exception = assertThrows() { RetrieveLicenseTexts(mockLicenseFetcher).main( arrayOf( "${tempFolder.root}/values", @@ -141,7 +141,7 @@ class RetrieveLicenseTextsTest { val pbFile = tempFolder.newFile("scripts/assets/maven_dependencies.pb") pbFile.outputStream().use { mavenDependencyList.writeTo(it) } - val exception = assertThrows(Exception::class) { + val exception = assertThrows() { RetrieveLicenseTexts(mockLicenseFetcher).main( arrayOf( "${tempFolder.root}/values", diff --git a/scripts/src/javatests/org/oppia/android/scripts/regex/RegexPatternValidationCheckTest.kt b/scripts/src/javatests/org/oppia/android/scripts/regex/RegexPatternValidationCheckTest.kt index 20fd219f857..a3eb9c825d9 100644 --- a/scripts/src/javatests/org/oppia/android/scripts/regex/RegexPatternValidationCheckTest.kt +++ b/scripts/src/javatests/org/oppia/android/scripts/regex/RegexPatternValidationCheckTest.kt @@ -211,6 +211,13 @@ class RegexPatternValidationCheckTest { " should immediately follow the at-clause without any additional linking with brackets." private val badSingleLineKdocShouldEndWithPunctuation = "Badly formatted KDoc. Single-line KDocs should end with punctuation." + private val activityTestRuleShouldNotBeUsed = + "ActivityTestRule is deprecated since it operates test activities in sometimes unsafe" + + " situations. Use ActivityScenario, instead." + private val activityScenarioRuleShouldNotBeUsed = + "ActivityScenarioRule can result in order dependence when static state leaks across tests" + + " (such as static module variables), and can make staging much more difficult for platform" + + " parameters. Use ActivityScenario directly, instead." private val wikiReferenceNote = "Refer to https://github.com/oppia/oppia-android/wiki/Static-Analysis-Checks" + "#regexpatternvalidation-check for more details on how to fix this." @@ -259,9 +266,7 @@ class RegexPatternValidationCheckTest { val tempFile = tempFolder.newFile("testfiles/data/src/main/TestActivity.kt") tempFile.writeText(requiredContent) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(REGEX_CHECK_FAILED_OUTPUT_INDICATOR) assertThat(outContent.toString().trim()).isEqualTo( @@ -289,9 +294,7 @@ class RegexPatternValidationCheckTest { tempFolder.newFolder("testfiles", "app", "src", "main", "res", "values", "subdir") tempFolder.newFile("testfiles/app/src/main/res/values/subdir/strings.xml") - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(REGEX_CHECK_FAILED_OUTPUT_INDICATOR) assertThat(outContent.toString().trim()).isEqualTo( @@ -309,16 +312,14 @@ class RegexPatternValidationCheckTest { tempFolder.newFolder("testfiles", "domain", "src", "main", "res", "drawable", "subdir") tempFolder.newFile("testfiles/domain/src/main/res/drawable/subdir/example.png") - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(REGEX_CHECK_FAILED_OUTPUT_INDICATOR) assertThat(outContent.toString().trim()).isEqualTo( """ File name/path violation: $nestedResourceSubdirectoryErrorMessage - domain/src/main/res/drawable/subdir/example.png - + $wikiReferenceNote """.trimIndent() ) @@ -339,9 +340,7 @@ class RegexPatternValidationCheckTest { val fileContainsSupportLibraryImport = tempFolder.newFile("testfiles/TestFile.kt") fileContainsSupportLibraryImport.writeText(prohibitedContent) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(REGEX_CHECK_FAILED_OUTPUT_INDICATOR) assertThat(outContent.toString().trim()) @@ -359,9 +358,7 @@ class RegexPatternValidationCheckTest { val fileContainsSupportLibraryImport = tempFolder.newFile("testfiles/TestFile.kt") fileContainsSupportLibraryImport.writeText(prohibitedContent) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(REGEX_CHECK_FAILED_OUTPUT_INDICATOR) assertThat(outContent.toString().trim()) @@ -379,9 +376,7 @@ class RegexPatternValidationCheckTest { val fileContainsSupportLibraryImport = tempFolder.newFile("testfiles/TestFile.kt") fileContainsSupportLibraryImport.writeText(prohibitedContent) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(REGEX_CHECK_FAILED_OUTPUT_INDICATOR) assertThat(outContent.toString().trim()) @@ -399,9 +394,7 @@ class RegexPatternValidationCheckTest { val fileContainsSupportLibraryImport = tempFolder.newFile("testfiles/TestFile.kt") fileContainsSupportLibraryImport.writeText(prohibitedContent) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(REGEX_CHECK_FAILED_OUTPUT_INDICATOR) assertThat(outContent.toString().trim()) @@ -419,9 +412,7 @@ class RegexPatternValidationCheckTest { val fileContainsSupportLibraryImport = tempFolder.newFile("testfiles/TestFile.kt") fileContainsSupportLibraryImport.writeText(prohibitedContent) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(REGEX_CHECK_FAILED_OUTPUT_INDICATOR) assertThat(outContent.toString().trim()) @@ -439,9 +430,7 @@ class RegexPatternValidationCheckTest { val fileContainsSupportLibraryImport = tempFolder.newFile("testfiles/test_layout.xml") fileContainsSupportLibraryImport.writeText(prohibitedContent) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(REGEX_CHECK_FAILED_OUTPUT_INDICATOR) assertThat(outContent.toString().trim()) @@ -459,9 +448,7 @@ class RegexPatternValidationCheckTest { val fileContainsSupportLibraryImport = tempFolder.newFile("testfiles/test_layout.xml") fileContainsSupportLibraryImport.writeText(prohibitedContent) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(REGEX_CHECK_FAILED_OUTPUT_INDICATOR) assertThat(outContent.toString().trim()) @@ -479,9 +466,7 @@ class RegexPatternValidationCheckTest { val fileContainsSupportLibraryImport = tempFolder.newFile("testfiles/test_layout.xml") fileContainsSupportLibraryImport.writeText(prohibitedContent) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(REGEX_CHECK_FAILED_OUTPUT_INDICATOR) assertThat(outContent.toString().trim()) @@ -499,9 +484,7 @@ class RegexPatternValidationCheckTest { val fileContainsSupportLibraryImport = tempFolder.newFile("testfiles/test_layout.xml") fileContainsSupportLibraryImport.writeText(prohibitedContent) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(REGEX_CHECK_FAILED_OUTPUT_INDICATOR) assertThat(outContent.toString().trim()) @@ -519,9 +502,7 @@ class RegexPatternValidationCheckTest { val fileContainsSupportLibraryImport = tempFolder.newFile("testfiles/test_layout.xml") fileContainsSupportLibraryImport.writeText(prohibitedContent) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(REGEX_CHECK_FAILED_OUTPUT_INDICATOR) assertThat(outContent.toString().trim()) @@ -539,9 +520,7 @@ class RegexPatternValidationCheckTest { val fileContainsSupportLibraryImport = tempFolder.newFile("testfiles/test_layout.xml") fileContainsSupportLibraryImport.writeText(prohibitedContent) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(REGEX_CHECK_FAILED_OUTPUT_INDICATOR) assertThat(outContent.toString().trim()) @@ -559,9 +538,7 @@ class RegexPatternValidationCheckTest { val fileContainsSupportLibraryImport = tempFolder.newFile("testfiles/test_layout.xml") fileContainsSupportLibraryImport.writeText(prohibitedContent) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(REGEX_CHECK_FAILED_OUTPUT_INDICATOR) assertThat(outContent.toString().trim()) @@ -579,9 +556,7 @@ class RegexPatternValidationCheckTest { val fileContainsSupportLibraryImport = tempFolder.newFile("testfiles/test_layout.xml") fileContainsSupportLibraryImport.writeText(prohibitedContent) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(REGEX_CHECK_FAILED_OUTPUT_INDICATOR) assertThat(outContent.toString().trim()) @@ -599,9 +574,7 @@ class RegexPatternValidationCheckTest { val fileContainsSupportLibraryImport = tempFolder.newFile("testfiles/test_layout.xml") fileContainsSupportLibraryImport.writeText(prohibitedContent) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(REGEX_CHECK_FAILED_OUTPUT_INDICATOR) assertThat(outContent.toString().trim()) @@ -619,9 +592,7 @@ class RegexPatternValidationCheckTest { val fileContainsSupportLibraryImport = tempFolder.newFile("testfiles/test_layout.xml") fileContainsSupportLibraryImport.writeText(prohibitedContent) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(REGEX_CHECK_FAILED_OUTPUT_INDICATOR) assertThat(outContent.toString().trim()) @@ -639,9 +610,7 @@ class RegexPatternValidationCheckTest { val fileContainsSupportLibraryImport = tempFolder.newFile("testfiles/test_layout.xml") fileContainsSupportLibraryImport.writeText(prohibitedContent) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(REGEX_CHECK_FAILED_OUTPUT_INDICATOR) assertThat(outContent.toString().trim()) @@ -659,9 +628,7 @@ class RegexPatternValidationCheckTest { val fileContainsSupportLibraryImport = tempFolder.newFile("testfiles/test_layout.xml") fileContainsSupportLibraryImport.writeText(prohibitedContent) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(REGEX_CHECK_FAILED_OUTPUT_INDICATOR) assertThat(outContent.toString().trim()) @@ -679,9 +646,7 @@ class RegexPatternValidationCheckTest { val fileContainsSupportLibraryImport = tempFolder.newFile("testfiles/test_layout.xml") fileContainsSupportLibraryImport.writeText(prohibitedContent) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(REGEX_CHECK_FAILED_OUTPUT_INDICATOR) assertThat(outContent.toString().trim()) @@ -699,9 +664,7 @@ class RegexPatternValidationCheckTest { val fileContainsSupportLibraryImport = tempFolder.newFile("testfiles/test_layout.xml") fileContainsSupportLibraryImport.writeText(prohibitedContent) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(REGEX_CHECK_FAILED_OUTPUT_INDICATOR) assertThat(outContent.toString().trim()) @@ -719,9 +682,7 @@ class RegexPatternValidationCheckTest { val fileContainsSupportLibraryImport = tempFolder.newFile("testfiles/test_layout.xml") fileContainsSupportLibraryImport.writeText(prohibitedContent) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(REGEX_CHECK_FAILED_OUTPUT_INDICATOR) assertThat(outContent.toString().trim()) @@ -739,9 +700,7 @@ class RegexPatternValidationCheckTest { val fileContainsSupportLibraryImport = tempFolder.newFile("testfiles/test_layout.xml") fileContainsSupportLibraryImport.writeText(prohibitedContent) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(REGEX_CHECK_FAILED_OUTPUT_INDICATOR) assertThat(outContent.toString().trim()) @@ -759,9 +718,7 @@ class RegexPatternValidationCheckTest { val fileContainsSupportLibraryImport = tempFolder.newFile("testfiles/test_layout.xml") fileContainsSupportLibraryImport.writeText(prohibitedContent) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(REGEX_CHECK_FAILED_OUTPUT_INDICATOR) assertThat(outContent.toString().trim()) @@ -779,9 +736,7 @@ class RegexPatternValidationCheckTest { val fileContainsSupportLibraryImport = tempFolder.newFile("testfiles/test_layout.xml") fileContainsSupportLibraryImport.writeText(prohibitedContent) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(REGEX_CHECK_FAILED_OUTPUT_INDICATOR) assertThat(outContent.toString().trim()) @@ -799,9 +754,7 @@ class RegexPatternValidationCheckTest { val fileContainsSupportLibraryImport = tempFolder.newFile("testfiles/test_layout.xml") fileContainsSupportLibraryImport.writeText(prohibitedContent) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(REGEX_CHECK_FAILED_OUTPUT_INDICATOR) assertThat(outContent.toString().trim()) @@ -819,9 +772,7 @@ class RegexPatternValidationCheckTest { val fileContainsSupportLibraryImport = tempFolder.newFile("testfiles/test_layout.xml") fileContainsSupportLibraryImport.writeText(prohibitedContent) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(REGEX_CHECK_FAILED_OUTPUT_INDICATOR) assertThat(outContent.toString().trim()) @@ -839,9 +790,7 @@ class RegexPatternValidationCheckTest { val fileContainsSupportLibraryImport = tempFolder.newFile("testfiles/test_layout.xml") fileContainsSupportLibraryImport.writeText(prohibitedContent) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(REGEX_CHECK_FAILED_OUTPUT_INDICATOR) assertThat(outContent.toString().trim()) @@ -859,9 +808,7 @@ class RegexPatternValidationCheckTest { val fileContainsSupportLibraryImport = tempFolder.newFile("testfiles/test_layout.xml") fileContainsSupportLibraryImport.writeText(prohibitedContent) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(REGEX_CHECK_FAILED_OUTPUT_INDICATOR) assertThat(outContent.toString().trim()) @@ -879,9 +826,7 @@ class RegexPatternValidationCheckTest { val fileContainsSupportLibraryImport = tempFolder.newFile("testfiles/test_layout.xml") fileContainsSupportLibraryImport.writeText(prohibitedContent) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(REGEX_CHECK_FAILED_OUTPUT_INDICATOR) assertThat(outContent.toString().trim()) @@ -899,9 +844,7 @@ class RegexPatternValidationCheckTest { val fileContainsSupportLibraryImport = tempFolder.newFile("testfiles/test_layout.xml") fileContainsSupportLibraryImport.writeText(prohibitedContent) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(REGEX_CHECK_FAILED_OUTPUT_INDICATOR) assertThat(outContent.toString().trim()) @@ -919,9 +862,7 @@ class RegexPatternValidationCheckTest { val fileContainsSupportLibraryImport = tempFolder.newFile("testfiles/test_layout.xml") fileContainsSupportLibraryImport.writeText(prohibitedContent) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(REGEX_CHECK_FAILED_OUTPUT_INDICATOR) assertThat(outContent.toString().trim()) @@ -939,9 +880,7 @@ class RegexPatternValidationCheckTest { val fileContainsSupportLibraryImport = tempFolder.newFile("testfiles/test_layout.xml") fileContainsSupportLibraryImport.writeText(prohibitedContent) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(REGEX_CHECK_FAILED_OUTPUT_INDICATOR) assertThat(outContent.toString().trim()) @@ -959,9 +898,7 @@ class RegexPatternValidationCheckTest { val fileContainsSupportLibraryImport = tempFolder.newFile("testfiles/test_layout.xml") fileContainsSupportLibraryImport.writeText(prohibitedContent) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(REGEX_CHECK_FAILED_OUTPUT_INDICATOR) assertThat(outContent.toString().trim()) @@ -979,9 +916,7 @@ class RegexPatternValidationCheckTest { val fileContainsSupportLibraryImport = tempFolder.newFile("testfiles/test_layout.xml") fileContainsSupportLibraryImport.writeText(prohibitedContent) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(REGEX_CHECK_FAILED_OUTPUT_INDICATOR) assertThat(outContent.toString().trim()) @@ -999,9 +934,7 @@ class RegexPatternValidationCheckTest { val fileContainsSupportLibraryImport = tempFolder.newFile("testfiles/test_layout.xml") fileContainsSupportLibraryImport.writeText(prohibitedContent) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(REGEX_CHECK_FAILED_OUTPUT_INDICATOR) assertThat(outContent.toString().trim()) @@ -1020,9 +953,7 @@ class RegexPatternValidationCheckTest { val stringFilePath = "app/src/main/res/values/strings.xml" tempFolder.newFile("testfiles/$stringFilePath").writeText(prohibitedContent) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(REGEX_CHECK_FAILED_OUTPUT_INDICATOR) assertThat(outContent.toString().trim()) @@ -1041,9 +972,7 @@ class RegexPatternValidationCheckTest { val stringFilePath = "app/src/main/res/values/strings.xml" tempFolder.newFile("testfiles/$stringFilePath").writeText(prohibitedContent) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(REGEX_CHECK_FAILED_OUTPUT_INDICATOR) assertThat(outContent.toString().trim()) @@ -1074,9 +1003,7 @@ class RegexPatternValidationCheckTest { val stringFilePath = "app/src/main/res/values/untranslated_strings.xml" tempFolder.newFile("testfiles/$stringFilePath").writeText(prohibitedContent) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(REGEX_CHECK_FAILED_OUTPUT_INDICATOR) assertThat(outContent.toString().trim()) @@ -1095,9 +1022,7 @@ class RegexPatternValidationCheckTest { val stringFilePath = "app/src/main/res/values/untranslated_strings.xml" tempFolder.newFile("testfiles/$stringFilePath").writeText(prohibitedContent) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(REGEX_CHECK_FAILED_OUTPUT_INDICATOR) assertThat(outContent.toString().trim()) @@ -1116,9 +1041,7 @@ class RegexPatternValidationCheckTest { val stringFilePath = "data/src/main/SomeController.kt" tempFolder.newFile("testfiles/$stringFilePath").writeText(prohibitedContent) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(REGEX_CHECK_FAILED_OUTPUT_INDICATOR) assertThat(outContent.toString().trim()) @@ -1137,9 +1060,7 @@ class RegexPatternValidationCheckTest { val stringFilePath = "data/src/main/SomeController.kt" tempFolder.newFile("testfiles/$stringFilePath").writeText(prohibitedContent) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(REGEX_CHECK_FAILED_OUTPUT_INDICATOR) assertThat(outContent.toString().trim()) @@ -1209,9 +1130,7 @@ class RegexPatternValidationCheckTest { val stringFilePath = "data/src/main/SomeController.kt" tempFolder.newFile("testfiles/$stringFilePath").writeText(prohibitedContent) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } // Verify that all patterns are properly detected & prohibited. assertThat(exception).hasMessageThat().contains(REGEX_CHECK_FAILED_OUTPUT_INDICATOR) @@ -1252,9 +1171,7 @@ class RegexPatternValidationCheckTest { val stringFilePath = "data/src/main/SomeController.java" tempFolder.newFile("testfiles/$stringFilePath").writeText(prohibitedContent) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } // Verify that all patterns are properly detected & prohibited. assertThat(exception).hasMessageThat().contains(REGEX_CHECK_FAILED_OUTPUT_INDICATOR) @@ -1287,9 +1204,7 @@ class RegexPatternValidationCheckTest { val stringFilePath = "data/src/main/SomeController.kt" tempFolder.newFile("testfiles/$stringFilePath").writeText(prohibitedContent) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } // Verify that all patterns are properly detected & prohibited. assertThat(exception).hasMessageThat().contains(REGEX_CHECK_FAILED_OUTPUT_INDICATOR) @@ -1319,9 +1234,7 @@ class RegexPatternValidationCheckTest { val stringFilePath = "app/src/main/res/values/strings.xml" tempFolder.newFile("testfiles/$stringFilePath").writeText(prohibitedContent) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } // Verify that all patterns are properly detected & prohibited. assertThat(exception).hasMessageThat().contains(REGEX_CHECK_FAILED_OUTPUT_INDICATOR) @@ -1347,9 +1260,7 @@ class RegexPatternValidationCheckTest { val stringFilePath = "app/src/main/res/values/strings.xml" tempFolder.newFile("testfiles/$stringFilePath").writeText(prohibitedContent) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(REGEX_CHECK_FAILED_OUTPUT_INDICATOR) assertThat(outContent.toString().trim()) @@ -1372,9 +1283,7 @@ class RegexPatternValidationCheckTest { val stringFilePath = "app/src/main/res/values/strings.xml" tempFolder.newFile("testfiles/$stringFilePath").writeText(prohibitedContent) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(REGEX_CHECK_FAILED_OUTPUT_INDICATOR) assertThat(outContent.toString().trim()) @@ -1402,9 +1311,7 @@ class RegexPatternValidationCheckTest { val stringFilePath = "app/src/main/res/values/strings.xml" tempFolder.newFile("testfiles/$stringFilePath").writeText(prohibitedContent) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } // Verify that all patterns are properly detected & prohibited. assertThat(exception).hasMessageThat().contains(REGEX_CHECK_FAILED_OUTPUT_INDICATOR) @@ -1445,9 +1352,7 @@ class RegexPatternValidationCheckTest { val stringFilePath = "app/src/main/SomeActivity.kt" tempFolder.newFile("testfiles/$stringFilePath").writeText(prohibitedContent + requiredContent) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(REGEX_CHECK_FAILED_OUTPUT_INDICATOR) assertThat(outContent.toString().trim()) @@ -1467,9 +1372,7 @@ class RegexPatternValidationCheckTest { val stringFilePath = "app/src/main/SomeActivity.kt" tempFolder.newFile("testfiles/$stringFilePath").writeText(prohibitedContent + requiredContent) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(REGEX_CHECK_FAILED_OUTPUT_INDICATOR) assertThat(outContent.toString().trim()) @@ -1489,9 +1392,7 @@ class RegexPatternValidationCheckTest { val stringFilePath = "app/src/main/SomeActivity.kt" tempFolder.newFile("testfiles/$stringFilePath").writeText(prohibitedContent + requiredContent) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(REGEX_CHECK_FAILED_OUTPUT_INDICATOR) assertThat(outContent.toString().trim()) @@ -1510,9 +1411,7 @@ class RegexPatternValidationCheckTest { val stringFilePath = "app/src/main/SomeDialogFragment.kt" tempFolder.newFile("testfiles/$stringFilePath").writeText(prohibitedContent) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(REGEX_CHECK_FAILED_OUTPUT_INDICATOR) assertThat(outContent.toString().trim()) @@ -1543,9 +1442,7 @@ class RegexPatternValidationCheckTest { val stringFilePath = "app/src/main/AndroidManifest.xml" tempFolder.newFile("testfiles/$stringFilePath").writeText(prohibitedContent) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(REGEX_CHECK_FAILED_OUTPUT_INDICATOR) assertThat(outContent.toString().trim()) @@ -1573,9 +1470,7 @@ class RegexPatternValidationCheckTest { val stringFilePath = "app/src/main/AndroidManifest.xml" tempFolder.newFile("testfiles/$stringFilePath").writeText(prohibitedContent) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(REGEX_CHECK_FAILED_OUTPUT_INDICATOR) assertThat(outContent.toString().trim()) @@ -1603,9 +1498,7 @@ class RegexPatternValidationCheckTest { val stringFilePath = "app/src/main/AndroidManifest.xml" tempFolder.newFile("testfiles/$stringFilePath").writeText(prohibitedContent) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(REGEX_CHECK_FAILED_OUTPUT_INDICATOR) assertThat(outContent.toString().trim()) @@ -1624,9 +1517,7 @@ class RegexPatternValidationCheckTest { val stringFilePath = "domain/src/main/SomeController.kt" tempFolder.newFile("testfiles/$stringFilePath").writeText(prohibitedContent) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(REGEX_CHECK_FAILED_OUTPUT_INDICATOR) assertThat(outContent.toString().trim()) @@ -1645,9 +1536,7 @@ class RegexPatternValidationCheckTest { val stringFilePath = "domain/src/main/SomeController.kt" tempFolder.newFile("testfiles/$stringFilePath").writeText(prohibitedContent) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(REGEX_CHECK_FAILED_OUTPUT_INDICATOR) assertThat(outContent.toString().trim()) @@ -1671,9 +1560,7 @@ class RegexPatternValidationCheckTest { val stringFilePath = "domain/src/main/SomeController.kt" tempFolder.newFile("testfiles/$stringFilePath").writeText(prohibitedContent) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(REGEX_CHECK_FAILED_OUTPUT_INDICATOR) assertThat(outContent.toString().trim()) @@ -1694,9 +1581,7 @@ class RegexPatternValidationCheckTest { val stringFilePath = "domain/src/main/SomeController.kt" tempFolder.newFile("testfiles/$stringFilePath").writeText(prohibitedContent) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(REGEX_CHECK_FAILED_OUTPUT_INDICATOR) assertThat(outContent.toString().trim()) @@ -1715,9 +1600,7 @@ class RegexPatternValidationCheckTest { val stringFilePath = "domain/src/main/SomeController.kt" tempFolder.newFile("testfiles/$stringFilePath").writeText(prohibitedContent) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(REGEX_CHECK_FAILED_OUTPUT_INDICATOR) assertThat(outContent.toString().trim()) @@ -1747,9 +1630,7 @@ class RegexPatternValidationCheckTest { val fileContainsSupportLibraryImport = "test_layout.xml" tempFolder.newFile("testfiles/$fileContainsSupportLibraryImport").writeText(prohibitedContent) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(REGEX_CHECK_FAILED_OUTPUT_INDICATOR) assertThat(outContent.toString().trim()) @@ -1776,9 +1657,7 @@ class RegexPatternValidationCheckTest { val stringFilePath = "domain/src/test/SomeTest.kt" tempFolder.newFile("testfiles/$stringFilePath").writeText(prohibitedContent) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(REGEX_CHECK_FAILED_OUTPUT_INDICATOR) assertThat(outContent.toString().trim()) @@ -1798,9 +1677,7 @@ class RegexPatternValidationCheckTest { val stringFilePath = "data/src/main/SomeController.kt" tempFolder.newFile("testfiles/$stringFilePath").writeText(prohibitedContent) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(REGEX_CHECK_FAILED_OUTPUT_INDICATOR) assertThat(outContent.toString().trim()) @@ -1819,9 +1696,7 @@ class RegexPatternValidationCheckTest { val stringFilePath = "domain/src/main/BUILD" tempFolder.newFile("testfiles/$stringFilePath").writeText(prohibitedContent) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(REGEX_CHECK_FAILED_OUTPUT_INDICATOR) assertThat(outContent.toString().trim()) @@ -1840,9 +1715,7 @@ class RegexPatternValidationCheckTest { val stringFilePath = "domain/src/main/BUILD.bazel" tempFolder.newFile("testfiles/$stringFilePath").writeText(prohibitedContent) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(REGEX_CHECK_FAILED_OUTPUT_INDICATOR) assertThat(outContent.toString().trim()) @@ -1861,9 +1734,7 @@ class RegexPatternValidationCheckTest { val stringFilePath = "domain/src/main/SomeController.kt" tempFolder.newFile("testfiles/$stringFilePath").writeText(prohibitedContent) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(REGEX_CHECK_FAILED_OUTPUT_INDICATOR) assertThat(outContent.toString().trim()) @@ -1883,9 +1754,7 @@ class RegexPatternValidationCheckTest { val prohibitedFile = tempFolder.newFile("testfiles/data/src/main/TestActivity.kt") prohibitedFile.writeText(prohibitedContent + requiredContent) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(REGEX_CHECK_FAILED_OUTPUT_INDICATOR) assertThat(outContent.toString().trim()).isEqualTo( @@ -1916,9 +1785,7 @@ class RegexPatternValidationCheckTest { val stringFilePath = "app/src/main/res/values/color_palette.xml" tempFolder.newFile("testfiles/$stringFilePath").writeText(prohibitedContent) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } // Verify that all patterns are properly detected & prohibited. assertThat(exception).hasMessageThat().contains(REGEX_CHECK_FAILED_OUTPUT_INDICATOR) @@ -1966,9 +1833,7 @@ class RegexPatternValidationCheckTest { val stringFilePath = "app/src/main/res/values/color_defs.xml" tempFolder.newFile("testfiles/$stringFilePath").writeText(prohibitedContent) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } // Verify that all patterns are properly detected & prohibited. assertThat(exception).hasMessageThat().contains(REGEX_CHECK_FAILED_OUTPUT_INDICATOR) @@ -2014,9 +1879,7 @@ class RegexPatternValidationCheckTest { val stringFilePath = "app/src/main/res/values/component_colors.xml" tempFolder.newFile("testfiles/$stringFilePath").writeText(prohibitedContent) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } // Verify that all patterns are properly detected & prohibited. assertThat(exception).hasMessageThat().contains(REGEX_CHECK_FAILED_OUTPUT_INDICATOR) @@ -2061,9 +1924,7 @@ class RegexPatternValidationCheckTest { val stringFilePath = "app/src/main/res/values/color_defs.xml" tempFolder.newFile("testfiles/$stringFilePath").writeText(prohibitedContent) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } // Verify that all patterns are properly detected & prohibited. assertThat(exception).hasMessageThat().contains(REGEX_CHECK_FAILED_OUTPUT_INDICATOR) @@ -2125,9 +1986,7 @@ class RegexPatternValidationCheckTest { val stringFilePath = "app/src/main/res/values/component_colors.xml" tempFolder.newFile("testfiles/$stringFilePath").writeText(prohibitedContent) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } // Verify that all patterns are properly detected & prohibited. assertThat(exception).hasMessageThat().contains(REGEX_CHECK_FAILED_OUTPUT_INDICATOR) @@ -2173,9 +2032,7 @@ class RegexPatternValidationCheckTest { val stringFilePath = "app/src/main/res/values/color_palette.xml" tempFolder.newFile("testfiles/$stringFilePath").writeText(prohibitedContent) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } // Verify that all patterns are properly detected & prohibited. assertThat(exception).hasMessageThat().contains(REGEX_CHECK_FAILED_OUTPUT_INDICATOR) @@ -2220,9 +2077,7 @@ class RegexPatternValidationCheckTest { val stringFilePath = "app/src/main/res/values/color_defs.xml" tempFolder.newFile("testfiles/$stringFilePath").writeText(prohibitedContent) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } // Verify that all patterns are properly detected & prohibited. assertThat(exception).hasMessageThat().contains(REGEX_CHECK_FAILED_OUTPUT_INDICATOR) @@ -2265,9 +2120,7 @@ class RegexPatternValidationCheckTest { val stringFilePath = "app/src/main/res/values/component_colors.xml" tempFolder.newFile("testfiles/$stringFilePath").writeText(prohibitedContent) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } // Verify that all patterns are properly detected & prohibited. assertThat(exception).hasMessageThat().contains(REGEX_CHECK_FAILED_OUTPUT_INDICATOR) @@ -2313,9 +2166,7 @@ class RegexPatternValidationCheckTest { val stringFilePath = "app/src/main/res/layout/test_layout.xml" tempFolder.newFile("testfiles/$stringFilePath").writeText(prohibitedContent) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } // Verify that all patterns are properly detected & prohibited. assertThat(exception).hasMessageThat().contains(REGEX_CHECK_FAILED_OUTPUT_INDICATOR) @@ -2358,9 +2209,7 @@ class RegexPatternValidationCheckTest { val stringFilePath = "app/src/main/res/drawable/test_layout.xml" tempFolder.newFile("testfiles/$stringFilePath").writeText(prohibitedContent) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } // Verify that all patterns are properly detected & prohibited. assertThat(exception).hasMessageThat().contains(REGEX_CHECK_FAILED_OUTPUT_INDICATOR) @@ -2411,9 +2260,7 @@ class RegexPatternValidationCheckTest { tempFolder.newFile("testfiles/$stringFilePath5").writeText(prohibitedContent) tempFolder.newFile("testfiles/$stringFilePath6").writeText(prohibitedContent) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } // Verify that all patterns are properly detected & prohibited. assertThat(exception).hasMessageThat().contains(REGEX_CHECK_FAILED_OUTPUT_INDICATOR) @@ -2468,9 +2315,7 @@ class RegexPatternValidationCheckTest { val stringFilePath = "app/src/main/res/values/color_palette.xml" tempFolder.newFile("testfiles/$stringFilePath").writeText(prohibitedContent) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } // Verify that all patterns are properly detected & prohibited. assertThat(exception).hasMessageThat().contains(REGEX_CHECK_FAILED_OUTPUT_INDICATOR) @@ -2490,9 +2335,7 @@ class RegexPatternValidationCheckTest { val stringFilePath = "app/src/main/activity/HomeActivity.kt" tempFolder.newFile("testfiles/$stringFilePath") - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(REGEX_CHECK_FAILED_OUTPUT_INDICATOR) assertThat(outContent.toString().trim()) @@ -2522,9 +2365,7 @@ class RegexPatternValidationCheckTest { val stringFilePath = "app/src/main/activity/HomeActivityTest.kt" tempFolder.newFile("testfiles/$stringFilePath") - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(REGEX_CHECK_FAILED_OUTPUT_INDICATOR) assertThat(outContent.toString().trim()) @@ -2558,9 +2399,7 @@ class RegexPatternValidationCheckTest { val stringFilePath = "app/src/main/java/org/oppia/android/SomeInitializer.kt" tempFolder.newFile("testfiles/$stringFilePath").writeText(prohibitedContent) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } // Verify that all patterns are properly detected & prohibited. assertThat(exception).hasMessageThat().contains(REGEX_CHECK_FAILED_OUTPUT_INDICATOR) @@ -2583,9 +2422,7 @@ class RegexPatternValidationCheckTest { val stringFilePath = "app/src/main/java/org/oppia/android/TestPresenter.kt" tempFolder.newFile("testfiles/$stringFilePath").writeText(prohibitedContent) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(REGEX_CHECK_FAILED_OUTPUT_INDICATOR) @@ -2608,9 +2445,7 @@ class RegexPatternValidationCheckTest { val stringFilePath = "app/src/main/java/org/oppia/android/TestPresenter.kt" tempFolder.newFile("testfiles/$stringFilePath").writeText(prohibitedContent) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(REGEX_CHECK_FAILED_OUTPUT_INDICATOR) @@ -2633,9 +2468,7 @@ class RegexPatternValidationCheckTest { val stringFilePath = "app/src/main/java/org/oppia/android/TestPresenter.kt" tempFolder.newFile("testfiles/$stringFilePath").writeText(prohibitedContent) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(REGEX_CHECK_FAILED_OUTPUT_INDICATOR) @@ -2663,7 +2496,7 @@ class RegexPatternValidationCheckTest { val stringFilePath = "app/src/main/java/org/oppia/android/TestPresenter.kt" tempFolder.newFile("testfiles/$stringFilePath").writeText(prohibitedContent) - val exception = assertThrows(Exception::class) { runScript() } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(REGEX_CHECK_FAILED_OUTPUT_INDICATOR) assertThat(outContent.toString().trim()) @@ -2687,7 +2520,7 @@ class RegexPatternValidationCheckTest { val stringFilePath = "app/src/main/java/org/oppia/android/TestPresenter.kt" tempFolder.newFile("testfiles/$stringFilePath").writeText(prohibitedContent) - val exception = assertThrows(Exception::class) { runScript() } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(REGEX_CHECK_FAILED_OUTPUT_INDICATOR) assertThat(outContent.toString().trim()) @@ -2712,7 +2545,7 @@ class RegexPatternValidationCheckTest { val stringFilePath = "app/src/main/java/org/oppia/android/TestPresenter.kt" tempFolder.newFile("testfiles/$stringFilePath").writeText(prohibitedContent) - val exception = assertThrows(Exception::class) { runScript() } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(REGEX_CHECK_FAILED_OUTPUT_INDICATOR) assertThat(outContent.toString().trim()) @@ -2732,7 +2565,7 @@ class RegexPatternValidationCheckTest { /** Content here.*/ /** Content here. **/ /** Correct KDoc. */ - + /* * Incorrect block comment. **/ @@ -2750,7 +2583,7 @@ class RegexPatternValidationCheckTest { val stringFilePath = "app/src/main/java/org/oppia/android/TestPresenter.kt" tempFolder.newFile("testfiles/$stringFilePath").writeText(prohibitedContent) - val exception = assertThrows(Exception::class) { runScript() } + val exception = assertThrows() { runScript() } // Two patterns are combined in this check because they slightly overlap in affected cases (e.g. // line 2 fails due to three different checks), and one pattern is subequently needed for the @@ -2782,7 +2615,7 @@ class RegexPatternValidationCheckTest { val stringFilePath = "app/src/main/java/org/oppia/android/TestPresenter.kt" tempFolder.newFile("testfiles/$stringFilePath").writeText(prohibitedContent) - val exception = assertThrows(Exception::class) { runScript() } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(REGEX_CHECK_FAILED_OUTPUT_INDICATOR) assertThat(outContent.toString().trim()) @@ -2812,7 +2645,7 @@ class RegexPatternValidationCheckTest { val stringFilePath = "app/src/main/java/org/oppia/android/TestPresenter.kt" tempFolder.newFile("testfiles/$stringFilePath").writeText(prohibitedContent) - val exception = assertThrows(Exception::class) { runScript() } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(REGEX_CHECK_FAILED_OUTPUT_INDICATOR) assertThat(outContent.toString().trim()) @@ -2837,7 +2670,7 @@ class RegexPatternValidationCheckTest { val stringFilePath = "app/src/main/java/org/oppia/android/TestPresenter.kt" tempFolder.newFile("testfiles/$stringFilePath").writeText(prohibitedContent) - val exception = assertThrows(Exception::class) { runScript() } + val exception = assertThrows() { runScript() } // 'Punctuation' currently assumes a period. assertThat(exception).hasMessageThat().contains(REGEX_CHECK_FAILED_OUTPUT_INDICATOR) @@ -2851,6 +2684,50 @@ class RegexPatternValidationCheckTest { ) } + @Test + fun testFileContent_referencesActivityTestRule_fileContentIsNotCorrect() { + val prohibitedContent = + """ + import androidx.test.rule.ActivityTestRule + """.trimIndent() + tempFolder.newFolder("testfiles", "app", "src", "test", "java", "org", "oppia", "android") + val stringFilePath = "app/src/test/java/org/oppia/android/PresenterTest.kt" + tempFolder.newFile("testfiles/$stringFilePath").writeText(prohibitedContent) + + val exception = assertThrows() { runScript() } + + assertThat(exception).hasMessageThat().contains(REGEX_CHECK_FAILED_OUTPUT_INDICATOR) + assertThat(outContent.toString().trim()) + .isEqualTo( + """ + $stringFilePath:1: $activityTestRuleShouldNotBeUsed + $wikiReferenceNote + """.trimIndent() + ) + } + + @Test + fun testFileContent_referencesActivityScenarioRule_fileContentIsNotCorrect() { + val prohibitedContent = + """ + import androidx.test.ext.junit.rules.ActivityScenarioRule + """.trimIndent() + tempFolder.newFolder("testfiles", "app", "src", "test", "java", "org", "oppia", "android") + val stringFilePath = "app/src/test/java/org/oppia/android/PresenterTest.kt" + tempFolder.newFile("testfiles/$stringFilePath").writeText(prohibitedContent) + + val exception = assertThrows() { runScript() } + + assertThat(exception).hasMessageThat().contains(REGEX_CHECK_FAILED_OUTPUT_INDICATOR) + assertThat(outContent.toString().trim()) + .isEqualTo( + """ + $stringFilePath:1: $activityScenarioRuleShouldNotBeUsed + $wikiReferenceNote + """.trimIndent() + ) + } + /** Runs the regex_pattern_validation_check. */ private fun runScript() { main(File(tempFolder.root, "testfiles").absolutePath) diff --git a/scripts/src/javatests/org/oppia/android/scripts/testfile/TestFileCheckTest.kt b/scripts/src/javatests/org/oppia/android/scripts/testfile/TestFileCheckTest.kt index a0fc700b720..1b6ded9633a 100644 --- a/scripts/src/javatests/org/oppia/android/scripts/testfile/TestFileCheckTest.kt +++ b/scripts/src/javatests/org/oppia/android/scripts/testfile/TestFileCheckTest.kt @@ -52,15 +52,13 @@ class TestFileCheckTest { tempFolder.newFile("testfiles/ProdFile1Test.kt") tempFolder.newFile("testfiles/ProdFile2.kt") - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(TEST_FILE_CHECK_FAILED_OUTPUT_INDICATOR) val failureMessage = """ File ${retrieveTestFilesDirectoryPath()}/ProdFile2.kt $errorMessage - + $wikiReferenceNote """.trimIndent() assertThat(outContent.toString().trim()).isEqualTo(failureMessage) @@ -73,16 +71,14 @@ class TestFileCheckTest { tempFolder.newFile("testfiles/ProdFile2.kt") tempFolder.newFile("testfiles/ProdFile3.kt") - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(TEST_FILE_CHECK_FAILED_OUTPUT_INDICATOR) val failureMessage = """ File ${retrieveTestFilesDirectoryPath()}/ProdFile2.kt does not have a corresponding test file. File ${retrieveTestFilesDirectoryPath()}/ProdFile3.kt does not have a corresponding test file. - + $wikiReferenceNote """.trimIndent() assertThat(outContent.toString().trim()).isEqualTo(failureMessage) @@ -95,16 +91,14 @@ class TestFileCheckTest { tempFolder.newFile("testfiles/ProdFile3.kt") tempFolder.newFile("testfiles/ProdFile2.kt") - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(TEST_FILE_CHECK_FAILED_OUTPUT_INDICATOR) val failureMessage = """ File ${retrieveTestFilesDirectoryPath()}/ProdFile2.kt does not have a corresponding test file. File ${retrieveTestFilesDirectoryPath()}/ProdFile3.kt does not have a corresponding test file. - + $wikiReferenceNote """.trimIndent() assertThat(outContent.toString().trim()).isEqualTo(failureMessage) diff --git a/scripts/src/javatests/org/oppia/android/scripts/testing/TestBazelWorkspaceTest.kt b/scripts/src/javatests/org/oppia/android/scripts/testing/TestBazelWorkspaceTest.kt index 9bec557f4ac..e20b633bbc9 100644 --- a/scripts/src/javatests/org/oppia/android/scripts/testing/TestBazelWorkspaceTest.kt +++ b/scripts/src/javatests/org/oppia/android/scripts/testing/TestBazelWorkspaceTest.kt @@ -23,9 +23,7 @@ import java.lang.IllegalStateException // Function name: test names are conventionally named with underscores. @Suppress("FunctionName") class TestBazelWorkspaceTest { - @Rule - @JvmField - var tempFolder = TemporaryFolder() + @field:[Rule JvmField] val tempFolder = TemporaryFolder() @Test fun testCreateTestUtility_doesNotImmediatelyCreateAnyFiles() { @@ -37,7 +35,7 @@ class TestBazelWorkspaceTest { } @Test - fun testInitEmptyWorkspace_emptyDirectory_createsEmptyWorkspace() { + fun testInitEmptyWorkspace_emptyDirectory_createsEmptyWorkspaceFile() { val testBazelWorkspace = TestBazelWorkspace(tempFolder) testBazelWorkspace.initEmptyWorkspace() @@ -48,6 +46,30 @@ class TestBazelWorkspaceTest { assertThat(workspaceFile.readLines()).isEmpty() } + @Test + fun testInitEmptyWorkspace_emptyDirectory_createsBazelVersionFile() { + val testBazelWorkspace = TestBazelWorkspace(tempFolder) + + testBazelWorkspace.initEmptyWorkspace() + + // A .bazelversion file should now exist with the correct version. + val bazelVersionFile = File(tempFolder.root, ".bazelversion") + assertThat(bazelVersionFile.exists()).isTrue() + assertThat(bazelVersionFile.readText().trim()).isEqualTo("4.0.0") + } + + @Test + fun testInitEmptyWorkspace_emptyDirectory_createsBazelRcFile() { + val testBazelWorkspace = TestBazelWorkspace(tempFolder) + + testBazelWorkspace.initEmptyWorkspace() + + // A .bazelversion file should now exist with the correct flags. + val bazelRcFile = File(tempFolder.root, ".bazelrc") + assertThat(bazelRcFile.exists()).isTrue() + assertThat(bazelRcFile.readText().trim()).isEqualTo("--noenable_bzlmod") + } + @Test fun testInitEmptyWorkspace_fileCreationFails_throwsAssertionError() { val testBazelWorkspace = TestBazelWorkspace(tempFolder) @@ -59,7 +81,7 @@ class TestBazelWorkspaceTest { // Verify that when initializing an empty workspace fails, an AssertionError is thrown (which // would fail for calling tests). - assertThrows(AssertionError::class) { testBazelWorkspace.initEmptyWorkspace() } + assertThrows() { testBazelWorkspace.initEmptyWorkspace() } } @Test @@ -85,11 +107,34 @@ class TestBazelWorkspaceTest { ) val workspaceFile = testBazelWorkspace.workspaceFile - val workspaceContent = workspaceFile.readAsJoinedString() - + val workspaceContent = workspaceFile.readText() assertThat(workspaceContent).contains("com.android.support:support-annotations:28.0.0") } + @Test + fun testSetupWorkspaceForRulesJvmExternal_withOneDep_setsUpBazelVersion() { + val testBazelWorkspace = TestBazelWorkspace(tempFolder) + + testBazelWorkspace.setUpWorkspaceForRulesJvmExternal( + listOf("com.android.support:support-annotations:28.0.0") + ) + + val bazelVersionContent = tempFolder.getBazelVersionFile().readText().trim() + assertThat(bazelVersionContent).isEqualTo("4.0.0") + } + + @Test + fun testSetupWorkspaceForRulesJvmExternal_withOneDep_setsUpBazelRc() { + val testBazelWorkspace = TestBazelWorkspace(tempFolder) + + testBazelWorkspace.setUpWorkspaceForRulesJvmExternal( + listOf("com.android.support:support-annotations:28.0.0") + ) + + val bazelRcContent = tempFolder.getBazelRcFile().readText().trim() + assertThat(bazelRcContent).isEqualTo("--noenable_bzlmod") + } + @Test fun testSetupWorkspaceForRulesJvmExternal_withTwoDeps_containsCorrectList() { val testBazelWorkspace = TestBazelWorkspace(tempFolder) @@ -102,7 +147,7 @@ class TestBazelWorkspaceTest { ) val workspaceFile = testBazelWorkspace.workspaceFile - val workspaceContent = workspaceFile.readAsJoinedString() + val workspaceContent = workspaceFile.readText() assertThat(workspaceContent).contains("com.android.support:support-annotations:28.0.0") assertThat(workspaceContent).contains("io.fabric.sdk.android:fabric:1.4.7") @@ -122,7 +167,7 @@ class TestBazelWorkspaceTest { ) val workspaceFile = testBazelWorkspace.workspaceFile - val workspaceContent = workspaceFile.readAsJoinedString() + val workspaceContent = workspaceFile.readText() assertThat(workspaceContent).contains("com.android.support:support-annotations:28.0.0") assertThat(workspaceContent).contains("io.fabric.sdk.android:fabric:1.4.7") @@ -143,7 +188,7 @@ class TestBazelWorkspaceTest { ) val workspaceFile = testBazelWorkspace.workspaceFile - val workspaceContent = workspaceFile.readAsJoinedString() + val workspaceContent = workspaceFile.readText() assertThat(workspaceContent).contains("com.android.support:support-annotations:28.0.0") assertThat(workspaceContent).doesNotContain("io.fabric.sdk.android:fabric:1.4.7") @@ -158,7 +203,7 @@ class TestBazelWorkspaceTest { ) val workspaceFile = testBazelWorkspace.workspaceFile - val workspaceContent = workspaceFile.readAsJoinedString() + val workspaceContent = workspaceFile.readText() assertThat(workspaceContent).contains( """ @@ -212,10 +257,9 @@ class TestBazelWorkspaceTest { @Test fun testAddTestToBuildFile_reusedTestName_throwsException() { val testBazelWorkspace = TestBazelWorkspace(tempFolder) - testBazelWorkspace.initEmptyWorkspace() testBazelWorkspace.createTest(testName = "FirstTest") - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { testBazelWorkspace.addTestToBuildFile( testName = "FirstTest", testFile = tempFolder.newFile("FirstTestOther.kt") @@ -228,21 +272,45 @@ class TestBazelWorkspaceTest { @Test fun testAddTestToBuildFile_firstTest_setsUpWorkspace() { val testBazelWorkspace = TestBazelWorkspace(tempFolder) - testBazelWorkspace.initEmptyWorkspace() testBazelWorkspace.addTestToBuildFile( testName = "FirstTest", testFile = tempFolder.newFile("FirstTest.kt") ) - val workspaceContent = tempFolder.getWorkspaceFile().readAsJoinedString() + val workspaceContent = tempFolder.getWorkspaceFile().readText() assertThat(workspaceContent).contains("kt_register_toolchains()") } + @Test + fun testAddTestToBuildFile_firstTest_setsUpBazelVersion() { + val testBazelWorkspace = TestBazelWorkspace(tempFolder) + + testBazelWorkspace.addTestToBuildFile( + testName = "FirstTest", + testFile = tempFolder.newFile("FirstTest.kt") + ) + + val bazelVersionContent = tempFolder.getBazelVersionFile().readText().trim() + assertThat(bazelVersionContent).isEqualTo("4.0.0") + } + + @Test + fun testAddTestToBuildFile_firstTest_setsUpBazelRc() { + val testBazelWorkspace = TestBazelWorkspace(tempFolder) + + testBazelWorkspace.addTestToBuildFile( + testName = "FirstTest", + testFile = tempFolder.newFile("FirstTest.kt") + ) + + val bazelRcContent = tempFolder.getBazelRcFile().readText().trim() + assertThat(bazelRcContent).isEqualTo("--noenable_bzlmod") + } + @Test fun testAddTestToBuildFile_firstTest_returnsTestBuildWorkspaceFiles() { val testBazelWorkspace = TestBazelWorkspace(tempFolder) - testBazelWorkspace.initEmptyWorkspace() val files = testBazelWorkspace.addTestToBuildFile( testName = "FirstTest", @@ -255,7 +323,6 @@ class TestBazelWorkspaceTest { @Test fun testAddTestToBuildFile_secondTest_doesNotChangeWorkspace() { val testBazelWorkspace = TestBazelWorkspace(tempFolder) - testBazelWorkspace.initEmptyWorkspace() testBazelWorkspace.addTestToBuildFile( testName = "FirstTest", testFile = tempFolder.newFile("FirstTest.kt") @@ -275,14 +342,13 @@ class TestBazelWorkspaceTest { @Test fun testAddTestToBuildFile_firstTest_initializesBuildFileOnlyForTests() { val testBazelWorkspace = TestBazelWorkspace(tempFolder) - testBazelWorkspace.initEmptyWorkspace() testBazelWorkspace.addTestToBuildFile( testName = "FirstTest", testFile = tempFolder.newFile("FirstTest.kt") ) - val buildContent = testBazelWorkspace.rootBuildFile.readAsJoinedString() + val buildContent = testBazelWorkspace.rootBuildFile.readText() assertThat(buildContent.countMatches("load\\(.+?kt_jvm_test")).isEqualTo(1) assertThat(buildContent.countMatches("load\\(.+?kt_jvm_library")).isEqualTo(0) } @@ -290,7 +356,6 @@ class TestBazelWorkspaceTest { @Test fun testAddTestToBuildFile_secondTest_doesNotReinitializeBuildFile() { val testBazelWorkspace = TestBazelWorkspace(tempFolder) - testBazelWorkspace.initEmptyWorkspace() testBazelWorkspace.addTestToBuildFile( testName = "FirstTest", testFile = tempFolder.newFile("FirstTest.kt") @@ -302,14 +367,13 @@ class TestBazelWorkspaceTest { ) // The load line should only exist once in the file. - val buildContent = testBazelWorkspace.rootBuildFile.readAsJoinedString() + val buildContent = testBazelWorkspace.rootBuildFile.readText() assertThat(buildContent.countMatches("load\\(.+?kt_jvm_test")).isEqualTo(1) } @Test fun testAddTestToBuildFile_unusedTestName_appendsBasicTest() { val testBazelWorkspace = TestBazelWorkspace(tempFolder) - testBazelWorkspace.initEmptyWorkspace() testBazelWorkspace.addTestToBuildFile( testName = "FirstTest", @@ -317,7 +381,7 @@ class TestBazelWorkspaceTest { ) // There should be 1 test in the file with empty deps and correct source. - val buildContent = testBazelWorkspace.rootBuildFile.readAsJoinedString() + val buildContent = testBazelWorkspace.rootBuildFile.readText() assertThat(buildContent.countMatches("kt_jvm_test\\(")).isEqualTo(1) assertThat(buildContent).contains("srcs = [\"FirstTest.kt\"]") assertThat(buildContent).contains("deps = []") @@ -326,7 +390,6 @@ class TestBazelWorkspaceTest { @Test fun testAddTestToBuildFile_unusedTestName_withGeneratedDep_configuresBuildFileForLibraries() { val testBazelWorkspace = TestBazelWorkspace(tempFolder) - testBazelWorkspace.initEmptyWorkspace() testBazelWorkspace.addTestToBuildFile( testName = "FirstTest", @@ -335,14 +398,13 @@ class TestBazelWorkspaceTest { ) // The build file should now be initialized for libraries. - val buildContent = testBazelWorkspace.rootBuildFile.readAsJoinedString() + val buildContent = testBazelWorkspace.rootBuildFile.readText() assertThat(buildContent.countMatches("load\\(.+?kt_jvm_library")).isEqualTo(1) } @Test fun testAddTestToBuildFile_unusedTestName_withGeneratedDep_appendsLibraryAndTestWithDep() { val testBazelWorkspace = TestBazelWorkspace(tempFolder) - testBazelWorkspace.initEmptyWorkspace() testBazelWorkspace.addTestToBuildFile( testName = "FirstTest", @@ -351,7 +413,7 @@ class TestBazelWorkspaceTest { ) // Ensure the test is arranged correctly. - val buildContent = testBazelWorkspace.rootBuildFile.readAsJoinedString() + val buildContent = testBazelWorkspace.rootBuildFile.readText() assertThat(buildContent.countMatches("kt_jvm_test\\(")).isEqualTo(1) assertThat(buildContent).contains("srcs = [\"FirstTest.kt\"]") assertThat(buildContent).contains("deps = [\"//:FirstTestDependency_lib\",]") @@ -363,7 +425,6 @@ class TestBazelWorkspaceTest { @Test fun testAddTestToBuildFile_firstTest_withGeneratedDep_returnsTestDepBuildWorkspaceFiles() { val testBazelWorkspace = TestBazelWorkspace(tempFolder) - testBazelWorkspace.initEmptyWorkspace() val files = testBazelWorkspace.addTestToBuildFile( testName = "FirstTest", @@ -378,7 +439,6 @@ class TestBazelWorkspaceTest { @Test fun testAddTestToBuildFile_secondTest_withGeneratedDep_returnsTestDepBuildWorkspaceFiles() { val testBazelWorkspace = TestBazelWorkspace(tempFolder) - testBazelWorkspace.initEmptyWorkspace() testBazelWorkspace.addTestToBuildFile( testName = "FirstTest", testFile = tempFolder.newFile("FirstTest.kt") @@ -397,7 +457,6 @@ class TestBazelWorkspaceTest { @Test fun testAddTestToBuildFile_unusedTestName_withExtraDep_appendsTestWithDep() { val testBazelWorkspace = TestBazelWorkspace(tempFolder) - testBazelWorkspace.initEmptyWorkspace() testBazelWorkspace.addTestToBuildFile( testName = "FirstTest", @@ -406,7 +465,7 @@ class TestBazelWorkspaceTest { ) // Ensure the test is arranged correctly. - val buildContent = testBazelWorkspace.rootBuildFile.readAsJoinedString() + val buildContent = testBazelWorkspace.rootBuildFile.readText() assertThat(buildContent.countMatches("kt_jvm_test\\(")).isEqualTo(1) assertThat(buildContent).contains("srcs = [\"FirstTest.kt\"]") assertThat(buildContent).contains("deps = [\"//:ExtraDep\",]") @@ -415,7 +474,6 @@ class TestBazelWorkspaceTest { @Test fun testAddTestToBuildFile_unusedTestName_withSubpackage_appendsToSubpackageBuildFile() { val testBazelWorkspace = TestBazelWorkspace(tempFolder) - testBazelWorkspace.initEmptyWorkspace() tempFolder.newFolder("subpackage") testBazelWorkspace.addTestToBuildFile( @@ -437,7 +495,6 @@ class TestBazelWorkspaceTest { @Test fun testAddTestToBuildFile_unusedTestName_withSubpackage_returnsNewBuildAndTestFiles() { val testBazelWorkspace = TestBazelWorkspace(tempFolder) - testBazelWorkspace.initEmptyWorkspace() tempFolder.newFolder("subpackage") val files = testBazelWorkspace.addTestToBuildFile( @@ -453,7 +510,6 @@ class TestBazelWorkspaceTest { @Test fun testAddTestToBuildFile_unusedTestName_withMultipleSubpackages_returnsNewBuildAndTestFiles() { val testBazelWorkspace = TestBazelWorkspace(tempFolder) - testBazelWorkspace.initEmptyWorkspace() val subpackage = "subpackage.first.second" tempFolder.newFolder(*(subpackage.split(".")).toTypedArray()) val files = testBazelWorkspace.addTestToBuildFile( @@ -471,7 +527,6 @@ class TestBazelWorkspaceTest { @Test fun testAddTestToBuildFile_unusedTestName_withGeneratedAndExtraDeps_includesBothInTestDeps() { val testBazelWorkspace = TestBazelWorkspace(tempFolder) - testBazelWorkspace.initEmptyWorkspace() testBazelWorkspace.addTestToBuildFile( testName = "FirstTest", @@ -481,7 +536,7 @@ class TestBazelWorkspaceTest { ) // Both dependencies should be included in the test's deps. - val buildContent = testBazelWorkspace.rootBuildFile.readAsJoinedString() + val buildContent = testBazelWorkspace.rootBuildFile.readText() assertThat(buildContent.countMatches("kt_jvm_test\\(")).isEqualTo(1) assertThat(buildContent).contains("deps = [\"//:FirstTestDependency_lib\",\"//:ExtraDep\",]") } @@ -489,10 +544,9 @@ class TestBazelWorkspaceTest { @Test fun testCreateTest_reusedTestName_throwsException() { val testBazelWorkspace = TestBazelWorkspace(tempFolder) - testBazelWorkspace.initEmptyWorkspace() testBazelWorkspace.createTest(testName = "FirstTest") - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { testBazelWorkspace.createTest(testName = "FirstTest") } @@ -502,18 +556,36 @@ class TestBazelWorkspaceTest { @Test fun testCreateTest_firstTest_setsUpWorkspace() { val testBazelWorkspace = TestBazelWorkspace(tempFolder) - testBazelWorkspace.initEmptyWorkspace() testBazelWorkspace.createTest(testName = "FirstTest") - val workspaceContent = tempFolder.getWorkspaceFile().readAsJoinedString() + val workspaceContent = tempFolder.getWorkspaceFile().readText() assertThat(workspaceContent).contains("kt_register_toolchains()") } + @Test + fun testCreateTest_firstTest_setsUpBazelVersion() { + val testBazelWorkspace = TestBazelWorkspace(tempFolder) + + testBazelWorkspace.createTest(testName = "FirstTest") + + val bazelVersionContent = tempFolder.getBazelVersionFile().readText().trim() + assertThat(bazelVersionContent).isEqualTo("4.0.0") + } + + @Test + fun testCreateTest_firstTest_setsUpBazelRc() { + val testBazelWorkspace = TestBazelWorkspace(tempFolder) + + testBazelWorkspace.createTest(testName = "FirstTest") + + val bazelRcContent = tempFolder.getBazelRcFile().readText().trim() + assertThat(bazelRcContent).isEqualTo("--noenable_bzlmod") + } + @Test fun testCreateTest_firstTest_returnsTestBuildWorkspaceFiles() { val testBazelWorkspace = TestBazelWorkspace(tempFolder) - testBazelWorkspace.initEmptyWorkspace() val files = testBazelWorkspace.createTest(testName = "FirstTest") @@ -523,7 +595,6 @@ class TestBazelWorkspaceTest { @Test fun testCreateTest_secondTest_doesNotChangeWorkspace() { val testBazelWorkspace = TestBazelWorkspace(tempFolder) - testBazelWorkspace.initEmptyWorkspace() testBazelWorkspace.createTest(testName = "FirstTest") val workspaceSize = tempFolder.getWorkspaceFile().length() @@ -537,11 +608,10 @@ class TestBazelWorkspaceTest { @Test fun testCreateTest_firstTest_initializesBuildFileOnlyForTests() { val testBazelWorkspace = TestBazelWorkspace(tempFolder) - testBazelWorkspace.initEmptyWorkspace() testBazelWorkspace.createTest(testName = "FirstTest") - val buildContent = testBazelWorkspace.rootBuildFile.readAsJoinedString() + val buildContent = testBazelWorkspace.rootBuildFile.readText() assertThat(buildContent.countMatches("load\\(.+?kt_jvm_test")).isEqualTo(1) assertThat(buildContent.countMatches("load\\(.+?kt_jvm_library")).isEqualTo(0) } @@ -549,25 +619,23 @@ class TestBazelWorkspaceTest { @Test fun testCreateTest_secondTest_doesNotReinitializeBuildFile() { val testBazelWorkspace = TestBazelWorkspace(tempFolder) - testBazelWorkspace.initEmptyWorkspace() testBazelWorkspace.createTest(testName = "FirstTest") testBazelWorkspace.createTest(testName = "SecondTest") // The load line should only exist once in the file. - val buildContent = testBazelWorkspace.rootBuildFile.readAsJoinedString() + val buildContent = testBazelWorkspace.rootBuildFile.readText() assertThat(buildContent.countMatches("load\\(.+?kt_jvm_test")).isEqualTo(1) } @Test fun testCreateTest_unusedTestName_appendsBasicTest() { val testBazelWorkspace = TestBazelWorkspace(tempFolder) - testBazelWorkspace.initEmptyWorkspace() testBazelWorkspace.createTest(testName = "FirstTest") // There should be 1 test in the file with empty deps and correct source. - val buildContent = testBazelWorkspace.rootBuildFile.readAsJoinedString() + val buildContent = testBazelWorkspace.rootBuildFile.readText() assertThat(buildContent.countMatches("kt_jvm_test\\(")).isEqualTo(1) assertThat(buildContent).contains("srcs = [\"FirstTest.kt\"]") assertThat(buildContent).contains("deps = []") @@ -576,7 +644,6 @@ class TestBazelWorkspaceTest { @Test fun testCreateTest_unusedTestName_withGeneratedDep_configuresBuildFileForLibraries() { val testBazelWorkspace = TestBazelWorkspace(tempFolder) - testBazelWorkspace.initEmptyWorkspace() testBazelWorkspace.createTest( testName = "FirstTest", @@ -584,14 +651,13 @@ class TestBazelWorkspaceTest { ) // The build file should now be initialized for libraries. - val buildContent = testBazelWorkspace.rootBuildFile.readAsJoinedString() + val buildContent = testBazelWorkspace.rootBuildFile.readText() assertThat(buildContent.countMatches("load\\(.+?kt_jvm_library")).isEqualTo(1) } @Test fun testCreateTest_unusedTestName_withGeneratedDep_appendsLibraryAndTestWithDep() { val testBazelWorkspace = TestBazelWorkspace(tempFolder) - testBazelWorkspace.initEmptyWorkspace() testBazelWorkspace.createTest( testName = "FirstTest", @@ -599,7 +665,7 @@ class TestBazelWorkspaceTest { ) // Ensure the test is arranged correctly. - val buildContent = testBazelWorkspace.rootBuildFile.readAsJoinedString() + val buildContent = testBazelWorkspace.rootBuildFile.readText() assertThat(buildContent.countMatches("kt_jvm_test\\(")).isEqualTo(1) assertThat(buildContent).contains("srcs = [\"FirstTest.kt\"]") assertThat(buildContent).contains("deps = [\"//:FirstTestDependency_lib\",]") @@ -611,7 +677,6 @@ class TestBazelWorkspaceTest { @Test fun testCreateTest_firstTest_withGeneratedDep_returnsTestDepBuildWorkspaceFiles() { val testBazelWorkspace = TestBazelWorkspace(tempFolder) - testBazelWorkspace.initEmptyWorkspace() val files = testBazelWorkspace.createTest( testName = "FirstTest", @@ -625,7 +690,6 @@ class TestBazelWorkspaceTest { @Test fun testCreateTest_secondTest_withGeneratedDep_returnsTestDepBuildWorkspaceFiles() { val testBazelWorkspace = TestBazelWorkspace(tempFolder) - testBazelWorkspace.initEmptyWorkspace() testBazelWorkspace.createTest(testName = "FirstTest") val files = testBazelWorkspace.createTest( @@ -640,12 +704,11 @@ class TestBazelWorkspaceTest { @Test fun testCreateTest_unusedTestName_withExtraDep_appendsTestWithDep() { val testBazelWorkspace = TestBazelWorkspace(tempFolder) - testBazelWorkspace.initEmptyWorkspace() testBazelWorkspace.createTest(testName = "FirstTest", withExtraDependency = "//:ExtraDep") // Ensure the test is arranged correctly. - val buildContent = testBazelWorkspace.rootBuildFile.readAsJoinedString() + val buildContent = testBazelWorkspace.rootBuildFile.readText() assertThat(buildContent.countMatches("kt_jvm_test\\(")).isEqualTo(1) assertThat(buildContent).contains("srcs = [\"FirstTest.kt\"]") assertThat(buildContent).contains("deps = [\"//:ExtraDep\",]") @@ -654,7 +717,6 @@ class TestBazelWorkspaceTest { @Test fun testCreateTest_unusedTestName_withSubpackage_appendsToSubpackageBuildFile() { val testBazelWorkspace = TestBazelWorkspace(tempFolder) - testBazelWorkspace.initEmptyWorkspace() testBazelWorkspace.createTest(testName = "FirstTest", subpackage = "subpackage") @@ -671,7 +733,6 @@ class TestBazelWorkspaceTest { @Test fun testCreateTest_unusedTestName_withSubpackage_returnsNewBuildAndTestFiles() { val testBazelWorkspace = TestBazelWorkspace(tempFolder) - testBazelWorkspace.initEmptyWorkspace() val files = testBazelWorkspace.createTest(testName = "FirstTest", subpackage = "subpackage") @@ -682,7 +743,6 @@ class TestBazelWorkspaceTest { @Test fun testCreateTest_unusedTestName_withMultipleSubpackages_returnsNewBuildAndTestFiles() { val testBazelWorkspace = TestBazelWorkspace(tempFolder) - testBazelWorkspace.initEmptyWorkspace() val files = testBazelWorkspace.createTest( testName = "FirstTest", @@ -698,7 +758,6 @@ class TestBazelWorkspaceTest { @Test fun testCreateTest_unusedTestName_withGeneratedAndExtraDeps_includesBothInTestDeps() { val testBazelWorkspace = TestBazelWorkspace(tempFolder) - testBazelWorkspace.initEmptyWorkspace() testBazelWorkspace.createTest( testName = "FirstTest", @@ -707,7 +766,7 @@ class TestBazelWorkspaceTest { ) // Both dependencies should be included in the test's deps. - val buildContent = testBazelWorkspace.rootBuildFile.readAsJoinedString() + val buildContent = testBazelWorkspace.rootBuildFile.readText() assertThat(buildContent.countMatches("kt_jvm_test\\(")).isEqualTo(1) assertThat(buildContent).contains("deps = [\"//:FirstTestDependency_lib\",\"//:ExtraDep\",]") } @@ -715,24 +774,42 @@ class TestBazelWorkspaceTest { @Test fun testCreateLibrary_firstLib_unusedName_configuresWorkspaceAndBuild() { val testBazelWorkspace = TestBazelWorkspace(tempFolder) - testBazelWorkspace.initEmptyWorkspace() testBazelWorkspace.createLibrary(dependencyName = "ExampleDep") - val workspaceContent = tempFolder.getWorkspaceFile().readAsJoinedString() - val buildContent = testBazelWorkspace.rootBuildFile.readAsJoinedString() + val workspaceContent = tempFolder.getWorkspaceFile().readText() + val buildContent = testBazelWorkspace.rootBuildFile.readText() assertThat(workspaceContent).contains("kt_register_toolchains()") assertThat(buildContent.countMatches("load\\(.+?kt_jvm_library")).isEqualTo(1) } + @Test + fun testCreateLibrary_firstLib_unusedName_setsUpBazelVersion() { + val testBazelWorkspace = TestBazelWorkspace(tempFolder) + + testBazelWorkspace.createLibrary(dependencyName = "ExampleDep") + + val bazelVersionContent = tempFolder.getBazelVersionFile().readText().trim() + assertThat(bazelVersionContent).isEqualTo("4.0.0") + } + + @Test + fun testCreateLibrary_firstLib_unusedName_setsUpBazelRc() { + val testBazelWorkspace = TestBazelWorkspace(tempFolder) + + testBazelWorkspace.createLibrary(dependencyName = "ExampleDep") + + val bazelRcContent = tempFolder.getBazelRcFile().readText().trim() + assertThat(bazelRcContent).isEqualTo("--noenable_bzlmod") + } + @Test fun testCreateLibrary_firstLib_unusedName_appendsJvmLibraryDeclaration() { val testBazelWorkspace = TestBazelWorkspace(tempFolder) - testBazelWorkspace.initEmptyWorkspace() testBazelWorkspace.createLibrary(dependencyName = "ExampleDep") - val buildContent = testBazelWorkspace.rootBuildFile.readAsJoinedString() + val buildContent = testBazelWorkspace.rootBuildFile.readText() assertThat(buildContent.countMatches("kt_jvm_library\\(")).isEqualTo(1) assertThat(buildContent).contains("name = \"ExampleDep_lib\"") assertThat(buildContent).contains("srcs = [\"ExampleDep.kt\"]") @@ -741,7 +818,6 @@ class TestBazelWorkspaceTest { @Test fun testCreateLibrary_firstLib_unusedName_returnsBuildLibAndWorkspaceFilesWithTargetName() { val testBazelWorkspace = TestBazelWorkspace(tempFolder) - testBazelWorkspace.initEmptyWorkspace() val (targetName, files) = testBazelWorkspace.createLibrary(dependencyName = "ExampleDep") @@ -752,7 +828,6 @@ class TestBazelWorkspaceTest { @Test fun testCreateLibrary_secondLib_unusedName_doesNotChangeWorkspace() { val testBazelWorkspace = TestBazelWorkspace(tempFolder) - testBazelWorkspace.initEmptyWorkspace() testBazelWorkspace.createLibrary(dependencyName = "FirstLib") val workspaceSize = tempFolder.getWorkspaceFile().length() @@ -765,13 +840,12 @@ class TestBazelWorkspaceTest { @Test fun testCreateLibrary_secondLib_unusedName_appendsJvmLibraryDeclaration() { val testBazelWorkspace = TestBazelWorkspace(tempFolder) - testBazelWorkspace.initEmptyWorkspace() testBazelWorkspace.createLibrary(dependencyName = "FirstLib") testBazelWorkspace.createLibrary(dependencyName = "SecondLib") // The kt_jvm_library declaration should only exist once, and both libraries should exist. - val buildContent = testBazelWorkspace.rootBuildFile.readAsJoinedString() + val buildContent = testBazelWorkspace.rootBuildFile.readText() assertThat(buildContent.countMatches("load\\(.+?kt_jvm_library")).isEqualTo(1) assertThat(buildContent.countMatches("kt_jvm_library\\(")).isEqualTo(2) assertThat(buildContent).contains("name = \"FirstLib_lib\"") @@ -783,10 +857,9 @@ class TestBazelWorkspaceTest { @Test fun testCreateLibrary_secondLib_reusedName_throwsException() { val testBazelWorkspace = TestBazelWorkspace(tempFolder) - testBazelWorkspace.initEmptyWorkspace() testBazelWorkspace.createLibrary(dependencyName = "FirstLib") - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { testBazelWorkspace.createLibrary(dependencyName = "FirstLib") } @@ -801,7 +874,7 @@ class TestBazelWorkspaceTest { testBazelWorkspace.createTest(testName = "FirstTest") // The workspace should only be configured once (due to the library initialization). - val workspaceContent = tempFolder.getWorkspaceFile().readAsJoinedString() + val workspaceContent = tempFolder.getWorkspaceFile().readText() assertThat(workspaceContent.countMatches("http_archive\\(")).isEqualTo(1) } @@ -813,7 +886,7 @@ class TestBazelWorkspaceTest { testBazelWorkspace.createLibrary(dependencyName = "FirstLib") // The workspace should only be configured once (due to the test initialization). - val workspaceContent = tempFolder.getWorkspaceFile().readAsJoinedString() + val workspaceContent = tempFolder.getWorkspaceFile().readText() assertThat(workspaceContent.countMatches("http_archive\\(")).isEqualTo(1) } @@ -822,7 +895,7 @@ class TestBazelWorkspaceTest { val testBazelWorkspace = TestBazelWorkspace(tempFolder) // A non-existent test file cannot be retrieved. - assertThrows(NoSuchElementException::class) { + assertThrows() { testBazelWorkspace.retrieveTestFile(testName = "Invalid") } } @@ -844,7 +917,7 @@ class TestBazelWorkspaceTest { val testBazelWorkspace = TestBazelWorkspace(tempFolder) // A non-existent library file cannot be retrieved. - assertThrows(NoSuchElementException::class) { + assertThrows() { testBazelWorkspace.retrieveLibraryFile(dependencyName = "Invalid") } } @@ -865,7 +938,7 @@ class TestBazelWorkspaceTest { fun testRetrieveTestDependencyFile_noTest_throwsExceptionWithHelpfulMessage() { val testBazelWorkspace = TestBazelWorkspace(tempFolder) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { testBazelWorkspace.retrieveTestDependencyFile(testName = "Invalid") } @@ -878,7 +951,7 @@ class TestBazelWorkspaceTest { val testBazelWorkspace = TestBazelWorkspace(tempFolder) testBazelWorkspace.createTest("ValidWithoutDep") - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { testBazelWorkspace.retrieveTestDependencyFile(testName = "ValidWithoutDep") } @@ -901,7 +974,9 @@ class TestBazelWorkspaceTest { private fun TemporaryFolder.getWorkspaceFile(): File = File(root, "WORKSPACE") - private fun File.readAsJoinedString(): String = readLines().joinToString(separator = "\n") + private fun TemporaryFolder.getBazelVersionFile(): File = File(root, ".bazelversion") + + private fun TemporaryFolder.getBazelRcFile(): File = File(root, ".bazelrc") private fun File.isRelativeTo(base: File): Boolean = relativeToOrNull(base) != null diff --git a/scripts/src/javatests/org/oppia/android/scripts/testing/TestGitRepositoryTest.kt b/scripts/src/javatests/org/oppia/android/scripts/testing/TestGitRepositoryTest.kt index 59aa28bdc84..453f17da044 100644 --- a/scripts/src/javatests/org/oppia/android/scripts/testing/TestGitRepositoryTest.kt +++ b/scripts/src/javatests/org/oppia/android/scripts/testing/TestGitRepositoryTest.kt @@ -59,11 +59,11 @@ class TestGitRepositoryTest { fun testSetUser_noGitRepository_throwsAssertionError() { val testGitRepository = TestGitRepository(tempFolder, commandExecutorInterceptor) - val error = assertThrows(AssertionError::class) { + val error = assertThrows() { testGitRepository.setUser(email = "test@oppia.org", name = "Test User") } - assertThat(error).hasMessageThat().contains("not in a git directory") + assertThat(error).hasMessageThat().contains("Not operating in an initialized Git repository.") } @Test @@ -92,11 +92,11 @@ class TestGitRepositoryTest { fun testCheckOutNewBranch_notGitRepository_throwsAssertionError() { val testGitRepository = TestGitRepository(tempFolder, commandExecutorInterceptor) - val error = assertThrows(AssertionError::class) { + val error = assertThrows() { testGitRepository.checkoutNewBranch("develop") } - assertThat(error).hasMessageThat().ignoringCase().contains("not a git repository") + assertThat(error).hasMessageThat().contains("Not operating in an initialized Git repository.") } @Test @@ -116,7 +116,7 @@ class TestGitRepositoryTest { testGitRepository.init() testGitRepository.checkoutNewBranch("develop") - val error = assertThrows(AssertionError::class) { + val error = assertThrows() { testGitRepository.stageFileForCommit(File(tempFolder.root, "fake_file")) } @@ -188,7 +188,7 @@ class TestGitRepositoryTest { testGitRepository.init() testGitRepository.checkoutNewBranch("develop") - val error = assertThrows(AssertionError::class) { + val error = assertThrows() { testGitRepository.stageFilesForCommit( listOf( tempFolder.newFile("new_file1"), @@ -207,7 +207,7 @@ class TestGitRepositoryTest { testGitRepository.init() testGitRepository.checkoutNewBranch("develop") - val error = assertThrows(AssertionError::class) { + val error = assertThrows() { testGitRepository.removeFileForCommit(File(tempFolder.root, "nonexistent_file")) } @@ -221,7 +221,7 @@ class TestGitRepositoryTest { testGitRepository.checkoutNewBranch("develop") tempFolder.newFile("untracked_file") - val error = assertThrows(AssertionError::class) { + val error = assertThrows() { testGitRepository.removeFileForCommit(File(tempFolder.root, "untracked_file")) } @@ -250,7 +250,7 @@ class TestGitRepositoryTest { testGitRepository.init() testGitRepository.checkoutNewBranch("develop") - val error = assertThrows(AssertionError::class) { + val error = assertThrows() { testGitRepository.moveFileForCommit( File(tempFolder.root, "nonexistent_file"), File(tempFolder.root, "new_file") ) @@ -266,7 +266,7 @@ class TestGitRepositoryTest { testGitRepository.checkoutNewBranch("develop") tempFolder.newFile("untracked_file") - val error = assertThrows(AssertionError::class) { + val error = assertThrows() { testGitRepository.moveFileForCommit( File(tempFolder.root, "untracked_file"), File(tempFolder.root, "new_file") ) @@ -304,11 +304,9 @@ class TestGitRepositoryTest { testGitRepository.checkoutNewBranch("develop") testGitRepository.stageFileForCommit(tempFolder.newFile("file_to_be_committed")) - val error = assertThrows(AssertionError::class) { - testGitRepository.commit("Commit new file.") - } + val error = assertThrows { testGitRepository.commit("Commit new file.") } - assertThat(error).hasMessageThat().contains("Please tell me who you are") + assertThat(error).hasMessageThat().contains("User email has not yet been set.") } @Test @@ -318,7 +316,7 @@ class TestGitRepositoryTest { testGitRepository.checkoutNewBranch("develop") testGitRepository.setUser(email = "test@oppia.org", name = "Test User") - val error = assertThrows(AssertionError::class) { + val error = assertThrows() { testGitRepository.commit("Attempting empty commit.", allowEmpty = false) } @@ -357,14 +355,34 @@ class TestGitRepositoryTest { } @Test - fun testStatus_noGitRepository_hasStatusWithError() { + fun testStatus_noGitRepository_doNotCheckForRepository_hasStatusWithError() { val testGitRepository = TestGitRepository(tempFolder, commandExecutorInterceptor) - val status = testGitRepository.status() + val status = testGitRepository.status(checkForGitRepository = false) assertThat(status).ignoringCase().contains("not a git repository") } + @Test + fun testStatus_noGitRepository_checkForRepository_throwsAssertionError() { + val testGitRepository = TestGitRepository(tempFolder, commandExecutorInterceptor) + + val error = assertThrows() { + testGitRepository.status(checkForGitRepository = true) + } + + assertThat(error).hasMessageThat().contains("Not operating in an initialized Git repository.") + } + + @Test + fun testStatus_noGitRepository_defaultCheckForRepository_throwsAssertionError() { + val testGitRepository = TestGitRepository(tempFolder, commandExecutorInterceptor) + + val error = assertThrows() { testGitRepository.status() } + + assertThat(error).hasMessageThat().contains("Not operating in an initialized Git repository.") + } + @Test fun testStatus_onBranch_nothingStaged_statusEmpty() { val testGitRepository = TestGitRepository(tempFolder, commandExecutorInterceptor) diff --git a/scripts/src/javatests/org/oppia/android/scripts/todo/TodoIssueCommentCheckTest.kt b/scripts/src/javatests/org/oppia/android/scripts/todo/TodoIssueCommentCheckTest.kt index 6c4d5fb8a8c..2d33e0e2a60 100644 --- a/scripts/src/javatests/org/oppia/android/scripts/todo/TodoIssueCommentCheckTest.kt +++ b/scripts/src/javatests/org/oppia/android/scripts/todo/TodoIssueCommentCheckTest.kt @@ -51,7 +51,7 @@ class TodoIssueCommentCheckTest { latestCommentFile.writeText(latestCommentContent) scriptFailureCommentFile.writeText(scriptFailureCommentContent) - val exception = assertThrows(Exception::class) { + val exception = assertThrows() { main(tempFolder.root.toString(), "latest_comment.txt", "script_failures.txt") } assertThat(exception).hasMessageThat().contains("NEW COMMENT SHOULD BE POSTED") @@ -80,7 +80,7 @@ class TodoIssueCommentCheckTest { latestCommentFile.writeText(latestCommentContent) scriptFailureCommentFile.writeText(scriptFailureCommentContent) - val exception = assertThrows(Exception::class) { + val exception = assertThrows() { main(tempFolder.root.toString(), "latest_comment.txt", "script_failures.txt") } assertThat(exception).hasMessageThat().contains("NEW COMMENT SHOULD BE POSTED") @@ -109,7 +109,7 @@ class TodoIssueCommentCheckTest { latestCommentFile.writeText(latestCommentContent) scriptFailureCommentFile.writeText(scriptFailureCommentContent) - val exception = assertThrows(Exception::class) { + val exception = assertThrows() { main(tempFolder.root.toString(), "latest_comment.txt", "script_failures.txt") } assertThat(exception).hasMessageThat().contains("NEW COMMENT SHOULD BE POSTED") diff --git a/scripts/src/javatests/org/oppia/android/scripts/todo/TodoIssueResolvedCheckTest.kt b/scripts/src/javatests/org/oppia/android/scripts/todo/TodoIssueResolvedCheckTest.kt index ae273159b92..4880c092ec5 100644 --- a/scripts/src/javatests/org/oppia/android/scripts/todo/TodoIssueResolvedCheckTest.kt +++ b/scripts/src/javatests/org/oppia/android/scripts/todo/TodoIssueResolvedCheckTest.kt @@ -105,7 +105,7 @@ class TodoIssueResolvedCheckTest { tempFile1.writeText(testContent1) tempFile2.writeText(testContent2) - val exception = assertThrows(Exception::class) { + val exception = assertThrows() { main(retrieveTestFilesDirectoryPath(), "169877", "abmzuyt") } @@ -149,7 +149,7 @@ class TodoIssueResolvedCheckTest { tempFile2.writeText(testContent2) tempFile3.writeText(testContent3) - val exception = assertThrows(Exception::class) { + val exception = assertThrows() { main(retrieveTestFilesDirectoryPath(), "169877", "abmzuyt") } @@ -195,7 +195,7 @@ class TodoIssueResolvedCheckTest { tempFile2.writeText(testContent2) tempFile3.writeText(testContent3) - val exception = assertThrows(Exception::class) { + val exception = assertThrows() { main(retrieveTestFilesDirectoryPath(), "169877", "abmzuyt") } val fileContentList = diff --git a/scripts/src/javatests/org/oppia/android/scripts/todo/TodoOpenCheckTest.kt b/scripts/src/javatests/org/oppia/android/scripts/todo/TodoOpenCheckTest.kt index 23f42c53f2c..6df3902ba9a 100644 --- a/scripts/src/javatests/org/oppia/android/scripts/todo/TodoOpenCheckTest.kt +++ b/scripts/src/javatests/org/oppia/android/scripts/todo/TodoOpenCheckTest.kt @@ -43,9 +43,7 @@ class TodoOpenCheckTest { @Test fun testTodoCheck_noJsonFilePresent_checkShouldFail() { - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains( "${retrieveTestFilesDirectoryPath()}/open_issues.json: No such file exists" @@ -103,9 +101,7 @@ class TodoOpenCheckTest { """.trimIndent() tempFile.writeText(testContent) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(TODO_SYNTAX_CHECK_FAILED_OUTPUT_INDICATOR) val failureMessage = @@ -116,7 +112,7 @@ class TodoOpenCheckTest { - ${retrieveTestFilesDirectoryPath()}/TempFile.txt:3 - ${retrieveTestFilesDirectoryPath()}/TempFile.txt:4 - ${retrieveTestFilesDirectoryPath()}/TempFile.txt:5 - + $wikiReferenceNote """.trimIndent() assertThat(outContent.toString().trim()).isEqualTo(failureMessage) @@ -141,9 +137,7 @@ class TodoOpenCheckTest { """.trimIndent() tempFile.writeText(testContent) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(TODO_SYNTAX_CHECK_FAILED_OUTPUT_INDICATOR) val failureMessage = @@ -152,7 +146,7 @@ class TodoOpenCheckTest { - ${retrieveTestFilesDirectoryPath()}/TempFile.txt:1 - ${retrieveTestFilesDirectoryPath()}/TempFile.txt:2 - ${retrieveTestFilesDirectoryPath()}/TempFile.txt:5 - + $wikiReferenceNote """.trimIndent() assertThat(outContent.toString().trim()).isEqualTo(failureMessage) @@ -185,9 +179,7 @@ class TodoOpenCheckTest { tempFile1.writeText(testContent1) tempFile2.writeText(testContent2) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(TODO_SYNTAX_CHECK_FAILED_OUTPUT_INDICATOR) val failureMessage = @@ -195,11 +187,11 @@ class TodoOpenCheckTest { TODOs not in correct format: - ${retrieveTestFilesDirectoryPath()}/TempFile1.kt:2 - ${retrieveTestFilesDirectoryPath()}/TempFile2.kt:1 - + TODOs not corresponding to open issues on GitHub: - ${retrieveTestFilesDirectoryPath()}/TempFile1.kt:1 - ${retrieveTestFilesDirectoryPath()}/TempFile2.kt:3 - + $wikiReferenceNote """.trimIndent() assertThat(outContent.toString().trim()).isEqualTo(failureMessage) @@ -239,9 +231,7 @@ class TodoOpenCheckTest { tempFile2.writeText(testContent2) tempFile3.writeText(testContent3) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(TODO_SYNTAX_CHECK_FAILED_OUTPUT_INDICATOR) val failureMessage = @@ -250,11 +240,11 @@ class TodoOpenCheckTest { - ${retrieveTestFilesDirectoryPath()}/Activity.kt:2 - ${retrieveTestFilesDirectoryPath()}/Fragment.kt:1 - ${retrieveTestFilesDirectoryPath()}/Presenter.kt:2 - + TODOs not corresponding to open issues on GitHub: - ${retrieveTestFilesDirectoryPath()}/Fragment.kt:3 - ${retrieveTestFilesDirectoryPath()}/Presenter.kt:1 - + $wikiReferenceNote """.trimIndent() assertThat(outContent.toString().trim()).isEqualTo(failureMessage) @@ -340,9 +330,7 @@ class TodoOpenCheckTest { }.build() exemptions.writeTo(exemptionFile.outputStream()) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(TODO_SYNTAX_CHECK_FAILED_OUTPUT_INDICATOR) val failureMessage = @@ -391,9 +379,7 @@ class TodoOpenCheckTest { }.build() exemptions.writeTo(exemptionFile.outputStream()) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(TODO_SYNTAX_CHECK_FAILED_OUTPUT_INDICATOR) val failureMessage = @@ -401,13 +387,13 @@ class TodoOpenCheckTest { Redundant exemptions (there are no TODOs corresponding to these lines): - TempFile1.kt:2 Please remove them from scripts/assets/todo_exemptions.textproto - + TODOs not in correct format: - ${retrieveTestFilesDirectoryPath()}/TempFile2.kt:1 - + TODOs not corresponding to open issues on GitHub: - ${retrieveTestFilesDirectoryPath()}/TempFile1.kt:3 - + $wikiReferenceNote """.trimIndent() assertThat(outContent.toString().trim()).isEqualTo(failureMessage) diff --git a/scripts/src/javatests/org/oppia/android/scripts/xml/StringLanguageTranslationCheckTest.kt b/scripts/src/javatests/org/oppia/android/scripts/xml/StringLanguageTranslationCheckTest.kt index 00916b400e4..bbe2c2ca818 100644 --- a/scripts/src/javatests/org/oppia/android/scripts/xml/StringLanguageTranslationCheckTest.kt +++ b/scripts/src/javatests/org/oppia/android/scripts/xml/StringLanguageTranslationCheckTest.kt @@ -65,7 +65,7 @@ class StringLanguageTranslationCheckTest { @Test fun testScript_missingPath_throwsException() { - val exception = assertThrows(IllegalArgumentException::class) { runScript(/* With no path. */) } + val exception = assertThrows() { runScript(/* With no path. */) } assertThat(exception) .hasMessageThat() @@ -74,7 +74,7 @@ class StringLanguageTranslationCheckTest { @Test fun testScript_validPath_noStringFiles_throwsException() { - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { runScript(tempFolder.root.absolutePath) } diff --git a/scripts/src/javatests/org/oppia/android/scripts/xml/StringResourceParserTest.kt b/scripts/src/javatests/org/oppia/android/scripts/xml/StringResourceParserTest.kt index 0e1edd3fa30..0bbe198f040 100644 --- a/scripts/src/javatests/org/oppia/android/scripts/xml/StringResourceParserTest.kt +++ b/scripts/src/javatests/org/oppia/android/scripts/xml/StringResourceParserTest.kt @@ -70,7 +70,7 @@ class StringResourceParserTest { fun testRetrieveBaseStringFile_noStrings_throwsException() { val parser = StringResourceParser(tempFolder.root) - val exception = assertThrows(IllegalStateException::class) { parser.retrieveBaseStringFile() } + val exception = assertThrows() { parser.retrieveBaseStringFile() } assertThat(exception) .hasMessageThat() @@ -88,7 +88,7 @@ class StringResourceParserTest { populateNigerianPidginTranslations() val parser = StringResourceParser(tempFolder.root) - val exception = assertThrows(IllegalStateException::class) { parser.retrieveBaseStringFile() } + val exception = assertThrows() { parser.retrieveBaseStringFile() } assertThat(exception) .hasMessageThat() @@ -103,7 +103,7 @@ class StringResourceParserTest { populateNigerianPidginTranslations() val parser = StringResourceParser(tempFolder.root) - val exception = assertThrows(IllegalStateException::class) { parser.retrieveBaseStringFile() } + val exception = assertThrows() { parser.retrieveBaseStringFile() } assertThat(exception) .hasMessageThat() @@ -118,7 +118,7 @@ class StringResourceParserTest { populateNigerianPidginTranslations() val parser = StringResourceParser(tempFolder.root) - val exception = assertThrows(IllegalStateException::class) { parser.retrieveBaseStringFile() } + val exception = assertThrows() { parser.retrieveBaseStringFile() } assertThat(exception) .hasMessageThat() @@ -133,7 +133,7 @@ class StringResourceParserTest { populateNigerianPidginTranslations() val parser = StringResourceParser(tempFolder.root) - val exception = assertThrows(IllegalStateException::class) { parser.retrieveBaseStringFile() } + val exception = assertThrows() { parser.retrieveBaseStringFile() } assertThat(exception) .hasMessageThat() @@ -148,7 +148,7 @@ class StringResourceParserTest { populateSwahiliTranslations() val parser = StringResourceParser(tempFolder.root) - val exception = assertThrows(IllegalStateException::class) { parser.retrieveBaseStringFile() } + val exception = assertThrows() { parser.retrieveBaseStringFile() } assertThat(exception) .hasMessageThat() @@ -161,7 +161,7 @@ class StringResourceParserTest { populateTranslations(appResources, "values-fake", mapOf()) val parser = StringResourceParser(tempFolder.root) - val exception = assertThrows(IllegalStateException::class) { parser.retrieveBaseStringFile() } + val exception = assertThrows() { parser.retrieveBaseStringFile() } assertThat(exception) .hasMessageThat() @@ -180,7 +180,7 @@ class StringResourceParserTest { populateTranslations(utilityResources, "values", mapOf()) val parser = StringResourceParser(tempFolder.root) - val exception = assertThrows(IllegalStateException::class) { parser.retrieveBaseStringFile() } + val exception = assertThrows() { parser.retrieveBaseStringFile() } // An exception is still thrown since resources outside the app directory are ignored. assertThat(exception) @@ -197,7 +197,7 @@ class StringResourceParserTest { writeTranslationsFile(appResources, "values", "") val parser = StringResourceParser(tempFolder.root) - assertThrows(SAXParseException::class) { parser.retrieveBaseStringFile() } + assertThrows() { parser.retrieveBaseStringFile() } } @Test diff --git a/scripts/src/javatests/org/oppia/android/scripts/xml/StringResourceValidationCheckTest.kt b/scripts/src/javatests/org/oppia/android/scripts/xml/StringResourceValidationCheckTest.kt index e2152950a99..424a0adb8c3 100644 --- a/scripts/src/javatests/org/oppia/android/scripts/xml/StringResourceValidationCheckTest.kt +++ b/scripts/src/javatests/org/oppia/android/scripts/xml/StringResourceValidationCheckTest.kt @@ -64,7 +64,7 @@ class StringResourceValidationCheckTest { @Test fun testScript_missingPath_throwsException() { - val exception = assertThrows(IllegalArgumentException::class) { runScript(/* With no path. */) } + val exception = assertThrows() { runScript(/* With no path. */) } assertThat(exception) .hasMessageThat() @@ -73,7 +73,7 @@ class StringResourceValidationCheckTest { @Test fun testScript_validPath_noStringFiles_fails() { - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { runScript(tempFolder.root.absolutePath) } @@ -105,7 +105,7 @@ class StringResourceValidationCheckTest { populateSwahiliTranslations(mapOf("str1" to SW_STRING_ONE_NEWLINE)) populateNigerianPidginTranslations(mapOf("str1" to PCM_STRING_ONE_NEWLINE)) - val exception = assertThrows(Exception::class) { runScript(tempFolder.root.absolutePath) } + val exception = assertThrows() { runScript(tempFolder.root.absolutePath) } // This output check also inadvertently verifies that the script doesn't care about missing // strings in translated string files. @@ -133,7 +133,7 @@ class StringResourceValidationCheckTest { populateSwahiliTranslations(mapOf("str1" to SW_STRING_ONE_NEWLINE)) populateNigerianPidginTranslations(mapOf("str1" to PCM_STRING_ONE_NEWLINE)) - val exception = assertThrows(Exception::class) { runScript(tempFolder.root.absolutePath) } + val exception = assertThrows() { runScript(tempFolder.root.absolutePath) } // This output check also inadvertently verifies that the script doesn't care about missing // strings in translated string files. @@ -161,7 +161,7 @@ class StringResourceValidationCheckTest { ) populateNigerianPidginTranslations(mapOf("str1" to PCM_STRING_ONE_NEWLINE)) - val exception = assertThrows(Exception::class) { runScript(tempFolder.root.absolutePath) } + val exception = assertThrows() { runScript(tempFolder.root.absolutePath) } // This output check also inadvertently verifies that the script doesn't care about missing // strings in translated string files. @@ -189,7 +189,7 @@ class StringResourceValidationCheckTest { mapOf("str1" to PCM_STRING_NO_NEWLINES, "str2" to PCM_STRING_TWO_NEWLINES) ) - val exception = assertThrows(Exception::class) { runScript(tempFolder.root.absolutePath) } + val exception = assertThrows() { runScript(tempFolder.root.absolutePath) } // This output check also inadvertently verifies that the script doesn't care about missing // strings in translated string files. @@ -223,7 +223,7 @@ class StringResourceValidationCheckTest { mapOf("str1" to PCM_STRING_NO_NEWLINES, "str2" to PCM_STRING_TWO_NEWLINES) ) - val exception = assertThrows(Exception::class) { runScript(tempFolder.root.absolutePath) } + val exception = assertThrows() { runScript(tempFolder.root.absolutePath) } // This output check also inadvertently verifies that the script doesn't care about missing // strings in translated string files. diff --git a/scripts/src/javatests/org/oppia/android/scripts/xml/XmlSyntaxCheckTest.kt b/scripts/src/javatests/org/oppia/android/scripts/xml/XmlSyntaxCheckTest.kt index 2e988cf0663..bc78d44296e 100644 --- a/scripts/src/javatests/org/oppia/android/scripts/xml/XmlSyntaxCheckTest.kt +++ b/scripts/src/javatests/org/oppia/android/scripts/xml/XmlSyntaxCheckTest.kt @@ -73,15 +73,13 @@ class XmlSyntaxCheckTest { val tempFile = tempFolder.newFile("testfiles/TestFile.xml") tempFile.writeText(invalidXml) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(XML_SYNTAX_CHECK_FAILED_OUTPUT_INDICATOR) val failureMessage = """ ${retrieveTestFilesDirectoryPath()}/TestFile.xml:6:8: $syntaxFailureMessage1 - + $wikiReferenceNote """.trimIndent() assertThat(outContent.toString().trim()).isEqualTo(failureMessage) @@ -112,16 +110,14 @@ class XmlSyntaxCheckTest { tempFile1.writeText(invalidXmlForFile1) tempFile2.writeText(invalidXmlForFile2) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(XML_SYNTAX_CHECK_FAILED_OUTPUT_INDICATOR) val failureMessage = """ ${retrieveTestFilesDirectoryPath()}/TestFile1.xml:4:4: $syntaxFailureMessage2 ${retrieveTestFilesDirectoryPath()}/TestFile2.xml:6:8: $syntaxFailureMessage1 - + $wikiReferenceNote """.trimIndent() assertThat(outContent.toString().trim()).isEqualTo(failureMessage) @@ -163,9 +159,7 @@ class XmlSyntaxCheckTest { tempFile2.writeText(invalidXmlForFile2) tempFile3.writeText(invalidXmlForFile3) - val exception = assertThrows(Exception::class) { - runScript() - } + val exception = assertThrows() { runScript() } assertThat(exception).hasMessageThat().contains(XML_SYNTAX_CHECK_FAILED_OUTPUT_INDICATOR) val failureMessage = @@ -173,7 +167,7 @@ class XmlSyntaxCheckTest { ${retrieveTestFilesDirectoryPath()}/TestFile1.xml:4:4: $syntaxFailureMessage2 ${retrieveTestFilesDirectoryPath()}/TestFile2.xml:6:8: $syntaxFailureMessage1 ${retrieveTestFilesDirectoryPath()}/TestFile3.xml:6:8: $syntaxFailureMessage1 - + $wikiReferenceNote """.trimIndent() assertThat(outContent.toString().trim()).isEqualTo(failureMessage) diff --git a/testing/BUILD.bazel b/testing/BUILD.bazel index 9bed8754f08..6a166ef498e 100644 --- a/testing/BUILD.bazel +++ b/testing/BUILD.bazel @@ -40,6 +40,7 @@ kt_android_library( "//model/src/main/proto:performance_metrics_event_logger_java_proto_lite", "//testing/src/main/java/org/oppia/android/testing/data:async_result_subject", "//testing/src/main/java/org/oppia/android/testing/data:data_provider_test_monitor", + "//testing/src/main/java/org/oppia/android/testing/firebase:test_authentication_module", "//testing/src/main/java/org/oppia/android/testing/threading:test_coroutine_dispatchers", "//testing/src/main/java/org/oppia/android/testing/time:fake_oppia_clock", "//third_party:androidx_core_core-ktx", @@ -153,10 +154,7 @@ kt_android_library( testonly = True, srcs = ["src/main/java/org/oppia/android/testing/AssertionHelpers.kt"], visibility = ["//visibility:public"], - deps = [ - "//third_party:junit_junit", - "//third_party:org_jetbrains_kotlin_kotlin-reflect", - ], + deps = ["//third_party:junit_junit"], ) filegroup( diff --git a/testing/build.gradle b/testing/build.gradle index 3116f0df05c..834206b8704 100644 --- a/testing/build.gradle +++ b/testing/build.gradle @@ -75,6 +75,7 @@ dependencies { 'androidx.test:runner:1.2.0', 'com.google.android.material:material:1.3.0', 'com.google.dagger:dagger:2.24', + 'com.google.firebase:firebase-auth-ktx:19.3.1', 'com.google.protobuf:protobuf-javalite:3.17.3', 'com.google.truth:truth:1.1.3', 'com.google.truth.extensions:truth-liteproto-extension:1.1.3', diff --git a/testing/src/main/java/org/oppia/android/testing/AssertionHelpers.kt b/testing/src/main/java/org/oppia/android/testing/AssertionHelpers.kt index e40d985dad7..7927cd7b79b 100644 --- a/testing/src/main/java/org/oppia/android/testing/AssertionHelpers.kt +++ b/testing/src/main/java/org/oppia/android/testing/AssertionHelpers.kt @@ -1,42 +1,37 @@ package org.oppia.android.testing -import org.junit.Assert.fail -import kotlin.reflect.KClass -import kotlin.reflect.full.cast - /* This file contains generic assertion helpers which are meant to be usable in any test. Not for methods which are specific to a certain test or part of the codebase. */ /** * A replacement to JUnit5's assertThrows() that asserts an execution of the supplied operation - * throws an exception of the supplied type + * throws an exception of the indicated type. * * An example of this might be: * - * val exception = assertThrows(IllegalArgumentException::class) { + * ```kotlin + * val exception = assertThrows() { * stringToRatioParser.parseRatioOrThrow("a:b:c") * } - * assertThat(exception) - * .hasMessageThat() - * .contains("Incorrectly formatted ratio: a:b:c") + * assertThat(exception).hasMessageThat().contains("Incorrectly formatted ratio: a:b:c") + * ``` * - * @param type the type of exception to be thrown * @param operation the operation being run * @return the exception being thrown * @throws AssertionError if the specified exception is not thrown */ -fun assertThrows(type: KClass, operation: () -> Unit): T { - try { - operation() - fail("Expected to encounter exception of $type") - } catch (t: Throwable) { - if (type.isInstance(t)) { - return type.cast(t) +inline fun assertThrows(noinline operation: () -> Unit): T { + return when (val result = try { operation() } catch (t: Throwable) { t }) { + is T -> result + is Throwable -> { + throw AssertionError( + "Expected exception of type: ${T::class.java}, not: ${result::class.java}.", result + ) + } + else -> { + throw AssertionError( + "Expected exception of type: ${T::class.java}. No exception was thrown." + ) } - // Unexpected exception; throw it. - throw t } - throw AssertionError( - "Reached an impossible state when verifying that an exception was thrown." - ) } diff --git a/testing/src/main/java/org/oppia/android/testing/FakeFirebaseAuthInstanceWrapperImpl.kt b/testing/src/main/java/org/oppia/android/testing/FakeFirebaseAuthInstanceWrapperImpl.kt new file mode 100644 index 00000000000..ea5ada533eb --- /dev/null +++ b/testing/src/main/java/org/oppia/android/testing/FakeFirebaseAuthInstanceWrapperImpl.kt @@ -0,0 +1,11 @@ +package org.oppia.android.testing + +import org.oppia.android.domain.auth.FirebaseAuthInstance +import org.oppia.android.domain.auth.FirebaseAuthInstanceWrapper +import javax.inject.Inject + +/** Implementation of [FirebaseAuthInstanceWrapper]. */ +class FakeFirebaseAuthInstanceWrapperImpl @Inject constructor() : FirebaseAuthInstanceWrapper { + override val firebaseAuthInstance: FirebaseAuthInstance? + get() = null +} diff --git a/testing/src/main/java/org/oppia/android/testing/FakeFirestoreEventLogger.kt b/testing/src/main/java/org/oppia/android/testing/FakeFirestoreEventLogger.kt new file mode 100644 index 00000000000..b2a16c85704 --- /dev/null +++ b/testing/src/main/java/org/oppia/android/testing/FakeFirestoreEventLogger.kt @@ -0,0 +1,41 @@ +package org.oppia.android.testing + +import org.oppia.android.app.model.EventLog +import org.oppia.android.util.logging.firebase.FirestoreEventLogger +import java.util.concurrent.CopyOnWriteArrayList +import javax.inject.Inject +import javax.inject.Singleton + +/** A test specific fake for the FirestoreEventLogger. */ +@Singleton +class FakeFirestoreEventLogger @Inject constructor() : FirestoreEventLogger { + private val eventList = CopyOnWriteArrayList() + + override fun uploadEvent(eventLog: EventLog) { + eventList.add(eventLog) + } + + /** Returns the oldest event that's been logged. */ + fun getOldestEvent(): EventLog = eventList.first() + + /** Returns the most recently logged event. */ + fun getMostRecentEvent(): EventLog = getMostRecentEvents(count = 1).first() + + /** Returns the most recent [count] logged events. */ + fun getMostRecentEvents(count: Int): List = eventList.takeLast(count) + + /** Clears all the events that are currently logged. */ + fun clearAllEvents() = eventList.clear() + + /** Returns whether a certain event has been logged or not, based on the provided [predicate]. */ + fun hasEventLogged(predicate: (EventLog) -> Boolean): Boolean = eventList.find(predicate) != null + + /** Returns the number of logged events that match the provided [predicate]. */ + fun countEvents(predicate: (EventLog) -> Boolean): Int = eventList.count(predicate) + + /** Returns true if there are no events logged. */ + fun noEventsPresent(): Boolean = eventList.isEmpty() + + /** Returns the number of events logged to date (and not cleared by [clearAllEvents]). */ + fun getEventListCount(): Int = eventList.size +} diff --git a/testing/src/main/java/org/oppia/android/testing/FakeFirestoreInstanceWrapperImpl.kt b/testing/src/main/java/org/oppia/android/testing/FakeFirestoreInstanceWrapperImpl.kt new file mode 100644 index 00000000000..e5f62715c78 --- /dev/null +++ b/testing/src/main/java/org/oppia/android/testing/FakeFirestoreInstanceWrapperImpl.kt @@ -0,0 +1,16 @@ +package org.oppia.android.testing + +import org.oppia.android.util.logging.firebase.FirestoreInstance +import org.oppia.android.util.logging.firebase.FirestoreInstanceWrapper +import javax.inject.Inject + +/** + * A test specific fake for the [FirestoreInstanceWrapper]. [FirebaseFirestore] requires an instance + * of [FirebaseApp], which is difficult to mock or fake hence this implementation always returns + * null when an instance of [FirebaseFirestore] is requested. + */ +class FakeFirestoreInstanceWrapperImpl @Inject constructor() : FirestoreInstanceWrapper { + + override val firestoreInstance: FirestoreInstance? + get() = null +} diff --git a/testing/src/main/java/org/oppia/android/testing/TestLogReportingModule.kt b/testing/src/main/java/org/oppia/android/testing/TestLogReportingModule.kt index 9d27f8c3a51..f10c83dfa83 100644 --- a/testing/src/main/java/org/oppia/android/testing/TestLogReportingModule.kt +++ b/testing/src/main/java/org/oppia/android/testing/TestLogReportingModule.kt @@ -4,6 +4,8 @@ import dagger.Binds import dagger.Module import org.oppia.android.util.logging.AnalyticsEventLogger import org.oppia.android.util.logging.ExceptionLogger +import org.oppia.android.util.logging.firebase.FirestoreEventLogger +import org.oppia.android.util.logging.firebase.FirestoreInstanceWrapper import org.oppia.android.util.logging.performancemetrics.PerformanceMetricsAssessor import org.oppia.android.util.logging.performancemetrics.PerformanceMetricsEventLogger @@ -26,4 +28,13 @@ interface TestLogReportingModule { fun bindFakePerformanceMetricsAssessor( fakePerformanceMetricAssessor: FakePerformanceMetricAssessor ): PerformanceMetricsAssessor + + @Binds + fun bindFakeFirestoreEventLogger( + fakeFirestoreEventLogger: FakeFirestoreEventLogger + ): FirestoreEventLogger + + @Binds + fun bindFirebaseFirestoreInstanceWrapper(wrapperImpl: FakeFirestoreInstanceWrapperImpl): + FirestoreInstanceWrapper } diff --git a/testing/src/main/java/org/oppia/android/testing/firebase/BUILD.bazel b/testing/src/main/java/org/oppia/android/testing/firebase/BUILD.bazel new file mode 100644 index 00000000000..78b9c0ffb82 --- /dev/null +++ b/testing/src/main/java/org/oppia/android/testing/firebase/BUILD.bazel @@ -0,0 +1,22 @@ +""" +Package for test-only Firebase utilities. +""" + +load("@dagger//:workspace_defs.bzl", "dagger_rules") +load("@io_bazel_rules_kotlin//kotlin:kotlin.bzl", "kt_android_library") + +kt_android_library( + name = "test_authentication_module", + testonly = True, + srcs = [ + "FakeFirebaseAuthWrapperImpl.kt", + "TestAuthenticationModule.kt", + ], + visibility = ["//:oppia_testing_visibility"], + deps = [ + ":dagger", + "//domain/src/main/java/org/oppia/android/domain/auth:firebase_auth_wrapper", + ], +) + +dagger_rules() diff --git a/testing/src/main/java/org/oppia/android/testing/firebase/FakeFirebaseAuthWrapperImpl.kt b/testing/src/main/java/org/oppia/android/testing/firebase/FakeFirebaseAuthWrapperImpl.kt new file mode 100644 index 00000000000..616448ce4a2 --- /dev/null +++ b/testing/src/main/java/org/oppia/android/testing/firebase/FakeFirebaseAuthWrapperImpl.kt @@ -0,0 +1,49 @@ +package org.oppia.android.testing.firebase + +import org.oppia.android.domain.auth.FirebaseAuthWrapper +import org.oppia.android.domain.auth.FirebaseUserWrapper +import java.util.UUID +import javax.inject.Inject +import javax.inject.Singleton + +/** A test specific fake for the [FirebaseAuthWrapper]. */ +@Singleton +class FakeFirebaseAuthWrapperImpl @Inject constructor() : FirebaseAuthWrapper { + private var fakeAuthState: FakeAuthState = FakeAuthState.SUCCESS + + /** Fake a successful auth response. */ + fun simulateSignInSuccess() { + fakeAuthState = FakeAuthState.SUCCESS + } + + /** Fake a failed auth response. */ + fun simulateSignInFailure() { + fakeAuthState = FakeAuthState.FAILURE + } + + /** Returns the [fakeAuthState] of the controller. */ + fun getAuthState(): FakeAuthState = fakeAuthState + + override val currentUser: FirebaseUserWrapper? + get() = if (fakeAuthState == FakeAuthState.SUCCESS) + FirebaseUserWrapper(uid = UUID.randomUUID().toString()) + else + null + + override fun signInAnonymously(onSuccess: () -> Unit, onFailure: (Throwable) -> Unit) { + if (fakeAuthState == FakeAuthState.SUCCESS) { + onSuccess.invoke() + } else { + onFailure.invoke(Exception("Sign-in failure")) + } + } + + /** Represents a faked authentication state. */ + enum class FakeAuthState { + /** Represents a faked successful authentication state. */ + SUCCESS, + + /** Represents a faked failed authentication state. */ + FAILURE + } +} diff --git a/testing/src/main/java/org/oppia/android/testing/firebase/TestAuthenticationModule.kt b/testing/src/main/java/org/oppia/android/testing/firebase/TestAuthenticationModule.kt new file mode 100644 index 00000000000..649f684b064 --- /dev/null +++ b/testing/src/main/java/org/oppia/android/testing/firebase/TestAuthenticationModule.kt @@ -0,0 +1,15 @@ +package org.oppia.android.testing.firebase + +import dagger.Module +import dagger.Provides +import org.oppia.android.domain.auth.FirebaseAuthWrapper +import javax.inject.Singleton + +/** Provides test authentication dependencies. */ +@Module +class TestAuthenticationModule { + @Provides + @Singleton + fun provideFakeFirebaseAuthWrapper(fakeFirebaseWrapperImpl: FakeFirebaseAuthWrapperImpl): + FirebaseAuthWrapper = fakeFirebaseWrapperImpl +} diff --git a/testing/src/main/java/org/oppia/android/testing/logging/EventLogSubject.kt b/testing/src/main/java/org/oppia/android/testing/logging/EventLogSubject.kt index cbd7163ce19..abec71d8ec0 100644 --- a/testing/src/main/java/org/oppia/android/testing/logging/EventLogSubject.kt +++ b/testing/src/main/java/org/oppia/android/testing/logging/EventLogSubject.kt @@ -40,6 +40,7 @@ import org.oppia.android.app.model.EventLog.Context.ActivityContextCase.OPEN_QUE import org.oppia.android.app.model.EventLog.Context.ActivityContextCase.OPEN_REVISION_CARD import org.oppia.android.app.model.EventLog.Context.ActivityContextCase.OPEN_REVISION_TAB import org.oppia.android.app.model.EventLog.Context.ActivityContextCase.OPEN_STORY_ACTIVITY +import org.oppia.android.app.model.EventLog.Context.ActivityContextCase.OPTIONAL_RESPONSE import org.oppia.android.app.model.EventLog.Context.ActivityContextCase.PAUSE_VOICE_OVER_CONTEXT import org.oppia.android.app.model.EventLog.Context.ActivityContextCase.PLAY_VOICE_OVER_CONTEXT import org.oppia.android.app.model.EventLog.Context.ActivityContextCase.REACH_INVESTED_ENGAGEMENT @@ -96,6 +97,13 @@ class EventLogSubject private constructor( assertThat(actual.priority).isEqualTo(EventLog.Priority.OPTIONAL) } + /** + * Verifies that the [EventLog] under test has no profile ID defined per [EventLog.getProfileId]. + */ + fun hasNoProfileId() { + assertThat(actual.hasProfileId()).isFalse() + } + /** * Returns an [LiteProtoSubject] to verify the under-test [EventLog]'s [EventLog.getProfileId] * field. @@ -1046,6 +1054,34 @@ class EventLogSubject private constructor( hasBeginSurveyContextThat().block() } + /** + * Verifies that the [EventLog] under test has a context corresponding to + * [OPTIONAL_RESPONSE] (per [EventLog.Context.getActivityContextCase]). + */ + fun hasOptionalSurveyResponseContext() { + assertThat(actual.context.activityContextCase).isEqualTo(OPTIONAL_RESPONSE) + } + + /** + * Verifies the [EventLog]'s context per [hasOptionalSurveyResponseContext] and returns a + * [OptionalSurveyResponseContextSubject] to test the corresponding context. + */ + fun hasOptionalSurveyResponseContextThat(): OptionalSurveyResponseContextSubject { + hasOptionalSurveyResponseContext() + return OptionalSurveyResponseContextSubject.assertThat( + actual.context.optionalResponse + ) + } + + /** + * Verifies the [EventLog]'s context and executes [block]. + */ + fun hasOptionalSurveyResponseContextThat( + block: OptionalSurveyResponseContextSubject.() -> Unit + ) { + hasOptionalSurveyResponseContextThat().block() + } + /** * Truth subject for verifying properties of [AppLanguageSelection]s. * @@ -1754,6 +1790,54 @@ class EventLogSubject private constructor( } } + /** + * Truth subject for verifying properties of [EventLog.OptionalSurveyResponseContext]s. + * + * Note that this class is also a [LiteProtoSubject] so other aspects of the underlying + * [EventLog.OptionalSurveyResponseContext] proto can be verified through inherited methods. + * + * Call [OptionalSurveyResponseContextSubject.assertThat] to create the subject. + */ + class OptionalSurveyResponseContextSubject private constructor( + metadata: FailureMetadata, + private val actual: EventLog.OptionalSurveyResponseContext + ) : LiteProtoSubject(metadata, actual) { + /** + * Returns a [SurveyResponseContextSubject] to test + * [EventLog.OptionalSurveyResponseContext.getSurveyDetails]. + * + * This method never fails since the underlying property defaults to empty string if it's not + * defined in the context. + */ + fun hasSurveyDetailsThat(): SurveyResponseContextSubject = + SurveyResponseContextSubject.assertThat(actual.surveyDetails) + + /** Executes [block] in the context returned by [hasSurveyDetailsThat]. */ + fun hasSurveyDetailsThat(block: SurveyResponseContextSubject.() -> Unit) { + hasSurveyDetailsThat().block() + } + + /** + * Returns a [StringSubject] to test + * [EventLog.OptionalSurveyResponseContext.getFeedbackAnswer]. + * + * This method never fails since the underlying property defaults to empty object if it's not + * defined in the context. + */ + fun hasFeedbackAnswerThat(): StringSubject = + assertThat(actual.feedbackAnswer) + + companion object { + /** + * Returns a new [OptionalSurveyResponseContextSubject] to verify aspects of the specified + * [EventLog.OptionalSurveyResponseContext] value. + */ + fun assertThat(actual: EventLog.OptionalSurveyResponseContext): + OptionalSurveyResponseContextSubject = + assertAbout(::OptionalSurveyResponseContextSubject).that(actual) + } + } + /** * Truth subject for verifying properties of [EventLog.MandatorySurveyResponseContext]s. * @@ -1768,7 +1852,7 @@ class EventLogSubject private constructor( ) : LiteProtoSubject(metadata, actual) { /** * Returns a [SurveyResponseContextSubject] to test - * [EventLog.AbandonSurveyContext.getSurveyDetails]. + * [EventLog.MandatorySurveyResponseContext.getSurveyDetails]. * * This method never fails since the underlying property defaults to empty object if it's not * defined in the context. @@ -1802,8 +1886,8 @@ class EventLogSubject private constructor( assertThat(actual.marketFitAnswer) /** - * Returns a [ComparableSubject] to test - * [EventLog.MandatorySurveyResponseContext.getUserTypeAnswer]. + * Returns a [IntegerSubject] to test + * [EventLog.MandatorySurveyResponseContext.getNpsScoreAnswer]. * * This method never fails since the underlying property defaults to empty object if it's not * defined in the context. @@ -1813,8 +1897,8 @@ class EventLogSubject private constructor( companion object { /** - * Returns a new [AbandonSurveyContextSubject] to verify aspects of the specified - * [EventLog.AbandonSurveyContext] value. + * Returns a new [MandatorySurveyResponseContextSubject] to verify aspects of the specified + * [EventLog.MandatorySurveyResponseContext] value. */ fun assertThat(actual: EventLog.MandatorySurveyResponseContext): MandatorySurveyResponseContextSubject = diff --git a/testing/src/main/java/org/oppia/android/testing/platformparameter/TestPlatformParameterModule.kt b/testing/src/main/java/org/oppia/android/testing/platformparameter/TestPlatformParameterModule.kt index 6874912d8ec..7eb105d2b97 100644 --- a/testing/src/main/java/org/oppia/android/testing/platformparameter/TestPlatformParameterModule.kt +++ b/testing/src/main/java/org/oppia/android/testing/platformparameter/TestPlatformParameterModule.kt @@ -4,7 +4,8 @@ import android.content.Context import androidx.annotation.VisibleForTesting import dagger.Module import dagger.Provides -import org.oppia.android.app.utility.getVersionCode +import org.oppia.android.util.extensions.getVersionCode +import org.oppia.android.util.platformparameter.APP_AND_OS_DEPRECATION import org.oppia.android.util.platformparameter.CACHE_LATEX_RENDERING import org.oppia.android.util.platformparameter.CACHE_LATEX_RENDERING_DEFAULT_VALUE import org.oppia.android.util.platformparameter.CacheLatexRendering @@ -13,6 +14,8 @@ import org.oppia.android.util.platformparameter.ENABLE_DOWNLOADS_SUPPORT_DEFAULT import org.oppia.android.util.platformparameter.ENABLE_EDIT_ACCOUNTS_OPTIONS_UI_DEFAULT_VALUE import org.oppia.android.util.platformparameter.ENABLE_EXTRA_TOPIC_TABS_UI_DEFAULT_VALUE import org.oppia.android.util.platformparameter.ENABLE_INTERACTION_CONFIG_CHANGE_STATE_RETENTION_DEFAULT_VALUE +import org.oppia.android.util.platformparameter.ENABLE_NPS_SURVEY_DEFAULT_VALUE +import org.oppia.android.util.platformparameter.ENABLE_ONBOARDING_FLOW_V2_DEFAULT_VALUE import org.oppia.android.util.platformparameter.ENABLE_PERFORMANCE_METRICS_COLLECTION_DEFAULT_VALUE import org.oppia.android.util.platformparameter.EnableAppAndOsDeprecation import org.oppia.android.util.platformparameter.EnableDownloadsSupport @@ -22,6 +25,8 @@ import org.oppia.android.util.platformparameter.EnableFastLanguageSwitchingInLes import org.oppia.android.util.platformparameter.EnableInteractionConfigChangeStateRetention import org.oppia.android.util.platformparameter.EnableLearnerStudyAnalytics import org.oppia.android.util.platformparameter.EnableLoggingLearnerStudyIds +import org.oppia.android.util.platformparameter.EnableNpsSurvey +import org.oppia.android.util.platformparameter.EnableOnboardingFlowV2 import org.oppia.android.util.platformparameter.EnablePerformanceMetricsCollection import org.oppia.android.util.platformparameter.EnableSpotlightUi import org.oppia.android.util.platformparameter.FAST_LANGUAGE_SWITCHING_IN_LESSON_DEFAULT_VALUE @@ -207,8 +212,11 @@ class TestPlatformParameterModule { @Provides @EnableAppAndOsDeprecation - fun provideEnableAppAndOsDeprecation(): PlatformParameterValue { - return PlatformParameterValue.createDefaultParameter(enableAppAndOsDeprecation) + fun provideEnableAppAndOsDeprecation( + platformParameterSingleton: PlatformParameterSingleton + ): PlatformParameterValue { + return platformParameterSingleton.getBooleanPlatformParameter(APP_AND_OS_DEPRECATION) + ?: PlatformParameterValue.createDefaultParameter(ENABLE_APP_AND_OS_DEPRECATION_DEFAULT_VALUE) } @Provides @@ -263,6 +271,18 @@ class TestPlatformParameterModule { return PlatformParameterValue.createDefaultParameter(minimumLearningTime) } + @Provides + @EnableNpsSurvey + fun provideEnableNpsSurvey(): PlatformParameterValue { + return PlatformParameterValue.createDefaultParameter(enableNpsSurvey) + } + + @Provides + @EnableOnboardingFlowV2 + fun provideEnableOnboardingFlowV2(): PlatformParameterValue { + return PlatformParameterValue.createDefaultParameter(enableOnboardingFlowV2) + } + companion object { private var enableDownloadsSupport = ENABLE_DOWNLOADS_SUPPORT_DEFAULT_VALUE private var enableEditAccountsOptionsUi = ENABLE_EDIT_ACCOUNTS_OPTIONS_UI_DEFAULT_VALUE @@ -280,6 +300,8 @@ class TestPlatformParameterModule { private var minimumLearningTime = NPS_SURVEY_MINIMUM_AGGREGATE_LEARNING_TIME_IN_A_TOPIC_IN_MINUTES_DEFAULT_VALUE private var gracePeriodInDays = NPS_SURVEY_GRACE_PERIOD_IN_DAYS_DEFAULT_VALUE + private var enableNpsSurvey = ENABLE_NPS_SURVEY_DEFAULT_VALUE + private var enableOnboardingFlowV2 = ENABLE_ONBOARDING_FLOW_V2_DEFAULT_VALUE @VisibleForTesting(otherwise = VisibleForTesting.NONE) fun forceEnableDownloadsSupport(value: Boolean) { @@ -334,6 +356,24 @@ class TestPlatformParameterModule { enableSpotlightUi = value } + /** Enables forcing [EnableNpsSurvey] feature flag from tests. */ + @VisibleForTesting(otherwise = VisibleForTesting.NONE) + fun forceEnableNpsSurvey(value: Boolean) { + enableNpsSurvey = value + } + + /** Enables forcing [EnableOnboardingFlowV2] platform parameter flag from tests. */ + @VisibleForTesting(otherwise = VisibleForTesting.NONE) + fun forceEnableOnboardingFlowV2(value: Boolean) { + enableOnboardingFlowV2 = value + } + + /** Enables forcing [EnableAppAndOsDeprecation] feature flag from tests. */ + @VisibleForTesting(otherwise = VisibleForTesting.NONE) + fun forceEnableAppAndOsDeprecation(value: Boolean) { + enableAppAndOsDeprecation = value + } + @VisibleForTesting(otherwise = VisibleForTesting.NONE) fun reset() { enableDownloadsSupport = ENABLE_DOWNLOADS_SUPPORT_DEFAULT_VALUE @@ -346,6 +386,7 @@ class TestPlatformParameterModule { ENABLE_INTERACTION_CONFIG_CHANGE_STATE_RETENTION_DEFAULT_VALUE enablePerformanceMetricsCollection = ENABLE_PERFORMANCE_METRICS_COLLECTION_DEFAULT_VALUE enableAppAndOsDeprecation = ENABLE_APP_AND_OS_DEPRECATION_DEFAULT_VALUE + enableOnboardingFlowV2 = ENABLE_ONBOARDING_FLOW_V2_DEFAULT_VALUE } } } diff --git a/testing/src/test/java/org/oppia/android/testing/FakeAnalyticsEventLoggerTest.kt b/testing/src/test/java/org/oppia/android/testing/FakeAnalyticsEventLoggerTest.kt index c3d4b258494..b6b3870763a 100644 --- a/testing/src/test/java/org/oppia/android/testing/FakeAnalyticsEventLoggerTest.kt +++ b/testing/src/test/java/org/oppia/android/testing/FakeAnalyticsEventLoggerTest.kt @@ -75,7 +75,7 @@ class FakeAnalyticsEventLoggerTest { @Test fun testFakeEventLogger_logNothing_getMostRecent_returnsFailure() { - assertThrows(NoSuchElementException::class) { fakeAnalyticsEventLogger.getMostRecentEvent() } + assertThrows() { fakeAnalyticsEventLogger.getMostRecentEvent() } } @Test @@ -83,7 +83,7 @@ class FakeAnalyticsEventLoggerTest { analyticsEventLogger.logEvent(eventLog1) fakeAnalyticsEventLogger.clearAllEvents() - val eventException = assertThrows(NoSuchElementException::class) { + val eventException = assertThrows() { fakeAnalyticsEventLogger.getMostRecentEvent() } @@ -141,7 +141,7 @@ class FakeAnalyticsEventLoggerTest { @Test fun testGetOldestEvent_noEventsLogged_throwsException() { - assertThrows(NoSuchElementException::class) { fakeAnalyticsEventLogger.getOldestEvent() } + assertThrows() { fakeAnalyticsEventLogger.getOldestEvent() } } @Test @@ -169,7 +169,7 @@ class FakeAnalyticsEventLoggerTest { analyticsEventLogger.logEvent(eventLog1) fakeAnalyticsEventLogger.clearAllEvents() - assertThrows(NoSuchElementException::class) { fakeAnalyticsEventLogger.getOldestEvent() } + assertThrows() { fakeAnalyticsEventLogger.getOldestEvent() } } @Test @@ -234,7 +234,7 @@ class FakeAnalyticsEventLoggerTest { analyticsEventLogger.logEvent(eventLog2) analyticsEventLogger.logEvent(eventLog1) - assertThrows(IllegalArgumentException::class) { + assertThrows() { fakeAnalyticsEventLogger.getMostRecentEvents(count = -1) } } diff --git a/testing/src/test/java/org/oppia/android/testing/FakeExceptionLoggerTest.kt b/testing/src/test/java/org/oppia/android/testing/FakeExceptionLoggerTest.kt index baa7483b27e..433731da58c 100644 --- a/testing/src/test/java/org/oppia/android/testing/FakeExceptionLoggerTest.kt +++ b/testing/src/test/java/org/oppia/android/testing/FakeExceptionLoggerTest.kt @@ -69,7 +69,7 @@ class FakeExceptionLoggerTest { @Test fun testFakeExceptionLogger_logNothing_getMostRecent_returnsFailure() { - val exception = assertThrows(NoSuchElementException::class) { + val exception = assertThrows() { fakeExceptionLogger.getMostRecentException() } @@ -81,7 +81,7 @@ class FakeExceptionLoggerTest { exceptionLogger.logException(IllegalStateException("Test Exception")) fakeExceptionLogger.clearAllExceptions() - val exception = assertThrows(NoSuchElementException::class) { + val exception = assertThrows() { fakeExceptionLogger.getMostRecentException() } diff --git a/testing/src/test/java/org/oppia/android/testing/FakeFirestoreEventLoggerTest.kt b/testing/src/test/java/org/oppia/android/testing/FakeFirestoreEventLoggerTest.kt new file mode 100644 index 00000000000..b04b5d13890 --- /dev/null +++ b/testing/src/test/java/org/oppia/android/testing/FakeFirestoreEventLoggerTest.kt @@ -0,0 +1,302 @@ +package org.oppia.android.testing + +import android.app.Application +import android.content.Context +import androidx.test.core.app.ApplicationProvider +import androidx.test.ext.junit.runners.AndroidJUnit4 +import com.google.common.truth.Truth.assertThat +import dagger.BindsInstance +import dagger.Component +import dagger.Module +import dagger.Provides +import org.junit.Before +import org.junit.Test +import org.junit.runner.RunWith +import org.oppia.android.app.model.EventLog +import org.oppia.android.app.model.EventLog.Priority +import org.oppia.android.domain.oppialogger.LogStorageModule +import org.oppia.android.testing.robolectric.RobolectricModule +import org.oppia.android.testing.threading.TestDispatcherModule +import org.oppia.android.testing.time.FakeOppiaClockModule +import org.oppia.android.util.logging.firebase.FirestoreEventLogger +import org.robolectric.annotation.Config +import org.robolectric.annotation.LooperMode +import javax.inject.Inject +import javax.inject.Singleton + +/** Tests for [fakeEventLogger]. */ +// FunctionName: test names are conventionally named with underscores. +@Suppress("FunctionName") +@RunWith(AndroidJUnit4::class) +@LooperMode(LooperMode.Mode.PAUSED) +@Config(manifest = Config.NONE) +class FakeFirestoreEventLoggerTest { + + @Inject + lateinit var fakeEventLogger: FakeFirestoreEventLogger + + @Inject + lateinit var eventLogger: FirestoreEventLogger + + private val eventLog1 = EventLog.newBuilder().setPriority(Priority.ESSENTIAL).build() + private val eventLog2 = EventLog.newBuilder().setPriority(Priority.OPTIONAL).build() + + @Before + fun setUp() { + setUpTestApplicationComponent() + } + + @Test + fun testfakeEventLogger_logEvent_returnsEvent() { + eventLogger.uploadEvent(eventLog1) + val event = fakeEventLogger.getMostRecentEvent() + + assertThat(event).isEqualTo(eventLog1) + assertThat(event.priority).isEqualTo(Priority.ESSENTIAL) + } + + @Test + fun testfakeEventLogger_logEventTwice_returnsLatestEvent() { + eventLogger.uploadEvent(eventLog1) + eventLogger.uploadEvent(eventLog2) + val event = fakeEventLogger.getMostRecentEvent() + + assertThat(event).isEqualTo(eventLog2) + assertThat(event.priority).isEqualTo(Priority.OPTIONAL) + } + + @Test + fun testfakeEventLogger_logEvent_clearAllEvents_logEventAgain_returnsLatestEvent() { + eventLogger.uploadEvent(eventLog1) + fakeEventLogger.clearAllEvents() + eventLogger.uploadEvent(eventLog2) + val event = fakeEventLogger.getMostRecentEvent() + + assertThat(event).isEqualTo(eventLog2) + assertThat(event.priority).isEqualTo(Priority.OPTIONAL) + } + + @Test + fun testfakeEventLogger_logNothing_getMostRecent_returnsFailure() { + assertThrows() { fakeEventLogger.getMostRecentEvent() } + } + + @Test + fun testfakeEventLogger_logEvent_clearAllEvents_getMostRecent_returnsFailure() { + eventLogger.uploadEvent(eventLog1) + fakeEventLogger.clearAllEvents() + + val eventException = assertThrows() { + fakeEventLogger.getMostRecentEvent() + } + + assertThat(eventException).isInstanceOf(NoSuchElementException::class.java) + } + + @Test + fun testfakeEventLogger_clearAllEvents_returnsEmptyList() { + fakeEventLogger.clearAllEvents() + val isListEmpty = fakeEventLogger.noEventsPresent() + + assertThat(isListEmpty).isTrue() + } + + @Test + fun testfakeEventLogger_logEvent_clearAllEvents_returnsEmptyList() { + eventLogger.uploadEvent(eventLog1) + fakeEventLogger.clearAllEvents() + val isListEmpty = fakeEventLogger.noEventsPresent() + + assertThat(isListEmpty).isTrue() + } + + @Test + fun testfakeEventLogger_logMultipleEvents_clearAllEvents_returnsEmptyList() { + eventLogger.uploadEvent(eventLog1) + eventLogger.uploadEvent(eventLog2) + fakeEventLogger.clearAllEvents() + val isListEmpty = fakeEventLogger.noEventsPresent() + + assertThat(isListEmpty).isTrue() + } + + @Test + fun testfakeEventLogger_logEvent_returnsNonEmptyList() { + eventLogger.uploadEvent(eventLog1) + val isListEmpty = fakeEventLogger.noEventsPresent() + + assertThat(isListEmpty).isFalse() + } + + @Test + fun testfakeEventLogger_logMultipleEvents_returnsNonEmptyList() { + eventLogger.uploadEvent(eventLog1) + eventLogger.uploadEvent(eventLog2) + + val eventLogStatus1 = fakeEventLogger.hasEventLogged { it == eventLog1 } + val eventLogStatus2 = fakeEventLogger.hasEventLogged { it == eventLog2 } + val eventListStatus = fakeEventLogger.noEventsPresent() + + assertThat(eventListStatus).isFalse() + assertThat(eventLogStatus1).isTrue() + assertThat(eventLogStatus2).isTrue() + } + + @Test + fun testGetOldestEvent_noEventsLogged_throwsException() { + assertThrows() { fakeEventLogger.getOldestEvent() } + } + + @Test + fun testGetOldestEvent_oneEventLogged_returnsLoggedEvent() { + eventLogger.uploadEvent(eventLog1) + + val oldestEvent = fakeEventLogger.getOldestEvent() + + assertThat(oldestEvent).isEqualTo(eventLog1) + } + + @Test + fun testGetOldestEvent_twoEventsLogged_returnsFirstEventLogged() { + eventLogger.uploadEvent(eventLog2) + eventLogger.uploadEvent(eventLog1) + + val oldestEvent = fakeEventLogger.getOldestEvent() + + assertThat(oldestEvent).isEqualTo(eventLog2) + } + + @Test + fun testGetOldestEvent_twoEventsLogged_clearEvents_throwsException() { + eventLogger.uploadEvent(eventLog2) + eventLogger.uploadEvent(eventLog1) + fakeEventLogger.clearAllEvents() + + assertThrows() { fakeEventLogger.getOldestEvent() } + } + + @Test + fun testGetOldestEvent_eventLogged_cleared_newEventLogged_returnsLatestEventLog() { + eventLogger.uploadEvent(eventLog2) + fakeEventLogger.clearAllEvents() + eventLogger.uploadEvent(eventLog1) + + val oldestEvent = fakeEventLogger.getOldestEvent() + + assertThat(oldestEvent).isEqualTo(eventLog1) + } + + @Test + fun testGetMostRecentEvents_twoEvents_noEventsLogged_returnsEmptyList() { + val mostRecentEvents = fakeEventLogger.getMostRecentEvents(count = 2) + + assertThat(mostRecentEvents).isEmpty() + } + + @Test + fun testGetMostRecentEvents_twoEvents_oneEventLogged_returnsOneItemList() { + eventLogger.uploadEvent(eventLog1) + + val mostRecentEvents = fakeEventLogger.getMostRecentEvents(count = 2) + + assertThat(mostRecentEvents).containsExactly(eventLog1) + } + + @Test + fun testGetMostRecentEvents_twoEvents_twoEventsLogged_returnsEventsInOrder() { + eventLogger.uploadEvent(eventLog2) + eventLogger.uploadEvent(eventLog1) + + val mostRecentEvents = fakeEventLogger.getMostRecentEvents(count = 2) + + assertThat(mostRecentEvents).containsExactly(eventLog2, eventLog1).inOrder() + } + + @Test + fun testGetMostRecentEvents_oneEvent_twoEventsLogged_returnsSingleLatestEvent() { + eventLogger.uploadEvent(eventLog2) + eventLogger.uploadEvent(eventLog1) + + val mostRecentEvents = fakeEventLogger.getMostRecentEvents(count = 1) + + assertThat(mostRecentEvents).containsExactly(eventLog1) + } + + @Test + fun testGetMostRecentEvents_zeroEvents_twoEventsLogged_returnsEmptyList() { + eventLogger.uploadEvent(eventLog2) + eventLogger.uploadEvent(eventLog1) + + val mostRecentEvents = fakeEventLogger.getMostRecentEvents(count = 0) + + assertThat(mostRecentEvents).isEmpty() + } + + @Test + fun testGetMostRecentEvents_negativeEvents_twoEventsLogged_throwsException() { + eventLogger.uploadEvent(eventLog2) + eventLogger.uploadEvent(eventLog1) + + assertThrows() { + fakeEventLogger.getMostRecentEvents(count = -1) + } + } + + @Test + fun testGetMostRecentEvents_twoEventsLogged_eventsCleared_returnsEmptyList() { + eventLogger.uploadEvent(eventLog2) + eventLogger.uploadEvent(eventLog1) + fakeEventLogger.clearAllEvents() + + val mostRecentEvents = fakeEventLogger.getMostRecentEvents(count = 2) + + assertThat(mostRecentEvents).isEmpty() + } + + @Test + fun testGetMostRecentEvents_eventLogged_cleared_newEventLogged_returnsNewestEvent() { + eventLogger.uploadEvent(eventLog1) + fakeEventLogger.clearAllEvents() + eventLogger.uploadEvent(eventLog2) + + val mostRecentEvents = fakeEventLogger.getMostRecentEvents(count = 2) + + assertThat(mostRecentEvents).containsExactly(eventLog2) + } + + private fun setUpTestApplicationComponent() { + DaggerFakeFirestoreEventLoggerTest_TestApplicationComponent.builder() + .setApplication(ApplicationProvider.getApplicationContext()) + .build() + .inject(this) + } + + // TODO(#89): Move this to a common test application component. + @Module + class TestModule { + @Provides + @Singleton + fun provideContext(application: Application): Context { + return application + } + } + + // TODO(#89): Move this to a common test application component. + @Singleton + @Component( + modules = [ + TestModule::class, TestLogReportingModule::class, RobolectricModule::class, + TestDispatcherModule::class, LogStorageModule::class, FakeOppiaClockModule::class + ] + ) + interface TestApplicationComponent { + @Component.Builder + interface Builder { + @BindsInstance + fun setApplication(application: Application): Builder + fun build(): TestApplicationComponent + } + + fun inject(fakeEventLoggerTest: FakeFirestoreEventLoggerTest) + } +} diff --git a/testing/src/test/java/org/oppia/android/testing/FakePerformanceMetricsEventLoggerTest.kt b/testing/src/test/java/org/oppia/android/testing/FakePerformanceMetricsEventLoggerTest.kt index 63afc482661..7f7b55a2d17 100644 --- a/testing/src/test/java/org/oppia/android/testing/FakePerformanceMetricsEventLoggerTest.kt +++ b/testing/src/test/java/org/oppia/android/testing/FakePerformanceMetricsEventLoggerTest.kt @@ -78,7 +78,7 @@ class FakePerformanceMetricsEventLoggerTest { @Test fun testFakeMetricsEventLogger_logNothing_getMostRecent_returnsFailure() { - assertThrows(NoSuchElementException::class) { + assertThrows() { fakePerformanceMetricsEventLogger.getMostRecentPerformanceMetricsEvent() } } @@ -88,7 +88,7 @@ class FakePerformanceMetricsEventLoggerTest { performanceMetricsEventLogger.logPerformanceMetric(metricLog1) fakePerformanceMetricsEventLogger.clearAllPerformanceMetricsEvents() - assertThrows(NoSuchElementException::class) { + assertThrows() { fakePerformanceMetricsEventLogger.getMostRecentPerformanceMetricsEvent() } } @@ -148,7 +148,7 @@ class FakePerformanceMetricsEventLoggerTest { @Test fun testGetOldestEvent_noEventsLogged_throwsException() { - assertThrows(NoSuchElementException::class) { + assertThrows() { fakePerformanceMetricsEventLogger.getOldestPerformanceMetricsEvent() } } @@ -178,7 +178,7 @@ class FakePerformanceMetricsEventLoggerTest { performanceMetricsEventLogger.logPerformanceMetric(metricLog1) fakePerformanceMetricsEventLogger.clearAllPerformanceMetricsEvents() - assertThrows(NoSuchElementException::class) { + assertThrows() { fakePerformanceMetricsEventLogger.getOldestPerformanceMetricsEvent() } } @@ -255,7 +255,7 @@ class FakePerformanceMetricsEventLoggerTest { performanceMetricsEventLogger.logPerformanceMetric(metricLog2) performanceMetricsEventLogger.logPerformanceMetric(metricLog1) - assertThrows(IllegalArgumentException::class) { + assertThrows() { fakePerformanceMetricsEventLogger.getMostRecentPerformanceMetricsEvents(count = -1) } } diff --git a/testing/src/test/java/org/oppia/android/testing/data/DataProviderTestMonitorTest.kt b/testing/src/test/java/org/oppia/android/testing/data/DataProviderTestMonitorTest.kt index 9df6e5257d3..aaa3f578c02 100644 --- a/testing/src/test/java/org/oppia/android/testing/data/DataProviderTestMonitorTest.kt +++ b/testing/src/test/java/org/oppia/android/testing/data/DataProviderTestMonitorTest.kt @@ -167,7 +167,7 @@ class DataProviderTestMonitorTest { } val monitor = monitorFactory.createMonitor(dataProvider) - val failure = assertThrows(IllegalStateException::class) { monitor.waitForNextSuccessResult() } + val failure = assertThrows() { monitor.waitForNextSuccessResult() } assertThat(failure).hasMessageThat().contains("Expected next result to be a success") } @@ -179,7 +179,7 @@ class DataProviderTestMonitorTest { } val monitor = monitorFactory.createMonitor(dataProvider) - val failure = assertThrows(IllegalStateException::class) { monitor.waitForNextSuccessResult() } + val failure = assertThrows() { monitor.waitForNextSuccessResult() } assertThat(failure).hasMessageThat().contains("Expected next result to be a success") } @@ -221,7 +221,7 @@ class DataProviderTestMonitorTest { monitor.waitForNextResult() // Wait for the first result. asyncDataSubscriptionManager.notifyChangeAsync("test") - val failure = assertThrows(IllegalStateException::class) { monitor.waitForNextSuccessResult() } + val failure = assertThrows() { monitor.waitForNextSuccessResult() } assertThat(failure).hasMessageThat().contains("Expected next result to be a success") } @@ -251,7 +251,7 @@ class DataProviderTestMonitorTest { val monitor = monitorFactory.createMonitor(dataProvider) // Internal expectation failure since the operation hasn't completed. - assertThrows(AssertionError::class) { monitor.ensureNextResultIsSuccess() } + assertThrows() { monitor.ensureNextResultIsSuccess() } } @Test @@ -275,7 +275,7 @@ class DataProviderTestMonitorTest { val monitor = monitorFactory.createMonitor(dataProvider) testCoroutineDispatchers.runCurrent() // Ensure the subscription is updated. - val failure = assertThrows(IllegalStateException::class) { monitor.ensureNextResultIsSuccess() } + val failure = assertThrows() { monitor.ensureNextResultIsSuccess() } assertThat(failure).hasMessageThat().contains("Expected next result to be a success") } @@ -288,26 +288,11 @@ class DataProviderTestMonitorTest { val monitor = monitorFactory.createMonitor(dataProvider) testCoroutineDispatchers.runCurrent() // Ensure the subscription is updated. - val failure = assertThrows(IllegalStateException::class) { monitor.ensureNextResultIsSuccess() } + val failure = assertThrows() { monitor.ensureNextResultIsSuccess() } assertThat(failure).hasMessageThat().contains("Expected next result to be a success") } - @Test - fun testEnsureNextResultIsSuccess_failureThenSuccess_notified_throwsException() { - val dataProvider = - createDataProviderWithResultsQueue( - "test", AsyncResult.Failure(Exception("Failure")), AsyncResult.Success("str value") - ) - val monitor = monitorFactory.createMonitor(dataProvider) - monitor.waitForNextResult() // Wait for the first result. - - asyncDataSubscriptionManager.notifyChangeAsync("test") - testCoroutineDispatchers.runCurrent() // Ensure the subscription is updated. - // Internal expectation failure since the operation hasn't completed. - assertThrows(AssertionError::class) { monitor.ensureNextResultIsSuccess() } - } - @Test fun testEnsureNextResultIsSuccess_failureThenSuccess_notified_wait_returnsLatest() { val dataProvider = @@ -335,7 +320,7 @@ class DataProviderTestMonitorTest { asyncDataSubscriptionManager.notifyChangeAsync("test") testCoroutineDispatchers.runCurrent() // Ensure the subscription is updated. - val failure = assertThrows(IllegalStateException::class) { monitor.ensureNextResultIsSuccess() } + val failure = assertThrows() { monitor.ensureNextResultIsSuccess() } assertThat(failure).hasMessageThat().contains("Expected next result to be a success") } @@ -365,7 +350,7 @@ class DataProviderTestMonitorTest { } val monitor = monitorFactory.createMonitor(dataProvider) - val failure = assertThrows(IllegalStateException::class) { monitor.waitForNextFailingResult() } + val failure = assertThrows() { monitor.waitForNextFailingResult() } assertThat(failure).hasMessageThat().contains("Expected next result to be a failure") } @@ -389,7 +374,7 @@ class DataProviderTestMonitorTest { } val monitor = monitorFactory.createMonitor(dataProvider) - val failure = assertThrows(IllegalStateException::class) { monitor.waitForNextFailingResult() } + val failure = assertThrows() { monitor.waitForNextFailingResult() } assertThat(failure).hasMessageThat().contains("Expected next result to be a failure") } @@ -419,7 +404,7 @@ class DataProviderTestMonitorTest { monitor.waitForNextResult() // Wait for the first result. asyncDataSubscriptionManager.notifyChangeAsync("test") - val failure = assertThrows(IllegalStateException::class) { monitor.waitForNextFailingResult() } + val failure = assertThrows() { monitor.waitForNextFailingResult() } assertThat(failure).hasMessageThat().contains("Expected next result to be a failure") } @@ -449,7 +434,7 @@ class DataProviderTestMonitorTest { val monitor = monitorFactory.createMonitor(dataProvider) // Internal expectation failure since the operation hasn't completed. - assertThrows(AssertionError::class) { monitor.ensureNextResultIsSuccess() } + assertThrows() { monitor.ensureNextResultIsSuccess() } } @Test @@ -473,7 +458,7 @@ class DataProviderTestMonitorTest { val monitor = monitorFactory.createMonitor(dataProvider) testCoroutineDispatchers.runCurrent() // Ensure the subscription is updated. - val failure = assertThrows(IllegalStateException::class) { monitor.ensureNextResultIsFailing() } + val failure = assertThrows() { monitor.ensureNextResultIsFailing() } assertThat(failure).hasMessageThat().contains("Expected next result to be a failure") } @@ -486,7 +471,7 @@ class DataProviderTestMonitorTest { val monitor = monitorFactory.createMonitor(dataProvider) testCoroutineDispatchers.runCurrent() // Ensure the subscription is updated. - val failure = assertThrows(IllegalStateException::class) { monitor.ensureNextResultIsFailing() } + val failure = assertThrows() { monitor.ensureNextResultIsFailing() } assertThat(failure).hasMessageThat().contains("Expected next result to be a failure") } @@ -502,7 +487,7 @@ class DataProviderTestMonitorTest { asyncDataSubscriptionManager.notifyChangeAsync("test") // Internal expectation failure since the operation hasn't completed. - assertThrows(AssertionError::class) { monitor.ensureNextResultIsFailing() } + assertThrows() { monitor.ensureNextResultIsFailing() } } @Test @@ -532,7 +517,7 @@ class DataProviderTestMonitorTest { asyncDataSubscriptionManager.notifyChangeAsync("test") testCoroutineDispatchers.runCurrent() // Ensure the subscription is updated. - val failure = assertThrows(IllegalStateException::class) { monitor.ensureNextResultIsFailing() } + val failure = assertThrows() { monitor.ensureNextResultIsFailing() } assertThat(failure).hasMessageThat().contains("Expected next result to be a failure") } @@ -563,7 +548,7 @@ class DataProviderTestMonitorTest { val monitor = monitorFactory.createMonitor(dataProvider) // Verify that the method wsa actually called despite not being expected to have been. - assertThrows(NeverWantedButInvoked::class) { monitor.verifyProviderIsNotUpdated() } + assertThrows() { monitor.verifyProviderIsNotUpdated() } } @Test @@ -574,7 +559,7 @@ class DataProviderTestMonitorTest { val monitor = monitorFactory.createMonitor(dataProvider) // Verify that the method wsa actually called despite not being expected to have been. - assertThrows(NeverWantedButInvoked::class) { monitor.verifyProviderIsNotUpdated() } + assertThrows() { monitor.verifyProviderIsNotUpdated() } } @Test @@ -585,7 +570,7 @@ class DataProviderTestMonitorTest { val monitor = monitorFactory.createMonitor(dataProvider) // Verify that the method wsa actually called despite not being expected to have been. - assertThrows(NeverWantedButInvoked::class) { monitor.verifyProviderIsNotUpdated() } + assertThrows() { monitor.verifyProviderIsNotUpdated() } } @Test @@ -599,7 +584,7 @@ class DataProviderTestMonitorTest { asyncDataSubscriptionManager.notifyChangeAsync("test") // Verify that the method wsa actually called despite not being expected to have been. - assertThrows(NeverWantedButInvoked::class) { monitor.verifyProviderIsNotUpdated() } + assertThrows() { monitor.verifyProviderIsNotUpdated() } } @Test @@ -615,7 +600,7 @@ class DataProviderTestMonitorTest { asyncDataSubscriptionManager.notifyChangeAsync("test") // Verify that the method wsa actually called despite not being expected to have been. - assertThrows(NeverWantedButInvoked::class) { monitor.verifyProviderIsNotUpdated() } + assertThrows() { monitor.verifyProviderIsNotUpdated() } } @Test @@ -630,7 +615,7 @@ class DataProviderTestMonitorTest { asyncDataSubscriptionManager.notifyChangeAsync("test") // Verify that the method wsa actually called despite not being expected to have been. - assertThrows(NeverWantedButInvoked::class) { monitor.verifyProviderIsNotUpdated() } + assertThrows() { monitor.verifyProviderIsNotUpdated() } } @Test @@ -657,7 +642,7 @@ class DataProviderTestMonitorTest { } val failure = - assertThrows(AssertionError::class) { + assertThrows() { monitorFactory.ensureDataProviderExecutes(dataProvider) } @@ -673,7 +658,7 @@ class DataProviderTestMonitorTest { } val failure = - assertThrows(AssertionError::class) { + assertThrows() { monitorFactory.ensureDataProviderExecutes(dataProvider) } @@ -688,7 +673,7 @@ class DataProviderTestMonitorTest { AsyncResult.Failure(Exception("Failure")) } - val failure = assertThrows(IllegalStateException::class) { + val failure = assertThrows() { monitorFactory.waitForNextSuccessfulResult(dataProvider) } @@ -727,7 +712,7 @@ class DataProviderTestMonitorTest { ) monitorFactory.waitForNextSuccessfulResult(dataProvider) - val failure = assertThrows(IllegalStateException::class) { + val failure = assertThrows() { monitorFactory.waitForNextSuccessfulResult(dataProvider) } @@ -770,7 +755,7 @@ class DataProviderTestMonitorTest { } val failure = - assertThrows(IllegalStateException::class) { + assertThrows() { monitorFactory.waitForNextSuccessfulResult(dataProvider) } @@ -783,7 +768,7 @@ class DataProviderTestMonitorTest { AsyncResult.Failure(Exception("Failure")) } - val failure = assertThrows(IllegalStateException::class) { + val failure = assertThrows() { monitorFactory.waitForNextSuccessfulResult(dataProvider) } @@ -822,7 +807,7 @@ class DataProviderTestMonitorTest { ) monitorFactory.waitForNextSuccessfulResult(dataProvider) - val failure = assertThrows(IllegalStateException::class) { + val failure = assertThrows() { monitorFactory.waitForNextSuccessfulResult(dataProvider) } @@ -864,7 +849,7 @@ class DataProviderTestMonitorTest { AsyncResult.Pending() } - val failure = assertThrows(IllegalStateException::class) { + val failure = assertThrows() { monitorFactory.waitForNextFailureResult(dataProvider) } @@ -888,7 +873,7 @@ class DataProviderTestMonitorTest { AsyncResult.Success("str value") } - val failure = assertThrows(IllegalStateException::class) { + val failure = assertThrows() { monitorFactory.waitForNextFailureResult(dataProvider) } @@ -916,7 +901,7 @@ class DataProviderTestMonitorTest { ) monitorFactory.waitForNextFailureResult(dataProvider) - val failure = assertThrows(IllegalStateException::class) { + val failure = assertThrows() { monitorFactory.waitForNextFailureResult(dataProvider) } diff --git a/testing/src/test/java/org/oppia/android/testing/firebase/BUILD.bazel b/testing/src/test/java/org/oppia/android/testing/firebase/BUILD.bazel new file mode 100644 index 00000000000..c6d5f002b6d --- /dev/null +++ b/testing/src/test/java/org/oppia/android/testing/firebase/BUILD.bazel @@ -0,0 +1,48 @@ +""" +Tests for test-only Firebase utilities. +""" + +load("@dagger//:workspace_defs.bzl", "dagger_rules") +load("//:oppia_android_test.bzl", "oppia_android_test") + +oppia_android_test( + name = "FakeFirebaseAuthWrapperImplTest", + srcs = ["FakeFirebaseAuthWrapperImplTest.kt"], + custom_package = "org.oppia.android.testing.firebase", + test_class = "org.oppia.android.testing.firebase.FakeFirebaseAuthWrapperImplTest", + test_manifest = "//testing:test_manifest", + deps = [ + ":dagger", + "//domain/src/main/java/org/oppia/android/domain/oppialogger/analytics:prod_module", + "//testing", + "//testing/src/main/java/org/oppia/android/testing/robolectric:test_module", + "//testing/src/main/java/org/oppia/android/testing/threading:test_module", + "//testing/src/main/java/org/oppia/android/testing/time:test_module", + "//third_party:com_google_truth_truth", + "//third_party:junit_junit", + "//third_party:org_robolectric_robolectric", + "//third_party:robolectric_android-all", + ], +) + +oppia_android_test( + name = "TestAuthenticationModuleTest", + srcs = ["TestAuthenticationModuleTest.kt"], + custom_package = "org.oppia.android.testing.firebase", + test_class = "org.oppia.android.testing.firebase.TestAuthenticationModuleTest", + test_manifest = "//testing:test_manifest", + deps = [ + ":dagger", + "//domain/src/main/java/org/oppia/android/domain/oppialogger/analytics:prod_module", + "//testing", + "//testing/src/main/java/org/oppia/android/testing/robolectric:test_module", + "//testing/src/main/java/org/oppia/android/testing/threading:test_module", + "//testing/src/main/java/org/oppia/android/testing/time:test_module", + "//third_party:com_google_truth_truth", + "//third_party:junit_junit", + "//third_party:org_robolectric_robolectric", + "//third_party:robolectric_android-all", + ], +) + +dagger_rules() diff --git a/testing/src/test/java/org/oppia/android/testing/firebase/FakeFirebaseAuthWrapperImplTest.kt b/testing/src/test/java/org/oppia/android/testing/firebase/FakeFirebaseAuthWrapperImplTest.kt new file mode 100644 index 00000000000..fff494e2ec3 --- /dev/null +++ b/testing/src/test/java/org/oppia/android/testing/firebase/FakeFirebaseAuthWrapperImplTest.kt @@ -0,0 +1,124 @@ +package org.oppia.android.testing.firebase + +import android.app.Application +import android.content.Context +import androidx.test.core.app.ApplicationProvider +import androidx.test.ext.junit.runners.AndroidJUnit4 +import com.google.common.truth.Truth.assertThat +import dagger.BindsInstance +import dagger.Component +import dagger.Module +import dagger.Provides +import org.junit.Before +import org.junit.Test +import org.junit.runner.RunWith +import org.oppia.android.domain.auth.FirebaseUserWrapper +import org.oppia.android.domain.oppialogger.analytics.ApplicationLifecycleModule +import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.FakeFirebaseAuthWrapperImpl.FakeAuthState +import org.oppia.android.testing.robolectric.RobolectricModule +import org.oppia.android.testing.threading.TestDispatcherModule +import org.oppia.android.testing.time.FakeOppiaClockModule +import org.oppia.android.util.data.DataProvidersInjector +import org.oppia.android.util.data.DataProvidersInjectorProvider +import org.robolectric.annotation.Config +import org.robolectric.annotation.LooperMode +import javax.inject.Inject +import javax.inject.Singleton + +/** Tests for [FakeFirebaseAuthWrapperImpl]. */ +// FunctionName: test names are conventionally named with underscores. +@Suppress("FunctionName") +@RunWith(AndroidJUnit4::class) +@LooperMode(LooperMode.Mode.PAUSED) +@Config(application = FakeFirebaseAuthWrapperImplTest.TestApplication::class) +class FakeFirebaseAuthWrapperImplTest { + @Inject + lateinit var fakeFirebaseAuthWrapperImpl: FakeFirebaseAuthWrapperImpl + + @Before + fun setUp() { + setUpTestApplicationComponent() + } + + @Test + fun testFakeAuthWrapper_getCurrentSignedInUser_userIsSignedIn_returnsFirebaseUserWrapper() { + fakeFirebaseAuthWrapperImpl.simulateSignInSuccess() + val user = fakeFirebaseAuthWrapperImpl.currentUser + + assertThat(user).isInstanceOf(FirebaseUserWrapper::class.java) + } + + @Test + fun testFakeAuthWrapper_getCurrentSignedInUser_userIsNotSignedIn_returnsNull() { + fakeFirebaseAuthWrapperImpl.simulateSignInFailure() + val user = fakeFirebaseAuthWrapperImpl.currentUser + + assertThat(user).isNull() + } + + @Test + fun testFakeAuthWrapper_simulateSignInSuccess_returnsFakeAuthStateSuccess() { + fakeFirebaseAuthWrapperImpl.simulateSignInSuccess() + val authState = fakeFirebaseAuthWrapperImpl.getAuthState() + + assertThat(authState).isEqualTo(FakeAuthState.SUCCESS) + } + + @Test + fun testFakeAuthWrapper_simulateSignInFailure_returnsFakeAuthStateFailure() { + fakeFirebaseAuthWrapperImpl.simulateSignInFailure() + val authState = fakeFirebaseAuthWrapperImpl.getAuthState() + + assertThat(authState).isEqualTo(FakeAuthState.FAILURE) + } + + private fun setUpTestApplicationComponent() { + ApplicationProvider.getApplicationContext() + .inject(this) + } + + @Module + class TestModule { + @Provides + @Singleton + fun provideContext(application: Application): Context { + return application + } + } + + // TODO(#89): Move this to a common test application component. + @Singleton + @Component( + modules = [ + TestModule::class, RobolectricModule::class, FakeOppiaClockModule::class, + ApplicationLifecycleModule::class, TestDispatcherModule::class, + TestAuthenticationModule::class, TestLogReportingModule::class, + ] + ) + interface TestApplicationComponent : DataProvidersInjector { + @Component.Builder + interface Builder { + @BindsInstance + fun setApplication(application: Application): Builder + + fun build(): TestApplicationComponent + } + + fun inject(test: FakeFirebaseAuthWrapperImplTest) + } + + class TestApplication : Application(), DataProvidersInjectorProvider { + private val component: TestApplicationComponent by lazy { + DaggerFakeFirebaseAuthWrapperImplTest_TestApplicationComponent.builder() + .setApplication(this) + .build() + } + + fun inject(test: FakeFirebaseAuthWrapperImplTest) { + component.inject(test) + } + + override fun getDataProvidersInjector(): DataProvidersInjector = component + } +} diff --git a/testing/src/test/java/org/oppia/android/testing/firebase/TestAuthenticationModuleTest.kt b/testing/src/test/java/org/oppia/android/testing/firebase/TestAuthenticationModuleTest.kt new file mode 100644 index 00000000000..284f0b27bc4 --- /dev/null +++ b/testing/src/test/java/org/oppia/android/testing/firebase/TestAuthenticationModuleTest.kt @@ -0,0 +1,81 @@ +package org.oppia.android.testing.firebase + +import android.app.Application +import android.content.Context +import androidx.test.core.app.ApplicationProvider +import androidx.test.ext.junit.runners.AndroidJUnit4 +import com.google.common.truth.Truth.assertThat +import dagger.BindsInstance +import dagger.Component +import dagger.Module +import dagger.Provides +import org.junit.Before +import org.junit.Test +import org.junit.runner.RunWith +import org.oppia.android.domain.auth.FirebaseAuthWrapper +import org.oppia.android.testing.robolectric.RobolectricModule +import org.oppia.android.testing.threading.TestDispatcherModule +import org.oppia.android.util.data.DataProvidersInjector +import org.oppia.android.util.logging.firebase.DebugLogReportingModule +import org.robolectric.annotation.Config +import org.robolectric.annotation.LooperMode +import javax.inject.Inject +import javax.inject.Singleton + +/** Tests for [TestAuthenticationModule]. */ +// FunctionName: test names are conventionally named with underscores. +@Suppress("FunctionName") +@RunWith(AndroidJUnit4::class) +@LooperMode(LooperMode.Mode.PAUSED) +@Config(manifest = Config.NONE) +class TestAuthenticationModuleTest { + + @Inject + lateinit var firebaseAuthWrapper: FirebaseAuthWrapper + + @Before + fun setUp() { + setUpTestApplicationComponent() + } + + @Test + fun testModule_injectsFakeInstanceOfFirebaseAuthWrapper() { + assertThat(firebaseAuthWrapper).isInstanceOf(FakeFirebaseAuthWrapperImpl::class.java) + } + + private fun setUpTestApplicationComponent() { + DaggerTestAuthenticationModuleTest_TestApplicationComponent.builder() + .setApplication(ApplicationProvider.getApplicationContext()) + .build() + .inject(this) + } + + @Module + class TestModule { + @Provides + @Singleton + fun provideContext(application: Application): Context { + return application + } + } + + // TODO(#89): Move this to a common test application component. + @Singleton + @Component( + modules = [ + TestModule::class, TestDispatcherModule::class, RobolectricModule::class, + DebugLogReportingModule::class, TestAuthenticationModule::class + ] + ) + interface TestApplicationComponent : DataProvidersInjector { + @Component.Builder + interface Builder { + @BindsInstance + fun setApplication(application: Application): Builder + + fun build(): TestApplicationComponent + } + + fun inject(test: TestAuthenticationModuleTest) + } +} diff --git a/testing/src/test/java/org/oppia/android/testing/junit/InitializeDefaultLocaleRuleCustomContextTest.kt b/testing/src/test/java/org/oppia/android/testing/junit/InitializeDefaultLocaleRuleCustomContextTest.kt index 0939de4682b..b5076ee912e 100644 --- a/testing/src/test/java/org/oppia/android/testing/junit/InitializeDefaultLocaleRuleCustomContextTest.kt +++ b/testing/src/test/java/org/oppia/android/testing/junit/InitializeDefaultLocaleRuleCustomContextTest.kt @@ -61,6 +61,7 @@ import org.oppia.android.domain.question.QuestionModule import org.oppia.android.domain.topic.PrimeTopicAssetsControllerModule import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestDispatcherModule import org.oppia.android.testing.time.FakeOppiaClockModule @@ -271,7 +272,8 @@ class InitializeDefaultLocaleRuleCustomContextTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/testing/src/test/java/org/oppia/android/testing/junit/InitializeDefaultLocaleRuleOmissionTest.kt b/testing/src/test/java/org/oppia/android/testing/junit/InitializeDefaultLocaleRuleOmissionTest.kt index f2f2b2c89f0..8bf8b9194db 100644 --- a/testing/src/test/java/org/oppia/android/testing/junit/InitializeDefaultLocaleRuleOmissionTest.kt +++ b/testing/src/test/java/org/oppia/android/testing/junit/InitializeDefaultLocaleRuleOmissionTest.kt @@ -59,6 +59,7 @@ import org.oppia.android.domain.topic.PrimeTopicAssetsControllerModule import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.TestLogReportingModule import org.oppia.android.testing.assertThrows +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestDispatcherModule import org.oppia.android.testing.time.FakeOppiaClockModule @@ -105,7 +106,7 @@ class InitializeDefaultLocaleRuleOmissionTest { @Test fun testSuite_withoutRule_doesNotInitializeLocaleHandlerWithDefaultContext() { // Not including the rule should result in a helpful exception being thrown. - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { appLanguageLocaleHandler.getDisplayLocale() } assertThat(exception) @@ -147,7 +148,8 @@ class InitializeDefaultLocaleRuleOmissionTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/testing/src/test/java/org/oppia/android/testing/junit/InitializeDefaultLocaleRuleTest.kt b/testing/src/test/java/org/oppia/android/testing/junit/InitializeDefaultLocaleRuleTest.kt index 89e80d0c6ef..3a8f7eaf441 100644 --- a/testing/src/test/java/org/oppia/android/testing/junit/InitializeDefaultLocaleRuleTest.kt +++ b/testing/src/test/java/org/oppia/android/testing/junit/InitializeDefaultLocaleRuleTest.kt @@ -62,6 +62,7 @@ import org.oppia.android.domain.question.QuestionModule import org.oppia.android.domain.topic.PrimeTopicAssetsControllerModule import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.TestLogReportingModule +import org.oppia.android.testing.firebase.TestAuthenticationModule import org.oppia.android.testing.robolectric.RobolectricModule import org.oppia.android.testing.threading.TestDispatcherModule import org.oppia.android.testing.time.FakeOppiaClockModule @@ -151,7 +152,8 @@ class InitializeDefaultLocaleRuleTest { LoggingIdentifierModule::class, ApplicationLifecycleModule::class, SyncStatusModule::class, MetricLogSchedulerModule::class, TestingBuildFlavorModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) interface TestApplicationComponent : ApplicationComponent { diff --git a/testing/src/test/java/org/oppia/android/testing/threading/CoroutineExecutorServiceTest.kt b/testing/src/test/java/org/oppia/android/testing/threading/CoroutineExecutorServiceTest.kt index 2e158ee93a1..3af786359ca 100644 --- a/testing/src/test/java/org/oppia/android/testing/threading/CoroutineExecutorServiceTest.kt +++ b/testing/src/test/java/org/oppia/android/testing/threading/CoroutineExecutorServiceTest.kt @@ -136,7 +136,7 @@ class CoroutineExecutorServiceTest { fun testExecute_nullParameter_throwsException() { val executorService = createExecutorService() - assertThrows(NullPointerException::class) { executorService.execute(/* command= */ null) } + assertThrows() { executorService.execute(/* command= */ null) } } @Test @@ -144,7 +144,7 @@ class CoroutineExecutorServiceTest { val executorService = createExecutorService() executorService.shutdown() - assertThrows(RejectedExecutionException::class) { executorService.execute(mockRunnable) } + assertThrows() { executorService.execute(mockRunnable) } } @Test @@ -152,7 +152,7 @@ class CoroutineExecutorServiceTest { val executorService = createExecutorService() executorService.shutdownNow() - assertThrows(RejectedExecutionException::class) { executorService.execute(mockRunnable) } + assertThrows() { executorService.execute(mockRunnable) } } @Test @@ -179,7 +179,7 @@ class CoroutineExecutorServiceTest { val executorService = createExecutorService() val nullRunnable: Runnable? = null - assertThrows(NullPointerException::class) { executorService.submit(nullRunnable) } + assertThrows() { executorService.submit(nullRunnable) } } @Test @@ -187,7 +187,7 @@ class CoroutineExecutorServiceTest { val executorService = createExecutorService() executorService.shutdown() - assertThrows(RejectedExecutionException::class) { executorService.submit(mockRunnable) } + assertThrows() { executorService.submit(mockRunnable) } } @Test @@ -195,7 +195,7 @@ class CoroutineExecutorServiceTest { val executorService = createExecutorService() executorService.shutdownNow() - assertThrows(RejectedExecutionException::class) { executorService.submit(mockRunnable) } + assertThrows() { executorService.submit(mockRunnable) } } @Test @@ -222,7 +222,7 @@ class CoroutineExecutorServiceTest { val executorService = createExecutorService() val nullCallable: Callable? = null - assertThrows(NullPointerException::class) { executorService.submit(nullCallable) } + assertThrows() { executorService.submit(nullCallable) } } @Test @@ -230,7 +230,7 @@ class CoroutineExecutorServiceTest { val executorService = createExecutorService() executorService.shutdown() - assertThrows(RejectedExecutionException::class) { executorService.submit(mockCallable) } + assertThrows() { executorService.submit(mockCallable) } } @Test @@ -238,7 +238,7 @@ class CoroutineExecutorServiceTest { val executorService = createExecutorService() executorService.shutdownNow() - assertThrows(RejectedExecutionException::class) { executorService.submit(mockCallable) } + assertThrows() { executorService.submit(mockCallable) } } @Test @@ -271,7 +271,7 @@ class CoroutineExecutorServiceTest { testCoroutineDispatchers.runCurrent() assertThat(callableFuture.isDone).isTrue() - val exception = assertThrows(ExecutionException::class) { callableFuture.get() } + val exception = assertThrows() { callableFuture.get() } assertThat(exception).hasCauseThat().isInstanceOf(Exception::class.java) assertThat(exception).hasCauseThat().hasMessageThat().contains("Task failed") } @@ -420,7 +420,7 @@ class CoroutineExecutorServiceTest { val executorService = createExecutorService() val nullRunnable: Runnable? = null - assertThrows(NullPointerException::class) { + assertThrows() { executorService.submit(nullRunnable, /* result= */ "Task") } } @@ -430,7 +430,7 @@ class CoroutineExecutorServiceTest { val executorService = createExecutorService() executorService.shutdown() - assertThrows(RejectedExecutionException::class) { + assertThrows() { executorService.submit(mockRunnable, /* result= */ "Task") } } @@ -440,7 +440,7 @@ class CoroutineExecutorServiceTest { val executorService = createExecutorService() executorService.shutdownNow() - assertThrows(RejectedExecutionException::class) { + assertThrows() { executorService.submit(mockRunnable, /* result= */ "Task") } } @@ -645,7 +645,7 @@ class CoroutineExecutorServiceTest { // Note that this is not documented in the ExecutorService documentation, it seems necessary // since it doesn't make sense to return false (per the documentation) or block unless a // shutdown request was actually initiated. - assertThrows(IllegalStateException::class) { + assertThrows() { executorService.awaitTermination(/* timeout= */ 1, TimeUnit.SECONDS) } } @@ -746,7 +746,7 @@ class CoroutineExecutorServiceTest { fun testInvokeAll_nullTasks_throwsException() { val executorService = createExecutorService() - assertThrows(NullPointerException::class) { executorService.invokeAll(/* tasks= */ null) } + assertThrows() { executorService.invokeAll(/* tasks= */ null) } } @Test @@ -807,7 +807,7 @@ class CoroutineExecutorServiceTest { val (future1, future2) = deferred.getCompleted() assertThat(future1.isDone).isTrue() assertThat(future2.isDone).isTrue() - assertThrows(ExecutionException::class) { future1.get() } + assertThrows() { future1.get() } assertThat(future2.get()).isEqualTo("Task 2") } @@ -906,7 +906,7 @@ class CoroutineExecutorServiceTest { fun testInvokeAny_nullTasks_throwsException() { val executorService = createExecutorService() - assertThrows(NullPointerException::class) { executorService.invokeAny(/* tasks= */ null) } + assertThrows() { executorService.invokeAny(/* tasks= */ null) } } @Test diff --git a/testing/src/test/java/org/oppia/android/testing/time/FakeOppiaClockTest.kt b/testing/src/test/java/org/oppia/android/testing/time/FakeOppiaClockTest.kt index 5b534916126..aabaee20ebc 100644 --- a/testing/src/test/java/org/oppia/android/testing/time/FakeOppiaClockTest.kt +++ b/testing/src/test/java/org/oppia/android/testing/time/FakeOppiaClockTest.kt @@ -110,7 +110,7 @@ class FakeOppiaClockTest { fun testSetCurrentTimeMs_wallClockMode_throwsException() { fakeOppiaClock.setFakeTimeMode(MODE_WALL_CLOCK_TIME) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { fakeOppiaClock.setCurrentTimeMs(0) } assertThat(exception).hasMessageThat().contains("MODE_FIXED_FAKE_TIME") @@ -128,7 +128,7 @@ class FakeOppiaClockTest { fun testSetCurrentTimeMs_uptimeMillisMode_throwsException() { fakeOppiaClock.setFakeTimeMode(MODE_UPTIME_MILLIS) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { fakeOppiaClock.setCurrentTimeMs(0) } assertThat(exception).hasMessageThat().contains("MODE_FIXED_FAKE_TIME") @@ -226,7 +226,7 @@ class FakeOppiaClockTest { fun testSetCurrentTimeToSameDateTime_wallClockMode_throwsException() { fakeOppiaClock.setFakeTimeMode(MODE_UPTIME_MILLIS) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { fakeOppiaClock.setCurrentTimeToSameDateTime(0) } assertThat(exception).hasMessageThat().contains("MODE_FIXED_FAKE_TIME") @@ -258,7 +258,7 @@ class FakeOppiaClockTest { fun testSetCurrentTimeToSameDateTime_uptimeMillisMode_throwsException() { fakeOppiaClock.setFakeTimeMode(MODE_UPTIME_MILLIS) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { fakeOppiaClock.setCurrentTimeToSameDateTime(0) } assertThat(exception).hasMessageThat().contains("MODE_FIXED_FAKE_TIME") diff --git a/third_party/maven_install.json b/third_party/maven_install.json index 6ac87f7eab6..f154369ddb7 100644 --- a/third_party/maven_install.json +++ b/third_party/maven_install.json @@ -1,14 +1,16 @@ { "dependency_tree": { "__AUTOGENERATED_FILE_DO_NOT_MODIFY_THIS_FILE_MANUALLY": "THERE_IS_NO_DATA_ONLY_ZUUL", - "__INPUT_ARTIFACTS_HASH": 521507787, - "__RESOLVED_ARTIFACTS_HASH": -1467267841, + "__INPUT_ARTIFACTS_HASH": 577686317, + "__RESOLVED_ARTIFACTS_HASH": 445130734, "conflict_resolution": { "androidx.constraintlayout:constraintlayout:1.1.3": "androidx.constraintlayout:constraintlayout:2.0.1", "androidx.core:core:1.0.1": "androidx.core:core:1.3.1", "androidx.recyclerview:recyclerview:1.0.0": "androidx.recyclerview:recyclerview:1.1.0", "androidx.test:core:1.0.0": "androidx.test:core:1.4.0", + "com.google.firebase:firebase-common:19.3.0": "com.google.firebase:firebase-common:20.1.1", "com.google.guava:guava:28.1-android": "com.google.guava:guava:30.1.1-android", + "com.google.protobuf:protobuf-javalite:3.17.3": "com.google.protobuf:protobuf-javalite:3.19.2", "com.google.truth:truth:0.43": "com.google.truth:truth:1.1.3", "junit:junit:4.12": "junit:junit:4.13.2", "org.jetbrains.kotlin:kotlin-reflect:1.3.41": "org.jetbrains.kotlin:kotlin-reflect:1.5.0", @@ -989,10 +991,10 @@ "commons-io:commons-io:2.4", "com.google.guava:guava:30.1.1-android", "com.googlecode.juniversalchardet:juniversalchardet:1.0.3", - "com.google.code.gson:gson:2.8.6", "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.10", "com.squareup:javapoet:1.11.1", - "org.jetbrains.kotlin:kotlin-stdlib:1.5.0" + "org.jetbrains.kotlin:kotlin-stdlib:1.5.0", + "com.google.code.gson:gson:2.8.9" ], "directDependencies": [ "com.android.tools.build.jetifier:jetifier-core:1.0.0-beta04", @@ -1003,9 +1005,9 @@ "commons-io:commons-io:2.4", "com.google.guava:guava:30.1.1-android", "com.googlecode.juniversalchardet:juniversalchardet:1.0.3", - "com.google.code.gson:gson:2.8.6", "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.10", - "com.squareup:javapoet:1.11.1" + "com.squareup:javapoet:1.11.1", + "com.google.code.gson:gson:2.8.9" ], "file": "v1/https/maven.google.com/androidx/databinding/databinding-compiler-common/3.4.2/databinding-compiler-common-3.4.2.jar", "mirror_urls": [ @@ -1028,7 +1030,7 @@ "com.android.databinding:baseLibrary:jar:sources:3.4.2", "org.antlr:antlr4:jar:sources:4.5.3", "org.jetbrains.kotlin:kotlin-stdlib-jdk8:jar:sources:1.4.10", - "com.google.code.gson:gson:jar:sources:2.8.6", + "com.google.code.gson:gson:jar:sources:2.8.9", "androidx.databinding:databinding-common:jar:sources:3.4.2", "com.squareup:javapoet:jar:sources:1.11.1", "commons-io:commons-io:jar:sources:2.4", @@ -1041,7 +1043,7 @@ "com.android.databinding:baseLibrary:jar:sources:3.4.2", "org.antlr:antlr4:jar:sources:4.5.3", "org.jetbrains.kotlin:kotlin-stdlib-jdk8:jar:sources:1.4.10", - "com.google.code.gson:gson:jar:sources:2.8.6", + "com.google.code.gson:gson:jar:sources:2.8.9", "androidx.databinding:databinding-common:jar:sources:3.4.2", "com.squareup:javapoet:jar:sources:1.11.1", "commons-io:commons-io:jar:sources:2.4", @@ -1069,12 +1071,12 @@ "commons-io:commons-io:2.4", "com.google.guava:guava:30.1.1-android", "com.googlecode.juniversalchardet:juniversalchardet:1.0.3", - "com.google.code.gson:gson:2.8.6", "androidx.databinding:databinding-compiler-common:3.4.2", "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.10", "com.squareup:javapoet:1.11.1", "commons-codec:commons-codec:1.10", - "org.jetbrains.kotlin:kotlin-stdlib:1.5.0" + "org.jetbrains.kotlin:kotlin-stdlib:1.5.0", + "com.google.code.gson:gson:2.8.9" ], "directDependencies": [ "androidx.databinding:databinding-common:3.4.2", @@ -1108,7 +1110,7 @@ "androidx.databinding:databinding-compiler-common:jar:sources:3.4.2", "org.antlr:antlr4:jar:sources:4.5.3", "org.jetbrains.kotlin:kotlin-stdlib-jdk8:jar:sources:1.4.10", - "com.google.code.gson:gson:jar:sources:2.8.6", + "com.google.code.gson:gson:jar:sources:2.8.9", "androidx.databinding:databinding-common:jar:sources:3.4.2", "com.squareup:javapoet:jar:sources:1.11.1", "commons-io:commons-io:jar:sources:2.4", @@ -4239,10 +4241,10 @@ "coord": "com.android.tools.build.jetifier:jetifier-core:1.0.0-beta04", "dependencies": [ "org.jetbrains.kotlin:kotlin-stdlib:1.5.0", - "com.google.code.gson:gson:2.8.6" + "com.google.code.gson:gson:2.8.9" ], "directDependencies": [ - "com.google.code.gson:gson:2.8.6", + "com.google.code.gson:gson:2.8.9", "org.jetbrains.kotlin:kotlin-stdlib:1.5.0" ], "file": "v1/https/maven.google.com/com/android/tools/build/jetifier/jetifier-core/1.0.0-beta04/jetifier-core-1.0.0-beta04.jar", @@ -4259,11 +4261,11 @@ { "coord": "com.android.tools.build.jetifier:jetifier-core:jar:sources:1.0.0-beta04", "dependencies": [ - "com.google.code.gson:gson:jar:sources:2.8.6", + "com.google.code.gson:gson:jar:sources:2.8.9", "org.jetbrains.kotlin:kotlin-stdlib:jar:sources:1.5.0" ], "directDependencies": [ - "com.google.code.gson:gson:jar:sources:2.8.6", + "com.google.code.gson:gson:jar:sources:2.8.9", "org.jetbrains.kotlin:kotlin-stdlib:jar:sources:1.5.0" ], "file": "v1/https/maven.google.com/com/android/tools/build/jetifier/jetifier-core/1.0.0-beta04/jetifier-core-1.0.0-beta04-sources.jar", @@ -4670,7 +4672,6 @@ "com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava", "com.github.bumptech.glide:annotations:4.11.0", "androidx.interpolator:interpolator:aar:1.0.0", - "org.codehaus.mojo:animal-sniffer-annotations:1.18", "androidx.annotation:annotation:1.1.0", "com.github.bumptech.glide:disklrucache:4.11.0", "com.google.j2objc:j2objc-annotations:1.3", @@ -4680,12 +4681,13 @@ "androidx.legacy:legacy-support-core-utils:aar:1.0.0", "com.google.guava:guava:30.1.1-android", "androidx.slidingpanelayout:slidingpanelayout:aar:1.0.0", - "com.google.errorprone:error_prone_annotations:2.7.1", + "org.codehaus.mojo:animal-sniffer-annotations:1.19", "androidx.lifecycle:lifecycle-livedata:aar:2.2.0", "androidx.vectordrawable:vectordrawable:aar:1.1.0", "androidx.cursoradapter:cursoradapter:aar:1.0.0", "androidx.drawerlayout:drawerlayout:aar:1.1.0", "androidx.core:core:aar:1.3.1", + "com.google.errorprone:error_prone_annotations:2.9.0", "com.github.bumptech.glide:gifdecoder:4.11.0", "androidx.coordinatorlayout:coordinatorlayout:aar:1.1.0", "androidx.print:print:aar:1.0.0", @@ -4724,7 +4726,6 @@ "dependencies": [ "androidx.documentfile:documentfile:aar:sources:1.0.0", "com.google.guava:guava:jar:sources:30.1.1-android", - "org.codehaus.mojo:animal-sniffer-annotations:jar:sources:1.18", "com.google.code.findbugs:jsr305:jar:sources:3.0.2", "androidx.print:print:aar:sources:1.0.0", "androidx.lifecycle:lifecycle-viewmodel:aar:sources:2.2.0", @@ -4754,8 +4755,9 @@ "com.google.guava:listenablefuture:jar:sources:9999.0-empty-to-avoid-conflict-with-guava", "androidx.customview:customview:aar:sources:1.1.0", "com.google.guava:failureaccess:jar:sources:1.0.1", - "com.google.errorprone:error_prone_annotations:jar:sources:2.7.1", + "com.google.errorprone:error_prone_annotations:jar:sources:2.9.0", "androidx.loader:loader:aar:sources:1.0.0", + "org.codehaus.mojo:animal-sniffer-annotations:jar:sources:1.19", "androidx.vectordrawable:vectordrawable:aar:sources:1.1.0" ], "directDependencies": [ @@ -4917,13 +4919,13 @@ { "coord": "com.google.android.gms:play-services-ads-identifier:aar:17.0.0", "dependencies": [ - "com.google.android.gms:play-services-basement:aar:17.0.0", "androidx.collection:collection:jar:1.1.0", "androidx.core:core:aar:1.3.1", + "com.google.android.gms:play-services-basement:aar:18.0.0", "androidx.fragment:fragment:aar:1.2.0" ], "directDependencies": [ - "com.google.android.gms:play-services-basement:aar:17.0.0" + "com.google.android.gms:play-services-basement:aar:18.0.0" ], "file": "v1/https/maven.google.com/com/google/android/gms/play-services-ads-identifier/17.0.0/play-services-ads-identifier-17.0.0.aar", "mirror_urls": [ @@ -4937,34 +4939,34 @@ "url": "https://maven.google.com/com/google/android/gms/play-services-ads-identifier/17.0.0/play-services-ads-identifier-17.0.0.aar" }, { - "coord": "com.google.android.gms:play-services-base:aar:17.0.0", + "coord": "com.google.android.gms:play-services-base:aar:18.0.1", "dependencies": [ "androidx.collection:collection:jar:1.1.0", - "com.google.android.gms:play-services-tasks:aar:17.0.0", "androidx.fragment:fragment:aar:1.2.0", + "com.google.android.gms:play-services-basement:aar:18.0.0", "androidx.core:core:aar:1.3.1", - "com.google.android.gms:play-services-basement:aar:17.0.0" + "com.google.android.gms:play-services-tasks:aar:18.0.1" ], "directDependencies": [ "androidx.collection:collection:jar:1.1.0", - "com.google.android.gms:play-services-tasks:aar:17.0.0", "androidx.fragment:fragment:aar:1.2.0", + "com.google.android.gms:play-services-basement:aar:18.0.0", "androidx.core:core:aar:1.3.1", - "com.google.android.gms:play-services-basement:aar:17.0.0" + "com.google.android.gms:play-services-tasks:aar:18.0.1" ], - "file": "v1/https/maven.google.com/com/google/android/gms/play-services-base/17.0.0/play-services-base-17.0.0.aar", + "file": "v1/https/maven.google.com/com/google/android/gms/play-services-base/18.0.1/play-services-base-18.0.1.aar", "mirror_urls": [ - "https://maven.google.com/com/google/android/gms/play-services-base/17.0.0/play-services-base-17.0.0.aar", - "https://repo1.maven.org/maven2/com/google/android/gms/play-services-base/17.0.0/play-services-base-17.0.0.aar", - "https://maven.fabric.io/public/com/google/android/gms/play-services-base/17.0.0/play-services-base-17.0.0.aar", - "https://maven.google.com/com/google/android/gms/play-services-base/17.0.0/play-services-base-17.0.0.aar", - "https://repo1.maven.org/maven2/com/google/android/gms/play-services-base/17.0.0/play-services-base-17.0.0.aar" + "https://maven.google.com/com/google/android/gms/play-services-base/18.0.1/play-services-base-18.0.1.aar", + "https://repo1.maven.org/maven2/com/google/android/gms/play-services-base/18.0.1/play-services-base-18.0.1.aar", + "https://maven.fabric.io/public/com/google/android/gms/play-services-base/18.0.1/play-services-base-18.0.1.aar", + "https://maven.google.com/com/google/android/gms/play-services-base/18.0.1/play-services-base-18.0.1.aar", + "https://repo1.maven.org/maven2/com/google/android/gms/play-services-base/18.0.1/play-services-base-18.0.1.aar" ], - "sha256": "dd0980edf729e0d346e2b58e70801dc237c1aed0c7ab274fa3f1c8c8efc64cc7", - "url": "https://maven.google.com/com/google/android/gms/play-services-base/17.0.0/play-services-base-17.0.0.aar" + "sha256": "2896d76f432be52167295bb9ce45ade25c310aeffc04d28cf8db6a15868e83de", + "url": "https://maven.google.com/com/google/android/gms/play-services-base/18.0.1/play-services-base-18.0.1.aar" }, { - "coord": "com.google.android.gms:play-services-basement:aar:17.0.0", + "coord": "com.google.android.gms:play-services-basement:aar:18.0.0", "dependencies": [ "androidx.collection:collection:jar:1.1.0", "androidx.core:core:aar:1.3.1", @@ -4975,57 +4977,56 @@ "androidx.core:core:aar:1.3.1", "androidx.fragment:fragment:aar:1.2.0" ], - "file": "v1/https/maven.google.com/com/google/android/gms/play-services-basement/17.0.0/play-services-basement-17.0.0.aar", + "file": "v1/https/maven.google.com/com/google/android/gms/play-services-basement/18.0.0/play-services-basement-18.0.0.aar", "mirror_urls": [ - "https://maven.google.com/com/google/android/gms/play-services-basement/17.0.0/play-services-basement-17.0.0.aar", - "https://repo1.maven.org/maven2/com/google/android/gms/play-services-basement/17.0.0/play-services-basement-17.0.0.aar", - "https://maven.fabric.io/public/com/google/android/gms/play-services-basement/17.0.0/play-services-basement-17.0.0.aar", - "https://maven.google.com/com/google/android/gms/play-services-basement/17.0.0/play-services-basement-17.0.0.aar", - "https://repo1.maven.org/maven2/com/google/android/gms/play-services-basement/17.0.0/play-services-basement-17.0.0.aar" + "https://maven.google.com/com/google/android/gms/play-services-basement/18.0.0/play-services-basement-18.0.0.aar", + "https://repo1.maven.org/maven2/com/google/android/gms/play-services-basement/18.0.0/play-services-basement-18.0.0.aar", + "https://maven.fabric.io/public/com/google/android/gms/play-services-basement/18.0.0/play-services-basement-18.0.0.aar", + "https://maven.google.com/com/google/android/gms/play-services-basement/18.0.0/play-services-basement-18.0.0.aar", + "https://repo1.maven.org/maven2/com/google/android/gms/play-services-basement/18.0.0/play-services-basement-18.0.0.aar" ], - "sha256": "d324a1785bbc48bfe3639fc847cfd3cf43d49e967b5caf2794240a854557a39c", - "url": "https://maven.google.com/com/google/android/gms/play-services-basement/17.0.0/play-services-basement-17.0.0.aar" + "sha256": "55c1777467901a2d399f3252384c4976284aa35fddfd5995466dbeacb49f9dd6", + "url": "https://maven.google.com/com/google/android/gms/play-services-basement/18.0.0/play-services-basement-18.0.0.aar" }, { "coord": "com.google.android.gms:play-services-measurement-api:aar:17.5.0", "dependencies": [ + "com.google.firebase:firebase-components:aar:17.0.0", "com.google.firebase:firebase-measurement-connector:aar:18.0.0", "com.google.firebase:firebase-installations:aar:16.3.2", "androidx.collection:collection:jar:1.1.0", "com.google.android.gms:play-services-stats:aar:17.0.0", "androidx.annotation:annotation:1.1.0", - "com.google.firebase:firebase-common:aar:19.3.0", "androidx.localbroadcastmanager:localbroadcastmanager:aar:1.0.0", "androidx.legacy:legacy-support-core-utils:aar:1.0.0", "com.google.android.gms:play-services-measurement-sdk-api:aar:17.5.0", - "com.google.android.gms:play-services-tasks:aar:17.0.0", - "com.google.firebase:firebase-components:aar:16.0.0", "com.google.android.gms:play-services-measurement-impl:aar:17.5.0", "androidx.lifecycle:lifecycle-livedata:aar:2.2.0", "androidx.fragment:fragment:aar:1.2.0", + "com.google.android.gms:play-services-basement:aar:18.0.0", "androidx.core:core:aar:1.3.1", "com.google.android.gms:play-services-ads-identifier:aar:17.0.0", "androidx.print:print:aar:1.0.0", - "androidx.annotation:annotation:jar:1.1.0", "androidx.lifecycle:lifecycle-viewmodel:aar:2.2.0", "androidx.documentfile:documentfile:aar:1.0.0", - "com.google.android.gms:play-services-basement:aar:17.0.0", + "com.google.firebase:firebase-common:aar:20.1.1", "com.google.auto.value:auto-value-annotations:jar:1.8.1", "com.google.firebase:firebase-installations-interop:aar:16.0.0", + "com.google.android.gms:play-services-tasks:aar:18.0.1", "com.google.android.gms:play-services-measurement-base:aar:17.5.0", "androidx.loader:loader:aar:1.0.0" ], "directDependencies": [ + "com.google.firebase:firebase-components:aar:17.0.0", "com.google.firebase:firebase-measurement-connector:aar:18.0.0", "com.google.firebase:firebase-installations:aar:16.3.2", - "com.google.firebase:firebase-common:aar:19.3.0", "com.google.android.gms:play-services-measurement-sdk-api:aar:17.5.0", - "com.google.android.gms:play-services-tasks:aar:17.0.0", - "com.google.firebase:firebase-components:aar:16.0.0", "com.google.android.gms:play-services-measurement-impl:aar:17.5.0", + "com.google.android.gms:play-services-basement:aar:18.0.0", "com.google.android.gms:play-services-ads-identifier:aar:17.0.0", - "com.google.android.gms:play-services-basement:aar:17.0.0", + "com.google.firebase:firebase-common:aar:20.1.1", "com.google.firebase:firebase-installations-interop:aar:16.0.0", + "com.google.android.gms:play-services-tasks:aar:18.0.1", "com.google.android.gms:play-services-measurement-base:aar:17.5.0" ], "file": "v1/https/maven.google.com/com/google/android/gms/play-services-measurement-api/17.5.0/play-services-measurement-api-17.5.0.aar", @@ -5042,13 +5043,13 @@ { "coord": "com.google.android.gms:play-services-measurement-base:aar:17.5.0", "dependencies": [ - "com.google.android.gms:play-services-basement:aar:17.0.0", "androidx.collection:collection:jar:1.1.0", "androidx.core:core:aar:1.3.1", + "com.google.android.gms:play-services-basement:aar:18.0.0", "androidx.fragment:fragment:aar:1.2.0" ], "directDependencies": [ - "com.google.android.gms:play-services-basement:aar:17.0.0" + "com.google.android.gms:play-services-basement:aar:18.0.0" ], "file": "v1/https/maven.google.com/com/google/android/gms/play-services-measurement-base/17.5.0/play-services-measurement-base-17.5.0.aar", "mirror_urls": [ @@ -5071,21 +5072,21 @@ "androidx.legacy:legacy-support-core-utils:aar:1.0.0", "androidx.lifecycle:lifecycle-livedata:aar:2.2.0", "androidx.fragment:fragment:aar:1.2.0", + "com.google.android.gms:play-services-basement:aar:18.0.0", "androidx.core:core:aar:1.3.1", "com.google.android.gms:play-services-ads-identifier:aar:17.0.0", "androidx.print:print:aar:1.0.0", "androidx.lifecycle:lifecycle-viewmodel:aar:2.2.0", "androidx.documentfile:documentfile:aar:1.0.0", - "com.google.android.gms:play-services-basement:aar:17.0.0", "com.google.android.gms:play-services-measurement-base:aar:17.5.0", "androidx.loader:loader:aar:1.0.0" ], "directDependencies": [ "androidx.collection:collection:jar:1.1.0", "com.google.android.gms:play-services-stats:aar:17.0.0", + "com.google.android.gms:play-services-basement:aar:18.0.0", "androidx.core:core:aar:1.3.1", "com.google.android.gms:play-services-ads-identifier:aar:17.0.0", - "com.google.android.gms:play-services-basement:aar:17.0.0", "com.google.android.gms:play-services-measurement-base:aar:17.5.0" ], "file": "v1/https/maven.google.com/com/google/android/gms/play-services-measurement-impl/17.5.0/play-services-measurement-impl-17.5.0.aar", @@ -5104,12 +5105,12 @@ "dependencies": [ "androidx.collection:collection:jar:1.1.0", "androidx.fragment:fragment:aar:1.2.0", + "com.google.android.gms:play-services-basement:aar:18.0.0", "androidx.core:core:aar:1.3.1", - "com.google.android.gms:play-services-basement:aar:17.0.0", "com.google.android.gms:play-services-measurement-base:aar:17.5.0" ], "directDependencies": [ - "com.google.android.gms:play-services-basement:aar:17.0.0", + "com.google.android.gms:play-services-basement:aar:18.0.0", "com.google.android.gms:play-services-measurement-base:aar:17.5.0" ], "file": "v1/https/maven.google.com/com/google/android/gms/play-services-measurement-sdk-api/17.5.0/play-services-measurement-sdk-api-17.5.0.aar", @@ -5134,18 +5135,18 @@ "com.google.android.gms:play-services-measurement-impl:aar:17.5.0", "androidx.lifecycle:lifecycle-livedata:aar:2.2.0", "androidx.fragment:fragment:aar:1.2.0", + "com.google.android.gms:play-services-basement:aar:18.0.0", "androidx.core:core:aar:1.3.1", "com.google.android.gms:play-services-ads-identifier:aar:17.0.0", "androidx.print:print:aar:1.0.0", "androidx.lifecycle:lifecycle-viewmodel:aar:2.2.0", "androidx.documentfile:documentfile:aar:1.0.0", - "com.google.android.gms:play-services-basement:aar:17.0.0", "com.google.android.gms:play-services-measurement-base:aar:17.5.0", "androidx.loader:loader:aar:1.0.0" ], "directDependencies": [ "androidx.collection:collection:jar:1.1.0", - "com.google.android.gms:play-services-basement:aar:17.0.0", + "com.google.android.gms:play-services-basement:aar:18.0.0", "com.google.android.gms:play-services-measurement-base:aar:17.5.0", "com.google.android.gms:play-services-measurement-impl:aar:17.5.0" ], @@ -5171,12 +5172,12 @@ "com.google.android.gms:play-services-measurement-impl:aar:17.5.0", "androidx.lifecycle:lifecycle-livedata:aar:2.2.0", "androidx.fragment:fragment:aar:1.2.0", + "com.google.android.gms:play-services-basement:aar:18.0.0", "androidx.core:core:aar:1.3.1", "com.google.android.gms:play-services-ads-identifier:aar:17.0.0", "androidx.print:print:aar:1.0.0", "androidx.lifecycle:lifecycle-viewmodel:aar:2.2.0", "androidx.documentfile:documentfile:aar:1.0.0", - "com.google.android.gms:play-services-basement:aar:17.0.0", "com.google.android.gms:play-services-measurement-base:aar:17.5.0", "androidx.loader:loader:aar:1.0.0" ], @@ -5185,8 +5186,8 @@ "com.google.android.gms:play-services-stats:aar:17.0.0", "androidx.legacy:legacy-support-core-utils:aar:1.0.0", "com.google.android.gms:play-services-measurement-impl:aar:17.5.0", + "com.google.android.gms:play-services-basement:aar:18.0.0", "com.google.android.gms:play-services-ads-identifier:aar:17.0.0", - "com.google.android.gms:play-services-basement:aar:17.0.0", "com.google.android.gms:play-services-measurement-base:aar:17.5.0" ], "file": "v1/https/maven.google.com/com/google/android/gms/play-services-measurement/17.5.0/play-services-measurement-17.5.0.aar", @@ -5209,16 +5210,16 @@ "androidx.legacy:legacy-support-core-utils:aar:1.0.0", "androidx.lifecycle:lifecycle-livedata:aar:2.2.0", "androidx.fragment:fragment:aar:1.2.0", + "com.google.android.gms:play-services-basement:aar:18.0.0", "androidx.core:core:aar:1.3.1", "androidx.print:print:aar:1.0.0", "androidx.lifecycle:lifecycle-viewmodel:aar:2.2.0", "androidx.documentfile:documentfile:aar:1.0.0", - "com.google.android.gms:play-services-basement:aar:17.0.0", "androidx.loader:loader:aar:1.0.0" ], "directDependencies": [ "androidx.legacy:legacy-support-core-utils:aar:1.0.0", - "com.google.android.gms:play-services-basement:aar:17.0.0" + "com.google.android.gms:play-services-basement:aar:18.0.0" ], "file": "v1/https/maven.google.com/com/google/android/gms/play-services-stats/17.0.0/play-services-stats-17.0.0.aar", "mirror_urls": [ @@ -5232,26 +5233,26 @@ "url": "https://maven.google.com/com/google/android/gms/play-services-stats/17.0.0/play-services-stats-17.0.0.aar" }, { - "coord": "com.google.android.gms:play-services-tasks:aar:17.0.0", + "coord": "com.google.android.gms:play-services-tasks:aar:18.0.1", "dependencies": [ - "com.google.android.gms:play-services-basement:aar:17.0.0", "androidx.collection:collection:jar:1.1.0", "androidx.core:core:aar:1.3.1", + "com.google.android.gms:play-services-basement:aar:18.0.0", "androidx.fragment:fragment:aar:1.2.0" ], "directDependencies": [ - "com.google.android.gms:play-services-basement:aar:17.0.0" + "com.google.android.gms:play-services-basement:aar:18.0.0" ], - "file": "v1/https/maven.google.com/com/google/android/gms/play-services-tasks/17.0.0/play-services-tasks-17.0.0.aar", + "file": "v1/https/maven.google.com/com/google/android/gms/play-services-tasks/18.0.1/play-services-tasks-18.0.1.aar", "mirror_urls": [ - "https://maven.google.com/com/google/android/gms/play-services-tasks/17.0.0/play-services-tasks-17.0.0.aar", - "https://repo1.maven.org/maven2/com/google/android/gms/play-services-tasks/17.0.0/play-services-tasks-17.0.0.aar", - "https://maven.fabric.io/public/com/google/android/gms/play-services-tasks/17.0.0/play-services-tasks-17.0.0.aar", - "https://maven.google.com/com/google/android/gms/play-services-tasks/17.0.0/play-services-tasks-17.0.0.aar", - "https://repo1.maven.org/maven2/com/google/android/gms/play-services-tasks/17.0.0/play-services-tasks-17.0.0.aar" + "https://maven.google.com/com/google/android/gms/play-services-tasks/18.0.1/play-services-tasks-18.0.1.aar", + "https://repo1.maven.org/maven2/com/google/android/gms/play-services-tasks/18.0.1/play-services-tasks-18.0.1.aar", + "https://maven.fabric.io/public/com/google/android/gms/play-services-tasks/18.0.1/play-services-tasks-18.0.1.aar", + "https://maven.google.com/com/google/android/gms/play-services-tasks/18.0.1/play-services-tasks-18.0.1.aar", + "https://repo1.maven.org/maven2/com/google/android/gms/play-services-tasks/18.0.1/play-services-tasks-18.0.1.aar" ], - "sha256": "2e6d1738b73647f3fe7a038b9780b97717b3746eae258009197e36e7bf3112a5", - "url": "https://maven.google.com/com/google/android/gms/play-services-tasks/17.0.0/play-services-tasks-17.0.0.aar" + "sha256": "f106db48c6ccfa8e1315a7adc44aecd02ff7355eb3fa7dcdcba8c283a8eb1681", + "url": "https://maven.google.com/com/google/android/gms/play-services-tasks/18.0.1/play-services-tasks-18.0.1.aar" }, { "coord": "com.google.android.gms:strict-version-matcher-plugin:1.2.1", @@ -5420,6 +5421,57 @@ "sha256": "1d9fe3a4512512a311889be798e4a0f9cf9fbccddea50a7ca330b1b99ee92993", "url": "https://maven.google.com/com/google/android/material/material/1.3.0/material-1.3.0-sources.jar" }, + { + "coord": "com.google.android.play:integrity:aar:1.0.1", + "dependencies": [ + "com.google.android.gms:play-services-tasks:aar:18.0.1", + "com.google.android.gms:play-services-basement:aar:18.0.0" + ], + "directDependencies": [ + "com.google.android.gms:play-services-basement:aar:18.0.0", + "com.google.android.gms:play-services-tasks:aar:18.0.1" + ], + "file": "v1/https/maven.google.com/com/google/android/play/integrity/1.0.1/integrity-1.0.1.aar", + "mirror_urls": [ + "https://maven.google.com/com/google/android/play/integrity/1.0.1/integrity-1.0.1.aar", + "https://repo1.maven.org/maven2/com/google/android/play/integrity/1.0.1/integrity-1.0.1.aar", + "https://maven.fabric.io/public/com/google/android/play/integrity/1.0.1/integrity-1.0.1.aar", + "https://maven.google.com/com/google/android/play/integrity/1.0.1/integrity-1.0.1.aar", + "https://repo1.maven.org/maven2/com/google/android/play/integrity/1.0.1/integrity-1.0.1.aar" + ], + "sha256": "c44e46f3fa25c89840e5edcd76e203d61bba2bb7c2eae485856fbcc7d6fa411b", + "url": "https://maven.google.com/com/google/android/play/integrity/1.0.1/integrity-1.0.1.aar" + }, + { + "coord": "com.google.android:annotations:4.1.1.4", + "dependencies": [], + "directDependencies": [], + "file": "v1/https/repo1.maven.org/maven2/com/google/android/annotations/4.1.1.4/annotations-4.1.1.4.jar", + "mirror_urls": [ + "https://maven.google.com/com/google/android/annotations/4.1.1.4/annotations-4.1.1.4.jar", + "https://repo1.maven.org/maven2/com/google/android/annotations/4.1.1.4/annotations-4.1.1.4.jar", + "https://maven.fabric.io/public/com/google/android/annotations/4.1.1.4/annotations-4.1.1.4.jar", + "https://maven.google.com/com/google/android/annotations/4.1.1.4/annotations-4.1.1.4.jar", + "https://repo1.maven.org/maven2/com/google/android/annotations/4.1.1.4/annotations-4.1.1.4.jar" + ], + "sha256": "ba734e1e84c09d615af6a09d33034b4f0442f8772dec120efb376d86a565ae15", + "url": "https://repo1.maven.org/maven2/com/google/android/annotations/4.1.1.4/annotations-4.1.1.4.jar" + }, + { + "coord": "com.google.android:annotations:jar:sources:4.1.1.4", + "dependencies": [], + "directDependencies": [], + "file": "v1/https/repo1.maven.org/maven2/com/google/android/annotations/4.1.1.4/annotations-4.1.1.4-sources.jar", + "mirror_urls": [ + "https://maven.google.com/com/google/android/annotations/4.1.1.4/annotations-4.1.1.4-sources.jar", + "https://repo1.maven.org/maven2/com/google/android/annotations/4.1.1.4/annotations-4.1.1.4-sources.jar", + "https://maven.fabric.io/public/com/google/android/annotations/4.1.1.4/annotations-4.1.1.4-sources.jar", + "https://maven.google.com/com/google/android/annotations/4.1.1.4/annotations-4.1.1.4-sources.jar", + "https://repo1.maven.org/maven2/com/google/android/annotations/4.1.1.4/annotations-4.1.1.4-sources.jar" + ], + "sha256": "e9b667aa958df78ea1ad115f7bbac18a5869c3128b1d5043feb360b0cfce9d40", + "url": "https://repo1.maven.org/maven2/com/google/android/annotations/4.1.1.4/annotations-4.1.1.4-sources.jar" + }, { "coord": "com.google.auto.service:auto-service-annotations:1.0-rc7", "dependencies": [], @@ -5511,34 +5563,34 @@ "url": "https://repo1.maven.org/maven2/com/google/code/findbugs/jsr305/3.0.2/jsr305-3.0.2-sources.jar" }, { - "coord": "com.google.code.gson:gson:2.8.6", + "coord": "com.google.code.gson:gson:2.8.9", "dependencies": [], "directDependencies": [], - "file": "v1/https/repo1.maven.org/maven2/com/google/code/gson/gson/2.8.6/gson-2.8.6.jar", + "file": "v1/https/repo1.maven.org/maven2/com/google/code/gson/gson/2.8.9/gson-2.8.9.jar", "mirror_urls": [ - "https://maven.google.com/com/google/code/gson/gson/2.8.6/gson-2.8.6.jar", - "https://repo1.maven.org/maven2/com/google/code/gson/gson/2.8.6/gson-2.8.6.jar", - "https://maven.fabric.io/public/com/google/code/gson/gson/2.8.6/gson-2.8.6.jar", - "https://maven.google.com/com/google/code/gson/gson/2.8.6/gson-2.8.6.jar", - "https://repo1.maven.org/maven2/com/google/code/gson/gson/2.8.6/gson-2.8.6.jar" + "https://maven.google.com/com/google/code/gson/gson/2.8.9/gson-2.8.9.jar", + "https://repo1.maven.org/maven2/com/google/code/gson/gson/2.8.9/gson-2.8.9.jar", + "https://maven.fabric.io/public/com/google/code/gson/gson/2.8.9/gson-2.8.9.jar", + "https://maven.google.com/com/google/code/gson/gson/2.8.9/gson-2.8.9.jar", + "https://repo1.maven.org/maven2/com/google/code/gson/gson/2.8.9/gson-2.8.9.jar" ], - "sha256": "c8fb4839054d280b3033f800d1f5a97de2f028eb8ba2eb458ad287e536f3f25f", - "url": "https://repo1.maven.org/maven2/com/google/code/gson/gson/2.8.6/gson-2.8.6.jar" + "sha256": "d3999291855de495c94c743761b8ab5176cfeabe281a5ab0d8e8d45326fd703e", + "url": "https://repo1.maven.org/maven2/com/google/code/gson/gson/2.8.9/gson-2.8.9.jar" }, { - "coord": "com.google.code.gson:gson:jar:sources:2.8.6", + "coord": "com.google.code.gson:gson:jar:sources:2.8.9", "dependencies": [], "directDependencies": [], - "file": "v1/https/repo1.maven.org/maven2/com/google/code/gson/gson/2.8.6/gson-2.8.6-sources.jar", + "file": "v1/https/repo1.maven.org/maven2/com/google/code/gson/gson/2.8.9/gson-2.8.9-sources.jar", "mirror_urls": [ - "https://maven.google.com/com/google/code/gson/gson/2.8.6/gson-2.8.6-sources.jar", - "https://repo1.maven.org/maven2/com/google/code/gson/gson/2.8.6/gson-2.8.6-sources.jar", - "https://maven.fabric.io/public/com/google/code/gson/gson/2.8.6/gson-2.8.6-sources.jar", - "https://maven.google.com/com/google/code/gson/gson/2.8.6/gson-2.8.6-sources.jar", - "https://repo1.maven.org/maven2/com/google/code/gson/gson/2.8.6/gson-2.8.6-sources.jar" + "https://maven.google.com/com/google/code/gson/gson/2.8.9/gson-2.8.9-sources.jar", + "https://repo1.maven.org/maven2/com/google/code/gson/gson/2.8.9/gson-2.8.9-sources.jar", + "https://maven.fabric.io/public/com/google/code/gson/gson/2.8.9/gson-2.8.9-sources.jar", + "https://maven.google.com/com/google/code/gson/gson/2.8.9/gson-2.8.9-sources.jar", + "https://repo1.maven.org/maven2/com/google/code/gson/gson/2.8.9/gson-2.8.9-sources.jar" ], - "sha256": "da4d787939dc8de214724a20d88614b70ef8c3a4931d9c694300b5d9098ed9bc", - "url": "https://repo1.maven.org/maven2/com/google/code/gson/gson/2.8.6/gson-2.8.6-sources.jar" + "sha256": "ba5bddb1a89eb721fcca39f3b34294532060f851e2407a82d82134a41eec4719", + "url": "https://repo1.maven.org/maven2/com/google/code/gson/gson/2.8.9/gson-2.8.9-sources.jar" }, { "coord": "com.google.dagger:dagger-compiler:2.28.1", @@ -5789,34 +5841,34 @@ "url": "https://repo1.maven.org/maven2/com/google/dagger/dagger/2.28.1/dagger-2.28.1-sources.jar" }, { - "coord": "com.google.errorprone:error_prone_annotations:2.7.1", + "coord": "com.google.errorprone:error_prone_annotations:2.9.0", "dependencies": [], "directDependencies": [], - "file": "v1/https/repo1.maven.org/maven2/com/google/errorprone/error_prone_annotations/2.7.1/error_prone_annotations-2.7.1.jar", + "file": "v1/https/repo1.maven.org/maven2/com/google/errorprone/error_prone_annotations/2.9.0/error_prone_annotations-2.9.0.jar", "mirror_urls": [ - "https://maven.google.com/com/google/errorprone/error_prone_annotations/2.7.1/error_prone_annotations-2.7.1.jar", - "https://repo1.maven.org/maven2/com/google/errorprone/error_prone_annotations/2.7.1/error_prone_annotations-2.7.1.jar", - "https://maven.fabric.io/public/com/google/errorprone/error_prone_annotations/2.7.1/error_prone_annotations-2.7.1.jar", - "https://maven.google.com/com/google/errorprone/error_prone_annotations/2.7.1/error_prone_annotations-2.7.1.jar", - "https://repo1.maven.org/maven2/com/google/errorprone/error_prone_annotations/2.7.1/error_prone_annotations-2.7.1.jar" + "https://maven.google.com/com/google/errorprone/error_prone_annotations/2.9.0/error_prone_annotations-2.9.0.jar", + "https://repo1.maven.org/maven2/com/google/errorprone/error_prone_annotations/2.9.0/error_prone_annotations-2.9.0.jar", + "https://maven.fabric.io/public/com/google/errorprone/error_prone_annotations/2.9.0/error_prone_annotations-2.9.0.jar", + "https://maven.google.com/com/google/errorprone/error_prone_annotations/2.9.0/error_prone_annotations-2.9.0.jar", + "https://repo1.maven.org/maven2/com/google/errorprone/error_prone_annotations/2.9.0/error_prone_annotations-2.9.0.jar" ], - "sha256": "cd5257c08a246cf8628817ae71cb822be192ef91f6881ca4a3fcff4f1de1cff3", - "url": "https://repo1.maven.org/maven2/com/google/errorprone/error_prone_annotations/2.7.1/error_prone_annotations-2.7.1.jar" + "sha256": "f947bdc33ae27a6b4aa44799e6c21e1944797bd0010ba43eb82d11446e163694", + "url": "https://repo1.maven.org/maven2/com/google/errorprone/error_prone_annotations/2.9.0/error_prone_annotations-2.9.0.jar" }, { - "coord": "com.google.errorprone:error_prone_annotations:jar:sources:2.7.1", + "coord": "com.google.errorprone:error_prone_annotations:jar:sources:2.9.0", "dependencies": [], "directDependencies": [], - "file": "v1/https/repo1.maven.org/maven2/com/google/errorprone/error_prone_annotations/2.7.1/error_prone_annotations-2.7.1-sources.jar", + "file": "v1/https/repo1.maven.org/maven2/com/google/errorprone/error_prone_annotations/2.9.0/error_prone_annotations-2.9.0-sources.jar", "mirror_urls": [ - "https://maven.google.com/com/google/errorprone/error_prone_annotations/2.7.1/error_prone_annotations-2.7.1-sources.jar", - "https://repo1.maven.org/maven2/com/google/errorprone/error_prone_annotations/2.7.1/error_prone_annotations-2.7.1-sources.jar", - "https://maven.fabric.io/public/com/google/errorprone/error_prone_annotations/2.7.1/error_prone_annotations-2.7.1-sources.jar", - "https://maven.google.com/com/google/errorprone/error_prone_annotations/2.7.1/error_prone_annotations-2.7.1-sources.jar", - "https://repo1.maven.org/maven2/com/google/errorprone/error_prone_annotations/2.7.1/error_prone_annotations-2.7.1-sources.jar" + "https://maven.google.com/com/google/errorprone/error_prone_annotations/2.9.0/error_prone_annotations-2.9.0-sources.jar", + "https://repo1.maven.org/maven2/com/google/errorprone/error_prone_annotations/2.9.0/error_prone_annotations-2.9.0-sources.jar", + "https://maven.fabric.io/public/com/google/errorprone/error_prone_annotations/2.9.0/error_prone_annotations-2.9.0-sources.jar", + "https://maven.google.com/com/google/errorprone/error_prone_annotations/2.9.0/error_prone_annotations-2.9.0-sources.jar", + "https://repo1.maven.org/maven2/com/google/errorprone/error_prone_annotations/2.9.0/error_prone_annotations-2.9.0-sources.jar" ], - "sha256": "e38921f918b8ad8eabd12bc61de426fa96c72de077054e9147d2f9fe7c648923", - "url": "https://repo1.maven.org/maven2/com/google/errorprone/error_prone_annotations/2.7.1/error_prone_annotations-2.7.1-sources.jar" + "sha256": "0e41e099f0d4c9be030c34a6991821e67a57e2846dba908f4e9bc9ec60732837", + "url": "https://repo1.maven.org/maven2/com/google/errorprone/error_prone_annotations/2.9.0/error_prone_annotations-2.9.0-sources.jar" }, { "coord": "com.google.errorprone:javac-shaded:9-dev-r4023-3", @@ -5851,32 +5903,31 @@ { "coord": "com.google.firebase:firebase-analytics:17.5.0", "dependencies": [ + "com.google.firebase:firebase-components:aar:17.0.0", "com.google.firebase:firebase-measurement-connector:aar:18.0.0", "com.google.firebase:firebase-installations:aar:16.3.2", "androidx.collection:collection:jar:1.1.0", "com.google.android.gms:play-services-stats:aar:17.0.0", "androidx.annotation:annotation:1.1.0", - "com.google.firebase:firebase-common:aar:19.3.0", "androidx.localbroadcastmanager:localbroadcastmanager:aar:1.0.0", "androidx.legacy:legacy-support-core-utils:aar:1.0.0", "com.google.android.gms:play-services-measurement-sdk-api:aar:17.5.0", - "com.google.android.gms:play-services-tasks:aar:17.0.0", - "com.google.firebase:firebase-components:aar:16.0.0", "com.google.android.gms:play-services-measurement-impl:aar:17.5.0", "androidx.lifecycle:lifecycle-livedata:aar:2.2.0", "androidx.fragment:fragment:aar:1.2.0", + "com.google.android.gms:play-services-basement:aar:18.0.0", "com.google.android.gms:play-services-measurement:aar:17.5.0", "androidx.core:core:aar:1.3.1", "com.google.android.gms:play-services-ads-identifier:aar:17.0.0", "com.google.android.gms:play-services-measurement-api:aar:17.5.0", "com.google.android.gms:play-services-measurement-sdk:aar:17.5.0", "androidx.print:print:aar:1.0.0", - "androidx.annotation:annotation:jar:1.1.0", "androidx.lifecycle:lifecycle-viewmodel:aar:2.2.0", "androidx.documentfile:documentfile:aar:1.0.0", - "com.google.android.gms:play-services-basement:aar:17.0.0", + "com.google.firebase:firebase-common:aar:20.1.1", "com.google.auto.value:auto-value-annotations:jar:1.8.1", "com.google.firebase:firebase-installations-interop:aar:16.0.0", + "com.google.android.gms:play-services-tasks:aar:18.0.1", "com.google.android.gms:play-services-measurement-base:aar:17.5.0", "androidx.loader:loader:aar:1.0.0" ], @@ -5897,1511 +5948,2756 @@ "url": "https://maven.google.com/com/google/firebase/firebase-analytics/17.5.0/firebase-analytics-17.5.0.aar" }, { - "coord": "com.google.firebase:firebase-common:19.3.0", + "coord": "com.google.firebase:firebase-annotations:jar:16.1.0", + "dependencies": [], + "directDependencies": [], + "file": "v1/https/maven.google.com/com/google/firebase/firebase-annotations/16.1.0/firebase-annotations-16.1.0.jar", + "mirror_urls": [ + "https://maven.google.com/com/google/firebase/firebase-annotations/16.1.0/firebase-annotations-16.1.0.jar", + "https://repo1.maven.org/maven2/com/google/firebase/firebase-annotations/16.1.0/firebase-annotations-16.1.0.jar", + "https://maven.fabric.io/public/com/google/firebase/firebase-annotations/16.1.0/firebase-annotations-16.1.0.jar", + "https://maven.google.com/com/google/firebase/firebase-annotations/16.1.0/firebase-annotations-16.1.0.jar", + "https://repo1.maven.org/maven2/com/google/firebase/firebase-annotations/16.1.0/firebase-annotations-16.1.0.jar" + ], + "sha256": "0393478cf124721c7502ea76a28129a420c462fc4d5c0a4274db9e309785bd7e", + "url": "https://maven.google.com/com/google/firebase/firebase-annotations/16.1.0/firebase-annotations-16.1.0.jar" + }, + { + "coord": "com.google.firebase:firebase-annotations:jar:sources:16.1.0", + "dependencies": [], + "directDependencies": [], + "file": "v1/https/maven.google.com/com/google/firebase/firebase-annotations/16.1.0/firebase-annotations-16.1.0-sources.jar", + "mirror_urls": [ + "https://maven.google.com/com/google/firebase/firebase-annotations/16.1.0/firebase-annotations-16.1.0-sources.jar", + "https://repo1.maven.org/maven2/com/google/firebase/firebase-annotations/16.1.0/firebase-annotations-16.1.0-sources.jar", + "https://maven.fabric.io/public/com/google/firebase/firebase-annotations/16.1.0/firebase-annotations-16.1.0-sources.jar", + "https://maven.google.com/com/google/firebase/firebase-annotations/16.1.0/firebase-annotations-16.1.0-sources.jar", + "https://repo1.maven.org/maven2/com/google/firebase/firebase-annotations/16.1.0/firebase-annotations-16.1.0-sources.jar" + ], + "sha256": "8fd2e91c651391d9c2196eedc784f3ce39bde37dc4b6c8e41055de0656bbb2c9", + "url": "https://maven.google.com/com/google/firebase/firebase-annotations/16.1.0/firebase-annotations-16.1.0-sources.jar" + }, + { + "coord": "com.google.firebase:firebase-appcheck-debug:16.0.0", "dependencies": [ + "com.google.firebase:firebase-components:aar:17.0.0", + "com.google.firebase:firebase-appcheck:aar:16.0.0", "androidx.collection:collection:jar:1.1.0", - "com.google.android.gms:play-services-tasks:aar:17.0.0", - "com.google.firebase:firebase-components:aar:16.0.0", "androidx.fragment:fragment:aar:1.2.0", + "com.google.android.gms:play-services-basement:aar:18.0.0", "androidx.core:core:aar:1.3.1", + "com.google.firebase:firebase-appcheck-interop:aar:16.0.0", + "com.google.android.gms:play-services-base:aar:18.0.1", "androidx.annotation:annotation:jar:1.1.0", - "com.google.android.gms:play-services-basement:aar:17.0.0", - "com.google.auto.value:auto-value-annotations:jar:1.8.1" + "com.google.firebase:firebase-common:aar:20.1.1", + "com.google.android.gms:play-services-tasks:aar:18.0.1", + "com.google.firebase:firebase-annotations:jar:16.1.0" ], "directDependencies": [ - "com.google.android.gms:play-services-basement:aar:17.0.0", - "com.google.android.gms:play-services-tasks:aar:17.0.0", - "com.google.auto.value:auto-value-annotations:jar:1.8.1", - "com.google.firebase:firebase-components:aar:16.0.0" + "com.google.firebase:firebase-components:aar:17.0.0", + "com.google.firebase:firebase-appcheck:aar:16.0.0", + "com.google.android.gms:play-services-base:aar:18.0.1", + "com.google.firebase:firebase-common:aar:20.1.1", + "com.google.android.gms:play-services-tasks:aar:18.0.1" ], - "file": "v1/https/maven.google.com/com/google/firebase/firebase-common/19.3.0/firebase-common-19.3.0.aar", + "file": "v1/https/maven.google.com/com/google/firebase/firebase-appcheck-debug/16.0.0/firebase-appcheck-debug-16.0.0.aar", "mirror_urls": [ - "https://maven.google.com/com/google/firebase/firebase-common/19.3.0/firebase-common-19.3.0.aar", - "https://repo1.maven.org/maven2/com/google/firebase/firebase-common/19.3.0/firebase-common-19.3.0.aar", - "https://maven.fabric.io/public/com/google/firebase/firebase-common/19.3.0/firebase-common-19.3.0.aar", - "https://maven.google.com/com/google/firebase/firebase-common/19.3.0/firebase-common-19.3.0.aar", - "https://repo1.maven.org/maven2/com/google/firebase/firebase-common/19.3.0/firebase-common-19.3.0.aar" + "https://maven.google.com/com/google/firebase/firebase-appcheck-debug/16.0.0/firebase-appcheck-debug-16.0.0.aar", + "https://repo1.maven.org/maven2/com/google/firebase/firebase-appcheck-debug/16.0.0/firebase-appcheck-debug-16.0.0.aar", + "https://maven.fabric.io/public/com/google/firebase/firebase-appcheck-debug/16.0.0/firebase-appcheck-debug-16.0.0.aar", + "https://maven.google.com/com/google/firebase/firebase-appcheck-debug/16.0.0/firebase-appcheck-debug-16.0.0.aar", + "https://repo1.maven.org/maven2/com/google/firebase/firebase-appcheck-debug/16.0.0/firebase-appcheck-debug-16.0.0.aar" ], - "sha256": "7bd7971470ff943e3c3abb1d7809ef5cb4b81f1996be0867714372b3efa7405a", - "url": "https://maven.google.com/com/google/firebase/firebase-common/19.3.0/firebase-common-19.3.0.aar" + "sha256": "544cff5ae13c1d2edcb2478c1d4ebb703d2d1a616f4e0bf261721aefc108ab4c", + "url": "https://maven.google.com/com/google/firebase/firebase-appcheck-debug/16.0.0/firebase-appcheck-debug-16.0.0.aar" }, { - "coord": "com.google.firebase:firebase-common:aar:sources:19.3.0", + "coord": "com.google.firebase:firebase-appcheck-debug:jar:sources:16.0.0", "dependencies": [ - "com.google.firebase:firebase-components:aar:sources:16.0.0", + "com.google.firebase:firebase-common:aar:sources:20.1.1", + "com.google.firebase:firebase-annotations:jar:sources:16.1.0", "androidx.core:core:aar:sources:1.3.1", "androidx.fragment:fragment:aar:sources:1.2.0", + "com.google.firebase:firebase-components:aar:sources:17.0.0", "androidx.collection:collection:jar:sources:1.1.0", "androidx.annotation:annotation:jar:sources:1.1.0", - "com.google.android.gms:play-services-tasks:aar:sources:17.0.0", - "com.google.auto.value:auto-value-annotations:jar:sources:1.8.1", - "com.google.android.gms:play-services-basement:aar:sources:17.0.0" + "com.google.firebase:firebase-appcheck:aar:sources:16.0.0", + "com.google.android.gms:play-services-tasks:aar:sources:18.0.1", + "com.google.firebase:firebase-appcheck-interop:aar:sources:16.0.0", + "com.google.android.gms:play-services-base:aar:sources:18.0.1", + "com.google.android.gms:play-services-basement:aar:sources:18.0.0" ], "directDependencies": [ - "com.google.android.gms:play-services-basement:aar:sources:17.0.0", - "com.google.android.gms:play-services-tasks:aar:sources:17.0.0", - "com.google.auto.value:auto-value-annotations:jar:sources:1.8.1", - "com.google.firebase:firebase-components:aar:sources:16.0.0" + "com.google.firebase:firebase-common:aar:sources:20.1.1", + "com.google.firebase:firebase-components:aar:sources:17.0.0", + "com.google.firebase:firebase-appcheck:aar:sources:16.0.0", + "com.google.android.gms:play-services-tasks:aar:sources:18.0.1", + "com.google.android.gms:play-services-base:aar:sources:18.0.1" ], - "file": "v1/https/maven.google.com/com/google/firebase/firebase-common/19.3.0/firebase-common-19.3.0-sources.jar", + "file": "v1/https/maven.google.com/com/google/firebase/firebase-appcheck-debug/16.0.0/firebase-appcheck-debug-16.0.0-sources.jar", "mirror_urls": [ - "https://maven.google.com/com/google/firebase/firebase-common/19.3.0/firebase-common-19.3.0-sources.jar", - "https://repo1.maven.org/maven2/com/google/firebase/firebase-common/19.3.0/firebase-common-19.3.0-sources.jar", - "https://maven.fabric.io/public/com/google/firebase/firebase-common/19.3.0/firebase-common-19.3.0-sources.jar", - "https://maven.google.com/com/google/firebase/firebase-common/19.3.0/firebase-common-19.3.0-sources.jar", - "https://repo1.maven.org/maven2/com/google/firebase/firebase-common/19.3.0/firebase-common-19.3.0-sources.jar" + "https://maven.google.com/com/google/firebase/firebase-appcheck-debug/16.0.0/firebase-appcheck-debug-16.0.0-sources.jar", + "https://repo1.maven.org/maven2/com/google/firebase/firebase-appcheck-debug/16.0.0/firebase-appcheck-debug-16.0.0-sources.jar", + "https://maven.fabric.io/public/com/google/firebase/firebase-appcheck-debug/16.0.0/firebase-appcheck-debug-16.0.0-sources.jar", + "https://maven.google.com/com/google/firebase/firebase-appcheck-debug/16.0.0/firebase-appcheck-debug-16.0.0-sources.jar", + "https://repo1.maven.org/maven2/com/google/firebase/firebase-appcheck-debug/16.0.0/firebase-appcheck-debug-16.0.0-sources.jar" ], - "sha256": "1a3f326b3992552200c91db1132c81ec5f6143bc6dd9af8f6f3b66388707c62b", - "url": "https://maven.google.com/com/google/firebase/firebase-common/19.3.0/firebase-common-19.3.0-sources.jar" + "sha256": "6d4d930dffab550d7f940837c33de14eb891cb22a22fb4aec4480a8fda8156f2", + "url": "https://maven.google.com/com/google/firebase/firebase-appcheck-debug/16.0.0/firebase-appcheck-debug-16.0.0-sources.jar" }, { - "coord": "com.google.firebase:firebase-components:aar:16.0.0", + "coord": "com.google.firebase:firebase-appcheck-interop:aar:16.0.0", "dependencies": [ - "androidx.annotation:annotation:jar:1.1.0" + "com.google.firebase:firebase-components:aar:17.0.0", + "androidx.collection:collection:jar:1.1.0", + "androidx.fragment:fragment:aar:1.2.0", + "com.google.android.gms:play-services-basement:aar:18.0.0", + "androidx.core:core:aar:1.3.1", + "com.google.android.gms:play-services-base:aar:18.0.1", + "androidx.annotation:annotation:jar:1.1.0", + "com.google.firebase:firebase-common:aar:20.1.1", + "com.google.android.gms:play-services-tasks:aar:18.0.1", + "com.google.firebase:firebase-annotations:jar:16.1.0" ], "directDependencies": [ - "androidx.annotation:annotation:jar:1.1.0" + "com.google.android.gms:play-services-base:aar:18.0.1", + "com.google.android.gms:play-services-tasks:aar:18.0.1", + "com.google.firebase:firebase-common:aar:20.1.1", + "com.google.firebase:firebase-components:aar:17.0.0" ], - "file": "v1/https/maven.google.com/com/google/firebase/firebase-components/16.0.0/firebase-components-16.0.0.aar", + "file": "v1/https/maven.google.com/com/google/firebase/firebase-appcheck-interop/16.0.0/firebase-appcheck-interop-16.0.0.aar", "mirror_urls": [ - "https://maven.google.com/com/google/firebase/firebase-components/16.0.0/firebase-components-16.0.0.aar", - "https://repo1.maven.org/maven2/com/google/firebase/firebase-components/16.0.0/firebase-components-16.0.0.aar", - "https://maven.fabric.io/public/com/google/firebase/firebase-components/16.0.0/firebase-components-16.0.0.aar", - "https://maven.google.com/com/google/firebase/firebase-components/16.0.0/firebase-components-16.0.0.aar", - "https://repo1.maven.org/maven2/com/google/firebase/firebase-components/16.0.0/firebase-components-16.0.0.aar" + "https://maven.google.com/com/google/firebase/firebase-appcheck-interop/16.0.0/firebase-appcheck-interop-16.0.0.aar", + "https://repo1.maven.org/maven2/com/google/firebase/firebase-appcheck-interop/16.0.0/firebase-appcheck-interop-16.0.0.aar", + "https://maven.fabric.io/public/com/google/firebase/firebase-appcheck-interop/16.0.0/firebase-appcheck-interop-16.0.0.aar", + "https://maven.google.com/com/google/firebase/firebase-appcheck-interop/16.0.0/firebase-appcheck-interop-16.0.0.aar", + "https://repo1.maven.org/maven2/com/google/firebase/firebase-appcheck-interop/16.0.0/firebase-appcheck-interop-16.0.0.aar" ], - "sha256": "8ef43b412de4ec3e36a87c66d8a0a14a3de0a2e8566946da6a0e799b7fdd8ec9", - "url": "https://maven.google.com/com/google/firebase/firebase-components/16.0.0/firebase-components-16.0.0.aar" + "sha256": "44b9133286fe4c550391cf55057b2748323c4052b68412df0f8c83efd6044824", + "url": "https://maven.google.com/com/google/firebase/firebase-appcheck-interop/16.0.0/firebase-appcheck-interop-16.0.0.aar" }, { - "coord": "com.google.firebase:firebase-components:aar:sources:16.0.0", + "coord": "com.google.firebase:firebase-appcheck-interop:aar:sources:16.0.0", "dependencies": [ - "androidx.annotation:annotation:jar:sources:1.1.0" + "com.google.firebase:firebase-common:aar:sources:20.1.1", + "com.google.firebase:firebase-annotations:jar:sources:16.1.0", + "androidx.core:core:aar:sources:1.3.1", + "androidx.fragment:fragment:aar:sources:1.2.0", + "com.google.firebase:firebase-components:aar:sources:17.0.0", + "androidx.collection:collection:jar:sources:1.1.0", + "androidx.annotation:annotation:jar:sources:1.1.0", + "com.google.android.gms:play-services-tasks:aar:sources:18.0.1", + "com.google.android.gms:play-services-base:aar:sources:18.0.1", + "com.google.android.gms:play-services-basement:aar:sources:18.0.0" ], "directDependencies": [ - "androidx.annotation:annotation:jar:sources:1.1.0" + "com.google.android.gms:play-services-base:aar:sources:18.0.1", + "com.google.android.gms:play-services-tasks:aar:sources:18.0.1", + "com.google.firebase:firebase-common:aar:sources:20.1.1", + "com.google.firebase:firebase-components:aar:sources:17.0.0" ], - "file": "v1/https/maven.google.com/com/google/firebase/firebase-components/16.0.0/firebase-components-16.0.0-sources.jar", + "file": "v1/https/maven.google.com/com/google/firebase/firebase-appcheck-interop/16.0.0/firebase-appcheck-interop-16.0.0-sources.jar", "mirror_urls": [ - "https://maven.google.com/com/google/firebase/firebase-components/16.0.0/firebase-components-16.0.0-sources.jar", - "https://repo1.maven.org/maven2/com/google/firebase/firebase-components/16.0.0/firebase-components-16.0.0-sources.jar", - "https://maven.fabric.io/public/com/google/firebase/firebase-components/16.0.0/firebase-components-16.0.0-sources.jar", - "https://maven.google.com/com/google/firebase/firebase-components/16.0.0/firebase-components-16.0.0-sources.jar", - "https://repo1.maven.org/maven2/com/google/firebase/firebase-components/16.0.0/firebase-components-16.0.0-sources.jar" + "https://maven.google.com/com/google/firebase/firebase-appcheck-interop/16.0.0/firebase-appcheck-interop-16.0.0-sources.jar", + "https://repo1.maven.org/maven2/com/google/firebase/firebase-appcheck-interop/16.0.0/firebase-appcheck-interop-16.0.0-sources.jar", + "https://maven.fabric.io/public/com/google/firebase/firebase-appcheck-interop/16.0.0/firebase-appcheck-interop-16.0.0-sources.jar", + "https://maven.google.com/com/google/firebase/firebase-appcheck-interop/16.0.0/firebase-appcheck-interop-16.0.0-sources.jar", + "https://repo1.maven.org/maven2/com/google/firebase/firebase-appcheck-interop/16.0.0/firebase-appcheck-interop-16.0.0-sources.jar" ], - "sha256": "8c541d1b27245aff00937b08131cb41c99b4a6dcb5b5a7440283018d13fe9747", - "url": "https://maven.google.com/com/google/firebase/firebase-components/16.0.0/firebase-components-16.0.0-sources.jar" + "sha256": "401532d113dcbbafa32132da0d1afb6713726791bb15dc3e311455b4de0b35e6", + "url": "https://maven.google.com/com/google/firebase/firebase-appcheck-interop/16.0.0/firebase-appcheck-interop-16.0.0-sources.jar" }, { - "coord": "com.google.firebase:firebase-crashlytics:17.1.1", + "coord": "com.google.firebase:firebase-appcheck-playintegrity:16.0.0", "dependencies": [ - "com.google.firebase:firebase-measurement-connector:aar:18.0.0", - "com.google.firebase:firebase-installations:aar:16.3.2", + "com.google.firebase:firebase-components:aar:17.0.0", + "com.google.firebase:firebase-appcheck:aar:16.0.0", "androidx.collection:collection:jar:1.1.0", - "com.google.android.gms:play-services-stats:aar:17.0.0", - "androidx.annotation:annotation:1.1.0", - "com.google.android.gms:play-services-base:aar:17.0.0", - "com.google.firebase:firebase-iid:aar:20.1.5", - "com.google.firebase:firebase-common:aar:19.3.0", - "com.google.android.datatransport:transport-backend-cct:aar:2.3.0", - "androidx.localbroadcastmanager:localbroadcastmanager:aar:1.0.0", - "androidx.legacy:legacy-support-core-utils:aar:1.0.0", - "com.google.android.gms:play-services-tasks:aar:17.0.0", - "com.google.android.datatransport:transport-api:aar:2.2.0", - "com.google.firebase:firebase-components:aar:16.0.0", - "androidx.lifecycle:lifecycle-livedata:aar:2.2.0", "androidx.fragment:fragment:aar:1.2.0", + "com.google.android.gms:play-services-basement:aar:18.0.0", "androidx.core:core:aar:1.3.1", - "com.google.dagger:dagger:jar:2.28.1", - "com.google.firebase:firebase-encoders-json:aar:16.1.0", - "com.squareup.okhttp3:okhttp:jar:4.7.2", - "androidx.print:print:aar:1.0.0", + "com.google.firebase:firebase-appcheck-interop:aar:16.0.0", + "com.google.android.gms:play-services-base:aar:18.0.1", "androidx.annotation:annotation:jar:1.1.0", - "androidx.lifecycle:lifecycle-viewmodel:aar:2.2.0", - "androidx.documentfile:documentfile:aar:1.0.0", - "com.google.android.gms:play-services-basement:aar:17.0.0", - "com.google.firebase:firebase-iid-interop:aar:17.0.0", - "com.google.android.datatransport:transport-runtime:aar:2.2.3", - "com.google.auto.value:auto-value-annotations:jar:1.8.1", - "com.google.firebase:firebase-installations-interop:aar:16.0.0", - "androidx.loader:loader:aar:1.0.0" + "com.google.firebase:firebase-common:aar:20.1.1", + "com.google.android.gms:play-services-tasks:aar:18.0.1", + "com.google.firebase:firebase-annotations:jar:16.1.0", + "com.google.android.play:integrity:aar:1.0.1" ], "directDependencies": [ - "com.google.firebase:firebase-measurement-connector:aar:18.0.0", - "com.google.firebase:firebase-iid:aar:20.1.5", - "com.google.firebase:firebase-common:aar:19.3.0", - "com.google.android.datatransport:transport-backend-cct:aar:2.3.0", - "com.google.android.gms:play-services-tasks:aar:17.0.0", - "com.google.android.datatransport:transport-api:aar:2.2.0", - "com.google.firebase:firebase-components:aar:16.0.0", - "com.google.firebase:firebase-encoders-json:aar:16.1.0", - "com.squareup.okhttp3:okhttp:jar:4.7.2", - "com.google.firebase:firebase-iid-interop:aar:17.0.0", - "com.google.android.datatransport:transport-runtime:aar:2.2.3" + "com.google.firebase:firebase-components:aar:17.0.0", + "com.google.firebase:firebase-appcheck:aar:16.0.0", + "com.google.android.gms:play-services-base:aar:18.0.1", + "com.google.firebase:firebase-common:aar:20.1.1", + "com.google.android.gms:play-services-tasks:aar:18.0.1", + "com.google.android.play:integrity:aar:1.0.1" ], - "file": "v1/https/maven.google.com/com/google/firebase/firebase-crashlytics/17.1.1/firebase-crashlytics-17.1.1.aar", + "file": "v1/https/maven.google.com/com/google/firebase/firebase-appcheck-playintegrity/16.0.0/firebase-appcheck-playintegrity-16.0.0.aar", "mirror_urls": [ - "https://maven.google.com/com/google/firebase/firebase-crashlytics/17.1.1/firebase-crashlytics-17.1.1.aar", - "https://repo1.maven.org/maven2/com/google/firebase/firebase-crashlytics/17.1.1/firebase-crashlytics-17.1.1.aar", - "https://maven.fabric.io/public/com/google/firebase/firebase-crashlytics/17.1.1/firebase-crashlytics-17.1.1.aar", - "https://maven.google.com/com/google/firebase/firebase-crashlytics/17.1.1/firebase-crashlytics-17.1.1.aar", - "https://repo1.maven.org/maven2/com/google/firebase/firebase-crashlytics/17.1.1/firebase-crashlytics-17.1.1.aar" + "https://maven.google.com/com/google/firebase/firebase-appcheck-playintegrity/16.0.0/firebase-appcheck-playintegrity-16.0.0.aar", + "https://repo1.maven.org/maven2/com/google/firebase/firebase-appcheck-playintegrity/16.0.0/firebase-appcheck-playintegrity-16.0.0.aar", + "https://maven.fabric.io/public/com/google/firebase/firebase-appcheck-playintegrity/16.0.0/firebase-appcheck-playintegrity-16.0.0.aar", + "https://maven.google.com/com/google/firebase/firebase-appcheck-playintegrity/16.0.0/firebase-appcheck-playintegrity-16.0.0.aar", + "https://repo1.maven.org/maven2/com/google/firebase/firebase-appcheck-playintegrity/16.0.0/firebase-appcheck-playintegrity-16.0.0.aar" ], - "sha256": "635953640e1bbb277affadbc3e59b43f1c4dd07de79c8973b6341a756ad8b74b", - "url": "https://maven.google.com/com/google/firebase/firebase-crashlytics/17.1.1/firebase-crashlytics-17.1.1.aar" + "sha256": "de9ca1700814a52272ad157654f1224c6b05da9c3da15121c4da23a5eca1ebda", + "url": "https://maven.google.com/com/google/firebase/firebase-appcheck-playintegrity/16.0.0/firebase-appcheck-playintegrity-16.0.0.aar" }, { - "coord": "com.google.firebase:firebase-encoders-json:aar:16.1.0", + "coord": "com.google.firebase:firebase-appcheck-playintegrity:jar:sources:16.0.0", "dependencies": [ - "androidx.annotation:annotation:jar:1.1.0" + "com.google.firebase:firebase-common:aar:sources:20.1.1", + "com.google.firebase:firebase-annotations:jar:sources:16.1.0", + "androidx.core:core:aar:sources:1.3.1", + "androidx.fragment:fragment:aar:sources:1.2.0", + "com.google.firebase:firebase-components:aar:sources:17.0.0", + "com.google.android.play:integrity:aar:sources:1.0.1", + "androidx.collection:collection:jar:sources:1.1.0", + "androidx.annotation:annotation:jar:sources:1.1.0", + "com.google.firebase:firebase-appcheck:aar:sources:16.0.0", + "com.google.android.gms:play-services-tasks:aar:sources:18.0.1", + "com.google.firebase:firebase-appcheck-interop:aar:sources:16.0.0", + "com.google.android.gms:play-services-base:aar:sources:18.0.1", + "com.google.android.gms:play-services-basement:aar:sources:18.0.0" ], "directDependencies": [ - "androidx.annotation:annotation:jar:1.1.0" + "com.google.firebase:firebase-common:aar:sources:20.1.1", + "com.google.firebase:firebase-components:aar:sources:17.0.0", + "com.google.android.play:integrity:aar:sources:1.0.1", + "com.google.firebase:firebase-appcheck:aar:sources:16.0.0", + "com.google.android.gms:play-services-tasks:aar:sources:18.0.1", + "com.google.android.gms:play-services-base:aar:sources:18.0.1" ], - "file": "v1/https/maven.google.com/com/google/firebase/firebase-encoders-json/16.1.0/firebase-encoders-json-16.1.0.aar", + "file": "v1/https/maven.google.com/com/google/firebase/firebase-appcheck-playintegrity/16.0.0/firebase-appcheck-playintegrity-16.0.0-sources.jar", "mirror_urls": [ - "https://maven.google.com/com/google/firebase/firebase-encoders-json/16.1.0/firebase-encoders-json-16.1.0.aar", - "https://repo1.maven.org/maven2/com/google/firebase/firebase-encoders-json/16.1.0/firebase-encoders-json-16.1.0.aar", - "https://maven.fabric.io/public/com/google/firebase/firebase-encoders-json/16.1.0/firebase-encoders-json-16.1.0.aar", - "https://maven.google.com/com/google/firebase/firebase-encoders-json/16.1.0/firebase-encoders-json-16.1.0.aar", - "https://repo1.maven.org/maven2/com/google/firebase/firebase-encoders-json/16.1.0/firebase-encoders-json-16.1.0.aar" + "https://maven.google.com/com/google/firebase/firebase-appcheck-playintegrity/16.0.0/firebase-appcheck-playintegrity-16.0.0-sources.jar", + "https://repo1.maven.org/maven2/com/google/firebase/firebase-appcheck-playintegrity/16.0.0/firebase-appcheck-playintegrity-16.0.0-sources.jar", + "https://maven.fabric.io/public/com/google/firebase/firebase-appcheck-playintegrity/16.0.0/firebase-appcheck-playintegrity-16.0.0-sources.jar", + "https://maven.google.com/com/google/firebase/firebase-appcheck-playintegrity/16.0.0/firebase-appcheck-playintegrity-16.0.0-sources.jar", + "https://repo1.maven.org/maven2/com/google/firebase/firebase-appcheck-playintegrity/16.0.0/firebase-appcheck-playintegrity-16.0.0-sources.jar" ], - "sha256": "24ce7c1cfda1d526b76b16437a2e7d0920d7176a377e0e30b2a7381341f22ea1", - "url": "https://maven.google.com/com/google/firebase/firebase-encoders-json/16.1.0/firebase-encoders-json-16.1.0.aar" + "sha256": "1bab390147068a9e0f10becdffddd2b1b46f3456b9024e567e7e448679b08b18", + "url": "https://maven.google.com/com/google/firebase/firebase-appcheck-playintegrity/16.0.0/firebase-appcheck-playintegrity-16.0.0-sources.jar" }, { - "coord": "com.google.firebase:firebase-encoders-json:aar:sources:16.1.0", + "coord": "com.google.firebase:firebase-appcheck:16.0.0", "dependencies": [ - "androidx.annotation:annotation:jar:sources:1.1.0" + "com.google.firebase:firebase-components:aar:17.0.0", + "androidx.collection:collection:jar:1.1.0", + "androidx.fragment:fragment:aar:1.2.0", + "com.google.android.gms:play-services-basement:aar:18.0.0", + "androidx.core:core:aar:1.3.1", + "com.google.firebase:firebase-appcheck-interop:aar:16.0.0", + "com.google.android.gms:play-services-base:aar:18.0.1", + "androidx.annotation:annotation:jar:1.1.0", + "com.google.firebase:firebase-common:aar:20.1.1", + "com.google.android.gms:play-services-tasks:aar:18.0.1", + "com.google.firebase:firebase-annotations:jar:16.1.0" ], "directDependencies": [ - "androidx.annotation:annotation:jar:sources:1.1.0" + "com.google.firebase:firebase-components:aar:17.0.0", + "com.google.firebase:firebase-appcheck-interop:aar:16.0.0", + "com.google.android.gms:play-services-base:aar:18.0.1", + "com.google.firebase:firebase-common:aar:20.1.1", + "com.google.android.gms:play-services-tasks:aar:18.0.1" ], - "file": "v1/https/maven.google.com/com/google/firebase/firebase-encoders-json/16.1.0/firebase-encoders-json-16.1.0-sources.jar", + "file": "v1/https/maven.google.com/com/google/firebase/firebase-appcheck/16.0.0/firebase-appcheck-16.0.0.aar", "mirror_urls": [ - "https://maven.google.com/com/google/firebase/firebase-encoders-json/16.1.0/firebase-encoders-json-16.1.0-sources.jar", - "https://repo1.maven.org/maven2/com/google/firebase/firebase-encoders-json/16.1.0/firebase-encoders-json-16.1.0-sources.jar", - "https://maven.fabric.io/public/com/google/firebase/firebase-encoders-json/16.1.0/firebase-encoders-json-16.1.0-sources.jar", - "https://maven.google.com/com/google/firebase/firebase-encoders-json/16.1.0/firebase-encoders-json-16.1.0-sources.jar", - "https://repo1.maven.org/maven2/com/google/firebase/firebase-encoders-json/16.1.0/firebase-encoders-json-16.1.0-sources.jar" + "https://maven.google.com/com/google/firebase/firebase-appcheck/16.0.0/firebase-appcheck-16.0.0.aar", + "https://repo1.maven.org/maven2/com/google/firebase/firebase-appcheck/16.0.0/firebase-appcheck-16.0.0.aar", + "https://maven.fabric.io/public/com/google/firebase/firebase-appcheck/16.0.0/firebase-appcheck-16.0.0.aar", + "https://maven.google.com/com/google/firebase/firebase-appcheck/16.0.0/firebase-appcheck-16.0.0.aar", + "https://repo1.maven.org/maven2/com/google/firebase/firebase-appcheck/16.0.0/firebase-appcheck-16.0.0.aar" ], - "sha256": "791b1521a8f5eda7ded50ccdf3afa7632a1198964e3c60e93e7ae602d54ca314", - "url": "https://maven.google.com/com/google/firebase/firebase-encoders-json/16.1.0/firebase-encoders-json-16.1.0-sources.jar" + "sha256": "f6f093086af3af54797cc8f4070aad5b1e8fbb3e16ccbcfd0f02e7dd3e3c9448", + "url": "https://maven.google.com/com/google/firebase/firebase-appcheck/16.0.0/firebase-appcheck-16.0.0.aar" }, { - "coord": "com.google.firebase:firebase-iid-interop:aar:17.0.0", + "coord": "com.google.firebase:firebase-appcheck:aar:sources:16.0.0", + "dependencies": [ + "com.google.firebase:firebase-common:aar:sources:20.1.1", + "com.google.firebase:firebase-annotations:jar:sources:16.1.0", + "androidx.core:core:aar:sources:1.3.1", + "androidx.fragment:fragment:aar:sources:1.2.0", + "com.google.firebase:firebase-components:aar:sources:17.0.0", + "androidx.collection:collection:jar:sources:1.1.0", + "androidx.annotation:annotation:jar:sources:1.1.0", + "com.google.android.gms:play-services-tasks:aar:sources:18.0.1", + "com.google.firebase:firebase-appcheck-interop:aar:sources:16.0.0", + "com.google.android.gms:play-services-base:aar:sources:18.0.1", + "com.google.android.gms:play-services-basement:aar:sources:18.0.0" + ], + "directDependencies": [ + "com.google.firebase:firebase-common:aar:sources:20.1.1", + "com.google.firebase:firebase-components:aar:sources:17.0.0", + "com.google.android.gms:play-services-tasks:aar:sources:18.0.1", + "com.google.firebase:firebase-appcheck-interop:aar:sources:16.0.0", + "com.google.android.gms:play-services-base:aar:sources:18.0.1" + ], + "file": "v1/https/maven.google.com/com/google/firebase/firebase-appcheck/16.0.0/firebase-appcheck-16.0.0-sources.jar", + "mirror_urls": [ + "https://maven.google.com/com/google/firebase/firebase-appcheck/16.0.0/firebase-appcheck-16.0.0-sources.jar", + "https://repo1.maven.org/maven2/com/google/firebase/firebase-appcheck/16.0.0/firebase-appcheck-16.0.0-sources.jar", + "https://maven.fabric.io/public/com/google/firebase/firebase-appcheck/16.0.0/firebase-appcheck-16.0.0-sources.jar", + "https://maven.google.com/com/google/firebase/firebase-appcheck/16.0.0/firebase-appcheck-16.0.0-sources.jar", + "https://repo1.maven.org/maven2/com/google/firebase/firebase-appcheck/16.0.0/firebase-appcheck-16.0.0-sources.jar" + ], + "sha256": "d6b6b35d7c6fd5c4bbb912b62175e285cba8b9e3280ccd6b4bfd3e14d5c3782c", + "url": "https://maven.google.com/com/google/firebase/firebase-appcheck/16.0.0/firebase-appcheck-16.0.0-sources.jar" + }, + { + "coord": "com.google.firebase:firebase-auth-interop:aar:19.0.2", "dependencies": [ "androidx.collection:collection:jar:1.1.0", - "com.google.android.gms:play-services-base:aar:17.0.0", - "com.google.android.gms:play-services-tasks:aar:17.0.0", "androidx.fragment:fragment:aar:1.2.0", + "com.google.android.gms:play-services-basement:aar:18.0.0", "androidx.core:core:aar:1.3.1", - "com.google.android.gms:play-services-basement:aar:17.0.0" + "com.google.firebase:firebase-common:aar:20.1.1", + "com.google.android.gms:play-services-tasks:aar:18.0.1", + "com.google.firebase:firebase-annotations:jar:16.1.0" ], "directDependencies": [ - "com.google.android.gms:play-services-base:aar:17.0.0", - "com.google.android.gms:play-services-basement:aar:17.0.0" + "com.google.android.gms:play-services-basement:aar:18.0.0", + "com.google.android.gms:play-services-tasks:aar:18.0.1", + "com.google.firebase:firebase-annotations:jar:16.1.0", + "com.google.firebase:firebase-common:aar:20.1.1" ], - "file": "v1/https/maven.google.com/com/google/firebase/firebase-iid-interop/17.0.0/firebase-iid-interop-17.0.0.aar", + "file": "v1/https/maven.google.com/com/google/firebase/firebase-auth-interop/19.0.2/firebase-auth-interop-19.0.2.aar", "mirror_urls": [ - "https://maven.google.com/com/google/firebase/firebase-iid-interop/17.0.0/firebase-iid-interop-17.0.0.aar", - "https://repo1.maven.org/maven2/com/google/firebase/firebase-iid-interop/17.0.0/firebase-iid-interop-17.0.0.aar", - "https://maven.fabric.io/public/com/google/firebase/firebase-iid-interop/17.0.0/firebase-iid-interop-17.0.0.aar", - "https://maven.google.com/com/google/firebase/firebase-iid-interop/17.0.0/firebase-iid-interop-17.0.0.aar", - "https://repo1.maven.org/maven2/com/google/firebase/firebase-iid-interop/17.0.0/firebase-iid-interop-17.0.0.aar" + "https://maven.google.com/com/google/firebase/firebase-auth-interop/19.0.2/firebase-auth-interop-19.0.2.aar", + "https://repo1.maven.org/maven2/com/google/firebase/firebase-auth-interop/19.0.2/firebase-auth-interop-19.0.2.aar", + "https://maven.fabric.io/public/com/google/firebase/firebase-auth-interop/19.0.2/firebase-auth-interop-19.0.2.aar", + "https://maven.google.com/com/google/firebase/firebase-auth-interop/19.0.2/firebase-auth-interop-19.0.2.aar", + "https://repo1.maven.org/maven2/com/google/firebase/firebase-auth-interop/19.0.2/firebase-auth-interop-19.0.2.aar" ], - "sha256": "b6f4ad581eb489370be3bf38a4bdabfc6ea3d4e716234c625a0f42516c53523c", - "url": "https://maven.google.com/com/google/firebase/firebase-iid-interop/17.0.0/firebase-iid-interop-17.0.0.aar" + "sha256": "64dd9a5c20b64d0e367f4731d11e8fd6ea816a89a4e44e4193c72eafb54264d3", + "url": "https://maven.google.com/com/google/firebase/firebase-auth-interop/19.0.2/firebase-auth-interop-19.0.2.aar" }, { - "coord": "com.google.firebase:firebase-iid:aar:20.1.5", + "coord": "com.google.firebase:firebase-auth-ktx:19.3.1", "dependencies": [ - "com.google.firebase:firebase-installations:aar:16.3.2", + "com.google.firebase:firebase-components:aar:17.0.0", "androidx.collection:collection:jar:1.1.0", - "com.google.android.gms:play-services-stats:aar:17.0.0", "androidx.annotation:annotation:1.1.0", - "com.google.android.gms:play-services-base:aar:17.0.0", - "com.google.firebase:firebase-common:aar:19.3.0", + "com.google.firebase:firebase-auth-interop:aar:19.0.2", "androidx.localbroadcastmanager:localbroadcastmanager:aar:1.0.0", - "androidx.legacy:legacy-support-core-utils:aar:1.0.0", - "com.google.android.gms:play-services-tasks:aar:17.0.0", - "com.google.firebase:firebase-components:aar:16.0.0", - "androidx.lifecycle:lifecycle-livedata:aar:2.2.0", + "org.jetbrains.kotlin:kotlin-stdlib-jdk7:jar:1.4.10", "androidx.fragment:fragment:aar:1.2.0", + "com.google.android.gms:play-services-basement:aar:18.0.0", "androidx.core:core:aar:1.3.1", - "androidx.print:print:aar:1.0.0", - "androidx.annotation:annotation:jar:1.1.0", - "androidx.lifecycle:lifecycle-viewmodel:aar:2.2.0", - "androidx.documentfile:documentfile:aar:1.0.0", - "com.google.android.gms:play-services-basement:aar:17.0.0", - "com.google.firebase:firebase-iid-interop:aar:17.0.0", + "com.google.android.gms:play-services-base:aar:18.0.1", + "com.google.firebase:firebase-common:aar:20.1.1", "com.google.auto.value:auto-value-annotations:jar:1.8.1", - "com.google.firebase:firebase-installations-interop:aar:16.0.0", - "androidx.loader:loader:aar:1.0.0" + "com.google.firebase:firebase-common-ktx:aar:20.1.1", + "com.google.android.gms:play-services-tasks:aar:18.0.1", + "com.google.firebase:firebase-auth:aar:19.3.1" ], "directDependencies": [ - "com.google.firebase:firebase-installations:aar:16.3.2", - "androidx.collection:collection:jar:1.1.0", - "com.google.android.gms:play-services-stats:aar:17.0.0", - "com.google.firebase:firebase-common:aar:19.3.0", - "androidx.legacy:legacy-support-core-utils:aar:1.0.0", - "com.google.android.gms:play-services-tasks:aar:17.0.0", - "com.google.firebase:firebase-components:aar:16.0.0", - "androidx.core:core:aar:1.3.1", - "com.google.android.gms:play-services-basement:aar:17.0.0", - "com.google.firebase:firebase-iid-interop:aar:17.0.0", - "com.google.firebase:firebase-installations-interop:aar:16.0.0" + "com.google.firebase:firebase-components:aar:17.0.0", + "org.jetbrains.kotlin:kotlin-stdlib-jdk7:jar:1.4.10", + "com.google.firebase:firebase-common:aar:20.1.1", + "com.google.firebase:firebase-common-ktx:aar:20.1.1", + "com.google.firebase:firebase-auth:aar:19.3.1" ], - "file": "v1/https/maven.google.com/com/google/firebase/firebase-iid/20.1.5/firebase-iid-20.1.5.aar", + "file": "v1/https/maven.google.com/com/google/firebase/firebase-auth-ktx/19.3.1/firebase-auth-ktx-19.3.1.aar", "mirror_urls": [ - "https://maven.google.com/com/google/firebase/firebase-iid/20.1.5/firebase-iid-20.1.5.aar", - "https://repo1.maven.org/maven2/com/google/firebase/firebase-iid/20.1.5/firebase-iid-20.1.5.aar", - "https://maven.fabric.io/public/com/google/firebase/firebase-iid/20.1.5/firebase-iid-20.1.5.aar", - "https://maven.google.com/com/google/firebase/firebase-iid/20.1.5/firebase-iid-20.1.5.aar", - "https://repo1.maven.org/maven2/com/google/firebase/firebase-iid/20.1.5/firebase-iid-20.1.5.aar" + "https://maven.google.com/com/google/firebase/firebase-auth-ktx/19.3.1/firebase-auth-ktx-19.3.1.aar", + "https://repo1.maven.org/maven2/com/google/firebase/firebase-auth-ktx/19.3.1/firebase-auth-ktx-19.3.1.aar", + "https://maven.fabric.io/public/com/google/firebase/firebase-auth-ktx/19.3.1/firebase-auth-ktx-19.3.1.aar", + "https://maven.google.com/com/google/firebase/firebase-auth-ktx/19.3.1/firebase-auth-ktx-19.3.1.aar", + "https://repo1.maven.org/maven2/com/google/firebase/firebase-auth-ktx/19.3.1/firebase-auth-ktx-19.3.1.aar" ], - "sha256": "f1c174e75a24f298fbc0ed93dde29c997f29ca511d7e8a18dec068203553cf6b", - "url": "https://maven.google.com/com/google/firebase/firebase-iid/20.1.5/firebase-iid-20.1.5.aar" + "sha256": "bd23f0077d8e85c8c57e06c06cdcccdc06a3de96facdd72fabd11159f01c4d4d", + "url": "https://maven.google.com/com/google/firebase/firebase-auth-ktx/19.3.1/firebase-auth-ktx-19.3.1.aar" }, { - "coord": "com.google.firebase:firebase-installations-interop:aar:16.0.0", + "coord": "com.google.firebase:firebase-auth:aar:19.3.1", "dependencies": [ + "com.google.firebase:firebase-components:aar:17.0.0", "androidx.collection:collection:jar:1.1.0", - "com.google.android.gms:play-services-tasks:aar:17.0.0", + "androidx.annotation:annotation:1.1.0", + "com.google.firebase:firebase-auth-interop:aar:19.0.2", + "androidx.localbroadcastmanager:localbroadcastmanager:aar:1.0.0", "androidx.fragment:fragment:aar:1.2.0", + "com.google.android.gms:play-services-basement:aar:18.0.0", "androidx.core:core:aar:1.3.1", - "com.google.android.gms:play-services-basement:aar:17.0.0" + "com.google.android.gms:play-services-base:aar:18.0.1", + "com.google.firebase:firebase-common:aar:20.1.1", + "com.google.auto.value:auto-value-annotations:jar:1.8.1", + "com.google.android.gms:play-services-tasks:aar:18.0.1" ], "directDependencies": [ - "com.google.android.gms:play-services-tasks:aar:17.0.0" + "com.google.firebase:firebase-components:aar:17.0.0", + "androidx.collection:collection:jar:1.1.0", + "com.google.firebase:firebase-auth-interop:aar:19.0.2", + "androidx.localbroadcastmanager:localbroadcastmanager:aar:1.0.0", + "androidx.fragment:fragment:aar:1.2.0", + "com.google.android.gms:play-services-basement:aar:18.0.0", + "com.google.android.gms:play-services-base:aar:18.0.1", + "com.google.firebase:firebase-common:aar:20.1.1", + "com.google.android.gms:play-services-tasks:aar:18.0.1" ], - "file": "v1/https/maven.google.com/com/google/firebase/firebase-installations-interop/16.0.0/firebase-installations-interop-16.0.0.aar", + "file": "v1/https/maven.google.com/com/google/firebase/firebase-auth/19.3.1/firebase-auth-19.3.1.aar", "mirror_urls": [ - "https://maven.google.com/com/google/firebase/firebase-installations-interop/16.0.0/firebase-installations-interop-16.0.0.aar", - "https://repo1.maven.org/maven2/com/google/firebase/firebase-installations-interop/16.0.0/firebase-installations-interop-16.0.0.aar", - "https://maven.fabric.io/public/com/google/firebase/firebase-installations-interop/16.0.0/firebase-installations-interop-16.0.0.aar", - "https://maven.google.com/com/google/firebase/firebase-installations-interop/16.0.0/firebase-installations-interop-16.0.0.aar", - "https://repo1.maven.org/maven2/com/google/firebase/firebase-installations-interop/16.0.0/firebase-installations-interop-16.0.0.aar" + "https://maven.google.com/com/google/firebase/firebase-auth/19.3.1/firebase-auth-19.3.1.aar", + "https://repo1.maven.org/maven2/com/google/firebase/firebase-auth/19.3.1/firebase-auth-19.3.1.aar", + "https://maven.fabric.io/public/com/google/firebase/firebase-auth/19.3.1/firebase-auth-19.3.1.aar", + "https://maven.google.com/com/google/firebase/firebase-auth/19.3.1/firebase-auth-19.3.1.aar", + "https://repo1.maven.org/maven2/com/google/firebase/firebase-auth/19.3.1/firebase-auth-19.3.1.aar" ], - "sha256": "d498fe20e7d2c65fc8f7124f1c1791d2828bebdf6bf06ab4cdee13e7fe9ccaa2", - "url": "https://maven.google.com/com/google/firebase/firebase-installations-interop/16.0.0/firebase-installations-interop-16.0.0.aar" + "sha256": "0523401e4028729d1a882d2f787cd180bdf91bd12cb1d362453a770e6a2f72c1", + "url": "https://maven.google.com/com/google/firebase/firebase-auth/19.3.1/firebase-auth-19.3.1.aar" }, { - "coord": "com.google.firebase:firebase-installations:aar:16.3.2", + "coord": "com.google.firebase:firebase-common-ktx:aar:20.1.1", "dependencies": [ + "com.google.firebase:firebase-components:aar:17.0.0", "androidx.collection:collection:jar:1.1.0", - "com.google.firebase:firebase-common:aar:19.3.0", - "com.google.android.gms:play-services-tasks:aar:17.0.0", - "com.google.firebase:firebase-components:aar:16.0.0", + "org.jetbrains.kotlin:kotlin-stdlib-jdk7:jar:1.4.10", "androidx.fragment:fragment:aar:1.2.0", + "com.google.android.gms:play-services-basement:aar:18.0.0", "androidx.core:core:aar:1.3.1", "androidx.annotation:annotation:jar:1.1.0", - "com.google.android.gms:play-services-basement:aar:17.0.0", - "com.google.auto.value:auto-value-annotations:jar:1.8.1", - "com.google.firebase:firebase-installations-interop:aar:16.0.0" + "com.google.firebase:firebase-common:aar:20.1.1", + "org.jetbrains.kotlin:kotlin-stdlib:1.5.0", + "com.google.android.gms:play-services-tasks:aar:18.0.1", + "com.google.firebase:firebase-annotations:jar:16.1.0" ], "directDependencies": [ - "com.google.android.gms:play-services-tasks:aar:17.0.0", - "com.google.firebase:firebase-common:aar:19.3.0", - "com.google.firebase:firebase-components:aar:16.0.0", - "com.google.firebase:firebase-installations-interop:aar:16.0.0" + "androidx.annotation:annotation:jar:1.1.0", + "com.google.firebase:firebase-common:aar:20.1.1", + "com.google.firebase:firebase-components:aar:17.0.0", + "org.jetbrains.kotlin:kotlin-stdlib-jdk7:jar:1.4.10" ], - "file": "v1/https/maven.google.com/com/google/firebase/firebase-installations/16.3.2/firebase-installations-16.3.2.aar", + "file": "v1/https/maven.google.com/com/google/firebase/firebase-common-ktx/20.1.1/firebase-common-ktx-20.1.1.aar", "mirror_urls": [ - "https://maven.google.com/com/google/firebase/firebase-installations/16.3.2/firebase-installations-16.3.2.aar", - "https://repo1.maven.org/maven2/com/google/firebase/firebase-installations/16.3.2/firebase-installations-16.3.2.aar", - "https://maven.fabric.io/public/com/google/firebase/firebase-installations/16.3.2/firebase-installations-16.3.2.aar", - "https://maven.google.com/com/google/firebase/firebase-installations/16.3.2/firebase-installations-16.3.2.aar", - "https://repo1.maven.org/maven2/com/google/firebase/firebase-installations/16.3.2/firebase-installations-16.3.2.aar" + "https://maven.google.com/com/google/firebase/firebase-common-ktx/20.1.1/firebase-common-ktx-20.1.1.aar", + "https://repo1.maven.org/maven2/com/google/firebase/firebase-common-ktx/20.1.1/firebase-common-ktx-20.1.1.aar", + "https://maven.fabric.io/public/com/google/firebase/firebase-common-ktx/20.1.1/firebase-common-ktx-20.1.1.aar", + "https://maven.google.com/com/google/firebase/firebase-common-ktx/20.1.1/firebase-common-ktx-20.1.1.aar", + "https://repo1.maven.org/maven2/com/google/firebase/firebase-common-ktx/20.1.1/firebase-common-ktx-20.1.1.aar" ], - "sha256": "0d0f88b3c3789d5fe1aa9a69bd5ab6c0e92036fcf34520775a0091e37268dd3f", - "url": "https://maven.google.com/com/google/firebase/firebase-installations/16.3.2/firebase-installations-16.3.2.aar" + "sha256": "32ef394eea17445d3460a11f7128ef412f9aa093cd00106e9cfbec363b17a2c1", + "url": "https://maven.google.com/com/google/firebase/firebase-common-ktx/20.1.1/firebase-common-ktx-20.1.1.aar" }, { - "coord": "com.google.firebase:firebase-measurement-connector:aar:18.0.0", + "coord": "com.google.firebase:firebase-common:20.1.1", "dependencies": [ - "com.google.android.gms:play-services-basement:aar:17.0.0", + "com.google.firebase:firebase-components:aar:17.0.0", "androidx.collection:collection:jar:1.1.0", + "androidx.fragment:fragment:aar:1.2.0", + "com.google.android.gms:play-services-basement:aar:18.0.0", "androidx.core:core:aar:1.3.1", - "androidx.fragment:fragment:aar:1.2.0" + "androidx.annotation:annotation:jar:1.1.0", + "com.google.android.gms:play-services-tasks:aar:18.0.1", + "com.google.firebase:firebase-annotations:jar:16.1.0" ], "directDependencies": [ - "com.google.android.gms:play-services-basement:aar:17.0.0" + "com.google.android.gms:play-services-basement:aar:18.0.0", + "com.google.android.gms:play-services-tasks:aar:18.0.1", + "com.google.firebase:firebase-components:aar:17.0.0" ], - "file": "v1/https/maven.google.com/com/google/firebase/firebase-measurement-connector/18.0.0/firebase-measurement-connector-18.0.0.aar", + "file": "v1/https/maven.google.com/com/google/firebase/firebase-common/20.1.1/firebase-common-20.1.1.aar", "mirror_urls": [ - "https://maven.google.com/com/google/firebase/firebase-measurement-connector/18.0.0/firebase-measurement-connector-18.0.0.aar", - "https://repo1.maven.org/maven2/com/google/firebase/firebase-measurement-connector/18.0.0/firebase-measurement-connector-18.0.0.aar", - "https://maven.fabric.io/public/com/google/firebase/firebase-measurement-connector/18.0.0/firebase-measurement-connector-18.0.0.aar", - "https://maven.google.com/com/google/firebase/firebase-measurement-connector/18.0.0/firebase-measurement-connector-18.0.0.aar", - "https://repo1.maven.org/maven2/com/google/firebase/firebase-measurement-connector/18.0.0/firebase-measurement-connector-18.0.0.aar" + "https://maven.google.com/com/google/firebase/firebase-common/20.1.1/firebase-common-20.1.1.aar", + "https://repo1.maven.org/maven2/com/google/firebase/firebase-common/20.1.1/firebase-common-20.1.1.aar", + "https://maven.fabric.io/public/com/google/firebase/firebase-common/20.1.1/firebase-common-20.1.1.aar", + "https://maven.google.com/com/google/firebase/firebase-common/20.1.1/firebase-common-20.1.1.aar", + "https://repo1.maven.org/maven2/com/google/firebase/firebase-common/20.1.1/firebase-common-20.1.1.aar" ], - "sha256": "17e8b9b60ac0a79fcbed754d03d4b966cc5bb8837e79c2308bf2970f1d05700c", - "url": "https://maven.google.com/com/google/firebase/firebase-measurement-connector/18.0.0/firebase-measurement-connector-18.0.0.aar" + "sha256": "1ab1a5054cb82395487fe0645dcfec6acc94efb9f4972fe717a8bff6905b8ecf", + "url": "https://maven.google.com/com/google/firebase/firebase-common/20.1.1/firebase-common-20.1.1.aar" }, { - "coord": "com.google.gms:google-services:4.3.3", + "coord": "com.google.firebase:firebase-common:aar:sources:20.1.1", "dependencies": [ - "com.google.code.findbugs:jsr305:3.0.2", - "com.google.guava:guava:30.1.1-android", - "com.google.code.gson:gson:2.8.6", - "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.10", - "com.google.android.gms:strict-version-matcher-plugin:1.2.1" + "com.google.firebase:firebase-annotations:jar:sources:16.1.0", + "androidx.core:core:aar:sources:1.3.1", + "androidx.fragment:fragment:aar:sources:1.2.0", + "com.google.firebase:firebase-components:aar:sources:17.0.0", + "androidx.collection:collection:jar:sources:1.1.0", + "androidx.annotation:annotation:jar:sources:1.1.0", + "com.google.android.gms:play-services-tasks:aar:sources:18.0.1", + "com.google.android.gms:play-services-basement:aar:sources:18.0.0" ], "directDependencies": [ - "com.google.android.gms:strict-version-matcher-plugin:1.2.1", - "com.google.code.gson:gson:2.8.6", - "com.google.guava:guava:30.1.1-android" + "com.google.android.gms:play-services-basement:aar:sources:18.0.0", + "com.google.android.gms:play-services-tasks:aar:sources:18.0.1", + "com.google.firebase:firebase-components:aar:sources:17.0.0" ], - "file": "v1/https/maven.google.com/com/google/gms/google-services/4.3.3/google-services-4.3.3.jar", + "file": "v1/https/maven.google.com/com/google/firebase/firebase-common/20.1.1/firebase-common-20.1.1-sources.jar", "mirror_urls": [ - "https://maven.google.com/com/google/gms/google-services/4.3.3/google-services-4.3.3.jar", - "https://repo1.maven.org/maven2/com/google/gms/google-services/4.3.3/google-services-4.3.3.jar", - "https://maven.fabric.io/public/com/google/gms/google-services/4.3.3/google-services-4.3.3.jar", - "https://maven.google.com/com/google/gms/google-services/4.3.3/google-services-4.3.3.jar", - "https://repo1.maven.org/maven2/com/google/gms/google-services/4.3.3/google-services-4.3.3.jar" + "https://maven.google.com/com/google/firebase/firebase-common/20.1.1/firebase-common-20.1.1-sources.jar", + "https://repo1.maven.org/maven2/com/google/firebase/firebase-common/20.1.1/firebase-common-20.1.1-sources.jar", + "https://maven.fabric.io/public/com/google/firebase/firebase-common/20.1.1/firebase-common-20.1.1-sources.jar", + "https://maven.google.com/com/google/firebase/firebase-common/20.1.1/firebase-common-20.1.1-sources.jar", + "https://repo1.maven.org/maven2/com/google/firebase/firebase-common/20.1.1/firebase-common-20.1.1-sources.jar" ], - "sha256": "d9668002ef7032deddf7dbf853b47e10e6722bbce1b318fe7d6a297e28a8dcae", - "url": "https://maven.google.com/com/google/gms/google-services/4.3.3/google-services-4.3.3.jar" + "sha256": "1cfd1e4aa6a4bb4379ead8eb44cac80e0a3f3a9414a3e2535a67b4e9a2209ff8", + "url": "https://maven.google.com/com/google/firebase/firebase-common/20.1.1/firebase-common-20.1.1-sources.jar" }, { - "coord": "com.google.gms:google-services:jar:sources:4.3.3", + "coord": "com.google.firebase:firebase-components:aar:17.0.0", "dependencies": [ - "com.google.guava:guava:jar:sources:30.1.1-android", - "com.google.code.findbugs:jsr305:jar:sources:3.0.2", - "org.jetbrains.kotlin:kotlin-stdlib-jdk8:jar:sources:1.4.10", - "com.google.code.gson:gson:jar:sources:2.8.6", - "com.google.android.gms:strict-version-matcher-plugin:jar:sources:1.2.1" + "androidx.annotation:annotation:jar:1.1.0", + "com.google.firebase:firebase-annotations:jar:16.1.0" ], "directDependencies": [ - "com.google.android.gms:strict-version-matcher-plugin:jar:sources:1.2.1", - "com.google.code.gson:gson:jar:sources:2.8.6", - "com.google.guava:guava:jar:sources:30.1.1-android" + "androidx.annotation:annotation:jar:1.1.0", + "com.google.firebase:firebase-annotations:jar:16.1.0" ], - "file": "v1/https/maven.google.com/com/google/gms/google-services/4.3.3/google-services-4.3.3-sources.jar", + "file": "v1/https/maven.google.com/com/google/firebase/firebase-components/17.0.0/firebase-components-17.0.0.aar", "mirror_urls": [ - "https://maven.google.com/com/google/gms/google-services/4.3.3/google-services-4.3.3-sources.jar", - "https://repo1.maven.org/maven2/com/google/gms/google-services/4.3.3/google-services-4.3.3-sources.jar", - "https://maven.fabric.io/public/com/google/gms/google-services/4.3.3/google-services-4.3.3-sources.jar", - "https://maven.google.com/com/google/gms/google-services/4.3.3/google-services-4.3.3-sources.jar", - "https://repo1.maven.org/maven2/com/google/gms/google-services/4.3.3/google-services-4.3.3-sources.jar" + "https://maven.google.com/com/google/firebase/firebase-components/17.0.0/firebase-components-17.0.0.aar", + "https://repo1.maven.org/maven2/com/google/firebase/firebase-components/17.0.0/firebase-components-17.0.0.aar", + "https://maven.fabric.io/public/com/google/firebase/firebase-components/17.0.0/firebase-components-17.0.0.aar", + "https://maven.google.com/com/google/firebase/firebase-components/17.0.0/firebase-components-17.0.0.aar", + "https://repo1.maven.org/maven2/com/google/firebase/firebase-components/17.0.0/firebase-components-17.0.0.aar" ], - "sha256": "453def3af6897f944b3175ce0538c3ca1536583ace3b3b3a15aca1c2e2be6bb0", - "url": "https://maven.google.com/com/google/gms/google-services/4.3.3/google-services-4.3.3-sources.jar" + "sha256": "dd678b2e24dd9b3f570196c618b6ffba9ea59b232ae6dce1356b0629ecb6fbf7", + "url": "https://maven.google.com/com/google/firebase/firebase-components/17.0.0/firebase-components-17.0.0.aar" }, { - "coord": "com.google.googlejavaformat:google-java-format:1.5", + "coord": "com.google.firebase:firebase-components:aar:sources:17.0.0", "dependencies": [ - "com.google.guava:guava:30.1.1-android", - "com.google.errorprone:javac-shaded:9-dev-r4023-3" + "com.google.firebase:firebase-annotations:jar:sources:16.1.0", + "androidx.annotation:annotation:jar:sources:1.1.0" ], "directDependencies": [ - "com.google.errorprone:javac-shaded:9-dev-r4023-3", - "com.google.guava:guava:30.1.1-android" + "androidx.annotation:annotation:jar:sources:1.1.0", + "com.google.firebase:firebase-annotations:jar:sources:16.1.0" ], - "file": "v1/https/repo1.maven.org/maven2/com/google/googlejavaformat/google-java-format/1.5/google-java-format-1.5.jar", + "file": "v1/https/maven.google.com/com/google/firebase/firebase-components/17.0.0/firebase-components-17.0.0-sources.jar", "mirror_urls": [ - "https://maven.google.com/com/google/googlejavaformat/google-java-format/1.5/google-java-format-1.5.jar", - "https://repo1.maven.org/maven2/com/google/googlejavaformat/google-java-format/1.5/google-java-format-1.5.jar", - "https://maven.fabric.io/public/com/google/googlejavaformat/google-java-format/1.5/google-java-format-1.5.jar", - "https://maven.google.com/com/google/googlejavaformat/google-java-format/1.5/google-java-format-1.5.jar", - "https://repo1.maven.org/maven2/com/google/googlejavaformat/google-java-format/1.5/google-java-format-1.5.jar" + "https://maven.google.com/com/google/firebase/firebase-components/17.0.0/firebase-components-17.0.0-sources.jar", + "https://repo1.maven.org/maven2/com/google/firebase/firebase-components/17.0.0/firebase-components-17.0.0-sources.jar", + "https://maven.fabric.io/public/com/google/firebase/firebase-components/17.0.0/firebase-components-17.0.0-sources.jar", + "https://maven.google.com/com/google/firebase/firebase-components/17.0.0/firebase-components-17.0.0-sources.jar", + "https://repo1.maven.org/maven2/com/google/firebase/firebase-components/17.0.0/firebase-components-17.0.0-sources.jar" ], - "sha256": "aa19ad7850fb85178aa22f2fddb163b84d6ce4d0035872f30d4408195ca1144e", - "url": "https://repo1.maven.org/maven2/com/google/googlejavaformat/google-java-format/1.5/google-java-format-1.5.jar" + "sha256": "8910a66c0ed4f81e894da879fd45cc647346a37a75eba0b9184e48d6654f8fcb", + "url": "https://maven.google.com/com/google/firebase/firebase-components/17.0.0/firebase-components-17.0.0-sources.jar" }, { - "coord": "com.google.googlejavaformat:google-java-format:jar:sources:1.5", + "coord": "com.google.firebase:firebase-crashlytics:17.1.1", "dependencies": [ - "com.google.errorprone:javac-shaded:jar:sources:9-dev-r4023-3", - "com.google.guava:guava:jar:sources:30.1.1-android" + "com.google.firebase:firebase-components:aar:17.0.0", + "com.google.firebase:firebase-measurement-connector:aar:18.0.0", + "com.google.firebase:firebase-installations:aar:16.3.2", + "androidx.collection:collection:jar:1.1.0", + "com.google.android.gms:play-services-stats:aar:17.0.0", + "androidx.annotation:annotation:1.1.0", + "com.google.firebase:firebase-iid:aar:20.1.5", + "com.google.android.datatransport:transport-backend-cct:aar:2.3.0", + "androidx.localbroadcastmanager:localbroadcastmanager:aar:1.0.0", + "androidx.legacy:legacy-support-core-utils:aar:1.0.0", + "com.google.android.datatransport:transport-api:aar:2.2.0", + "androidx.lifecycle:lifecycle-livedata:aar:2.2.0", + "androidx.fragment:fragment:aar:1.2.0", + "com.google.android.gms:play-services-basement:aar:18.0.0", + "androidx.core:core:aar:1.3.1", + "com.google.dagger:dagger:jar:2.28.1", + "com.google.firebase:firebase-encoders-json:aar:16.1.0", + "com.google.android.gms:play-services-base:aar:18.0.1", + "com.squareup.okhttp3:okhttp:jar:4.7.2", + "androidx.print:print:aar:1.0.0", + "androidx.annotation:annotation:jar:1.1.0", + "androidx.lifecycle:lifecycle-viewmodel:aar:2.2.0", + "androidx.documentfile:documentfile:aar:1.0.0", + "com.google.firebase:firebase-common:aar:20.1.1", + "com.google.firebase:firebase-iid-interop:aar:17.0.0", + "com.google.android.datatransport:transport-runtime:aar:2.2.3", + "com.google.auto.value:auto-value-annotations:jar:1.8.1", + "com.google.firebase:firebase-installations-interop:aar:16.0.0", + "com.google.android.gms:play-services-tasks:aar:18.0.1", + "androidx.loader:loader:aar:1.0.0" ], "directDependencies": [ - "com.google.errorprone:javac-shaded:jar:sources:9-dev-r4023-3", - "com.google.guava:guava:jar:sources:30.1.1-android" + "com.google.firebase:firebase-components:aar:17.0.0", + "com.google.firebase:firebase-measurement-connector:aar:18.0.0", + "com.google.firebase:firebase-iid:aar:20.1.5", + "com.google.android.datatransport:transport-backend-cct:aar:2.3.0", + "com.google.android.datatransport:transport-api:aar:2.2.0", + "com.google.firebase:firebase-encoders-json:aar:16.1.0", + "com.squareup.okhttp3:okhttp:jar:4.7.2", + "com.google.firebase:firebase-common:aar:20.1.1", + "com.google.firebase:firebase-iid-interop:aar:17.0.0", + "com.google.android.datatransport:transport-runtime:aar:2.2.3", + "com.google.android.gms:play-services-tasks:aar:18.0.1" ], - "file": "v1/https/repo1.maven.org/maven2/com/google/googlejavaformat/google-java-format/1.5/google-java-format-1.5-sources.jar", + "file": "v1/https/maven.google.com/com/google/firebase/firebase-crashlytics/17.1.1/firebase-crashlytics-17.1.1.aar", "mirror_urls": [ - "https://maven.google.com/com/google/googlejavaformat/google-java-format/1.5/google-java-format-1.5-sources.jar", - "https://repo1.maven.org/maven2/com/google/googlejavaformat/google-java-format/1.5/google-java-format-1.5-sources.jar", - "https://maven.fabric.io/public/com/google/googlejavaformat/google-java-format/1.5/google-java-format-1.5-sources.jar", - "https://maven.google.com/com/google/googlejavaformat/google-java-format/1.5/google-java-format-1.5-sources.jar", - "https://repo1.maven.org/maven2/com/google/googlejavaformat/google-java-format/1.5/google-java-format-1.5-sources.jar" + "https://maven.google.com/com/google/firebase/firebase-crashlytics/17.1.1/firebase-crashlytics-17.1.1.aar", + "https://repo1.maven.org/maven2/com/google/firebase/firebase-crashlytics/17.1.1/firebase-crashlytics-17.1.1.aar", + "https://maven.fabric.io/public/com/google/firebase/firebase-crashlytics/17.1.1/firebase-crashlytics-17.1.1.aar", + "https://maven.google.com/com/google/firebase/firebase-crashlytics/17.1.1/firebase-crashlytics-17.1.1.aar", + "https://repo1.maven.org/maven2/com/google/firebase/firebase-crashlytics/17.1.1/firebase-crashlytics-17.1.1.aar" ], - "sha256": "c204b15b3834128d335f17213f7e621ddb2cc5bfff5b8dd035cd1f2affb7fa8f", - "url": "https://repo1.maven.org/maven2/com/google/googlejavaformat/google-java-format/1.5/google-java-format-1.5-sources.jar" + "sha256": "635953640e1bbb277affadbc3e59b43f1c4dd07de79c8973b6341a756ad8b74b", + "url": "https://maven.google.com/com/google/firebase/firebase-crashlytics/17.1.1/firebase-crashlytics-17.1.1.aar" }, { - "coord": "com.google.guava:failureaccess:1.0.1", - "dependencies": [], - "directDependencies": [], - "file": "v1/https/repo1.maven.org/maven2/com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1.jar", - "mirror_urls": [ - "https://maven.google.com/com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1.jar", - "https://repo1.maven.org/maven2/com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1.jar", - "https://maven.fabric.io/public/com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1.jar", - "https://maven.google.com/com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1.jar", - "https://repo1.maven.org/maven2/com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1.jar" + "coord": "com.google.firebase:firebase-database-collection:aar:18.0.1", + "dependencies": [ + "androidx.collection:collection:jar:1.1.0", + "androidx.fragment:fragment:aar:1.2.0", + "com.google.android.gms:play-services-basement:aar:18.0.0", + "androidx.core:core:aar:1.3.1", + "com.google.android.gms:play-services-base:aar:18.0.1", + "com.google.android.gms:play-services-tasks:aar:18.0.1" ], - "sha256": "a171ee4c734dd2da837e4b16be9df4661afab72a41adaf31eb84dfdaf936ca26", - "url": "https://repo1.maven.org/maven2/com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1.jar" - }, - { - "coord": "com.google.guava:failureaccess:jar:sources:1.0.1", - "dependencies": [], - "directDependencies": [], - "file": "v1/https/repo1.maven.org/maven2/com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1-sources.jar", + "directDependencies": [ + "com.google.android.gms:play-services-base:aar:18.0.1" + ], + "file": "v1/https/maven.google.com/com/google/firebase/firebase-database-collection/18.0.1/firebase-database-collection-18.0.1.aar", "mirror_urls": [ - "https://maven.google.com/com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1-sources.jar", - "https://repo1.maven.org/maven2/com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1-sources.jar", - "https://maven.fabric.io/public/com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1-sources.jar", - "https://maven.google.com/com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1-sources.jar", - "https://repo1.maven.org/maven2/com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1-sources.jar" + "https://maven.google.com/com/google/firebase/firebase-database-collection/18.0.1/firebase-database-collection-18.0.1.aar", + "https://repo1.maven.org/maven2/com/google/firebase/firebase-database-collection/18.0.1/firebase-database-collection-18.0.1.aar", + "https://maven.fabric.io/public/com/google/firebase/firebase-database-collection/18.0.1/firebase-database-collection-18.0.1.aar", + "https://maven.google.com/com/google/firebase/firebase-database-collection/18.0.1/firebase-database-collection-18.0.1.aar", + "https://repo1.maven.org/maven2/com/google/firebase/firebase-database-collection/18.0.1/firebase-database-collection-18.0.1.aar" ], - "sha256": "092346eebbb1657b51aa7485a246bf602bb464cc0b0e2e1c7e7201fadce1e98f", - "url": "https://repo1.maven.org/maven2/com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1-sources.jar" + "sha256": "fb92604df35bf819e706432ff6e3ca9d4794cc85348d94c887622ba93b5450e0", + "url": "https://maven.google.com/com/google/firebase/firebase-database-collection/18.0.1/firebase-database-collection-18.0.1.aar" }, { - "coord": "com.google.guava:guava:30.1.1-android", + "coord": "com.google.firebase:firebase-database-collection:aar:sources:18.0.1", "dependencies": [ - "com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava", - "com.google.j2objc:j2objc-annotations:1.3", - "com.google.code.findbugs:jsr305:3.0.2", - "com.google.errorprone:error_prone_annotations:2.7.1", - "com.google.guava:failureaccess:1.0.1", - "org.checkerframework:checker-compat-qual:2.5.5" + "androidx.core:core:aar:sources:1.3.1", + "androidx.fragment:fragment:aar:sources:1.2.0", + "androidx.collection:collection:jar:sources:1.1.0", + "com.google.android.gms:play-services-tasks:aar:sources:18.0.1", + "com.google.android.gms:play-services-base:aar:sources:18.0.1", + "com.google.android.gms:play-services-basement:aar:sources:18.0.0" ], "directDependencies": [ - "com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava", - "com.google.j2objc:j2objc-annotations:1.3", - "com.google.code.findbugs:jsr305:3.0.2", - "com.google.errorprone:error_prone_annotations:2.7.1", - "com.google.guava:failureaccess:1.0.1", - "org.checkerframework:checker-compat-qual:2.5.5" + "com.google.android.gms:play-services-base:aar:sources:18.0.1" ], - "file": "v1/https/repo1.maven.org/maven2/com/google/guava/guava/30.1.1-android/guava-30.1.1-android.jar", + "file": "v1/https/maven.google.com/com/google/firebase/firebase-database-collection/18.0.1/firebase-database-collection-18.0.1-sources.jar", "mirror_urls": [ - "https://maven.google.com/com/google/guava/guava/30.1.1-android/guava-30.1.1-android.jar", - "https://repo1.maven.org/maven2/com/google/guava/guava/30.1.1-android/guava-30.1.1-android.jar", - "https://maven.fabric.io/public/com/google/guava/guava/30.1.1-android/guava-30.1.1-android.jar", - "https://maven.google.com/com/google/guava/guava/30.1.1-android/guava-30.1.1-android.jar", - "https://repo1.maven.org/maven2/com/google/guava/guava/30.1.1-android/guava-30.1.1-android.jar" + "https://maven.google.com/com/google/firebase/firebase-database-collection/18.0.1/firebase-database-collection-18.0.1-sources.jar", + "https://repo1.maven.org/maven2/com/google/firebase/firebase-database-collection/18.0.1/firebase-database-collection-18.0.1-sources.jar", + "https://maven.fabric.io/public/com/google/firebase/firebase-database-collection/18.0.1/firebase-database-collection-18.0.1-sources.jar", + "https://maven.google.com/com/google/firebase/firebase-database-collection/18.0.1/firebase-database-collection-18.0.1-sources.jar", + "https://repo1.maven.org/maven2/com/google/firebase/firebase-database-collection/18.0.1/firebase-database-collection-18.0.1-sources.jar" ], - "sha256": "355f79352f8c252f2bdaa06c687c4836a38016caccfc4c28d16ae77ecfdffa2f", - "url": "https://repo1.maven.org/maven2/com/google/guava/guava/30.1.1-android/guava-30.1.1-android.jar" + "sha256": "e010851f4524833f72df62d594ff92f1af34026453721c387f522365d1d68cd5", + "url": "https://maven.google.com/com/google/firebase/firebase-database-collection/18.0.1/firebase-database-collection-18.0.1-sources.jar" }, { - "coord": "com.google.guava:guava:jar:sources:30.1.1-android", + "coord": "com.google.firebase:firebase-encoders-json:aar:16.1.0", "dependencies": [ - "com.google.code.findbugs:jsr305:jar:sources:3.0.2", - "com.google.j2objc:j2objc-annotations:jar:sources:1.3", - "org.checkerframework:checker-compat-qual:jar:sources:2.5.5", - "com.google.guava:listenablefuture:jar:sources:9999.0-empty-to-avoid-conflict-with-guava", - "com.google.guava:failureaccess:jar:sources:1.0.1", - "com.google.errorprone:error_prone_annotations:jar:sources:2.7.1" + "androidx.annotation:annotation:jar:1.1.0" ], "directDependencies": [ - "com.google.code.findbugs:jsr305:jar:sources:3.0.2", - "com.google.j2objc:j2objc-annotations:jar:sources:1.3", - "org.checkerframework:checker-compat-qual:jar:sources:2.5.5", - "com.google.guava:listenablefuture:jar:sources:9999.0-empty-to-avoid-conflict-with-guava", - "com.google.guava:failureaccess:jar:sources:1.0.1", - "com.google.errorprone:error_prone_annotations:jar:sources:2.7.1" + "androidx.annotation:annotation:jar:1.1.0" ], - "file": "v1/https/repo1.maven.org/maven2/com/google/guava/guava/30.1.1-android/guava-30.1.1-android-sources.jar", + "file": "v1/https/maven.google.com/com/google/firebase/firebase-encoders-json/16.1.0/firebase-encoders-json-16.1.0.aar", "mirror_urls": [ - "https://maven.google.com/com/google/guava/guava/30.1.1-android/guava-30.1.1-android-sources.jar", - "https://repo1.maven.org/maven2/com/google/guava/guava/30.1.1-android/guava-30.1.1-android-sources.jar", - "https://maven.fabric.io/public/com/google/guava/guava/30.1.1-android/guava-30.1.1-android-sources.jar", - "https://maven.google.com/com/google/guava/guava/30.1.1-android/guava-30.1.1-android-sources.jar", - "https://repo1.maven.org/maven2/com/google/guava/guava/30.1.1-android/guava-30.1.1-android-sources.jar" + "https://maven.google.com/com/google/firebase/firebase-encoders-json/16.1.0/firebase-encoders-json-16.1.0.aar", + "https://repo1.maven.org/maven2/com/google/firebase/firebase-encoders-json/16.1.0/firebase-encoders-json-16.1.0.aar", + "https://maven.fabric.io/public/com/google/firebase/firebase-encoders-json/16.1.0/firebase-encoders-json-16.1.0.aar", + "https://maven.google.com/com/google/firebase/firebase-encoders-json/16.1.0/firebase-encoders-json-16.1.0.aar", + "https://repo1.maven.org/maven2/com/google/firebase/firebase-encoders-json/16.1.0/firebase-encoders-json-16.1.0.aar" ], - "sha256": "dac52416371d86baea1ffe6ef7b54b2730b52fcea19091ae32942cb5cd9f868c", - "url": "https://repo1.maven.org/maven2/com/google/guava/guava/30.1.1-android/guava-30.1.1-android-sources.jar" + "sha256": "24ce7c1cfda1d526b76b16437a2e7d0920d7176a377e0e30b2a7381341f22ea1", + "url": "https://maven.google.com/com/google/firebase/firebase-encoders-json/16.1.0/firebase-encoders-json-16.1.0.aar" }, { - "coord": "com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava", - "dependencies": [], - "directDependencies": [], - "file": "v1/https/repo1.maven.org/maven2/com/google/guava/listenablefuture/9999.0-empty-to-avoid-conflict-with-guava/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar", + "coord": "com.google.firebase:firebase-encoders-json:aar:sources:16.1.0", + "dependencies": [ + "androidx.annotation:annotation:jar:sources:1.1.0" + ], + "directDependencies": [ + "androidx.annotation:annotation:jar:sources:1.1.0" + ], + "file": "v1/https/maven.google.com/com/google/firebase/firebase-encoders-json/16.1.0/firebase-encoders-json-16.1.0-sources.jar", "mirror_urls": [ - "https://maven.google.com/com/google/guava/listenablefuture/9999.0-empty-to-avoid-conflict-with-guava/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar", - "https://repo1.maven.org/maven2/com/google/guava/listenablefuture/9999.0-empty-to-avoid-conflict-with-guava/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar", - "https://maven.fabric.io/public/com/google/guava/listenablefuture/9999.0-empty-to-avoid-conflict-with-guava/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar", - "https://maven.google.com/com/google/guava/listenablefuture/9999.0-empty-to-avoid-conflict-with-guava/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar", - "https://repo1.maven.org/maven2/com/google/guava/listenablefuture/9999.0-empty-to-avoid-conflict-with-guava/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar" + "https://maven.google.com/com/google/firebase/firebase-encoders-json/16.1.0/firebase-encoders-json-16.1.0-sources.jar", + "https://repo1.maven.org/maven2/com/google/firebase/firebase-encoders-json/16.1.0/firebase-encoders-json-16.1.0-sources.jar", + "https://maven.fabric.io/public/com/google/firebase/firebase-encoders-json/16.1.0/firebase-encoders-json-16.1.0-sources.jar", + "https://maven.google.com/com/google/firebase/firebase-encoders-json/16.1.0/firebase-encoders-json-16.1.0-sources.jar", + "https://repo1.maven.org/maven2/com/google/firebase/firebase-encoders-json/16.1.0/firebase-encoders-json-16.1.0-sources.jar" ], - "sha256": "b372a037d4230aa57fbeffdef30fd6123f9c0c2db85d0aced00c91b974f33f99", - "url": "https://repo1.maven.org/maven2/com/google/guava/listenablefuture/9999.0-empty-to-avoid-conflict-with-guava/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar" + "sha256": "791b1521a8f5eda7ded50ccdf3afa7632a1198964e3c60e93e7ae602d54ca314", + "url": "https://maven.google.com/com/google/firebase/firebase-encoders-json/16.1.0/firebase-encoders-json-16.1.0-sources.jar" }, { - "coord": "com.google.j2objc:j2objc-annotations:1.3", - "dependencies": [], - "directDependencies": [], - "file": "v1/https/repo1.maven.org/maven2/com/google/j2objc/j2objc-annotations/1.3/j2objc-annotations-1.3.jar", + "coord": "com.google.firebase:firebase-firestore-ktx:24.2.1", + "dependencies": [ + "com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava", + "io.grpc:grpc-protobuf-lite:jar:1.44.1", + "com.google.firebase:firebase-database-collection:aar:18.0.1", + "com.google.firebase:firebase-components:aar:17.0.0", + "io.grpc:grpc-core:1.44.1", + "androidx.collection:collection:jar:1.1.0", + "com.google.j2objc:j2objc-annotations:1.3", + "com.google.firebase:firebase-auth-interop:aar:19.0.2", + "com.google.code.findbugs:jsr305:3.0.2", + "io.grpc:grpc-android:aar:1.44.1", + "com.squareup.okhttp:okhttp:jar:2.7.5", + "com.google.protobuf:protobuf-javalite:3.19.2", + "com.google.android:annotations:4.1.1.4", + "com.google.guava:guava:30.1.1-android", + "org.jetbrains.kotlin:kotlin-stdlib-jdk7:jar:1.4.10", + "io.grpc:grpc-stub:jar:1.44.1", + "org.codehaus.mojo:animal-sniffer-annotations:1.19", + "io.perfmark:perfmark-api:0.23.0", + "com.google.firebase:protolite-well-known-types:aar:18.0.0", + "androidx.fragment:fragment:aar:1.2.0", + "com.google.android.gms:play-services-basement:aar:18.0.0", + "androidx.core:core:aar:1.3.1", + "com.google.firebase:firebase-appcheck-interop:aar:16.0.0", + "com.google.errorprone:error_prone_annotations:2.9.0", + "com.google.android.gms:play-services-base:aar:18.0.1", + "io.grpc:grpc-context:1.44.1", + "com.squareup.okhttp:okhttp:2.7.5", + "com.squareup.okio:okio:2.6.0", + "io.grpc:grpc-okhttp:jar:1.44.1", + "androidx.annotation:annotation:jar:1.1.0", + "com.google.guava:failureaccess:1.0.1", + "com.google.firebase:firebase-common:aar:20.1.1", + "org.jetbrains.kotlin:kotlin-stdlib:1.5.0", + "com.google.protobuf:protobuf-javalite:jar:3.19.2", + "io.grpc:grpc-api:1.44.1", + "com.google.firebase:firebase-common-ktx:aar:20.1.1", + "com.google.firebase:firebase-firestore:aar:24.2.1", + "com.google.android.gms:play-services-tasks:aar:18.0.1", + "com.google.firebase:firebase-annotations:jar:16.1.0", + "com.google.code.gson:gson:2.8.9", + "org.checkerframework:checker-compat-qual:2.5.5" + ], + "directDependencies": [ + "com.google.firebase:firebase-components:aar:17.0.0", + "org.jetbrains.kotlin:kotlin-stdlib-jdk7:jar:1.4.10", + "androidx.annotation:annotation:jar:1.1.0", + "com.google.firebase:firebase-common:aar:20.1.1", + "com.google.firebase:firebase-common-ktx:aar:20.1.1", + "com.google.firebase:firebase-firestore:aar:24.2.1" + ], + "file": "v1/https/maven.google.com/com/google/firebase/firebase-firestore-ktx/24.2.1/firebase-firestore-ktx-24.2.1.aar", "mirror_urls": [ - "https://maven.google.com/com/google/j2objc/j2objc-annotations/1.3/j2objc-annotations-1.3.jar", - "https://repo1.maven.org/maven2/com/google/j2objc/j2objc-annotations/1.3/j2objc-annotations-1.3.jar", - "https://maven.fabric.io/public/com/google/j2objc/j2objc-annotations/1.3/j2objc-annotations-1.3.jar", - "https://maven.google.com/com/google/j2objc/j2objc-annotations/1.3/j2objc-annotations-1.3.jar", - "https://repo1.maven.org/maven2/com/google/j2objc/j2objc-annotations/1.3/j2objc-annotations-1.3.jar" + "https://maven.google.com/com/google/firebase/firebase-firestore-ktx/24.2.1/firebase-firestore-ktx-24.2.1.aar", + "https://repo1.maven.org/maven2/com/google/firebase/firebase-firestore-ktx/24.2.1/firebase-firestore-ktx-24.2.1.aar", + "https://maven.fabric.io/public/com/google/firebase/firebase-firestore-ktx/24.2.1/firebase-firestore-ktx-24.2.1.aar", + "https://maven.google.com/com/google/firebase/firebase-firestore-ktx/24.2.1/firebase-firestore-ktx-24.2.1.aar", + "https://repo1.maven.org/maven2/com/google/firebase/firebase-firestore-ktx/24.2.1/firebase-firestore-ktx-24.2.1.aar" ], - "sha256": "21af30c92267bd6122c0e0b4d20cccb6641a37eaf956c6540ec471d584e64a7b", - "url": "https://repo1.maven.org/maven2/com/google/j2objc/j2objc-annotations/1.3/j2objc-annotations-1.3.jar" + "sha256": "5c3ebeadfc1feed2fb20c3a974c9f108e2068833af1b9e532cda6a85cb37011f", + "url": "https://maven.google.com/com/google/firebase/firebase-firestore-ktx/24.2.1/firebase-firestore-ktx-24.2.1.aar" }, { - "coord": "com.google.j2objc:j2objc-annotations:jar:sources:1.3", - "dependencies": [], - "directDependencies": [], - "file": "v1/https/repo1.maven.org/maven2/com/google/j2objc/j2objc-annotations/1.3/j2objc-annotations-1.3-sources.jar", + "coord": "com.google.firebase:firebase-firestore-ktx:jar:sources:24.2.1", + "dependencies": [ + "io.grpc:grpc-api:jar:sources:1.44.1", + "com.google.firebase:protolite-well-known-types:aar:sources:18.0.0", + "com.google.guava:guava:jar:sources:30.1.1-android", + "org.jetbrains.kotlin:kotlin-stdlib:jar:sources:1.5.0", + "com.google.firebase:firebase-common-ktx:aar:sources:20.1.1", + "com.google.code.findbugs:jsr305:jar:sources:3.0.2", + "com.google.android:annotations:jar:sources:4.1.1.4", + "com.google.firebase:firebase-common:aar:sources:20.1.1", + "com.google.firebase:firebase-annotations:jar:sources:16.1.0", + "androidx.core:core:aar:sources:1.3.1", + "com.google.j2objc:j2objc-annotations:jar:sources:1.3", + "com.google.firebase:firebase-firestore:aar:sources:24.2.1", + "io.grpc:grpc-okhttp:jar:sources:1.44.1", + "androidx.fragment:fragment:aar:sources:1.2.0", + "com.google.firebase:firebase-components:aar:sources:17.0.0", + "androidx.collection:collection:jar:sources:1.1.0", + "com.google.code.gson:gson:jar:sources:2.8.9", + "com.squareup.okhttp:okhttp:jar:sources:2.7.5", + "org.jetbrains.kotlin:kotlin-stdlib-jdk7:jar:sources:1.4.10", + "io.grpc:grpc-android:aar:sources:1.44.1", + "com.google.protobuf:protobuf-javalite:jar:sources:3.19.2", + "io.grpc:grpc-stub:jar:sources:1.44.1", + "androidx.annotation:annotation:jar:sources:1.1.0", + "io.grpc:grpc-protobuf-lite:jar:sources:1.44.1", + "org.checkerframework:checker-compat-qual:jar:sources:2.5.5", + "com.google.android.gms:play-services-tasks:aar:sources:18.0.1", + "com.google.guava:listenablefuture:jar:sources:9999.0-empty-to-avoid-conflict-with-guava", + "io.grpc:grpc-core:jar:sources:1.44.1", + "com.squareup.okio:okio:jar:sources:2.6.0", + "com.google.firebase:firebase-appcheck-interop:aar:sources:16.0.0", + "com.google.guava:failureaccess:jar:sources:1.0.1", + "com.google.errorprone:error_prone_annotations:jar:sources:2.9.0", + "io.perfmark:perfmark-api:jar:sources:0.23.0", + "com.google.firebase:firebase-auth-interop:aar:sources:19.0.2", + "org.codehaus.mojo:animal-sniffer-annotations:jar:sources:1.19", + "com.google.android.gms:play-services-base:aar:sources:18.0.1", + "com.google.firebase:firebase-database-collection:aar:sources:18.0.1", + "com.google.android.gms:play-services-basement:aar:sources:18.0.0", + "io.grpc:grpc-context:jar:sources:1.44.1" + ], + "directDependencies": [ + "com.google.firebase:firebase-common-ktx:aar:sources:20.1.1", + "com.google.firebase:firebase-common:aar:sources:20.1.1", + "com.google.firebase:firebase-firestore:aar:sources:24.2.1", + "com.google.firebase:firebase-components:aar:sources:17.0.0", + "org.jetbrains.kotlin:kotlin-stdlib-jdk7:jar:sources:1.4.10", + "androidx.annotation:annotation:jar:sources:1.1.0" + ], + "file": "v1/https/maven.google.com/com/google/firebase/firebase-firestore-ktx/24.2.1/firebase-firestore-ktx-24.2.1-sources.jar", "mirror_urls": [ - "https://maven.google.com/com/google/j2objc/j2objc-annotations/1.3/j2objc-annotations-1.3-sources.jar", - "https://repo1.maven.org/maven2/com/google/j2objc/j2objc-annotations/1.3/j2objc-annotations-1.3-sources.jar", - "https://maven.fabric.io/public/com/google/j2objc/j2objc-annotations/1.3/j2objc-annotations-1.3-sources.jar", - "https://maven.google.com/com/google/j2objc/j2objc-annotations/1.3/j2objc-annotations-1.3-sources.jar", - "https://repo1.maven.org/maven2/com/google/j2objc/j2objc-annotations/1.3/j2objc-annotations-1.3-sources.jar" + "https://maven.google.com/com/google/firebase/firebase-firestore-ktx/24.2.1/firebase-firestore-ktx-24.2.1-sources.jar", + "https://repo1.maven.org/maven2/com/google/firebase/firebase-firestore-ktx/24.2.1/firebase-firestore-ktx-24.2.1-sources.jar", + "https://maven.fabric.io/public/com/google/firebase/firebase-firestore-ktx/24.2.1/firebase-firestore-ktx-24.2.1-sources.jar", + "https://maven.google.com/com/google/firebase/firebase-firestore-ktx/24.2.1/firebase-firestore-ktx-24.2.1-sources.jar", + "https://repo1.maven.org/maven2/com/google/firebase/firebase-firestore-ktx/24.2.1/firebase-firestore-ktx-24.2.1-sources.jar" ], - "sha256": "ba4df669fec153fa4cd0ef8d02c6d3ef0702b7ac4cabe080facf3b6e490bb972", - "url": "https://repo1.maven.org/maven2/com/google/j2objc/j2objc-annotations/1.3/j2objc-annotations-1.3-sources.jar" + "sha256": "b537e0077bcd144f2591e1bf505e9e28bbc0cecef81beefdd16170ac93b7631d", + "url": "https://maven.google.com/com/google/firebase/firebase-firestore-ktx/24.2.1/firebase-firestore-ktx-24.2.1-sources.jar" }, { - "coord": "com.google.protobuf:protobuf-java-util:3.17.3", + "coord": "com.google.firebase:firebase-firestore:aar:24.2.1", "dependencies": [ "com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava", + "io.grpc:grpc-protobuf-lite:jar:1.44.1", + "com.google.firebase:firebase-database-collection:aar:18.0.1", + "com.google.firebase:firebase-components:aar:17.0.0", + "io.grpc:grpc-core:1.44.1", + "androidx.collection:collection:jar:1.1.0", "com.google.j2objc:j2objc-annotations:1.3", + "com.google.firebase:firebase-auth-interop:aar:19.0.2", "com.google.code.findbugs:jsr305:3.0.2", + "io.grpc:grpc-android:aar:1.44.1", + "com.squareup.okhttp:okhttp:jar:2.7.5", + "com.google.protobuf:protobuf-javalite:3.19.2", + "com.google.android:annotations:4.1.1.4", "com.google.guava:guava:30.1.1-android", - "com.google.errorprone:error_prone_annotations:2.7.1", - "com.google.code.gson:gson:2.8.6", - "com.google.protobuf:protobuf-java:3.17.3", + "io.grpc:grpc-stub:jar:1.44.1", + "org.codehaus.mojo:animal-sniffer-annotations:1.19", + "io.perfmark:perfmark-api:0.23.0", + "com.google.firebase:protolite-well-known-types:aar:18.0.0", + "androidx.fragment:fragment:aar:1.2.0", + "com.google.android.gms:play-services-basement:aar:18.0.0", + "androidx.core:core:aar:1.3.1", + "com.google.firebase:firebase-appcheck-interop:aar:16.0.0", + "com.google.errorprone:error_prone_annotations:2.9.0", + "com.google.android.gms:play-services-base:aar:18.0.1", + "io.grpc:grpc-context:1.44.1", + "com.squareup.okhttp:okhttp:2.7.5", + "com.squareup.okio:okio:2.6.0", + "io.grpc:grpc-okhttp:jar:1.44.1", + "androidx.annotation:annotation:jar:1.1.0", "com.google.guava:failureaccess:1.0.1", + "com.google.firebase:firebase-common:aar:20.1.1", + "com.google.protobuf:protobuf-javalite:jar:3.19.2", + "io.grpc:grpc-api:1.44.1", + "com.google.android.gms:play-services-tasks:aar:18.0.1", + "com.google.firebase:firebase-annotations:jar:16.1.0", + "com.google.code.gson:gson:2.8.9", "org.checkerframework:checker-compat-qual:2.5.5" ], "directDependencies": [ - "com.google.code.gson:gson:2.8.6", - "com.google.errorprone:error_prone_annotations:2.7.1", - "com.google.guava:guava:30.1.1-android", - "com.google.protobuf:protobuf-java:3.17.3" + "io.grpc:grpc-protobuf-lite:jar:1.44.1", + "com.google.firebase:firebase-database-collection:aar:18.0.1", + "com.google.firebase:firebase-components:aar:17.0.0", + "com.google.firebase:firebase-auth-interop:aar:19.0.2", + "io.grpc:grpc-android:aar:1.44.1", + "com.squareup.okhttp:okhttp:jar:2.7.5", + "io.grpc:grpc-stub:jar:1.44.1", + "com.google.firebase:protolite-well-known-types:aar:18.0.0", + "com.google.android.gms:play-services-basement:aar:18.0.0", + "com.google.firebase:firebase-appcheck-interop:aar:16.0.0", + "com.google.android.gms:play-services-base:aar:18.0.1", + "io.grpc:grpc-okhttp:jar:1.44.1", + "androidx.annotation:annotation:jar:1.1.0", + "com.google.firebase:firebase-common:aar:20.1.1", + "com.google.android.gms:play-services-tasks:aar:18.0.1", + "com.google.firebase:firebase-annotations:jar:16.1.0" ], - "file": "v1/https/repo1.maven.org/maven2/com/google/protobuf/protobuf-java-util/3.17.3/protobuf-java-util-3.17.3.jar", + "file": "v1/https/maven.google.com/com/google/firebase/firebase-firestore/24.2.1/firebase-firestore-24.2.1.aar", "mirror_urls": [ - "https://maven.google.com/com/google/protobuf/protobuf-java-util/3.17.3/protobuf-java-util-3.17.3.jar", - "https://repo1.maven.org/maven2/com/google/protobuf/protobuf-java-util/3.17.3/protobuf-java-util-3.17.3.jar", - "https://maven.fabric.io/public/com/google/protobuf/protobuf-java-util/3.17.3/protobuf-java-util-3.17.3.jar", - "https://maven.google.com/com/google/protobuf/protobuf-java-util/3.17.3/protobuf-java-util-3.17.3.jar", - "https://repo1.maven.org/maven2/com/google/protobuf/protobuf-java-util/3.17.3/protobuf-java-util-3.17.3.jar" + "https://maven.google.com/com/google/firebase/firebase-firestore/24.2.1/firebase-firestore-24.2.1.aar", + "https://repo1.maven.org/maven2/com/google/firebase/firebase-firestore/24.2.1/firebase-firestore-24.2.1.aar", + "https://maven.fabric.io/public/com/google/firebase/firebase-firestore/24.2.1/firebase-firestore-24.2.1.aar", + "https://maven.google.com/com/google/firebase/firebase-firestore/24.2.1/firebase-firestore-24.2.1.aar", + "https://repo1.maven.org/maven2/com/google/firebase/firebase-firestore/24.2.1/firebase-firestore-24.2.1.aar" ], - "sha256": "bf320ed076000e1d8c7cbf7601b056acaecab80f75b9a659b9f6398d0d7e3f79", - "url": "https://repo1.maven.org/maven2/com/google/protobuf/protobuf-java-util/3.17.3/protobuf-java-util-3.17.3.jar" + "sha256": "e0f2b11b93e779f13e7fcc6a91724aeb071114959c55d19e7e0028c0a01003aa", + "url": "https://maven.google.com/com/google/firebase/firebase-firestore/24.2.1/firebase-firestore-24.2.1.aar" }, { - "coord": "com.google.protobuf:protobuf-java-util:jar:sources:3.17.3", + "coord": "com.google.firebase:firebase-firestore:aar:sources:24.2.1", "dependencies": [ + "io.grpc:grpc-api:jar:sources:1.44.1", + "com.google.firebase:protolite-well-known-types:aar:sources:18.0.0", "com.google.guava:guava:jar:sources:30.1.1-android", - "com.google.protobuf:protobuf-java:jar:sources:3.17.3", "com.google.code.findbugs:jsr305:jar:sources:3.0.2", + "com.google.android:annotations:jar:sources:4.1.1.4", + "com.google.firebase:firebase-common:aar:sources:20.1.1", + "com.google.firebase:firebase-annotations:jar:sources:16.1.0", + "androidx.core:core:aar:sources:1.3.1", "com.google.j2objc:j2objc-annotations:jar:sources:1.3", - "com.google.code.gson:gson:jar:sources:2.8.6", + "io.grpc:grpc-okhttp:jar:sources:1.44.1", + "androidx.fragment:fragment:aar:sources:1.2.0", + "com.google.firebase:firebase-components:aar:sources:17.0.0", + "androidx.collection:collection:jar:sources:1.1.0", + "com.google.code.gson:gson:jar:sources:2.8.9", + "com.squareup.okhttp:okhttp:jar:sources:2.7.5", + "io.grpc:grpc-android:aar:sources:1.44.1", + "com.google.protobuf:protobuf-javalite:jar:sources:3.19.2", + "io.grpc:grpc-stub:jar:sources:1.44.1", + "androidx.annotation:annotation:jar:sources:1.1.0", + "io.grpc:grpc-protobuf-lite:jar:sources:1.44.1", "org.checkerframework:checker-compat-qual:jar:sources:2.5.5", + "com.google.android.gms:play-services-tasks:aar:sources:18.0.1", "com.google.guava:listenablefuture:jar:sources:9999.0-empty-to-avoid-conflict-with-guava", + "io.grpc:grpc-core:jar:sources:1.44.1", + "com.squareup.okio:okio:jar:sources:2.6.0", + "com.google.firebase:firebase-appcheck-interop:aar:sources:16.0.0", "com.google.guava:failureaccess:jar:sources:1.0.1", - "com.google.errorprone:error_prone_annotations:jar:sources:2.7.1" - ], - "directDependencies": [ - "com.google.code.gson:gson:jar:sources:2.8.6", - "com.google.errorprone:error_prone_annotations:jar:sources:2.7.1", - "com.google.guava:guava:jar:sources:30.1.1-android", - "com.google.protobuf:protobuf-java:jar:sources:3.17.3" + "com.google.errorprone:error_prone_annotations:jar:sources:2.9.0", + "io.perfmark:perfmark-api:jar:sources:0.23.0", + "com.google.firebase:firebase-auth-interop:aar:sources:19.0.2", + "org.codehaus.mojo:animal-sniffer-annotations:jar:sources:1.19", + "com.google.android.gms:play-services-base:aar:sources:18.0.1", + "com.google.firebase:firebase-database-collection:aar:sources:18.0.1", + "com.google.android.gms:play-services-basement:aar:sources:18.0.0", + "io.grpc:grpc-context:jar:sources:1.44.1" + ], + "directDependencies": [ + "com.google.firebase:protolite-well-known-types:aar:sources:18.0.0", + "com.google.firebase:firebase-common:aar:sources:20.1.1", + "com.google.firebase:firebase-annotations:jar:sources:16.1.0", + "io.grpc:grpc-okhttp:jar:sources:1.44.1", + "com.google.firebase:firebase-components:aar:sources:17.0.0", + "com.squareup.okhttp:okhttp:jar:sources:2.7.5", + "io.grpc:grpc-android:aar:sources:1.44.1", + "io.grpc:grpc-stub:jar:sources:1.44.1", + "androidx.annotation:annotation:jar:sources:1.1.0", + "io.grpc:grpc-protobuf-lite:jar:sources:1.44.1", + "com.google.android.gms:play-services-tasks:aar:sources:18.0.1", + "com.google.firebase:firebase-appcheck-interop:aar:sources:16.0.0", + "com.google.firebase:firebase-auth-interop:aar:sources:19.0.2", + "com.google.android.gms:play-services-base:aar:sources:18.0.1", + "com.google.firebase:firebase-database-collection:aar:sources:18.0.1", + "com.google.android.gms:play-services-basement:aar:sources:18.0.0" ], - "file": "v1/https/repo1.maven.org/maven2/com/google/protobuf/protobuf-java-util/3.17.3/protobuf-java-util-3.17.3-sources.jar", + "file": "v1/https/maven.google.com/com/google/firebase/firebase-firestore/24.2.1/firebase-firestore-24.2.1-sources.jar", "mirror_urls": [ - "https://maven.google.com/com/google/protobuf/protobuf-java-util/3.17.3/protobuf-java-util-3.17.3-sources.jar", - "https://repo1.maven.org/maven2/com/google/protobuf/protobuf-java-util/3.17.3/protobuf-java-util-3.17.3-sources.jar", - "https://maven.fabric.io/public/com/google/protobuf/protobuf-java-util/3.17.3/protobuf-java-util-3.17.3-sources.jar", - "https://maven.google.com/com/google/protobuf/protobuf-java-util/3.17.3/protobuf-java-util-3.17.3-sources.jar", - "https://repo1.maven.org/maven2/com/google/protobuf/protobuf-java-util/3.17.3/protobuf-java-util-3.17.3-sources.jar" + "https://maven.google.com/com/google/firebase/firebase-firestore/24.2.1/firebase-firestore-24.2.1-sources.jar", + "https://repo1.maven.org/maven2/com/google/firebase/firebase-firestore/24.2.1/firebase-firestore-24.2.1-sources.jar", + "https://maven.fabric.io/public/com/google/firebase/firebase-firestore/24.2.1/firebase-firestore-24.2.1-sources.jar", + "https://maven.google.com/com/google/firebase/firebase-firestore/24.2.1/firebase-firestore-24.2.1-sources.jar", + "https://repo1.maven.org/maven2/com/google/firebase/firebase-firestore/24.2.1/firebase-firestore-24.2.1-sources.jar" ], - "sha256": "4046612802edfa6f9e201b2a53d10439a4ebbab5324ae415874e041cd1d70bbf", - "url": "https://repo1.maven.org/maven2/com/google/protobuf/protobuf-java-util/3.17.3/protobuf-java-util-3.17.3-sources.jar" + "sha256": "10f45bc182859afbe8da94f9b0b7b2f778dc30ccb903d6a8099a05393d88ce9f", + "url": "https://maven.google.com/com/google/firebase/firebase-firestore/24.2.1/firebase-firestore-24.2.1-sources.jar" }, { - "coord": "com.google.protobuf:protobuf-java:3.17.3", - "dependencies": [], - "directDependencies": [], - "file": "v1/https/repo1.maven.org/maven2/com/google/protobuf/protobuf-java/3.17.3/protobuf-java-3.17.3.jar", + "coord": "com.google.firebase:firebase-iid-interop:aar:17.0.0", + "dependencies": [ + "androidx.collection:collection:jar:1.1.0", + "androidx.fragment:fragment:aar:1.2.0", + "com.google.android.gms:play-services-basement:aar:18.0.0", + "androidx.core:core:aar:1.3.1", + "com.google.android.gms:play-services-base:aar:18.0.1" + ], + "directDependencies": [ + "com.google.android.gms:play-services-base:aar:18.0.1", + "com.google.android.gms:play-services-basement:aar:18.0.0" + ], + "file": "v1/https/maven.google.com/com/google/firebase/firebase-iid-interop/17.0.0/firebase-iid-interop-17.0.0.aar", "mirror_urls": [ - "https://maven.google.com/com/google/protobuf/protobuf-java/3.17.3/protobuf-java-3.17.3.jar", - "https://repo1.maven.org/maven2/com/google/protobuf/protobuf-java/3.17.3/protobuf-java-3.17.3.jar", - "https://maven.fabric.io/public/com/google/protobuf/protobuf-java/3.17.3/protobuf-java-3.17.3.jar", - "https://maven.google.com/com/google/protobuf/protobuf-java/3.17.3/protobuf-java-3.17.3.jar", - "https://repo1.maven.org/maven2/com/google/protobuf/protobuf-java/3.17.3/protobuf-java-3.17.3.jar" + "https://maven.google.com/com/google/firebase/firebase-iid-interop/17.0.0/firebase-iid-interop-17.0.0.aar", + "https://repo1.maven.org/maven2/com/google/firebase/firebase-iid-interop/17.0.0/firebase-iid-interop-17.0.0.aar", + "https://maven.fabric.io/public/com/google/firebase/firebase-iid-interop/17.0.0/firebase-iid-interop-17.0.0.aar", + "https://maven.google.com/com/google/firebase/firebase-iid-interop/17.0.0/firebase-iid-interop-17.0.0.aar", + "https://repo1.maven.org/maven2/com/google/firebase/firebase-iid-interop/17.0.0/firebase-iid-interop-17.0.0.aar" ], - "sha256": "4ac549b192694141958049f060a1c826a33342f619e108ced8c17d9877f5e3ed", - "url": "https://repo1.maven.org/maven2/com/google/protobuf/protobuf-java/3.17.3/protobuf-java-3.17.3.jar" + "sha256": "b6f4ad581eb489370be3bf38a4bdabfc6ea3d4e716234c625a0f42516c53523c", + "url": "https://maven.google.com/com/google/firebase/firebase-iid-interop/17.0.0/firebase-iid-interop-17.0.0.aar" }, { - "coord": "com.google.protobuf:protobuf-java:jar:sources:3.17.3", - "dependencies": [], - "directDependencies": [], - "file": "v1/https/repo1.maven.org/maven2/com/google/protobuf/protobuf-java/3.17.3/protobuf-java-3.17.3-sources.jar", + "coord": "com.google.firebase:firebase-iid:aar:20.1.5", + "dependencies": [ + "com.google.firebase:firebase-components:aar:17.0.0", + "com.google.firebase:firebase-installations:aar:16.3.2", + "androidx.collection:collection:jar:1.1.0", + "com.google.android.gms:play-services-stats:aar:17.0.0", + "androidx.annotation:annotation:1.1.0", + "androidx.localbroadcastmanager:localbroadcastmanager:aar:1.0.0", + "androidx.legacy:legacy-support-core-utils:aar:1.0.0", + "androidx.lifecycle:lifecycle-livedata:aar:2.2.0", + "androidx.fragment:fragment:aar:1.2.0", + "com.google.android.gms:play-services-basement:aar:18.0.0", + "androidx.core:core:aar:1.3.1", + "com.google.android.gms:play-services-base:aar:18.0.1", + "androidx.print:print:aar:1.0.0", + "androidx.lifecycle:lifecycle-viewmodel:aar:2.2.0", + "androidx.documentfile:documentfile:aar:1.0.0", + "com.google.firebase:firebase-common:aar:20.1.1", + "com.google.firebase:firebase-iid-interop:aar:17.0.0", + "com.google.auto.value:auto-value-annotations:jar:1.8.1", + "com.google.firebase:firebase-installations-interop:aar:16.0.0", + "com.google.android.gms:play-services-tasks:aar:18.0.1", + "androidx.loader:loader:aar:1.0.0" + ], + "directDependencies": [ + "com.google.firebase:firebase-components:aar:17.0.0", + "com.google.firebase:firebase-installations:aar:16.3.2", + "androidx.collection:collection:jar:1.1.0", + "com.google.android.gms:play-services-stats:aar:17.0.0", + "androidx.legacy:legacy-support-core-utils:aar:1.0.0", + "com.google.android.gms:play-services-basement:aar:18.0.0", + "androidx.core:core:aar:1.3.1", + "com.google.firebase:firebase-common:aar:20.1.1", + "com.google.firebase:firebase-iid-interop:aar:17.0.0", + "com.google.firebase:firebase-installations-interop:aar:16.0.0", + "com.google.android.gms:play-services-tasks:aar:18.0.1" + ], + "file": "v1/https/maven.google.com/com/google/firebase/firebase-iid/20.1.5/firebase-iid-20.1.5.aar", "mirror_urls": [ - "https://maven.google.com/com/google/protobuf/protobuf-java/3.17.3/protobuf-java-3.17.3-sources.jar", - "https://repo1.maven.org/maven2/com/google/protobuf/protobuf-java/3.17.3/protobuf-java-3.17.3-sources.jar", - "https://maven.fabric.io/public/com/google/protobuf/protobuf-java/3.17.3/protobuf-java-3.17.3-sources.jar", - "https://maven.google.com/com/google/protobuf/protobuf-java/3.17.3/protobuf-java-3.17.3-sources.jar", - "https://repo1.maven.org/maven2/com/google/protobuf/protobuf-java/3.17.3/protobuf-java-3.17.3-sources.jar" + "https://maven.google.com/com/google/firebase/firebase-iid/20.1.5/firebase-iid-20.1.5.aar", + "https://repo1.maven.org/maven2/com/google/firebase/firebase-iid/20.1.5/firebase-iid-20.1.5.aar", + "https://maven.fabric.io/public/com/google/firebase/firebase-iid/20.1.5/firebase-iid-20.1.5.aar", + "https://maven.google.com/com/google/firebase/firebase-iid/20.1.5/firebase-iid-20.1.5.aar", + "https://repo1.maven.org/maven2/com/google/firebase/firebase-iid/20.1.5/firebase-iid-20.1.5.aar" ], - "sha256": "204bad0a36827296ed0b6fdbdf1a17028f3e3d289dd20042980331b8f0ef646e", - "url": "https://repo1.maven.org/maven2/com/google/protobuf/protobuf-java/3.17.3/protobuf-java-3.17.3-sources.jar" + "sha256": "f1c174e75a24f298fbc0ed93dde29c997f29ca511d7e8a18dec068203553cf6b", + "url": "https://maven.google.com/com/google/firebase/firebase-iid/20.1.5/firebase-iid-20.1.5.aar" }, { - "coord": "com.google.protobuf:protobuf-javalite:3.17.3", - "dependencies": [], - "directDependencies": [], - "file": "v1/https/repo1.maven.org/maven2/com/google/protobuf/protobuf-javalite/3.17.3/protobuf-javalite-3.17.3.jar", + "coord": "com.google.firebase:firebase-installations-interop:aar:16.0.0", + "dependencies": [ + "com.google.android.gms:play-services-tasks:aar:18.0.1" + ], + "directDependencies": [ + "com.google.android.gms:play-services-tasks:aar:18.0.1" + ], + "file": "v1/https/maven.google.com/com/google/firebase/firebase-installations-interop/16.0.0/firebase-installations-interop-16.0.0.aar", "mirror_urls": [ - "https://maven.google.com/com/google/protobuf/protobuf-javalite/3.17.3/protobuf-javalite-3.17.3.jar", - "https://repo1.maven.org/maven2/com/google/protobuf/protobuf-javalite/3.17.3/protobuf-javalite-3.17.3.jar", - "https://maven.fabric.io/public/com/google/protobuf/protobuf-javalite/3.17.3/protobuf-javalite-3.17.3.jar", - "https://maven.google.com/com/google/protobuf/protobuf-javalite/3.17.3/protobuf-javalite-3.17.3.jar", - "https://repo1.maven.org/maven2/com/google/protobuf/protobuf-javalite/3.17.3/protobuf-javalite-3.17.3.jar" + "https://maven.google.com/com/google/firebase/firebase-installations-interop/16.0.0/firebase-installations-interop-16.0.0.aar", + "https://repo1.maven.org/maven2/com/google/firebase/firebase-installations-interop/16.0.0/firebase-installations-interop-16.0.0.aar", + "https://maven.fabric.io/public/com/google/firebase/firebase-installations-interop/16.0.0/firebase-installations-interop-16.0.0.aar", + "https://maven.google.com/com/google/firebase/firebase-installations-interop/16.0.0/firebase-installations-interop-16.0.0.aar", + "https://repo1.maven.org/maven2/com/google/firebase/firebase-installations-interop/16.0.0/firebase-installations-interop-16.0.0.aar" ], - "sha256": "dc643901cc9d95998a1e45ab11e75d4237a7e1947bcbca0b7eca569aaf5e714d", - "url": "https://repo1.maven.org/maven2/com/google/protobuf/protobuf-javalite/3.17.3/protobuf-javalite-3.17.3.jar" + "sha256": "d498fe20e7d2c65fc8f7124f1c1791d2828bebdf6bf06ab4cdee13e7fe9ccaa2", + "url": "https://maven.google.com/com/google/firebase/firebase-installations-interop/16.0.0/firebase-installations-interop-16.0.0.aar" }, { - "coord": "com.google.protobuf:protobuf-javalite:jar:sources:3.17.3", - "dependencies": [], - "directDependencies": [], - "file": "v1/https/repo1.maven.org/maven2/com/google/protobuf/protobuf-javalite/3.17.3/protobuf-javalite-3.17.3-sources.jar", + "coord": "com.google.firebase:firebase-installations:aar:16.3.2", + "dependencies": [ + "com.google.firebase:firebase-components:aar:17.0.0", + "androidx.collection:collection:jar:1.1.0", + "androidx.fragment:fragment:aar:1.2.0", + "com.google.android.gms:play-services-basement:aar:18.0.0", + "androidx.core:core:aar:1.3.1", + "com.google.firebase:firebase-common:aar:20.1.1", + "com.google.auto.value:auto-value-annotations:jar:1.8.1", + "com.google.firebase:firebase-installations-interop:aar:16.0.0", + "com.google.android.gms:play-services-tasks:aar:18.0.1" + ], + "directDependencies": [ + "com.google.android.gms:play-services-tasks:aar:18.0.1", + "com.google.firebase:firebase-common:aar:20.1.1", + "com.google.firebase:firebase-components:aar:17.0.0", + "com.google.firebase:firebase-installations-interop:aar:16.0.0" + ], + "file": "v1/https/maven.google.com/com/google/firebase/firebase-installations/16.3.2/firebase-installations-16.3.2.aar", "mirror_urls": [ - "https://maven.google.com/com/google/protobuf/protobuf-javalite/3.17.3/protobuf-javalite-3.17.3-sources.jar", - "https://repo1.maven.org/maven2/com/google/protobuf/protobuf-javalite/3.17.3/protobuf-javalite-3.17.3-sources.jar", - "https://maven.fabric.io/public/com/google/protobuf/protobuf-javalite/3.17.3/protobuf-javalite-3.17.3-sources.jar", - "https://maven.google.com/com/google/protobuf/protobuf-javalite/3.17.3/protobuf-javalite-3.17.3-sources.jar", - "https://repo1.maven.org/maven2/com/google/protobuf/protobuf-javalite/3.17.3/protobuf-javalite-3.17.3-sources.jar" + "https://maven.google.com/com/google/firebase/firebase-installations/16.3.2/firebase-installations-16.3.2.aar", + "https://repo1.maven.org/maven2/com/google/firebase/firebase-installations/16.3.2/firebase-installations-16.3.2.aar", + "https://maven.fabric.io/public/com/google/firebase/firebase-installations/16.3.2/firebase-installations-16.3.2.aar", + "https://maven.google.com/com/google/firebase/firebase-installations/16.3.2/firebase-installations-16.3.2.aar", + "https://repo1.maven.org/maven2/com/google/firebase/firebase-installations/16.3.2/firebase-installations-16.3.2.aar" ], - "sha256": "b7bc7b41c266f59c921bf094b4325fb9bcdd0a8d95d742db8cca3a1c76503f9b", - "url": "https://repo1.maven.org/maven2/com/google/protobuf/protobuf-javalite/3.17.3/protobuf-javalite-3.17.3-sources.jar" + "sha256": "0d0f88b3c3789d5fe1aa9a69bd5ab6c0e92036fcf34520775a0091e37268dd3f", + "url": "https://maven.google.com/com/google/firebase/firebase-installations/16.3.2/firebase-installations-16.3.2.aar" }, { - "coord": "com.google.truth.extensions:truth-liteproto-extension:1.1.3", + "coord": "com.google.firebase:firebase-measurement-connector:aar:18.0.0", "dependencies": [ - "com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava", - "com.google.j2objc:j2objc-annotations:1.3", - "com.google.truth:truth:1.1.3", - "com.google.code.findbugs:jsr305:3.0.2", - "com.google.guava:guava:30.1.1-android", - "com.google.errorprone:error_prone_annotations:2.7.1", - "org.hamcrest:hamcrest-core:1.3", - "org.checkerframework:checker-qual:3.13.0", - "com.google.auto.value:auto-value-annotations:1.8.1", - "com.google.guava:failureaccess:1.0.1", - "org.ow2.asm:asm:9.1", - "junit:junit:4.13.2", - "org.checkerframework:checker-compat-qual:2.5.5" + "androidx.collection:collection:jar:1.1.0", + "androidx.core:core:aar:1.3.1", + "com.google.android.gms:play-services-basement:aar:18.0.0", + "androidx.fragment:fragment:aar:1.2.0" ], "directDependencies": [ - "com.google.truth:truth:1.1.3", - "com.google.guava:guava:30.1.1-android", - "com.google.errorprone:error_prone_annotations:2.7.1", - "org.checkerframework:checker-qual:3.13.0", - "com.google.auto.value:auto-value-annotations:1.8.1" + "com.google.android.gms:play-services-basement:aar:18.0.0" ], - "file": "v1/https/repo1.maven.org/maven2/com/google/truth/extensions/truth-liteproto-extension/1.1.3/truth-liteproto-extension-1.1.3.jar", + "file": "v1/https/maven.google.com/com/google/firebase/firebase-measurement-connector/18.0.0/firebase-measurement-connector-18.0.0.aar", "mirror_urls": [ - "https://maven.google.com/com/google/truth/extensions/truth-liteproto-extension/1.1.3/truth-liteproto-extension-1.1.3.jar", - "https://repo1.maven.org/maven2/com/google/truth/extensions/truth-liteproto-extension/1.1.3/truth-liteproto-extension-1.1.3.jar", - "https://maven.fabric.io/public/com/google/truth/extensions/truth-liteproto-extension/1.1.3/truth-liteproto-extension-1.1.3.jar", - "https://maven.google.com/com/google/truth/extensions/truth-liteproto-extension/1.1.3/truth-liteproto-extension-1.1.3.jar", - "https://repo1.maven.org/maven2/com/google/truth/extensions/truth-liteproto-extension/1.1.3/truth-liteproto-extension-1.1.3.jar" + "https://maven.google.com/com/google/firebase/firebase-measurement-connector/18.0.0/firebase-measurement-connector-18.0.0.aar", + "https://repo1.maven.org/maven2/com/google/firebase/firebase-measurement-connector/18.0.0/firebase-measurement-connector-18.0.0.aar", + "https://maven.fabric.io/public/com/google/firebase/firebase-measurement-connector/18.0.0/firebase-measurement-connector-18.0.0.aar", + "https://maven.google.com/com/google/firebase/firebase-measurement-connector/18.0.0/firebase-measurement-connector-18.0.0.aar", + "https://repo1.maven.org/maven2/com/google/firebase/firebase-measurement-connector/18.0.0/firebase-measurement-connector-18.0.0.aar" ], - "sha256": "71cce6284554e546d1b5ba48e310ee4b4050676f09fb0eced136d779284ff78d", - "url": "https://repo1.maven.org/maven2/com/google/truth/extensions/truth-liteproto-extension/1.1.3/truth-liteproto-extension-1.1.3.jar" + "sha256": "17e8b9b60ac0a79fcbed754d03d4b966cc5bb8837e79c2308bf2970f1d05700c", + "url": "https://maven.google.com/com/google/firebase/firebase-measurement-connector/18.0.0/firebase-measurement-connector-18.0.0.aar" }, { - "coord": "com.google.truth.extensions:truth-liteproto-extension:jar:sources:1.1.3", + "coord": "com.google.firebase:protolite-well-known-types:aar:18.0.0", "dependencies": [ - "com.google.guava:guava:jar:sources:30.1.1-android", - "com.google.code.findbugs:jsr305:jar:sources:3.0.2", - "com.google.j2objc:j2objc-annotations:jar:sources:1.3", - "org.ow2.asm:asm:jar:sources:9.1", - "org.checkerframework:checker-qual:jar:sources:3.13.0", - "junit:junit:jar:sources:4.13.2", - "org.hamcrest:hamcrest-core:jar:sources:1.3", - "com.google.truth:truth:jar:sources:1.1.3", - "org.checkerframework:checker-compat-qual:jar:sources:2.5.5", - "com.google.guava:listenablefuture:jar:sources:9999.0-empty-to-avoid-conflict-with-guava", - "com.google.guava:failureaccess:jar:sources:1.0.1", - "com.google.errorprone:error_prone_annotations:jar:sources:2.7.1", - "com.google.auto.value:auto-value-annotations:jar:sources:1.8.1" + "com.google.protobuf:protobuf-javalite:jar:3.19.2" ], "directDependencies": [ - "com.google.guava:guava:jar:sources:30.1.1-android", - "org.checkerframework:checker-qual:jar:sources:3.13.0", - "com.google.truth:truth:jar:sources:1.1.3", - "com.google.errorprone:error_prone_annotations:jar:sources:2.7.1", - "com.google.auto.value:auto-value-annotations:jar:sources:1.8.1" + "com.google.protobuf:protobuf-javalite:jar:3.19.2" ], - "file": "v1/https/repo1.maven.org/maven2/com/google/truth/extensions/truth-liteproto-extension/1.1.3/truth-liteproto-extension-1.1.3-sources.jar", + "file": "v1/https/maven.google.com/com/google/firebase/protolite-well-known-types/18.0.0/protolite-well-known-types-18.0.0.aar", "mirror_urls": [ - "https://maven.google.com/com/google/truth/extensions/truth-liteproto-extension/1.1.3/truth-liteproto-extension-1.1.3-sources.jar", - "https://repo1.maven.org/maven2/com/google/truth/extensions/truth-liteproto-extension/1.1.3/truth-liteproto-extension-1.1.3-sources.jar", - "https://maven.fabric.io/public/com/google/truth/extensions/truth-liteproto-extension/1.1.3/truth-liteproto-extension-1.1.3-sources.jar", - "https://maven.google.com/com/google/truth/extensions/truth-liteproto-extension/1.1.3/truth-liteproto-extension-1.1.3-sources.jar", - "https://repo1.maven.org/maven2/com/google/truth/extensions/truth-liteproto-extension/1.1.3/truth-liteproto-extension-1.1.3-sources.jar" + "https://maven.google.com/com/google/firebase/protolite-well-known-types/18.0.0/protolite-well-known-types-18.0.0.aar", + "https://repo1.maven.org/maven2/com/google/firebase/protolite-well-known-types/18.0.0/protolite-well-known-types-18.0.0.aar", + "https://maven.fabric.io/public/com/google/firebase/protolite-well-known-types/18.0.0/protolite-well-known-types-18.0.0.aar", + "https://maven.google.com/com/google/firebase/protolite-well-known-types/18.0.0/protolite-well-known-types-18.0.0.aar", + "https://repo1.maven.org/maven2/com/google/firebase/protolite-well-known-types/18.0.0/protolite-well-known-types-18.0.0.aar" ], - "sha256": "fd3c26b2232966a3ff25e5b9c642f9ae9f19c86b29dfeb6e72aeb67e45e36130", - "url": "https://repo1.maven.org/maven2/com/google/truth/extensions/truth-liteproto-extension/1.1.3/truth-liteproto-extension-1.1.3-sources.jar" + "sha256": "9ac16b795b44c4ba87937ba0a850260d393f9dc25ff469d52a7bad528daac986", + "url": "https://maven.google.com/com/google/firebase/protolite-well-known-types/18.0.0/protolite-well-known-types-18.0.0.aar" }, { - "coord": "com.google.truth:truth:1.1.3", + "coord": "com.google.gms:google-services:4.3.3", "dependencies": [ - "com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava", - "com.google.j2objc:j2objc-annotations:1.3", "com.google.code.findbugs:jsr305:3.0.2", "com.google.guava:guava:30.1.1-android", - "com.google.errorprone:error_prone_annotations:2.7.1", - "org.hamcrest:hamcrest-core:1.3", - "org.checkerframework:checker-qual:3.13.0", - "com.google.auto.value:auto-value-annotations:1.8.1", - "com.google.guava:failureaccess:1.0.1", - "org.ow2.asm:asm:9.1", - "junit:junit:4.13.2", - "org.checkerframework:checker-compat-qual:2.5.5" + "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.10", + "com.google.android.gms:strict-version-matcher-plugin:1.2.1", + "com.google.code.gson:gson:2.8.9" ], "directDependencies": [ - "com.google.guava:guava:30.1.1-android", - "com.google.errorprone:error_prone_annotations:2.7.1", - "org.checkerframework:checker-qual:3.13.0", - "com.google.auto.value:auto-value-annotations:1.8.1", - "org.ow2.asm:asm:9.1", - "junit:junit:4.13.2" + "com.google.android.gms:strict-version-matcher-plugin:1.2.1", + "com.google.code.gson:gson:2.8.9", + "com.google.guava:guava:30.1.1-android" ], - "file": "v1/https/repo1.maven.org/maven2/com/google/truth/truth/1.1.3/truth-1.1.3.jar", + "file": "v1/https/maven.google.com/com/google/gms/google-services/4.3.3/google-services-4.3.3.jar", "mirror_urls": [ - "https://maven.google.com/com/google/truth/truth/1.1.3/truth-1.1.3.jar", - "https://repo1.maven.org/maven2/com/google/truth/truth/1.1.3/truth-1.1.3.jar", - "https://maven.fabric.io/public/com/google/truth/truth/1.1.3/truth-1.1.3.jar", - "https://maven.google.com/com/google/truth/truth/1.1.3/truth-1.1.3.jar", - "https://repo1.maven.org/maven2/com/google/truth/truth/1.1.3/truth-1.1.3.jar" + "https://maven.google.com/com/google/gms/google-services/4.3.3/google-services-4.3.3.jar", + "https://repo1.maven.org/maven2/com/google/gms/google-services/4.3.3/google-services-4.3.3.jar", + "https://maven.fabric.io/public/com/google/gms/google-services/4.3.3/google-services-4.3.3.jar", + "https://maven.google.com/com/google/gms/google-services/4.3.3/google-services-4.3.3.jar", + "https://repo1.maven.org/maven2/com/google/gms/google-services/4.3.3/google-services-4.3.3.jar" ], - "sha256": "fc0b67782289a2aabfddfdf99eff1dcd5edc890d49143fcd489214b107b8f4f3", - "url": "https://repo1.maven.org/maven2/com/google/truth/truth/1.1.3/truth-1.1.3.jar" + "sha256": "d9668002ef7032deddf7dbf853b47e10e6722bbce1b318fe7d6a297e28a8dcae", + "url": "https://maven.google.com/com/google/gms/google-services/4.3.3/google-services-4.3.3.jar" }, { - "coord": "com.google.truth:truth:jar:sources:1.1.3", + "coord": "com.google.gms:google-services:jar:sources:4.3.3", "dependencies": [ "com.google.guava:guava:jar:sources:30.1.1-android", "com.google.code.findbugs:jsr305:jar:sources:3.0.2", - "com.google.j2objc:j2objc-annotations:jar:sources:1.3", - "org.ow2.asm:asm:jar:sources:9.1", - "org.checkerframework:checker-qual:jar:sources:3.13.0", - "junit:junit:jar:sources:4.13.2", - "org.hamcrest:hamcrest-core:jar:sources:1.3", - "org.checkerframework:checker-compat-qual:jar:sources:2.5.5", - "com.google.guava:listenablefuture:jar:sources:9999.0-empty-to-avoid-conflict-with-guava", - "com.google.guava:failureaccess:jar:sources:1.0.1", - "com.google.errorprone:error_prone_annotations:jar:sources:2.7.1", - "com.google.auto.value:auto-value-annotations:jar:sources:1.8.1" + "org.jetbrains.kotlin:kotlin-stdlib-jdk8:jar:sources:1.4.10", + "com.google.code.gson:gson:jar:sources:2.8.9", + "com.google.android.gms:strict-version-matcher-plugin:jar:sources:1.2.1" ], "directDependencies": [ - "com.google.guava:guava:jar:sources:30.1.1-android", - "org.ow2.asm:asm:jar:sources:9.1", - "org.checkerframework:checker-qual:jar:sources:3.13.0", - "junit:junit:jar:sources:4.13.2", - "com.google.errorprone:error_prone_annotations:jar:sources:2.7.1", - "com.google.auto.value:auto-value-annotations:jar:sources:1.8.1" + "com.google.android.gms:strict-version-matcher-plugin:jar:sources:1.2.1", + "com.google.code.gson:gson:jar:sources:2.8.9", + "com.google.guava:guava:jar:sources:30.1.1-android" ], - "file": "v1/https/repo1.maven.org/maven2/com/google/truth/truth/1.1.3/truth-1.1.3-sources.jar", + "file": "v1/https/maven.google.com/com/google/gms/google-services/4.3.3/google-services-4.3.3-sources.jar", "mirror_urls": [ - "https://maven.google.com/com/google/truth/truth/1.1.3/truth-1.1.3-sources.jar", - "https://repo1.maven.org/maven2/com/google/truth/truth/1.1.3/truth-1.1.3-sources.jar", - "https://maven.fabric.io/public/com/google/truth/truth/1.1.3/truth-1.1.3-sources.jar", - "https://maven.google.com/com/google/truth/truth/1.1.3/truth-1.1.3-sources.jar", - "https://repo1.maven.org/maven2/com/google/truth/truth/1.1.3/truth-1.1.3-sources.jar" + "https://maven.google.com/com/google/gms/google-services/4.3.3/google-services-4.3.3-sources.jar", + "https://repo1.maven.org/maven2/com/google/gms/google-services/4.3.3/google-services-4.3.3-sources.jar", + "https://maven.fabric.io/public/com/google/gms/google-services/4.3.3/google-services-4.3.3-sources.jar", + "https://maven.google.com/com/google/gms/google-services/4.3.3/google-services-4.3.3-sources.jar", + "https://repo1.maven.org/maven2/com/google/gms/google-services/4.3.3/google-services-4.3.3-sources.jar" ], - "sha256": "6c35e3d7087cd222938b41bbdb54041239b79dda07cf96c4027c118d566df545", - "url": "https://repo1.maven.org/maven2/com/google/truth/truth/1.1.3/truth-1.1.3-sources.jar" + "sha256": "453def3af6897f944b3175ce0538c3ca1536583ace3b3b3a15aca1c2e2be6bb0", + "url": "https://maven.google.com/com/google/gms/google-services/4.3.3/google-services-4.3.3-sources.jar" }, { - "coord": "com.googlecode.juniversalchardet:juniversalchardet:1.0.3", - "dependencies": [], - "directDependencies": [], - "file": "v1/https/repo1.maven.org/maven2/com/googlecode/juniversalchardet/juniversalchardet/1.0.3/juniversalchardet-1.0.3.jar", - "mirror_urls": [ - "https://maven.google.com/com/googlecode/juniversalchardet/juniversalchardet/1.0.3/juniversalchardet-1.0.3.jar", - "https://repo1.maven.org/maven2/com/googlecode/juniversalchardet/juniversalchardet/1.0.3/juniversalchardet-1.0.3.jar", - "https://maven.fabric.io/public/com/googlecode/juniversalchardet/juniversalchardet/1.0.3/juniversalchardet-1.0.3.jar", - "https://maven.google.com/com/googlecode/juniversalchardet/juniversalchardet/1.0.3/juniversalchardet-1.0.3.jar", - "https://repo1.maven.org/maven2/com/googlecode/juniversalchardet/juniversalchardet/1.0.3/juniversalchardet-1.0.3.jar" + "coord": "com.google.googlejavaformat:google-java-format:1.5", + "dependencies": [ + "com.google.guava:guava:30.1.1-android", + "com.google.errorprone:javac-shaded:9-dev-r4023-3" ], - "sha256": "757bfe906193b8b651e79dc26cd67d6b55d0770a2cdfb0381591504f779d4a76", - "url": "https://repo1.maven.org/maven2/com/googlecode/juniversalchardet/juniversalchardet/1.0.3/juniversalchardet-1.0.3.jar" + "directDependencies": [ + "com.google.errorprone:javac-shaded:9-dev-r4023-3", + "com.google.guava:guava:30.1.1-android" + ], + "file": "v1/https/repo1.maven.org/maven2/com/google/googlejavaformat/google-java-format/1.5/google-java-format-1.5.jar", + "mirror_urls": [ + "https://maven.google.com/com/google/googlejavaformat/google-java-format/1.5/google-java-format-1.5.jar", + "https://repo1.maven.org/maven2/com/google/googlejavaformat/google-java-format/1.5/google-java-format-1.5.jar", + "https://maven.fabric.io/public/com/google/googlejavaformat/google-java-format/1.5/google-java-format-1.5.jar", + "https://maven.google.com/com/google/googlejavaformat/google-java-format/1.5/google-java-format-1.5.jar", + "https://repo1.maven.org/maven2/com/google/googlejavaformat/google-java-format/1.5/google-java-format-1.5.jar" + ], + "sha256": "aa19ad7850fb85178aa22f2fddb163b84d6ce4d0035872f30d4408195ca1144e", + "url": "https://repo1.maven.org/maven2/com/google/googlejavaformat/google-java-format/1.5/google-java-format-1.5.jar" }, { - "coord": "com.googlecode.juniversalchardet:juniversalchardet:jar:sources:1.0.3", + "coord": "com.google.googlejavaformat:google-java-format:jar:sources:1.5", + "dependencies": [ + "com.google.errorprone:javac-shaded:jar:sources:9-dev-r4023-3", + "com.google.guava:guava:jar:sources:30.1.1-android" + ], + "directDependencies": [ + "com.google.errorprone:javac-shaded:jar:sources:9-dev-r4023-3", + "com.google.guava:guava:jar:sources:30.1.1-android" + ], + "file": "v1/https/repo1.maven.org/maven2/com/google/googlejavaformat/google-java-format/1.5/google-java-format-1.5-sources.jar", + "mirror_urls": [ + "https://maven.google.com/com/google/googlejavaformat/google-java-format/1.5/google-java-format-1.5-sources.jar", + "https://repo1.maven.org/maven2/com/google/googlejavaformat/google-java-format/1.5/google-java-format-1.5-sources.jar", + "https://maven.fabric.io/public/com/google/googlejavaformat/google-java-format/1.5/google-java-format-1.5-sources.jar", + "https://maven.google.com/com/google/googlejavaformat/google-java-format/1.5/google-java-format-1.5-sources.jar", + "https://repo1.maven.org/maven2/com/google/googlejavaformat/google-java-format/1.5/google-java-format-1.5-sources.jar" + ], + "sha256": "c204b15b3834128d335f17213f7e621ddb2cc5bfff5b8dd035cd1f2affb7fa8f", + "url": "https://repo1.maven.org/maven2/com/google/googlejavaformat/google-java-format/1.5/google-java-format-1.5-sources.jar" + }, + { + "coord": "com.google.guava:failureaccess:1.0.1", "dependencies": [], "directDependencies": [], - "file": "v1/https/repo1.maven.org/maven2/com/googlecode/juniversalchardet/juniversalchardet/1.0.3/juniversalchardet-1.0.3-sources.jar", + "file": "v1/https/repo1.maven.org/maven2/com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1.jar", "mirror_urls": [ - "https://maven.google.com/com/googlecode/juniversalchardet/juniversalchardet/1.0.3/juniversalchardet-1.0.3-sources.jar", - "https://repo1.maven.org/maven2/com/googlecode/juniversalchardet/juniversalchardet/1.0.3/juniversalchardet-1.0.3-sources.jar", - "https://maven.fabric.io/public/com/googlecode/juniversalchardet/juniversalchardet/1.0.3/juniversalchardet-1.0.3-sources.jar", - "https://maven.google.com/com/googlecode/juniversalchardet/juniversalchardet/1.0.3/juniversalchardet-1.0.3-sources.jar", - "https://repo1.maven.org/maven2/com/googlecode/juniversalchardet/juniversalchardet/1.0.3/juniversalchardet-1.0.3-sources.jar" + "https://maven.google.com/com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1.jar", + "https://repo1.maven.org/maven2/com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1.jar", + "https://maven.fabric.io/public/com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1.jar", + "https://maven.google.com/com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1.jar", + "https://repo1.maven.org/maven2/com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1.jar" ], - "sha256": "3d1cb067f5cfe3cc19b77c837156f22368462af9acac5dd878e785966758fc27", - "url": "https://repo1.maven.org/maven2/com/googlecode/juniversalchardet/juniversalchardet/1.0.3/juniversalchardet-1.0.3-sources.jar" + "sha256": "a171ee4c734dd2da837e4b16be9df4661afab72a41adaf31eb84dfdaf936ca26", + "url": "https://repo1.maven.org/maven2/com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1.jar" }, { - "coord": "com.ibm.icu:icu4j:53.1", + "coord": "com.google.guava:failureaccess:jar:sources:1.0.1", "dependencies": [], "directDependencies": [], - "file": "v1/https/repo1.maven.org/maven2/com/ibm/icu/icu4j/53.1/icu4j-53.1.jar", + "file": "v1/https/repo1.maven.org/maven2/com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1-sources.jar", "mirror_urls": [ - "https://maven.google.com/com/ibm/icu/icu4j/53.1/icu4j-53.1.jar", - "https://repo1.maven.org/maven2/com/ibm/icu/icu4j/53.1/icu4j-53.1.jar", - "https://maven.fabric.io/public/com/ibm/icu/icu4j/53.1/icu4j-53.1.jar", - "https://maven.google.com/com/ibm/icu/icu4j/53.1/icu4j-53.1.jar", - "https://repo1.maven.org/maven2/com/ibm/icu/icu4j/53.1/icu4j-53.1.jar" + "https://maven.google.com/com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1-sources.jar", + "https://repo1.maven.org/maven2/com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1-sources.jar", + "https://maven.fabric.io/public/com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1-sources.jar", + "https://maven.google.com/com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1-sources.jar", + "https://repo1.maven.org/maven2/com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1-sources.jar" ], - "sha256": "e37a4467bac5cdeb02c5c4b8e5063d2f4e67b69e3c7df6d6b610f13185572bab", - "url": "https://repo1.maven.org/maven2/com/ibm/icu/icu4j/53.1/icu4j-53.1.jar" + "sha256": "092346eebbb1657b51aa7485a246bf602bb464cc0b0e2e1c7e7201fadce1e98f", + "url": "https://repo1.maven.org/maven2/com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1-sources.jar" }, { - "coord": "com.ibm.icu:icu4j:jar:sources:53.1", + "coord": "com.google.guava:guava:30.1.1-android", + "dependencies": [ + "com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava", + "com.google.j2objc:j2objc-annotations:1.3", + "com.google.code.findbugs:jsr305:3.0.2", + "com.google.errorprone:error_prone_annotations:2.9.0", + "com.google.guava:failureaccess:1.0.1", + "org.checkerframework:checker-compat-qual:2.5.5" + ], + "directDependencies": [ + "com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava", + "com.google.j2objc:j2objc-annotations:1.3", + "com.google.code.findbugs:jsr305:3.0.2", + "com.google.errorprone:error_prone_annotations:2.9.0", + "com.google.guava:failureaccess:1.0.1", + "org.checkerframework:checker-compat-qual:2.5.5" + ], + "file": "v1/https/repo1.maven.org/maven2/com/google/guava/guava/30.1.1-android/guava-30.1.1-android.jar", + "mirror_urls": [ + "https://maven.google.com/com/google/guava/guava/30.1.1-android/guava-30.1.1-android.jar", + "https://repo1.maven.org/maven2/com/google/guava/guava/30.1.1-android/guava-30.1.1-android.jar", + "https://maven.fabric.io/public/com/google/guava/guava/30.1.1-android/guava-30.1.1-android.jar", + "https://maven.google.com/com/google/guava/guava/30.1.1-android/guava-30.1.1-android.jar", + "https://repo1.maven.org/maven2/com/google/guava/guava/30.1.1-android/guava-30.1.1-android.jar" + ], + "sha256": "355f79352f8c252f2bdaa06c687c4836a38016caccfc4c28d16ae77ecfdffa2f", + "url": "https://repo1.maven.org/maven2/com/google/guava/guava/30.1.1-android/guava-30.1.1-android.jar" + }, + { + "coord": "com.google.guava:guava:jar:sources:30.1.1-android", + "dependencies": [ + "com.google.code.findbugs:jsr305:jar:sources:3.0.2", + "com.google.j2objc:j2objc-annotations:jar:sources:1.3", + "org.checkerframework:checker-compat-qual:jar:sources:2.5.5", + "com.google.guava:listenablefuture:jar:sources:9999.0-empty-to-avoid-conflict-with-guava", + "com.google.guava:failureaccess:jar:sources:1.0.1", + "com.google.errorprone:error_prone_annotations:jar:sources:2.9.0" + ], + "directDependencies": [ + "com.google.code.findbugs:jsr305:jar:sources:3.0.2", + "com.google.j2objc:j2objc-annotations:jar:sources:1.3", + "org.checkerframework:checker-compat-qual:jar:sources:2.5.5", + "com.google.guava:listenablefuture:jar:sources:9999.0-empty-to-avoid-conflict-with-guava", + "com.google.guava:failureaccess:jar:sources:1.0.1", + "com.google.errorprone:error_prone_annotations:jar:sources:2.9.0" + ], + "file": "v1/https/repo1.maven.org/maven2/com/google/guava/guava/30.1.1-android/guava-30.1.1-android-sources.jar", + "mirror_urls": [ + "https://maven.google.com/com/google/guava/guava/30.1.1-android/guava-30.1.1-android-sources.jar", + "https://repo1.maven.org/maven2/com/google/guava/guava/30.1.1-android/guava-30.1.1-android-sources.jar", + "https://maven.fabric.io/public/com/google/guava/guava/30.1.1-android/guava-30.1.1-android-sources.jar", + "https://maven.google.com/com/google/guava/guava/30.1.1-android/guava-30.1.1-android-sources.jar", + "https://repo1.maven.org/maven2/com/google/guava/guava/30.1.1-android/guava-30.1.1-android-sources.jar" + ], + "sha256": "dac52416371d86baea1ffe6ef7b54b2730b52fcea19091ae32942cb5cd9f868c", + "url": "https://repo1.maven.org/maven2/com/google/guava/guava/30.1.1-android/guava-30.1.1-android-sources.jar" + }, + { + "coord": "com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava", "dependencies": [], "directDependencies": [], - "file": "v1/https/repo1.maven.org/maven2/com/ibm/icu/icu4j/53.1/icu4j-53.1-sources.jar", + "file": "v1/https/repo1.maven.org/maven2/com/google/guava/listenablefuture/9999.0-empty-to-avoid-conflict-with-guava/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar", "mirror_urls": [ - "https://maven.google.com/com/ibm/icu/icu4j/53.1/icu4j-53.1-sources.jar", - "https://repo1.maven.org/maven2/com/ibm/icu/icu4j/53.1/icu4j-53.1-sources.jar", - "https://maven.fabric.io/public/com/ibm/icu/icu4j/53.1/icu4j-53.1-sources.jar", - "https://maven.google.com/com/ibm/icu/icu4j/53.1/icu4j-53.1-sources.jar", - "https://repo1.maven.org/maven2/com/ibm/icu/icu4j/53.1/icu4j-53.1-sources.jar" + "https://maven.google.com/com/google/guava/listenablefuture/9999.0-empty-to-avoid-conflict-with-guava/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar", + "https://repo1.maven.org/maven2/com/google/guava/listenablefuture/9999.0-empty-to-avoid-conflict-with-guava/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar", + "https://maven.fabric.io/public/com/google/guava/listenablefuture/9999.0-empty-to-avoid-conflict-with-guava/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar", + "https://maven.google.com/com/google/guava/listenablefuture/9999.0-empty-to-avoid-conflict-with-guava/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar", + "https://repo1.maven.org/maven2/com/google/guava/listenablefuture/9999.0-empty-to-avoid-conflict-with-guava/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar" ], - "sha256": "610f0f35cd11415effe23b248ab129a316e7f73994c20ac1ebe7e092629eb994", - "url": "https://repo1.maven.org/maven2/com/ibm/icu/icu4j/53.1/icu4j-53.1-sources.jar" + "sha256": "b372a037d4230aa57fbeffdef30fd6123f9c0c2db85d0aced00c91b974f33f99", + "url": "https://repo1.maven.org/maven2/com/google/guava/listenablefuture/9999.0-empty-to-avoid-conflict-with-guava/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar" }, { - "coord": "com.squareup.moshi:moshi-kotlin-codegen:1.11.0", + "coord": "com.google.j2objc:j2objc-annotations:1.3", + "dependencies": [], + "directDependencies": [], + "file": "v1/https/repo1.maven.org/maven2/com/google/j2objc/j2objc-annotations/1.3/j2objc-annotations-1.3.jar", + "mirror_urls": [ + "https://maven.google.com/com/google/j2objc/j2objc-annotations/1.3/j2objc-annotations-1.3.jar", + "https://repo1.maven.org/maven2/com/google/j2objc/j2objc-annotations/1.3/j2objc-annotations-1.3.jar", + "https://maven.fabric.io/public/com/google/j2objc/j2objc-annotations/1.3/j2objc-annotations-1.3.jar", + "https://maven.google.com/com/google/j2objc/j2objc-annotations/1.3/j2objc-annotations-1.3.jar", + "https://repo1.maven.org/maven2/com/google/j2objc/j2objc-annotations/1.3/j2objc-annotations-1.3.jar" + ], + "sha256": "21af30c92267bd6122c0e0b4d20cccb6641a37eaf956c6540ec471d584e64a7b", + "url": "https://repo1.maven.org/maven2/com/google/j2objc/j2objc-annotations/1.3/j2objc-annotations-1.3.jar" + }, + { + "coord": "com.google.j2objc:j2objc-annotations:jar:sources:1.3", + "dependencies": [], + "directDependencies": [], + "file": "v1/https/repo1.maven.org/maven2/com/google/j2objc/j2objc-annotations/1.3/j2objc-annotations-1.3-sources.jar", + "mirror_urls": [ + "https://maven.google.com/com/google/j2objc/j2objc-annotations/1.3/j2objc-annotations-1.3-sources.jar", + "https://repo1.maven.org/maven2/com/google/j2objc/j2objc-annotations/1.3/j2objc-annotations-1.3-sources.jar", + "https://maven.fabric.io/public/com/google/j2objc/j2objc-annotations/1.3/j2objc-annotations-1.3-sources.jar", + "https://maven.google.com/com/google/j2objc/j2objc-annotations/1.3/j2objc-annotations-1.3-sources.jar", + "https://repo1.maven.org/maven2/com/google/j2objc/j2objc-annotations/1.3/j2objc-annotations-1.3-sources.jar" + ], + "sha256": "ba4df669fec153fa4cd0ef8d02c6d3ef0702b7ac4cabe080facf3b6e490bb972", + "url": "https://repo1.maven.org/maven2/com/google/j2objc/j2objc-annotations/1.3/j2objc-annotations-1.3-sources.jar" + }, + { + "coord": "com.google.protobuf:protobuf-java-util:3.17.3", "dependencies": [ - "com.squareup:kotlinpoet:1.6.0", - "com.squareup.moshi:moshi:1.11.0", - "com.google.auto.service:auto-service-annotations:1.0-rc7", - "net.ltgt.gradle.incap:incap:0.3", - "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.10", - "com.squareup.okio:okio:2.6.0", - "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.4.10", - "org.jetbrains.kotlin:kotlin-stdlib:1.5.0", - "org.ow2.asm:asm:9.1", - "org.jetbrains.kotlin:kotlin-reflect:1.5.0" + "com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava", + "com.google.j2objc:j2objc-annotations:1.3", + "com.google.code.findbugs:jsr305:3.0.2", + "com.google.guava:guava:30.1.1-android", + "com.google.errorprone:error_prone_annotations:2.9.0", + "com.google.protobuf:protobuf-java:3.17.3", + "com.google.guava:failureaccess:1.0.1", + "com.google.code.gson:gson:2.8.9", + "org.checkerframework:checker-compat-qual:2.5.5" ], "directDependencies": [ - "com.squareup:kotlinpoet:1.6.0", - "com.squareup.moshi:moshi:1.11.0", - "com.google.auto.service:auto-service-annotations:1.0-rc7", - "net.ltgt.gradle.incap:incap:0.3", - "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.10", - "org.ow2.asm:asm:9.1", - "org.jetbrains.kotlin:kotlin-reflect:1.5.0" + "com.google.code.gson:gson:2.8.9", + "com.google.errorprone:error_prone_annotations:2.9.0", + "com.google.guava:guava:30.1.1-android", + "com.google.protobuf:protobuf-java:3.17.3" ], - "file": "v1/https/repo1.maven.org/maven2/com/squareup/moshi/moshi-kotlin-codegen/1.11.0/moshi-kotlin-codegen-1.11.0.jar", + "file": "v1/https/repo1.maven.org/maven2/com/google/protobuf/protobuf-java-util/3.17.3/protobuf-java-util-3.17.3.jar", "mirror_urls": [ - "https://maven.google.com/com/squareup/moshi/moshi-kotlin-codegen/1.11.0/moshi-kotlin-codegen-1.11.0.jar", - "https://repo1.maven.org/maven2/com/squareup/moshi/moshi-kotlin-codegen/1.11.0/moshi-kotlin-codegen-1.11.0.jar", - "https://maven.fabric.io/public/com/squareup/moshi/moshi-kotlin-codegen/1.11.0/moshi-kotlin-codegen-1.11.0.jar", - "https://maven.google.com/com/squareup/moshi/moshi-kotlin-codegen/1.11.0/moshi-kotlin-codegen-1.11.0.jar", - "https://repo1.maven.org/maven2/com/squareup/moshi/moshi-kotlin-codegen/1.11.0/moshi-kotlin-codegen-1.11.0.jar" + "https://maven.google.com/com/google/protobuf/protobuf-java-util/3.17.3/protobuf-java-util-3.17.3.jar", + "https://repo1.maven.org/maven2/com/google/protobuf/protobuf-java-util/3.17.3/protobuf-java-util-3.17.3.jar", + "https://maven.fabric.io/public/com/google/protobuf/protobuf-java-util/3.17.3/protobuf-java-util-3.17.3.jar", + "https://maven.google.com/com/google/protobuf/protobuf-java-util/3.17.3/protobuf-java-util-3.17.3.jar", + "https://repo1.maven.org/maven2/com/google/protobuf/protobuf-java-util/3.17.3/protobuf-java-util-3.17.3.jar" + ], + "sha256": "bf320ed076000e1d8c7cbf7601b056acaecab80f75b9a659b9f6398d0d7e3f79", + "url": "https://repo1.maven.org/maven2/com/google/protobuf/protobuf-java-util/3.17.3/protobuf-java-util-3.17.3.jar" + }, + { + "coord": "com.google.protobuf:protobuf-java-util:jar:sources:3.17.3", + "dependencies": [ + "com.google.guava:guava:jar:sources:30.1.1-android", + "com.google.protobuf:protobuf-java:jar:sources:3.17.3", + "com.google.code.findbugs:jsr305:jar:sources:3.0.2", + "com.google.j2objc:j2objc-annotations:jar:sources:1.3", + "com.google.code.gson:gson:jar:sources:2.8.9", + "org.checkerframework:checker-compat-qual:jar:sources:2.5.5", + "com.google.guava:listenablefuture:jar:sources:9999.0-empty-to-avoid-conflict-with-guava", + "com.google.guava:failureaccess:jar:sources:1.0.1", + "com.google.errorprone:error_prone_annotations:jar:sources:2.9.0" + ], + "directDependencies": [ + "com.google.code.gson:gson:jar:sources:2.8.9", + "com.google.errorprone:error_prone_annotations:jar:sources:2.9.0", + "com.google.guava:guava:jar:sources:30.1.1-android", + "com.google.protobuf:protobuf-java:jar:sources:3.17.3" + ], + "file": "v1/https/repo1.maven.org/maven2/com/google/protobuf/protobuf-java-util/3.17.3/protobuf-java-util-3.17.3-sources.jar", + "mirror_urls": [ + "https://maven.google.com/com/google/protobuf/protobuf-java-util/3.17.3/protobuf-java-util-3.17.3-sources.jar", + "https://repo1.maven.org/maven2/com/google/protobuf/protobuf-java-util/3.17.3/protobuf-java-util-3.17.3-sources.jar", + "https://maven.fabric.io/public/com/google/protobuf/protobuf-java-util/3.17.3/protobuf-java-util-3.17.3-sources.jar", + "https://maven.google.com/com/google/protobuf/protobuf-java-util/3.17.3/protobuf-java-util-3.17.3-sources.jar", + "https://repo1.maven.org/maven2/com/google/protobuf/protobuf-java-util/3.17.3/protobuf-java-util-3.17.3-sources.jar" + ], + "sha256": "4046612802edfa6f9e201b2a53d10439a4ebbab5324ae415874e041cd1d70bbf", + "url": "https://repo1.maven.org/maven2/com/google/protobuf/protobuf-java-util/3.17.3/protobuf-java-util-3.17.3-sources.jar" + }, + { + "coord": "com.google.protobuf:protobuf-java:3.17.3", + "dependencies": [], + "directDependencies": [], + "file": "v1/https/repo1.maven.org/maven2/com/google/protobuf/protobuf-java/3.17.3/protobuf-java-3.17.3.jar", + "mirror_urls": [ + "https://maven.google.com/com/google/protobuf/protobuf-java/3.17.3/protobuf-java-3.17.3.jar", + "https://repo1.maven.org/maven2/com/google/protobuf/protobuf-java/3.17.3/protobuf-java-3.17.3.jar", + "https://maven.fabric.io/public/com/google/protobuf/protobuf-java/3.17.3/protobuf-java-3.17.3.jar", + "https://maven.google.com/com/google/protobuf/protobuf-java/3.17.3/protobuf-java-3.17.3.jar", + "https://repo1.maven.org/maven2/com/google/protobuf/protobuf-java/3.17.3/protobuf-java-3.17.3.jar" + ], + "sha256": "4ac549b192694141958049f060a1c826a33342f619e108ced8c17d9877f5e3ed", + "url": "https://repo1.maven.org/maven2/com/google/protobuf/protobuf-java/3.17.3/protobuf-java-3.17.3.jar" + }, + { + "coord": "com.google.protobuf:protobuf-java:jar:sources:3.17.3", + "dependencies": [], + "directDependencies": [], + "file": "v1/https/repo1.maven.org/maven2/com/google/protobuf/protobuf-java/3.17.3/protobuf-java-3.17.3-sources.jar", + "mirror_urls": [ + "https://maven.google.com/com/google/protobuf/protobuf-java/3.17.3/protobuf-java-3.17.3-sources.jar", + "https://repo1.maven.org/maven2/com/google/protobuf/protobuf-java/3.17.3/protobuf-java-3.17.3-sources.jar", + "https://maven.fabric.io/public/com/google/protobuf/protobuf-java/3.17.3/protobuf-java-3.17.3-sources.jar", + "https://maven.google.com/com/google/protobuf/protobuf-java/3.17.3/protobuf-java-3.17.3-sources.jar", + "https://repo1.maven.org/maven2/com/google/protobuf/protobuf-java/3.17.3/protobuf-java-3.17.3-sources.jar" + ], + "sha256": "204bad0a36827296ed0b6fdbdf1a17028f3e3d289dd20042980331b8f0ef646e", + "url": "https://repo1.maven.org/maven2/com/google/protobuf/protobuf-java/3.17.3/protobuf-java-3.17.3-sources.jar" + }, + { + "coord": "com.google.protobuf:protobuf-javalite:3.19.2", + "dependencies": [], + "directDependencies": [], + "file": "v1/https/repo1.maven.org/maven2/com/google/protobuf/protobuf-javalite/3.19.2/protobuf-javalite-3.19.2.jar", + "mirror_urls": [ + "https://maven.google.com/com/google/protobuf/protobuf-javalite/3.19.2/protobuf-javalite-3.19.2.jar", + "https://repo1.maven.org/maven2/com/google/protobuf/protobuf-javalite/3.19.2/protobuf-javalite-3.19.2.jar", + "https://maven.fabric.io/public/com/google/protobuf/protobuf-javalite/3.19.2/protobuf-javalite-3.19.2.jar", + "https://maven.google.com/com/google/protobuf/protobuf-javalite/3.19.2/protobuf-javalite-3.19.2.jar", + "https://repo1.maven.org/maven2/com/google/protobuf/protobuf-javalite/3.19.2/protobuf-javalite-3.19.2.jar" + ], + "sha256": "bfc598474392a015c050d34be38bb84eb3986809374eac437420d51680150e94", + "url": "https://repo1.maven.org/maven2/com/google/protobuf/protobuf-javalite/3.19.2/protobuf-javalite-3.19.2.jar" + }, + { + "coord": "com.google.protobuf:protobuf-javalite:jar:sources:3.19.2", + "dependencies": [], + "directDependencies": [], + "file": "v1/https/repo1.maven.org/maven2/com/google/protobuf/protobuf-javalite/3.19.2/protobuf-javalite-3.19.2-sources.jar", + "mirror_urls": [ + "https://maven.google.com/com/google/protobuf/protobuf-javalite/3.19.2/protobuf-javalite-3.19.2-sources.jar", + "https://repo1.maven.org/maven2/com/google/protobuf/protobuf-javalite/3.19.2/protobuf-javalite-3.19.2-sources.jar", + "https://maven.fabric.io/public/com/google/protobuf/protobuf-javalite/3.19.2/protobuf-javalite-3.19.2-sources.jar", + "https://maven.google.com/com/google/protobuf/protobuf-javalite/3.19.2/protobuf-javalite-3.19.2-sources.jar", + "https://repo1.maven.org/maven2/com/google/protobuf/protobuf-javalite/3.19.2/protobuf-javalite-3.19.2-sources.jar" + ], + "sha256": "0154a27b8b6e4753013922fc8e50c59ebd7108af95f11fa9bc6b72ef14db0dc9", + "url": "https://repo1.maven.org/maven2/com/google/protobuf/protobuf-javalite/3.19.2/protobuf-javalite-3.19.2-sources.jar" + }, + { + "coord": "com.google.truth.extensions:truth-liteproto-extension:1.1.3", + "dependencies": [ + "com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava", + "com.google.j2objc:j2objc-annotations:1.3", + "com.google.truth:truth:1.1.3", + "com.google.code.findbugs:jsr305:3.0.2", + "com.google.guava:guava:30.1.1-android", + "org.hamcrest:hamcrest-core:1.3", + "org.checkerframework:checker-qual:3.13.0", + "com.google.auto.value:auto-value-annotations:1.8.1", + "com.google.errorprone:error_prone_annotations:2.9.0", + "com.google.guava:failureaccess:1.0.1", + "org.ow2.asm:asm:9.1", + "junit:junit:4.13.2", + "org.checkerframework:checker-compat-qual:2.5.5" + ], + "directDependencies": [ + "com.google.truth:truth:1.1.3", + "com.google.guava:guava:30.1.1-android", + "org.checkerframework:checker-qual:3.13.0", + "com.google.auto.value:auto-value-annotations:1.8.1", + "com.google.errorprone:error_prone_annotations:2.9.0" + ], + "file": "v1/https/repo1.maven.org/maven2/com/google/truth/extensions/truth-liteproto-extension/1.1.3/truth-liteproto-extension-1.1.3.jar", + "mirror_urls": [ + "https://maven.google.com/com/google/truth/extensions/truth-liteproto-extension/1.1.3/truth-liteproto-extension-1.1.3.jar", + "https://repo1.maven.org/maven2/com/google/truth/extensions/truth-liteproto-extension/1.1.3/truth-liteproto-extension-1.1.3.jar", + "https://maven.fabric.io/public/com/google/truth/extensions/truth-liteproto-extension/1.1.3/truth-liteproto-extension-1.1.3.jar", + "https://maven.google.com/com/google/truth/extensions/truth-liteproto-extension/1.1.3/truth-liteproto-extension-1.1.3.jar", + "https://repo1.maven.org/maven2/com/google/truth/extensions/truth-liteproto-extension/1.1.3/truth-liteproto-extension-1.1.3.jar" + ], + "sha256": "71cce6284554e546d1b5ba48e310ee4b4050676f09fb0eced136d779284ff78d", + "url": "https://repo1.maven.org/maven2/com/google/truth/extensions/truth-liteproto-extension/1.1.3/truth-liteproto-extension-1.1.3.jar" + }, + { + "coord": "com.google.truth.extensions:truth-liteproto-extension:jar:sources:1.1.3", + "dependencies": [ + "com.google.guava:guava:jar:sources:30.1.1-android", + "com.google.code.findbugs:jsr305:jar:sources:3.0.2", + "com.google.j2objc:j2objc-annotations:jar:sources:1.3", + "org.ow2.asm:asm:jar:sources:9.1", + "org.checkerframework:checker-qual:jar:sources:3.13.0", + "junit:junit:jar:sources:4.13.2", + "org.hamcrest:hamcrest-core:jar:sources:1.3", + "com.google.truth:truth:jar:sources:1.1.3", + "org.checkerframework:checker-compat-qual:jar:sources:2.5.5", + "com.google.guava:listenablefuture:jar:sources:9999.0-empty-to-avoid-conflict-with-guava", + "com.google.guava:failureaccess:jar:sources:1.0.1", + "com.google.errorprone:error_prone_annotations:jar:sources:2.9.0", + "com.google.auto.value:auto-value-annotations:jar:sources:1.8.1" + ], + "directDependencies": [ + "com.google.guava:guava:jar:sources:30.1.1-android", + "org.checkerframework:checker-qual:jar:sources:3.13.0", + "com.google.truth:truth:jar:sources:1.1.3", + "com.google.errorprone:error_prone_annotations:jar:sources:2.9.0", + "com.google.auto.value:auto-value-annotations:jar:sources:1.8.1" + ], + "file": "v1/https/repo1.maven.org/maven2/com/google/truth/extensions/truth-liteproto-extension/1.1.3/truth-liteproto-extension-1.1.3-sources.jar", + "mirror_urls": [ + "https://maven.google.com/com/google/truth/extensions/truth-liteproto-extension/1.1.3/truth-liteproto-extension-1.1.3-sources.jar", + "https://repo1.maven.org/maven2/com/google/truth/extensions/truth-liteproto-extension/1.1.3/truth-liteproto-extension-1.1.3-sources.jar", + "https://maven.fabric.io/public/com/google/truth/extensions/truth-liteproto-extension/1.1.3/truth-liteproto-extension-1.1.3-sources.jar", + "https://maven.google.com/com/google/truth/extensions/truth-liteproto-extension/1.1.3/truth-liteproto-extension-1.1.3-sources.jar", + "https://repo1.maven.org/maven2/com/google/truth/extensions/truth-liteproto-extension/1.1.3/truth-liteproto-extension-1.1.3-sources.jar" + ], + "sha256": "fd3c26b2232966a3ff25e5b9c642f9ae9f19c86b29dfeb6e72aeb67e45e36130", + "url": "https://repo1.maven.org/maven2/com/google/truth/extensions/truth-liteproto-extension/1.1.3/truth-liteproto-extension-1.1.3-sources.jar" + }, + { + "coord": "com.google.truth:truth:1.1.3", + "dependencies": [ + "com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava", + "com.google.j2objc:j2objc-annotations:1.3", + "com.google.code.findbugs:jsr305:3.0.2", + "com.google.guava:guava:30.1.1-android", + "org.hamcrest:hamcrest-core:1.3", + "org.checkerframework:checker-qual:3.13.0", + "com.google.auto.value:auto-value-annotations:1.8.1", + "com.google.errorprone:error_prone_annotations:2.9.0", + "com.google.guava:failureaccess:1.0.1", + "org.ow2.asm:asm:9.1", + "junit:junit:4.13.2", + "org.checkerframework:checker-compat-qual:2.5.5" + ], + "directDependencies": [ + "com.google.guava:guava:30.1.1-android", + "org.checkerframework:checker-qual:3.13.0", + "com.google.auto.value:auto-value-annotations:1.8.1", + "com.google.errorprone:error_prone_annotations:2.9.0", + "org.ow2.asm:asm:9.1", + "junit:junit:4.13.2" + ], + "file": "v1/https/repo1.maven.org/maven2/com/google/truth/truth/1.1.3/truth-1.1.3.jar", + "mirror_urls": [ + "https://maven.google.com/com/google/truth/truth/1.1.3/truth-1.1.3.jar", + "https://repo1.maven.org/maven2/com/google/truth/truth/1.1.3/truth-1.1.3.jar", + "https://maven.fabric.io/public/com/google/truth/truth/1.1.3/truth-1.1.3.jar", + "https://maven.google.com/com/google/truth/truth/1.1.3/truth-1.1.3.jar", + "https://repo1.maven.org/maven2/com/google/truth/truth/1.1.3/truth-1.1.3.jar" + ], + "sha256": "fc0b67782289a2aabfddfdf99eff1dcd5edc890d49143fcd489214b107b8f4f3", + "url": "https://repo1.maven.org/maven2/com/google/truth/truth/1.1.3/truth-1.1.3.jar" + }, + { + "coord": "com.google.truth:truth:jar:sources:1.1.3", + "dependencies": [ + "com.google.guava:guava:jar:sources:30.1.1-android", + "com.google.code.findbugs:jsr305:jar:sources:3.0.2", + "com.google.j2objc:j2objc-annotations:jar:sources:1.3", + "org.ow2.asm:asm:jar:sources:9.1", + "org.checkerframework:checker-qual:jar:sources:3.13.0", + "junit:junit:jar:sources:4.13.2", + "org.hamcrest:hamcrest-core:jar:sources:1.3", + "org.checkerframework:checker-compat-qual:jar:sources:2.5.5", + "com.google.guava:listenablefuture:jar:sources:9999.0-empty-to-avoid-conflict-with-guava", + "com.google.guava:failureaccess:jar:sources:1.0.1", + "com.google.errorprone:error_prone_annotations:jar:sources:2.9.0", + "com.google.auto.value:auto-value-annotations:jar:sources:1.8.1" + ], + "directDependencies": [ + "com.google.guava:guava:jar:sources:30.1.1-android", + "org.ow2.asm:asm:jar:sources:9.1", + "org.checkerframework:checker-qual:jar:sources:3.13.0", + "junit:junit:jar:sources:4.13.2", + "com.google.errorprone:error_prone_annotations:jar:sources:2.9.0", + "com.google.auto.value:auto-value-annotations:jar:sources:1.8.1" + ], + "file": "v1/https/repo1.maven.org/maven2/com/google/truth/truth/1.1.3/truth-1.1.3-sources.jar", + "mirror_urls": [ + "https://maven.google.com/com/google/truth/truth/1.1.3/truth-1.1.3-sources.jar", + "https://repo1.maven.org/maven2/com/google/truth/truth/1.1.3/truth-1.1.3-sources.jar", + "https://maven.fabric.io/public/com/google/truth/truth/1.1.3/truth-1.1.3-sources.jar", + "https://maven.google.com/com/google/truth/truth/1.1.3/truth-1.1.3-sources.jar", + "https://repo1.maven.org/maven2/com/google/truth/truth/1.1.3/truth-1.1.3-sources.jar" + ], + "sha256": "6c35e3d7087cd222938b41bbdb54041239b79dda07cf96c4027c118d566df545", + "url": "https://repo1.maven.org/maven2/com/google/truth/truth/1.1.3/truth-1.1.3-sources.jar" + }, + { + "coord": "com.googlecode.juniversalchardet:juniversalchardet:1.0.3", + "dependencies": [], + "directDependencies": [], + "file": "v1/https/repo1.maven.org/maven2/com/googlecode/juniversalchardet/juniversalchardet/1.0.3/juniversalchardet-1.0.3.jar", + "mirror_urls": [ + "https://maven.google.com/com/googlecode/juniversalchardet/juniversalchardet/1.0.3/juniversalchardet-1.0.3.jar", + "https://repo1.maven.org/maven2/com/googlecode/juniversalchardet/juniversalchardet/1.0.3/juniversalchardet-1.0.3.jar", + "https://maven.fabric.io/public/com/googlecode/juniversalchardet/juniversalchardet/1.0.3/juniversalchardet-1.0.3.jar", + "https://maven.google.com/com/googlecode/juniversalchardet/juniversalchardet/1.0.3/juniversalchardet-1.0.3.jar", + "https://repo1.maven.org/maven2/com/googlecode/juniversalchardet/juniversalchardet/1.0.3/juniversalchardet-1.0.3.jar" + ], + "sha256": "757bfe906193b8b651e79dc26cd67d6b55d0770a2cdfb0381591504f779d4a76", + "url": "https://repo1.maven.org/maven2/com/googlecode/juniversalchardet/juniversalchardet/1.0.3/juniversalchardet-1.0.3.jar" + }, + { + "coord": "com.googlecode.juniversalchardet:juniversalchardet:jar:sources:1.0.3", + "dependencies": [], + "directDependencies": [], + "file": "v1/https/repo1.maven.org/maven2/com/googlecode/juniversalchardet/juniversalchardet/1.0.3/juniversalchardet-1.0.3-sources.jar", + "mirror_urls": [ + "https://maven.google.com/com/googlecode/juniversalchardet/juniversalchardet/1.0.3/juniversalchardet-1.0.3-sources.jar", + "https://repo1.maven.org/maven2/com/googlecode/juniversalchardet/juniversalchardet/1.0.3/juniversalchardet-1.0.3-sources.jar", + "https://maven.fabric.io/public/com/googlecode/juniversalchardet/juniversalchardet/1.0.3/juniversalchardet-1.0.3-sources.jar", + "https://maven.google.com/com/googlecode/juniversalchardet/juniversalchardet/1.0.3/juniversalchardet-1.0.3-sources.jar", + "https://repo1.maven.org/maven2/com/googlecode/juniversalchardet/juniversalchardet/1.0.3/juniversalchardet-1.0.3-sources.jar" + ], + "sha256": "3d1cb067f5cfe3cc19b77c837156f22368462af9acac5dd878e785966758fc27", + "url": "https://repo1.maven.org/maven2/com/googlecode/juniversalchardet/juniversalchardet/1.0.3/juniversalchardet-1.0.3-sources.jar" + }, + { + "coord": "com.ibm.icu:icu4j:53.1", + "dependencies": [], + "directDependencies": [], + "file": "v1/https/repo1.maven.org/maven2/com/ibm/icu/icu4j/53.1/icu4j-53.1.jar", + "mirror_urls": [ + "https://maven.google.com/com/ibm/icu/icu4j/53.1/icu4j-53.1.jar", + "https://repo1.maven.org/maven2/com/ibm/icu/icu4j/53.1/icu4j-53.1.jar", + "https://maven.fabric.io/public/com/ibm/icu/icu4j/53.1/icu4j-53.1.jar", + "https://maven.google.com/com/ibm/icu/icu4j/53.1/icu4j-53.1.jar", + "https://repo1.maven.org/maven2/com/ibm/icu/icu4j/53.1/icu4j-53.1.jar" + ], + "sha256": "e37a4467bac5cdeb02c5c4b8e5063d2f4e67b69e3c7df6d6b610f13185572bab", + "url": "https://repo1.maven.org/maven2/com/ibm/icu/icu4j/53.1/icu4j-53.1.jar" + }, + { + "coord": "com.ibm.icu:icu4j:jar:sources:53.1", + "dependencies": [], + "directDependencies": [], + "file": "v1/https/repo1.maven.org/maven2/com/ibm/icu/icu4j/53.1/icu4j-53.1-sources.jar", + "mirror_urls": [ + "https://maven.google.com/com/ibm/icu/icu4j/53.1/icu4j-53.1-sources.jar", + "https://repo1.maven.org/maven2/com/ibm/icu/icu4j/53.1/icu4j-53.1-sources.jar", + "https://maven.fabric.io/public/com/ibm/icu/icu4j/53.1/icu4j-53.1-sources.jar", + "https://maven.google.com/com/ibm/icu/icu4j/53.1/icu4j-53.1-sources.jar", + "https://repo1.maven.org/maven2/com/ibm/icu/icu4j/53.1/icu4j-53.1-sources.jar" + ], + "sha256": "610f0f35cd11415effe23b248ab129a316e7f73994c20ac1ebe7e092629eb994", + "url": "https://repo1.maven.org/maven2/com/ibm/icu/icu4j/53.1/icu4j-53.1-sources.jar" + }, + { + "coord": "com.squareup.moshi:moshi-kotlin-codegen:1.11.0", + "dependencies": [ + "com.squareup:kotlinpoet:1.6.0", + "com.squareup.moshi:moshi:1.11.0", + "com.google.auto.service:auto-service-annotations:1.0-rc7", + "net.ltgt.gradle.incap:incap:0.3", + "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.10", + "com.squareup.okio:okio:2.6.0", + "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.4.10", + "org.jetbrains.kotlin:kotlin-stdlib:1.5.0", + "org.ow2.asm:asm:9.1", + "org.jetbrains.kotlin:kotlin-reflect:1.5.0" + ], + "directDependencies": [ + "com.squareup:kotlinpoet:1.6.0", + "com.squareup.moshi:moshi:1.11.0", + "com.google.auto.service:auto-service-annotations:1.0-rc7", + "net.ltgt.gradle.incap:incap:0.3", + "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.10", + "org.ow2.asm:asm:9.1", + "org.jetbrains.kotlin:kotlin-reflect:1.5.0" + ], + "file": "v1/https/repo1.maven.org/maven2/com/squareup/moshi/moshi-kotlin-codegen/1.11.0/moshi-kotlin-codegen-1.11.0.jar", + "mirror_urls": [ + "https://maven.google.com/com/squareup/moshi/moshi-kotlin-codegen/1.11.0/moshi-kotlin-codegen-1.11.0.jar", + "https://repo1.maven.org/maven2/com/squareup/moshi/moshi-kotlin-codegen/1.11.0/moshi-kotlin-codegen-1.11.0.jar", + "https://maven.fabric.io/public/com/squareup/moshi/moshi-kotlin-codegen/1.11.0/moshi-kotlin-codegen-1.11.0.jar", + "https://maven.google.com/com/squareup/moshi/moshi-kotlin-codegen/1.11.0/moshi-kotlin-codegen-1.11.0.jar", + "https://repo1.maven.org/maven2/com/squareup/moshi/moshi-kotlin-codegen/1.11.0/moshi-kotlin-codegen-1.11.0.jar" + ], + "sha256": "e5d8e5cba11d8aca0261649c362fdee718e16ccc647124e55ee2e2c328be4c82", + "url": "https://repo1.maven.org/maven2/com/squareup/moshi/moshi-kotlin-codegen/1.11.0/moshi-kotlin-codegen-1.11.0.jar" + }, + { + "coord": "com.squareup.moshi:moshi-kotlin-codegen:jar:sources:1.11.0", + "dependencies": [ + "com.google.auto.service:auto-service-annotations:jar:sources:1.0-rc7", + "org.jetbrains.kotlin:kotlin-stdlib:jar:sources:1.5.0", + "org.ow2.asm:asm:jar:sources:9.1", + "org.jetbrains.kotlin:kotlin-reflect:jar:sources:1.5.0", + "org.jetbrains.kotlin:kotlin-stdlib-jdk8:jar:sources:1.4.10", + "org.jetbrains.kotlin:kotlin-stdlib-jdk7:jar:sources:1.4.10", + "com.squareup:kotlinpoet:jar:sources:1.6.0", + "com.squareup.moshi:moshi:jar:sources:1.11.0", + "com.squareup.okio:okio:jar:sources:2.6.0", + "net.ltgt.gradle.incap:incap:jar:sources:0.3" + ], + "directDependencies": [ + "com.google.auto.service:auto-service-annotations:jar:sources:1.0-rc7", + "org.ow2.asm:asm:jar:sources:9.1", + "org.jetbrains.kotlin:kotlin-reflect:jar:sources:1.5.0", + "org.jetbrains.kotlin:kotlin-stdlib-jdk8:jar:sources:1.4.10", + "com.squareup:kotlinpoet:jar:sources:1.6.0", + "com.squareup.moshi:moshi:jar:sources:1.11.0", + "net.ltgt.gradle.incap:incap:jar:sources:0.3" + ], + "file": "v1/https/repo1.maven.org/maven2/com/squareup/moshi/moshi-kotlin-codegen/1.11.0/moshi-kotlin-codegen-1.11.0-sources.jar", + "mirror_urls": [ + "https://maven.google.com/com/squareup/moshi/moshi-kotlin-codegen/1.11.0/moshi-kotlin-codegen-1.11.0-sources.jar", + "https://repo1.maven.org/maven2/com/squareup/moshi/moshi-kotlin-codegen/1.11.0/moshi-kotlin-codegen-1.11.0-sources.jar", + "https://maven.fabric.io/public/com/squareup/moshi/moshi-kotlin-codegen/1.11.0/moshi-kotlin-codegen-1.11.0-sources.jar", + "https://maven.google.com/com/squareup/moshi/moshi-kotlin-codegen/1.11.0/moshi-kotlin-codegen-1.11.0-sources.jar", + "https://repo1.maven.org/maven2/com/squareup/moshi/moshi-kotlin-codegen/1.11.0/moshi-kotlin-codegen-1.11.0-sources.jar" + ], + "sha256": "c77fe938333fd96539aee34cdb8e923591f145ad727a2fb9ab250f527d85859c", + "url": "https://repo1.maven.org/maven2/com/squareup/moshi/moshi-kotlin-codegen/1.11.0/moshi-kotlin-codegen-1.11.0-sources.jar" + }, + { + "coord": "com.squareup.moshi:moshi-kotlin:1.11.0", + "dependencies": [ + "com.squareup.moshi:moshi:1.11.0", + "com.squareup.okio:okio:2.6.0", + "org.jetbrains.kotlin:kotlin-reflect:1.5.0", + "org.jetbrains.kotlin:kotlin-stdlib:1.5.0" + ], + "directDependencies": [ + "com.squareup.moshi:moshi:1.11.0", + "org.jetbrains.kotlin:kotlin-reflect:1.5.0", + "org.jetbrains.kotlin:kotlin-stdlib:1.5.0" + ], + "file": "v1/https/repo1.maven.org/maven2/com/squareup/moshi/moshi-kotlin/1.11.0/moshi-kotlin-1.11.0.jar", + "mirror_urls": [ + "https://maven.google.com/com/squareup/moshi/moshi-kotlin/1.11.0/moshi-kotlin-1.11.0.jar", + "https://repo1.maven.org/maven2/com/squareup/moshi/moshi-kotlin/1.11.0/moshi-kotlin-1.11.0.jar", + "https://maven.fabric.io/public/com/squareup/moshi/moshi-kotlin/1.11.0/moshi-kotlin-1.11.0.jar", + "https://maven.google.com/com/squareup/moshi/moshi-kotlin/1.11.0/moshi-kotlin-1.11.0.jar", + "https://repo1.maven.org/maven2/com/squareup/moshi/moshi-kotlin/1.11.0/moshi-kotlin-1.11.0.jar" + ], + "sha256": "220f3b85d99ea40ff65609813f3624fb4313de3634a747adb04040cf7cb486bc", + "url": "https://repo1.maven.org/maven2/com/squareup/moshi/moshi-kotlin/1.11.0/moshi-kotlin-1.11.0.jar" + }, + { + "coord": "com.squareup.moshi:moshi-kotlin:jar:sources:1.11.0", + "dependencies": [ + "org.jetbrains.kotlin:kotlin-stdlib:jar:sources:1.5.0", + "com.squareup.moshi:moshi:jar:sources:1.11.0", + "com.squareup.okio:okio:jar:sources:2.6.0", + "org.jetbrains.kotlin:kotlin-reflect:jar:sources:1.5.0" + ], + "directDependencies": [ + "com.squareup.moshi:moshi:jar:sources:1.11.0", + "org.jetbrains.kotlin:kotlin-reflect:jar:sources:1.5.0", + "org.jetbrains.kotlin:kotlin-stdlib:jar:sources:1.5.0" + ], + "file": "v1/https/repo1.maven.org/maven2/com/squareup/moshi/moshi-kotlin/1.11.0/moshi-kotlin-1.11.0-sources.jar", + "mirror_urls": [ + "https://maven.google.com/com/squareup/moshi/moshi-kotlin/1.11.0/moshi-kotlin-1.11.0-sources.jar", + "https://repo1.maven.org/maven2/com/squareup/moshi/moshi-kotlin/1.11.0/moshi-kotlin-1.11.0-sources.jar", + "https://maven.fabric.io/public/com/squareup/moshi/moshi-kotlin/1.11.0/moshi-kotlin-1.11.0-sources.jar", + "https://maven.google.com/com/squareup/moshi/moshi-kotlin/1.11.0/moshi-kotlin-1.11.0-sources.jar", + "https://repo1.maven.org/maven2/com/squareup/moshi/moshi-kotlin/1.11.0/moshi-kotlin-1.11.0-sources.jar" + ], + "sha256": "8ff200ab30a6d222281eb3db17d6c8f1854d4bc9e2d5ccf1d237029cb448dbb2", + "url": "https://repo1.maven.org/maven2/com/squareup/moshi/moshi-kotlin/1.11.0/moshi-kotlin-1.11.0-sources.jar" + }, + { + "coord": "com.squareup.moshi:moshi:1.11.0", + "dependencies": [ + "com.squareup.okio:okio:2.6.0" + ], + "directDependencies": [ + "com.squareup.okio:okio:2.6.0" + ], + "file": "v1/https/repo1.maven.org/maven2/com/squareup/moshi/moshi/1.11.0/moshi-1.11.0.jar", + "mirror_urls": [ + "https://maven.google.com/com/squareup/moshi/moshi/1.11.0/moshi-1.11.0.jar", + "https://repo1.maven.org/maven2/com/squareup/moshi/moshi/1.11.0/moshi-1.11.0.jar", + "https://maven.fabric.io/public/com/squareup/moshi/moshi/1.11.0/moshi-1.11.0.jar", + "https://maven.google.com/com/squareup/moshi/moshi/1.11.0/moshi-1.11.0.jar", + "https://repo1.maven.org/maven2/com/squareup/moshi/moshi/1.11.0/moshi-1.11.0.jar" + ], + "sha256": "b6ee64fb84a7486aa9983e20c75259d4931bd597c169e1e67c3bc0521fd03b27", + "url": "https://repo1.maven.org/maven2/com/squareup/moshi/moshi/1.11.0/moshi-1.11.0.jar" + }, + { + "coord": "com.squareup.moshi:moshi:jar:sources:1.11.0", + "dependencies": [ + "com.squareup.okio:okio:jar:sources:2.6.0" + ], + "directDependencies": [ + "com.squareup.okio:okio:jar:sources:2.6.0" + ], + "file": "v1/https/repo1.maven.org/maven2/com/squareup/moshi/moshi/1.11.0/moshi-1.11.0-sources.jar", + "mirror_urls": [ + "https://maven.google.com/com/squareup/moshi/moshi/1.11.0/moshi-1.11.0-sources.jar", + "https://repo1.maven.org/maven2/com/squareup/moshi/moshi/1.11.0/moshi-1.11.0-sources.jar", + "https://maven.fabric.io/public/com/squareup/moshi/moshi/1.11.0/moshi-1.11.0-sources.jar", + "https://maven.google.com/com/squareup/moshi/moshi/1.11.0/moshi-1.11.0-sources.jar", + "https://repo1.maven.org/maven2/com/squareup/moshi/moshi/1.11.0/moshi-1.11.0-sources.jar" + ], + "sha256": "ca8cbe76fb144ea7f274f914adfa51b932f390a67a16bf1f71f9b254303d4729", + "url": "https://repo1.maven.org/maven2/com/squareup/moshi/moshi/1.11.0/moshi-1.11.0-sources.jar" + }, + { + "coord": "com.squareup.okhttp3:mockwebserver:4.7.2", + "dependencies": [ + "org.hamcrest:hamcrest-core:1.3", + "org.jetbrains.kotlin:kotlin-stdlib-common:1.5.0", + "com.squareup.okio:okio:2.6.0", + "org.jetbrains.kotlin:kotlin-stdlib:1.5.0", + "junit:junit:4.13.2", + "com.squareup.okhttp3:okhttp:4.7.2" + ], + "directDependencies": [ + "com.squareup.okhttp3:okhttp:4.7.2", + "junit:junit:4.13.2" + ], + "file": "v1/https/repo1.maven.org/maven2/com/squareup/okhttp3/mockwebserver/4.7.2/mockwebserver-4.7.2.jar", + "mirror_urls": [ + "https://maven.google.com/com/squareup/okhttp3/mockwebserver/4.7.2/mockwebserver-4.7.2.jar", + "https://repo1.maven.org/maven2/com/squareup/okhttp3/mockwebserver/4.7.2/mockwebserver-4.7.2.jar", + "https://maven.fabric.io/public/com/squareup/okhttp3/mockwebserver/4.7.2/mockwebserver-4.7.2.jar", + "https://maven.google.com/com/squareup/okhttp3/mockwebserver/4.7.2/mockwebserver-4.7.2.jar", + "https://repo1.maven.org/maven2/com/squareup/okhttp3/mockwebserver/4.7.2/mockwebserver-4.7.2.jar" + ], + "sha256": "d7d08b5096336d5b5a27d0e91bb2ebfa7dd54e48c3bb1e3cba15cc9bf16526b7", + "url": "https://repo1.maven.org/maven2/com/squareup/okhttp3/mockwebserver/4.7.2/mockwebserver-4.7.2.jar" + }, + { + "coord": "com.squareup.okhttp3:mockwebserver:jar:sources:4.7.2", + "dependencies": [ + "com.squareup.okhttp3:okhttp:jar:sources:4.7.2", + "org.jetbrains.kotlin:kotlin-stdlib:jar:sources:1.5.0", + "org.jetbrains.kotlin:kotlin-stdlib-common:jar:sources:1.5.0", + "junit:junit:jar:sources:4.13.2", + "org.hamcrest:hamcrest-core:jar:sources:1.3", + "com.squareup.okio:okio:jar:sources:2.6.0" + ], + "directDependencies": [ + "com.squareup.okhttp3:okhttp:jar:sources:4.7.2", + "junit:junit:jar:sources:4.13.2" + ], + "file": "v1/https/repo1.maven.org/maven2/com/squareup/okhttp3/mockwebserver/4.7.2/mockwebserver-4.7.2-sources.jar", + "mirror_urls": [ + "https://maven.google.com/com/squareup/okhttp3/mockwebserver/4.7.2/mockwebserver-4.7.2-sources.jar", + "https://repo1.maven.org/maven2/com/squareup/okhttp3/mockwebserver/4.7.2/mockwebserver-4.7.2-sources.jar", + "https://maven.fabric.io/public/com/squareup/okhttp3/mockwebserver/4.7.2/mockwebserver-4.7.2-sources.jar", + "https://maven.google.com/com/squareup/okhttp3/mockwebserver/4.7.2/mockwebserver-4.7.2-sources.jar", + "https://repo1.maven.org/maven2/com/squareup/okhttp3/mockwebserver/4.7.2/mockwebserver-4.7.2-sources.jar" + ], + "sha256": "c5bc89a4ba5429b68713443e0dc625e0bd073e2c4b06a7b6c6c643d4ce29e32b", + "url": "https://repo1.maven.org/maven2/com/squareup/okhttp3/mockwebserver/4.7.2/mockwebserver-4.7.2-sources.jar" + }, + { + "coord": "com.squareup.okhttp3:okhttp:4.7.2", + "dependencies": [ + "com.squareup.okio:okio:2.6.0", + "org.jetbrains.kotlin:kotlin-stdlib-common:1.5.0", + "org.jetbrains.kotlin:kotlin-stdlib:1.5.0" + ], + "directDependencies": [ + "com.squareup.okio:okio:2.6.0", + "org.jetbrains.kotlin:kotlin-stdlib:1.5.0" + ], + "file": "v1/https/repo1.maven.org/maven2/com/squareup/okhttp3/okhttp/4.7.2/okhttp-4.7.2.jar", + "mirror_urls": [ + "https://maven.google.com/com/squareup/okhttp3/okhttp/4.7.2/okhttp-4.7.2.jar", + "https://repo1.maven.org/maven2/com/squareup/okhttp3/okhttp/4.7.2/okhttp-4.7.2.jar", + "https://maven.fabric.io/public/com/squareup/okhttp3/okhttp/4.7.2/okhttp-4.7.2.jar", + "https://maven.google.com/com/squareup/okhttp3/okhttp/4.7.2/okhttp-4.7.2.jar", + "https://repo1.maven.org/maven2/com/squareup/okhttp3/okhttp/4.7.2/okhttp-4.7.2.jar" + ], + "sha256": "6b64ca1d2069751242984537d5de2cbe627ae000430f5117c47d8cb3d272facd", + "url": "https://repo1.maven.org/maven2/com/squareup/okhttp3/okhttp/4.7.2/okhttp-4.7.2.jar" + }, + { + "coord": "com.squareup.okhttp3:okhttp:jar:sources:4.7.2", + "dependencies": [ + "org.jetbrains.kotlin:kotlin-stdlib:jar:sources:1.5.0", + "com.squareup.okio:okio:jar:sources:2.6.0", + "org.jetbrains.kotlin:kotlin-stdlib-common:jar:sources:1.5.0" + ], + "directDependencies": [ + "com.squareup.okio:okio:jar:sources:2.6.0", + "org.jetbrains.kotlin:kotlin-stdlib:jar:sources:1.5.0" + ], + "file": "v1/https/repo1.maven.org/maven2/com/squareup/okhttp3/okhttp/4.7.2/okhttp-4.7.2-sources.jar", + "mirror_urls": [ + "https://maven.google.com/com/squareup/okhttp3/okhttp/4.7.2/okhttp-4.7.2-sources.jar", + "https://repo1.maven.org/maven2/com/squareup/okhttp3/okhttp/4.7.2/okhttp-4.7.2-sources.jar", + "https://maven.fabric.io/public/com/squareup/okhttp3/okhttp/4.7.2/okhttp-4.7.2-sources.jar", + "https://maven.google.com/com/squareup/okhttp3/okhttp/4.7.2/okhttp-4.7.2-sources.jar", + "https://repo1.maven.org/maven2/com/squareup/okhttp3/okhttp/4.7.2/okhttp-4.7.2-sources.jar" + ], + "sha256": "88348cf944f841a7a8f5f38960474592e0c1ed8a53349cabe05b22d255479772", + "url": "https://repo1.maven.org/maven2/com/squareup/okhttp3/okhttp/4.7.2/okhttp-4.7.2-sources.jar" + }, + { + "coord": "com.squareup.okhttp:okhttp:2.7.5", + "dependencies": [ + "com.squareup.okio:okio:2.6.0" + ], + "directDependencies": [ + "com.squareup.okio:okio:2.6.0" + ], + "file": "v1/https/repo1.maven.org/maven2/com/squareup/okhttp/okhttp/2.7.5/okhttp-2.7.5.jar", + "mirror_urls": [ + "https://maven.google.com/com/squareup/okhttp/okhttp/2.7.5/okhttp-2.7.5.jar", + "https://repo1.maven.org/maven2/com/squareup/okhttp/okhttp/2.7.5/okhttp-2.7.5.jar", + "https://maven.fabric.io/public/com/squareup/okhttp/okhttp/2.7.5/okhttp-2.7.5.jar", + "https://maven.google.com/com/squareup/okhttp/okhttp/2.7.5/okhttp-2.7.5.jar", + "https://repo1.maven.org/maven2/com/squareup/okhttp/okhttp/2.7.5/okhttp-2.7.5.jar" + ], + "sha256": "88ac9fd1bb51f82bcc664cc1eb9c225c90dc4389d660231b4cc737bebfe7d0aa", + "url": "https://repo1.maven.org/maven2/com/squareup/okhttp/okhttp/2.7.5/okhttp-2.7.5.jar" + }, + { + "coord": "com.squareup.okhttp:okhttp:jar:sources:2.7.5", + "dependencies": [ + "com.squareup.okio:okio:jar:sources:2.6.0" + ], + "directDependencies": [ + "com.squareup.okio:okio:jar:sources:2.6.0" + ], + "file": "v1/https/repo1.maven.org/maven2/com/squareup/okhttp/okhttp/2.7.5/okhttp-2.7.5-sources.jar", + "mirror_urls": [ + "https://maven.google.com/com/squareup/okhttp/okhttp/2.7.5/okhttp-2.7.5-sources.jar", + "https://repo1.maven.org/maven2/com/squareup/okhttp/okhttp/2.7.5/okhttp-2.7.5-sources.jar", + "https://maven.fabric.io/public/com/squareup/okhttp/okhttp/2.7.5/okhttp-2.7.5-sources.jar", + "https://maven.google.com/com/squareup/okhttp/okhttp/2.7.5/okhttp-2.7.5-sources.jar", + "https://repo1.maven.org/maven2/com/squareup/okhttp/okhttp/2.7.5/okhttp-2.7.5-sources.jar" + ], + "sha256": "edfafce3b9abb0fc31b5c72cc5f533516a08f7b86754138f36595a6837746ddf", + "url": "https://repo1.maven.org/maven2/com/squareup/okhttp/okhttp/2.7.5/okhttp-2.7.5-sources.jar" + }, + { + "coord": "com.squareup.okio:okio:2.6.0", + "dependencies": [ + "org.jetbrains.kotlin:kotlin-stdlib-common:1.5.0", + "org.jetbrains.kotlin:kotlin-stdlib:1.5.0" + ], + "directDependencies": [ + "org.jetbrains.kotlin:kotlin-stdlib:1.5.0", + "org.jetbrains.kotlin:kotlin-stdlib-common:1.5.0" + ], + "file": "v1/https/repo1.maven.org/maven2/com/squareup/okio/okio/2.6.0/okio-2.6.0.jar", + "mirror_urls": [ + "https://maven.google.com/com/squareup/okio/okio/2.6.0/okio-2.6.0.jar", + "https://repo1.maven.org/maven2/com/squareup/okio/okio/2.6.0/okio-2.6.0.jar", + "https://maven.fabric.io/public/com/squareup/okio/okio/2.6.0/okio-2.6.0.jar", + "https://maven.google.com/com/squareup/okio/okio/2.6.0/okio-2.6.0.jar", + "https://repo1.maven.org/maven2/com/squareup/okio/okio/2.6.0/okio-2.6.0.jar" + ], + "sha256": "4d84ef686277b58eb05691ac19cd3befa3429a27274982ee65ea0f07044bcc00", + "url": "https://repo1.maven.org/maven2/com/squareup/okio/okio/2.6.0/okio-2.6.0.jar" + }, + { + "coord": "com.squareup.okio:okio:jar:sources:2.6.0", + "dependencies": [ + "org.jetbrains.kotlin:kotlin-stdlib:jar:sources:1.5.0", + "org.jetbrains.kotlin:kotlin-stdlib-common:jar:sources:1.5.0" + ], + "directDependencies": [ + "org.jetbrains.kotlin:kotlin-stdlib:jar:sources:1.5.0", + "org.jetbrains.kotlin:kotlin-stdlib-common:jar:sources:1.5.0" + ], + "file": "v1/https/repo1.maven.org/maven2/com/squareup/okio/okio/2.6.0/okio-2.6.0-sources.jar", + "mirror_urls": [ + "https://maven.google.com/com/squareup/okio/okio/2.6.0/okio-2.6.0-sources.jar", + "https://repo1.maven.org/maven2/com/squareup/okio/okio/2.6.0/okio-2.6.0-sources.jar", + "https://maven.fabric.io/public/com/squareup/okio/okio/2.6.0/okio-2.6.0-sources.jar", + "https://maven.google.com/com/squareup/okio/okio/2.6.0/okio-2.6.0-sources.jar", + "https://repo1.maven.org/maven2/com/squareup/okio/okio/2.6.0/okio-2.6.0-sources.jar" + ], + "sha256": "bffda723f6706a29a0406993bd5262ecc4459460baa1b248147e03a3c55b62b4", + "url": "https://repo1.maven.org/maven2/com/squareup/okio/okio/2.6.0/okio-2.6.0-sources.jar" + }, + { + "coord": "com.squareup.retrofit2:converter-moshi:2.5.0", + "dependencies": [ + "com.squareup.retrofit2:retrofit:2.9.0", + "com.squareup.moshi:moshi:1.11.0" + ], + "directDependencies": [ + "com.squareup.moshi:moshi:1.11.0", + "com.squareup.retrofit2:retrofit:2.9.0" + ], + "file": "v1/https/repo1.maven.org/maven2/com/squareup/retrofit2/converter-moshi/2.5.0/converter-moshi-2.5.0.jar", + "mirror_urls": [ + "https://maven.google.com/com/squareup/retrofit2/converter-moshi/2.5.0/converter-moshi-2.5.0.jar", + "https://repo1.maven.org/maven2/com/squareup/retrofit2/converter-moshi/2.5.0/converter-moshi-2.5.0.jar", + "https://maven.fabric.io/public/com/squareup/retrofit2/converter-moshi/2.5.0/converter-moshi-2.5.0.jar", + "https://maven.google.com/com/squareup/retrofit2/converter-moshi/2.5.0/converter-moshi-2.5.0.jar", + "https://repo1.maven.org/maven2/com/squareup/retrofit2/converter-moshi/2.5.0/converter-moshi-2.5.0.jar" + ], + "sha256": "6bade0b754a7b8b7551e2208cb8227e697c2db553b8f12df6f1aa70c6f058600", + "url": "https://repo1.maven.org/maven2/com/squareup/retrofit2/converter-moshi/2.5.0/converter-moshi-2.5.0.jar" + }, + { + "coord": "com.squareup.retrofit2:converter-moshi:jar:sources:2.5.0", + "dependencies": [ + "com.squareup.retrofit2:retrofit:jar:sources:2.9.0", + "com.squareup.moshi:moshi:jar:sources:1.11.0" + ], + "directDependencies": [ + "com.squareup.moshi:moshi:jar:sources:1.11.0", + "com.squareup.retrofit2:retrofit:jar:sources:2.9.0" + ], + "file": "v1/https/repo1.maven.org/maven2/com/squareup/retrofit2/converter-moshi/2.5.0/converter-moshi-2.5.0-sources.jar", + "mirror_urls": [ + "https://maven.google.com/com/squareup/retrofit2/converter-moshi/2.5.0/converter-moshi-2.5.0-sources.jar", + "https://repo1.maven.org/maven2/com/squareup/retrofit2/converter-moshi/2.5.0/converter-moshi-2.5.0-sources.jar", + "https://maven.fabric.io/public/com/squareup/retrofit2/converter-moshi/2.5.0/converter-moshi-2.5.0-sources.jar", + "https://maven.google.com/com/squareup/retrofit2/converter-moshi/2.5.0/converter-moshi-2.5.0-sources.jar", + "https://repo1.maven.org/maven2/com/squareup/retrofit2/converter-moshi/2.5.0/converter-moshi-2.5.0-sources.jar" + ], + "sha256": "d36be44932f400577eccd3c060543e74c8be651b245ad9d5c96fbb79a5ecbf03", + "url": "https://repo1.maven.org/maven2/com/squareup/retrofit2/converter-moshi/2.5.0/converter-moshi-2.5.0-sources.jar" + }, + { + "coord": "com.squareup.retrofit2:retrofit-mock:2.5.0", + "dependencies": [ + "com.squareup.retrofit2:retrofit:2.9.0" + ], + "directDependencies": [ + "com.squareup.retrofit2:retrofit:2.9.0" + ], + "file": "v1/https/repo1.maven.org/maven2/com/squareup/retrofit2/retrofit-mock/2.5.0/retrofit-mock-2.5.0.jar", + "mirror_urls": [ + "https://maven.google.com/com/squareup/retrofit2/retrofit-mock/2.5.0/retrofit-mock-2.5.0.jar", + "https://repo1.maven.org/maven2/com/squareup/retrofit2/retrofit-mock/2.5.0/retrofit-mock-2.5.0.jar", + "https://maven.fabric.io/public/com/squareup/retrofit2/retrofit-mock/2.5.0/retrofit-mock-2.5.0.jar", + "https://maven.google.com/com/squareup/retrofit2/retrofit-mock/2.5.0/retrofit-mock-2.5.0.jar", + "https://repo1.maven.org/maven2/com/squareup/retrofit2/retrofit-mock/2.5.0/retrofit-mock-2.5.0.jar" + ], + "sha256": "00692755410b4367c7c12e6e4aadd3b1a28b5169e8961d94bc27ab36ece9bf29", + "url": "https://repo1.maven.org/maven2/com/squareup/retrofit2/retrofit-mock/2.5.0/retrofit-mock-2.5.0.jar" + }, + { + "coord": "com.squareup.retrofit2:retrofit-mock:jar:sources:2.5.0", + "dependencies": [ + "com.squareup.retrofit2:retrofit:jar:sources:2.9.0" + ], + "directDependencies": [ + "com.squareup.retrofit2:retrofit:jar:sources:2.9.0" + ], + "file": "v1/https/repo1.maven.org/maven2/com/squareup/retrofit2/retrofit-mock/2.5.0/retrofit-mock-2.5.0-sources.jar", + "mirror_urls": [ + "https://maven.google.com/com/squareup/retrofit2/retrofit-mock/2.5.0/retrofit-mock-2.5.0-sources.jar", + "https://repo1.maven.org/maven2/com/squareup/retrofit2/retrofit-mock/2.5.0/retrofit-mock-2.5.0-sources.jar", + "https://maven.fabric.io/public/com/squareup/retrofit2/retrofit-mock/2.5.0/retrofit-mock-2.5.0-sources.jar", + "https://maven.google.com/com/squareup/retrofit2/retrofit-mock/2.5.0/retrofit-mock-2.5.0-sources.jar", + "https://repo1.maven.org/maven2/com/squareup/retrofit2/retrofit-mock/2.5.0/retrofit-mock-2.5.0-sources.jar" + ], + "sha256": "e0423bab50f7097f02e5a9e874a630d3b31e49bba559c6e526e443cfeae5ad92", + "url": "https://repo1.maven.org/maven2/com/squareup/retrofit2/retrofit-mock/2.5.0/retrofit-mock-2.5.0-sources.jar" + }, + { + "coord": "com.squareup.retrofit2:retrofit:2.9.0", + "dependencies": [ + "com.squareup.okhttp3:okhttp:4.7.2" + ], + "directDependencies": [ + "com.squareup.okhttp3:okhttp:4.7.2" + ], + "file": "v1/https/repo1.maven.org/maven2/com/squareup/retrofit2/retrofit/2.9.0/retrofit-2.9.0.jar", + "mirror_urls": [ + "https://maven.google.com/com/squareup/retrofit2/retrofit/2.9.0/retrofit-2.9.0.jar", + "https://repo1.maven.org/maven2/com/squareup/retrofit2/retrofit/2.9.0/retrofit-2.9.0.jar", + "https://maven.fabric.io/public/com/squareup/retrofit2/retrofit/2.9.0/retrofit-2.9.0.jar", + "https://maven.google.com/com/squareup/retrofit2/retrofit/2.9.0/retrofit-2.9.0.jar", + "https://repo1.maven.org/maven2/com/squareup/retrofit2/retrofit/2.9.0/retrofit-2.9.0.jar" + ], + "sha256": "e6ea1929c46852f5bec66ab3357da383476cef4e8d1deefdbf195b79cc4d6581", + "url": "https://repo1.maven.org/maven2/com/squareup/retrofit2/retrofit/2.9.0/retrofit-2.9.0.jar" + }, + { + "coord": "com.squareup.retrofit2:retrofit:jar:sources:2.9.0", + "dependencies": [ + "com.squareup.okhttp3:okhttp:jar:sources:4.7.2" + ], + "directDependencies": [ + "com.squareup.okhttp3:okhttp:jar:sources:4.7.2" + ], + "file": "v1/https/repo1.maven.org/maven2/com/squareup/retrofit2/retrofit/2.9.0/retrofit-2.9.0-sources.jar", + "mirror_urls": [ + "https://maven.google.com/com/squareup/retrofit2/retrofit/2.9.0/retrofit-2.9.0-sources.jar", + "https://repo1.maven.org/maven2/com/squareup/retrofit2/retrofit/2.9.0/retrofit-2.9.0-sources.jar", + "https://maven.fabric.io/public/com/squareup/retrofit2/retrofit/2.9.0/retrofit-2.9.0-sources.jar", + "https://maven.google.com/com/squareup/retrofit2/retrofit/2.9.0/retrofit-2.9.0-sources.jar", + "https://repo1.maven.org/maven2/com/squareup/retrofit2/retrofit/2.9.0/retrofit-2.9.0-sources.jar" + ], + "sha256": "64dab37d8cdca9846df237e766a48251287c188e4ff0ac488d1664e7a6644f7a", + "url": "https://repo1.maven.org/maven2/com/squareup/retrofit2/retrofit/2.9.0/retrofit-2.9.0-sources.jar" + }, + { + "coord": "com.squareup:javapoet:1.11.1", + "dependencies": [], + "directDependencies": [], + "file": "v1/https/repo1.maven.org/maven2/com/squareup/javapoet/1.11.1/javapoet-1.11.1.jar", + "mirror_urls": [ + "https://maven.google.com/com/squareup/javapoet/1.11.1/javapoet-1.11.1.jar", + "https://repo1.maven.org/maven2/com/squareup/javapoet/1.11.1/javapoet-1.11.1.jar", + "https://maven.fabric.io/public/com/squareup/javapoet/1.11.1/javapoet-1.11.1.jar", + "https://maven.google.com/com/squareup/javapoet/1.11.1/javapoet-1.11.1.jar", + "https://repo1.maven.org/maven2/com/squareup/javapoet/1.11.1/javapoet-1.11.1.jar" + ], + "sha256": "9cbf2107be499ec6e95afd36b58e3ca122a24166cdd375732e51267d64058e90", + "url": "https://repo1.maven.org/maven2/com/squareup/javapoet/1.11.1/javapoet-1.11.1.jar" + }, + { + "coord": "com.squareup:javapoet:jar:sources:1.11.1", + "dependencies": [], + "directDependencies": [], + "file": "v1/https/repo1.maven.org/maven2/com/squareup/javapoet/1.11.1/javapoet-1.11.1-sources.jar", + "mirror_urls": [ + "https://maven.google.com/com/squareup/javapoet/1.11.1/javapoet-1.11.1-sources.jar", + "https://repo1.maven.org/maven2/com/squareup/javapoet/1.11.1/javapoet-1.11.1-sources.jar", + "https://maven.fabric.io/public/com/squareup/javapoet/1.11.1/javapoet-1.11.1-sources.jar", + "https://maven.google.com/com/squareup/javapoet/1.11.1/javapoet-1.11.1-sources.jar", + "https://repo1.maven.org/maven2/com/squareup/javapoet/1.11.1/javapoet-1.11.1-sources.jar" + ], + "sha256": "63d3187d924582b1afe9eb171e725d27a7e15603513890de0f8804a7fc07e9ac", + "url": "https://repo1.maven.org/maven2/com/squareup/javapoet/1.11.1/javapoet-1.11.1-sources.jar" + }, + { + "coord": "com.squareup:javawriter:2.1.1", + "dependencies": [], + "directDependencies": [], + "file": "v1/https/repo1.maven.org/maven2/com/squareup/javawriter/2.1.1/javawriter-2.1.1.jar", + "mirror_urls": [ + "https://maven.google.com/com/squareup/javawriter/2.1.1/javawriter-2.1.1.jar", + "https://repo1.maven.org/maven2/com/squareup/javawriter/2.1.1/javawriter-2.1.1.jar", + "https://maven.fabric.io/public/com/squareup/javawriter/2.1.1/javawriter-2.1.1.jar", + "https://maven.google.com/com/squareup/javawriter/2.1.1/javawriter-2.1.1.jar", + "https://repo1.maven.org/maven2/com/squareup/javawriter/2.1.1/javawriter-2.1.1.jar" ], - "sha256": "e5d8e5cba11d8aca0261649c362fdee718e16ccc647124e55ee2e2c328be4c82", - "url": "https://repo1.maven.org/maven2/com/squareup/moshi/moshi-kotlin-codegen/1.11.0/moshi-kotlin-codegen-1.11.0.jar" + "sha256": "f699823d0081f69cbb676c1845ea222e0ada79bc88a53e5d22d8bd02d328f57e", + "url": "https://repo1.maven.org/maven2/com/squareup/javawriter/2.1.1/javawriter-2.1.1.jar" }, { - "coord": "com.squareup.moshi:moshi-kotlin-codegen:jar:sources:1.11.0", - "dependencies": [ - "com.google.auto.service:auto-service-annotations:jar:sources:1.0-rc7", - "org.jetbrains.kotlin:kotlin-stdlib:jar:sources:1.5.0", - "org.ow2.asm:asm:jar:sources:9.1", - "org.jetbrains.kotlin:kotlin-reflect:jar:sources:1.5.0", - "org.jetbrains.kotlin:kotlin-stdlib-jdk8:jar:sources:1.4.10", - "org.jetbrains.kotlin:kotlin-stdlib-jdk7:jar:sources:1.4.10", - "com.squareup:kotlinpoet:jar:sources:1.6.0", - "com.squareup.moshi:moshi:jar:sources:1.11.0", - "com.squareup.okio:okio:jar:sources:2.6.0", - "net.ltgt.gradle.incap:incap:jar:sources:0.3" - ], - "directDependencies": [ - "com.google.auto.service:auto-service-annotations:jar:sources:1.0-rc7", - "org.ow2.asm:asm:jar:sources:9.1", - "org.jetbrains.kotlin:kotlin-reflect:jar:sources:1.5.0", - "org.jetbrains.kotlin:kotlin-stdlib-jdk8:jar:sources:1.4.10", - "com.squareup:kotlinpoet:jar:sources:1.6.0", - "com.squareup.moshi:moshi:jar:sources:1.11.0", - "net.ltgt.gradle.incap:incap:jar:sources:0.3" - ], - "file": "v1/https/repo1.maven.org/maven2/com/squareup/moshi/moshi-kotlin-codegen/1.11.0/moshi-kotlin-codegen-1.11.0-sources.jar", + "coord": "com.squareup:javawriter:jar:sources:2.1.1", + "dependencies": [], + "directDependencies": [], + "file": "v1/https/repo1.maven.org/maven2/com/squareup/javawriter/2.1.1/javawriter-2.1.1-sources.jar", "mirror_urls": [ - "https://maven.google.com/com/squareup/moshi/moshi-kotlin-codegen/1.11.0/moshi-kotlin-codegen-1.11.0-sources.jar", - "https://repo1.maven.org/maven2/com/squareup/moshi/moshi-kotlin-codegen/1.11.0/moshi-kotlin-codegen-1.11.0-sources.jar", - "https://maven.fabric.io/public/com/squareup/moshi/moshi-kotlin-codegen/1.11.0/moshi-kotlin-codegen-1.11.0-sources.jar", - "https://maven.google.com/com/squareup/moshi/moshi-kotlin-codegen/1.11.0/moshi-kotlin-codegen-1.11.0-sources.jar", - "https://repo1.maven.org/maven2/com/squareup/moshi/moshi-kotlin-codegen/1.11.0/moshi-kotlin-codegen-1.11.0-sources.jar" + "https://maven.google.com/com/squareup/javawriter/2.1.1/javawriter-2.1.1-sources.jar", + "https://repo1.maven.org/maven2/com/squareup/javawriter/2.1.1/javawriter-2.1.1-sources.jar", + "https://maven.fabric.io/public/com/squareup/javawriter/2.1.1/javawriter-2.1.1-sources.jar", + "https://maven.google.com/com/squareup/javawriter/2.1.1/javawriter-2.1.1-sources.jar", + "https://repo1.maven.org/maven2/com/squareup/javawriter/2.1.1/javawriter-2.1.1-sources.jar" ], - "sha256": "c77fe938333fd96539aee34cdb8e923591f145ad727a2fb9ab250f527d85859c", - "url": "https://repo1.maven.org/maven2/com/squareup/moshi/moshi-kotlin-codegen/1.11.0/moshi-kotlin-codegen-1.11.0-sources.jar" + "sha256": "f57646206c5908c69342022c7b5ccbc15dbf605ce80421da3b96af9f86331e28", + "url": "https://repo1.maven.org/maven2/com/squareup/javawriter/2.1.1/javawriter-2.1.1-sources.jar" }, { - "coord": "com.squareup.moshi:moshi-kotlin:1.11.0", + "coord": "com.squareup:kotlinpoet:1.6.0", "dependencies": [ - "com.squareup.moshi:moshi:1.11.0", - "com.squareup.okio:okio:2.6.0", + "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.4.10", + "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.10", "org.jetbrains.kotlin:kotlin-reflect:1.5.0", "org.jetbrains.kotlin:kotlin-stdlib:1.5.0" ], "directDependencies": [ - "com.squareup.moshi:moshi:1.11.0", "org.jetbrains.kotlin:kotlin-reflect:1.5.0", - "org.jetbrains.kotlin:kotlin-stdlib:1.5.0" + "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.10" ], - "file": "v1/https/repo1.maven.org/maven2/com/squareup/moshi/moshi-kotlin/1.11.0/moshi-kotlin-1.11.0.jar", + "file": "v1/https/repo1.maven.org/maven2/com/squareup/kotlinpoet/1.6.0/kotlinpoet-1.6.0.jar", "mirror_urls": [ - "https://maven.google.com/com/squareup/moshi/moshi-kotlin/1.11.0/moshi-kotlin-1.11.0.jar", - "https://repo1.maven.org/maven2/com/squareup/moshi/moshi-kotlin/1.11.0/moshi-kotlin-1.11.0.jar", - "https://maven.fabric.io/public/com/squareup/moshi/moshi-kotlin/1.11.0/moshi-kotlin-1.11.0.jar", - "https://maven.google.com/com/squareup/moshi/moshi-kotlin/1.11.0/moshi-kotlin-1.11.0.jar", - "https://repo1.maven.org/maven2/com/squareup/moshi/moshi-kotlin/1.11.0/moshi-kotlin-1.11.0.jar" + "https://maven.google.com/com/squareup/kotlinpoet/1.6.0/kotlinpoet-1.6.0.jar", + "https://repo1.maven.org/maven2/com/squareup/kotlinpoet/1.6.0/kotlinpoet-1.6.0.jar", + "https://maven.fabric.io/public/com/squareup/kotlinpoet/1.6.0/kotlinpoet-1.6.0.jar", + "https://maven.google.com/com/squareup/kotlinpoet/1.6.0/kotlinpoet-1.6.0.jar", + "https://repo1.maven.org/maven2/com/squareup/kotlinpoet/1.6.0/kotlinpoet-1.6.0.jar" ], - "sha256": "220f3b85d99ea40ff65609813f3624fb4313de3634a747adb04040cf7cb486bc", - "url": "https://repo1.maven.org/maven2/com/squareup/moshi/moshi-kotlin/1.11.0/moshi-kotlin-1.11.0.jar" + "sha256": "8085eb4c8b1ece4f32259b22f26bf880bc47b74f548e29010b0146aa6b38f24b", + "url": "https://repo1.maven.org/maven2/com/squareup/kotlinpoet/1.6.0/kotlinpoet-1.6.0.jar" }, { - "coord": "com.squareup.moshi:moshi-kotlin:jar:sources:1.11.0", + "coord": "com.squareup:kotlinpoet:jar:sources:1.6.0", "dependencies": [ + "org.jetbrains.kotlin:kotlin-stdlib-jdk8:jar:sources:1.4.10", "org.jetbrains.kotlin:kotlin-stdlib:jar:sources:1.5.0", - "com.squareup.moshi:moshi:jar:sources:1.11.0", - "com.squareup.okio:okio:jar:sources:2.6.0", + "org.jetbrains.kotlin:kotlin-stdlib-jdk7:jar:sources:1.4.10", "org.jetbrains.kotlin:kotlin-reflect:jar:sources:1.5.0" ], "directDependencies": [ - "com.squareup.moshi:moshi:jar:sources:1.11.0", "org.jetbrains.kotlin:kotlin-reflect:jar:sources:1.5.0", - "org.jetbrains.kotlin:kotlin-stdlib:jar:sources:1.5.0" + "org.jetbrains.kotlin:kotlin-stdlib-jdk8:jar:sources:1.4.10" ], - "file": "v1/https/repo1.maven.org/maven2/com/squareup/moshi/moshi-kotlin/1.11.0/moshi-kotlin-1.11.0-sources.jar", + "file": "v1/https/repo1.maven.org/maven2/com/squareup/kotlinpoet/1.6.0/kotlinpoet-1.6.0-sources.jar", "mirror_urls": [ - "https://maven.google.com/com/squareup/moshi/moshi-kotlin/1.11.0/moshi-kotlin-1.11.0-sources.jar", - "https://repo1.maven.org/maven2/com/squareup/moshi/moshi-kotlin/1.11.0/moshi-kotlin-1.11.0-sources.jar", - "https://maven.fabric.io/public/com/squareup/moshi/moshi-kotlin/1.11.0/moshi-kotlin-1.11.0-sources.jar", - "https://maven.google.com/com/squareup/moshi/moshi-kotlin/1.11.0/moshi-kotlin-1.11.0-sources.jar", - "https://repo1.maven.org/maven2/com/squareup/moshi/moshi-kotlin/1.11.0/moshi-kotlin-1.11.0-sources.jar" + "https://maven.google.com/com/squareup/kotlinpoet/1.6.0/kotlinpoet-1.6.0-sources.jar", + "https://repo1.maven.org/maven2/com/squareup/kotlinpoet/1.6.0/kotlinpoet-1.6.0-sources.jar", + "https://maven.fabric.io/public/com/squareup/kotlinpoet/1.6.0/kotlinpoet-1.6.0-sources.jar", + "https://maven.google.com/com/squareup/kotlinpoet/1.6.0/kotlinpoet-1.6.0-sources.jar", + "https://repo1.maven.org/maven2/com/squareup/kotlinpoet/1.6.0/kotlinpoet-1.6.0-sources.jar" ], - "sha256": "8ff200ab30a6d222281eb3db17d6c8f1854d4bc9e2d5ccf1d237029cb448dbb2", - "url": "https://repo1.maven.org/maven2/com/squareup/moshi/moshi-kotlin/1.11.0/moshi-kotlin-1.11.0-sources.jar" + "sha256": "cca9ad8636922585e3f116a885c580890d6be1a19655b0916a54c1928a7f0840", + "url": "https://repo1.maven.org/maven2/com/squareup/kotlinpoet/1.6.0/kotlinpoet-1.6.0-sources.jar" }, { - "coord": "com.squareup.moshi:moshi:1.11.0", - "dependencies": [ - "com.squareup.okio:okio:2.6.0" - ], - "directDependencies": [ - "com.squareup.okio:okio:2.6.0" - ], - "file": "v1/https/repo1.maven.org/maven2/com/squareup/moshi/moshi/1.11.0/moshi-1.11.0.jar", + "coord": "commons-codec:commons-codec:1.10", + "dependencies": [], + "directDependencies": [], + "file": "v1/https/repo1.maven.org/maven2/commons-codec/commons-codec/1.10/commons-codec-1.10.jar", "mirror_urls": [ - "https://maven.google.com/com/squareup/moshi/moshi/1.11.0/moshi-1.11.0.jar", - "https://repo1.maven.org/maven2/com/squareup/moshi/moshi/1.11.0/moshi-1.11.0.jar", - "https://maven.fabric.io/public/com/squareup/moshi/moshi/1.11.0/moshi-1.11.0.jar", - "https://maven.google.com/com/squareup/moshi/moshi/1.11.0/moshi-1.11.0.jar", - "https://repo1.maven.org/maven2/com/squareup/moshi/moshi/1.11.0/moshi-1.11.0.jar" + "https://maven.google.com/commons-codec/commons-codec/1.10/commons-codec-1.10.jar", + "https://repo1.maven.org/maven2/commons-codec/commons-codec/1.10/commons-codec-1.10.jar", + "https://maven.fabric.io/public/commons-codec/commons-codec/1.10/commons-codec-1.10.jar", + "https://maven.google.com/commons-codec/commons-codec/1.10/commons-codec-1.10.jar", + "https://repo1.maven.org/maven2/commons-codec/commons-codec/1.10/commons-codec-1.10.jar" ], - "sha256": "b6ee64fb84a7486aa9983e20c75259d4931bd597c169e1e67c3bc0521fd03b27", - "url": "https://repo1.maven.org/maven2/com/squareup/moshi/moshi/1.11.0/moshi-1.11.0.jar" + "sha256": "4241dfa94e711d435f29a4604a3e2de5c4aa3c165e23bd066be6fc1fc4309569", + "url": "https://repo1.maven.org/maven2/commons-codec/commons-codec/1.10/commons-codec-1.10.jar" }, { - "coord": "com.squareup.moshi:moshi:jar:sources:1.11.0", - "dependencies": [ - "com.squareup.okio:okio:jar:sources:2.6.0" - ], - "directDependencies": [ - "com.squareup.okio:okio:jar:sources:2.6.0" - ], - "file": "v1/https/repo1.maven.org/maven2/com/squareup/moshi/moshi/1.11.0/moshi-1.11.0-sources.jar", + "coord": "commons-codec:commons-codec:jar:sources:1.10", + "dependencies": [], + "directDependencies": [], + "file": "v1/https/repo1.maven.org/maven2/commons-codec/commons-codec/1.10/commons-codec-1.10-sources.jar", "mirror_urls": [ - "https://maven.google.com/com/squareup/moshi/moshi/1.11.0/moshi-1.11.0-sources.jar", - "https://repo1.maven.org/maven2/com/squareup/moshi/moshi/1.11.0/moshi-1.11.0-sources.jar", - "https://maven.fabric.io/public/com/squareup/moshi/moshi/1.11.0/moshi-1.11.0-sources.jar", - "https://maven.google.com/com/squareup/moshi/moshi/1.11.0/moshi-1.11.0-sources.jar", - "https://repo1.maven.org/maven2/com/squareup/moshi/moshi/1.11.0/moshi-1.11.0-sources.jar" + "https://maven.google.com/commons-codec/commons-codec/1.10/commons-codec-1.10-sources.jar", + "https://repo1.maven.org/maven2/commons-codec/commons-codec/1.10/commons-codec-1.10-sources.jar", + "https://maven.fabric.io/public/commons-codec/commons-codec/1.10/commons-codec-1.10-sources.jar", + "https://maven.google.com/commons-codec/commons-codec/1.10/commons-codec-1.10-sources.jar", + "https://repo1.maven.org/maven2/commons-codec/commons-codec/1.10/commons-codec-1.10-sources.jar" ], - "sha256": "ca8cbe76fb144ea7f274f914adfa51b932f390a67a16bf1f71f9b254303d4729", - "url": "https://repo1.maven.org/maven2/com/squareup/moshi/moshi/1.11.0/moshi-1.11.0-sources.jar" + "sha256": "dfae68268ce86f1a18fc45b99317c13d6c9d252f001d37961e79a51076808986", + "url": "https://repo1.maven.org/maven2/commons-codec/commons-codec/1.10/commons-codec-1.10-sources.jar" }, { - "coord": "com.squareup.okhttp3:mockwebserver:4.7.2", - "dependencies": [ - "org.hamcrest:hamcrest-core:1.3", - "org.jetbrains.kotlin:kotlin-stdlib-common:1.5.0", - "com.squareup.okio:okio:2.6.0", - "org.jetbrains.kotlin:kotlin-stdlib:1.5.0", - "junit:junit:4.13.2", - "com.squareup.okhttp3:okhttp:4.7.2" - ], - "directDependencies": [ - "com.squareup.okhttp3:okhttp:4.7.2", - "junit:junit:4.13.2" - ], - "file": "v1/https/repo1.maven.org/maven2/com/squareup/okhttp3/mockwebserver/4.7.2/mockwebserver-4.7.2.jar", + "coord": "commons-io:commons-io:2.4", + "dependencies": [], + "directDependencies": [], + "file": "v1/https/repo1.maven.org/maven2/commons-io/commons-io/2.4/commons-io-2.4.jar", "mirror_urls": [ - "https://maven.google.com/com/squareup/okhttp3/mockwebserver/4.7.2/mockwebserver-4.7.2.jar", - "https://repo1.maven.org/maven2/com/squareup/okhttp3/mockwebserver/4.7.2/mockwebserver-4.7.2.jar", - "https://maven.fabric.io/public/com/squareup/okhttp3/mockwebserver/4.7.2/mockwebserver-4.7.2.jar", - "https://maven.google.com/com/squareup/okhttp3/mockwebserver/4.7.2/mockwebserver-4.7.2.jar", - "https://repo1.maven.org/maven2/com/squareup/okhttp3/mockwebserver/4.7.2/mockwebserver-4.7.2.jar" + "https://maven.google.com/commons-io/commons-io/2.4/commons-io-2.4.jar", + "https://repo1.maven.org/maven2/commons-io/commons-io/2.4/commons-io-2.4.jar", + "https://maven.fabric.io/public/commons-io/commons-io/2.4/commons-io-2.4.jar", + "https://maven.google.com/commons-io/commons-io/2.4/commons-io-2.4.jar", + "https://repo1.maven.org/maven2/commons-io/commons-io/2.4/commons-io-2.4.jar" ], - "sha256": "d7d08b5096336d5b5a27d0e91bb2ebfa7dd54e48c3bb1e3cba15cc9bf16526b7", - "url": "https://repo1.maven.org/maven2/com/squareup/okhttp3/mockwebserver/4.7.2/mockwebserver-4.7.2.jar" + "sha256": "cc6a41dc3eaacc9e440a6bd0d2890b20d36b4ee408fe2d67122f328bb6e01581", + "url": "https://repo1.maven.org/maven2/commons-io/commons-io/2.4/commons-io-2.4.jar" }, { - "coord": "com.squareup.okhttp3:mockwebserver:jar:sources:4.7.2", - "dependencies": [ - "com.squareup.okhttp3:okhttp:jar:sources:4.7.2", - "org.jetbrains.kotlin:kotlin-stdlib:jar:sources:1.5.0", - "org.jetbrains.kotlin:kotlin-stdlib-common:jar:sources:1.5.0", - "junit:junit:jar:sources:4.13.2", - "org.hamcrest:hamcrest-core:jar:sources:1.3", - "com.squareup.okio:okio:jar:sources:2.6.0" - ], - "directDependencies": [ - "com.squareup.okhttp3:okhttp:jar:sources:4.7.2", - "junit:junit:jar:sources:4.13.2" - ], - "file": "v1/https/repo1.maven.org/maven2/com/squareup/okhttp3/mockwebserver/4.7.2/mockwebserver-4.7.2-sources.jar", + "coord": "commons-io:commons-io:jar:sources:2.4", + "dependencies": [], + "directDependencies": [], + "file": "v1/https/repo1.maven.org/maven2/commons-io/commons-io/2.4/commons-io-2.4-sources.jar", "mirror_urls": [ - "https://maven.google.com/com/squareup/okhttp3/mockwebserver/4.7.2/mockwebserver-4.7.2-sources.jar", - "https://repo1.maven.org/maven2/com/squareup/okhttp3/mockwebserver/4.7.2/mockwebserver-4.7.2-sources.jar", - "https://maven.fabric.io/public/com/squareup/okhttp3/mockwebserver/4.7.2/mockwebserver-4.7.2-sources.jar", - "https://maven.google.com/com/squareup/okhttp3/mockwebserver/4.7.2/mockwebserver-4.7.2-sources.jar", - "https://repo1.maven.org/maven2/com/squareup/okhttp3/mockwebserver/4.7.2/mockwebserver-4.7.2-sources.jar" + "https://maven.google.com/commons-io/commons-io/2.4/commons-io-2.4-sources.jar", + "https://repo1.maven.org/maven2/commons-io/commons-io/2.4/commons-io-2.4-sources.jar", + "https://maven.fabric.io/public/commons-io/commons-io/2.4/commons-io-2.4-sources.jar", + "https://maven.google.com/commons-io/commons-io/2.4/commons-io-2.4-sources.jar", + "https://repo1.maven.org/maven2/commons-io/commons-io/2.4/commons-io-2.4-sources.jar" ], - "sha256": "c5bc89a4ba5429b68713443e0dc625e0bd073e2c4b06a7b6c6c643d4ce29e32b", - "url": "https://repo1.maven.org/maven2/com/squareup/okhttp3/mockwebserver/4.7.2/mockwebserver-4.7.2-sources.jar" + "sha256": "d4635b348bbbf3f166d972b052bc4cac5b326c133beed7b8a1cab7ea22b61e01", + "url": "https://repo1.maven.org/maven2/commons-io/commons-io/2.4/commons-io-2.4-sources.jar" }, { - "coord": "com.squareup.okhttp3:okhttp:4.7.2", - "dependencies": [ - "com.squareup.okio:okio:2.6.0", - "org.jetbrains.kotlin:kotlin-stdlib-common:1.5.0", - "org.jetbrains.kotlin:kotlin-stdlib:1.5.0" - ], - "directDependencies": [ - "com.squareup.okio:okio:2.6.0", - "org.jetbrains.kotlin:kotlin-stdlib:1.5.0" + "coord": "de.hdodenhof:circleimageview:3.0.1", + "dependencies": [], + "directDependencies": [], + "file": "v1/https/repo1.maven.org/maven2/de/hdodenhof/circleimageview/3.0.1/circleimageview-3.0.1.aar", + "mirror_urls": [ + "https://maven.google.com/de/hdodenhof/circleimageview/3.0.1/circleimageview-3.0.1.aar", + "https://repo1.maven.org/maven2/de/hdodenhof/circleimageview/3.0.1/circleimageview-3.0.1.aar", + "https://maven.fabric.io/public/de/hdodenhof/circleimageview/3.0.1/circleimageview-3.0.1.aar", + "https://maven.google.com/de/hdodenhof/circleimageview/3.0.1/circleimageview-3.0.1.aar", + "https://repo1.maven.org/maven2/de/hdodenhof/circleimageview/3.0.1/circleimageview-3.0.1.aar" ], - "file": "v1/https/repo1.maven.org/maven2/com/squareup/okhttp3/okhttp/4.7.2/okhttp-4.7.2.jar", + "sha256": "7b0f088436ad4dcbb36d779fd09bf2192d9cc1e1a734bb6337904a7648f97617", + "url": "https://repo1.maven.org/maven2/de/hdodenhof/circleimageview/3.0.1/circleimageview-3.0.1.aar" + }, + { + "coord": "de.hdodenhof:circleimageview:jar:sources:3.0.1", + "dependencies": [], + "directDependencies": [], + "file": "v1/https/repo1.maven.org/maven2/de/hdodenhof/circleimageview/3.0.1/circleimageview-3.0.1-sources.jar", "mirror_urls": [ - "https://maven.google.com/com/squareup/okhttp3/okhttp/4.7.2/okhttp-4.7.2.jar", - "https://repo1.maven.org/maven2/com/squareup/okhttp3/okhttp/4.7.2/okhttp-4.7.2.jar", - "https://maven.fabric.io/public/com/squareup/okhttp3/okhttp/4.7.2/okhttp-4.7.2.jar", - "https://maven.google.com/com/squareup/okhttp3/okhttp/4.7.2/okhttp-4.7.2.jar", - "https://repo1.maven.org/maven2/com/squareup/okhttp3/okhttp/4.7.2/okhttp-4.7.2.jar" + "https://maven.google.com/de/hdodenhof/circleimageview/3.0.1/circleimageview-3.0.1-sources.jar", + "https://repo1.maven.org/maven2/de/hdodenhof/circleimageview/3.0.1/circleimageview-3.0.1-sources.jar", + "https://maven.fabric.io/public/de/hdodenhof/circleimageview/3.0.1/circleimageview-3.0.1-sources.jar", + "https://maven.google.com/de/hdodenhof/circleimageview/3.0.1/circleimageview-3.0.1-sources.jar", + "https://repo1.maven.org/maven2/de/hdodenhof/circleimageview/3.0.1/circleimageview-3.0.1-sources.jar" ], - "sha256": "6b64ca1d2069751242984537d5de2cbe627ae000430f5117c47d8cb3d272facd", - "url": "https://repo1.maven.org/maven2/com/squareup/okhttp3/okhttp/4.7.2/okhttp-4.7.2.jar" + "sha256": "41ac0df4f7bab17c56b075a0c802a6f0b6d9013831d409556fdcd56bdb8a460b", + "url": "https://repo1.maven.org/maven2/de/hdodenhof/circleimageview/3.0.1/circleimageview-3.0.1-sources.jar" }, { - "coord": "com.squareup.okhttp3:okhttp:jar:sources:4.7.2", - "dependencies": [ - "org.jetbrains.kotlin:kotlin-stdlib:jar:sources:1.5.0", - "com.squareup.okio:okio:jar:sources:2.6.0", - "org.jetbrains.kotlin:kotlin-stdlib-common:jar:sources:1.5.0" - ], - "directDependencies": [ - "com.squareup.okio:okio:jar:sources:2.6.0", - "org.jetbrains.kotlin:kotlin-stdlib:jar:sources:1.5.0" - ], - "file": "v1/https/repo1.maven.org/maven2/com/squareup/okhttp3/okhttp/4.7.2/okhttp-4.7.2-sources.jar", + "coord": "io.fabric.sdk.android:fabric:1.4.7", + "dependencies": [], + "directDependencies": [], + "file": "v1/https/maven.google.com/io/fabric/sdk/android/fabric/1.4.7/fabric-1.4.7.aar", "mirror_urls": [ - "https://maven.google.com/com/squareup/okhttp3/okhttp/4.7.2/okhttp-4.7.2-sources.jar", - "https://repo1.maven.org/maven2/com/squareup/okhttp3/okhttp/4.7.2/okhttp-4.7.2-sources.jar", - "https://maven.fabric.io/public/com/squareup/okhttp3/okhttp/4.7.2/okhttp-4.7.2-sources.jar", - "https://maven.google.com/com/squareup/okhttp3/okhttp/4.7.2/okhttp-4.7.2-sources.jar", - "https://repo1.maven.org/maven2/com/squareup/okhttp3/okhttp/4.7.2/okhttp-4.7.2-sources.jar" + "https://maven.google.com/io/fabric/sdk/android/fabric/1.4.7/fabric-1.4.7.aar", + "https://repo1.maven.org/maven2/io/fabric/sdk/android/fabric/1.4.7/fabric-1.4.7.aar", + "https://maven.fabric.io/public/io/fabric/sdk/android/fabric/1.4.7/fabric-1.4.7.aar", + "https://maven.google.com/io/fabric/sdk/android/fabric/1.4.7/fabric-1.4.7.aar", + "https://repo1.maven.org/maven2/io/fabric/sdk/android/fabric/1.4.7/fabric-1.4.7.aar" ], - "sha256": "88348cf944f841a7a8f5f38960474592e0c1ed8a53349cabe05b22d255479772", - "url": "https://repo1.maven.org/maven2/com/squareup/okhttp3/okhttp/4.7.2/okhttp-4.7.2-sources.jar" + "sha256": "36df4b321ec95e31226ff5abaae73e66f3a99dedddbc2d03054c4e141c8aaa5c", + "url": "https://maven.google.com/io/fabric/sdk/android/fabric/1.4.7/fabric-1.4.7.aar" }, { - "coord": "com.squareup.okio:okio:2.6.0", + "coord": "io.grpc:grpc-android:aar:1.44.1", "dependencies": [ - "org.jetbrains.kotlin:kotlin-stdlib-common:1.5.0", - "org.jetbrains.kotlin:kotlin-stdlib:1.5.0" + "com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava", + "io.grpc:grpc-core:1.44.1", + "com.google.j2objc:j2objc-annotations:1.3", + "com.google.code.findbugs:jsr305:3.0.2", + "com.google.android:annotations:4.1.1.4", + "com.google.guava:guava:30.1.1-android", + "org.codehaus.mojo:animal-sniffer-annotations:1.19", + "io.perfmark:perfmark-api:0.23.0", + "com.google.errorprone:error_prone_annotations:2.9.0", + "com.google.guava:failureaccess:1.0.1", + "io.grpc:grpc-api:1.44.1", + "com.google.code.gson:gson:2.8.9", + "org.checkerframework:checker-compat-qual:2.5.5" ], "directDependencies": [ - "org.jetbrains.kotlin:kotlin-stdlib:1.5.0", - "org.jetbrains.kotlin:kotlin-stdlib-common:1.5.0" + "com.google.guava:guava:30.1.1-android", + "io.grpc:grpc-core:1.44.1" ], - "file": "v1/https/repo1.maven.org/maven2/com/squareup/okio/okio/2.6.0/okio-2.6.0.jar", + "file": "v1/https/repo1.maven.org/maven2/io/grpc/grpc-android/1.44.1/grpc-android-1.44.1.aar", "mirror_urls": [ - "https://maven.google.com/com/squareup/okio/okio/2.6.0/okio-2.6.0.jar", - "https://repo1.maven.org/maven2/com/squareup/okio/okio/2.6.0/okio-2.6.0.jar", - "https://maven.fabric.io/public/com/squareup/okio/okio/2.6.0/okio-2.6.0.jar", - "https://maven.google.com/com/squareup/okio/okio/2.6.0/okio-2.6.0.jar", - "https://repo1.maven.org/maven2/com/squareup/okio/okio/2.6.0/okio-2.6.0.jar" + "https://maven.google.com/io/grpc/grpc-android/1.44.1/grpc-android-1.44.1.aar", + "https://repo1.maven.org/maven2/io/grpc/grpc-android/1.44.1/grpc-android-1.44.1.aar", + "https://maven.fabric.io/public/io/grpc/grpc-android/1.44.1/grpc-android-1.44.1.aar", + "https://maven.google.com/io/grpc/grpc-android/1.44.1/grpc-android-1.44.1.aar", + "https://repo1.maven.org/maven2/io/grpc/grpc-android/1.44.1/grpc-android-1.44.1.aar" ], - "sha256": "4d84ef686277b58eb05691ac19cd3befa3429a27274982ee65ea0f07044bcc00", - "url": "https://repo1.maven.org/maven2/com/squareup/okio/okio/2.6.0/okio-2.6.0.jar" + "sha256": "5a2d9a295c6e77cb4e615ed4519edcae2432b7828cac2cc1a8ee798cffb43c9a", + "url": "https://repo1.maven.org/maven2/io/grpc/grpc-android/1.44.1/grpc-android-1.44.1.aar" }, { - "coord": "com.squareup.okio:okio:jar:sources:2.6.0", + "coord": "io.grpc:grpc-android:aar:sources:1.44.1", "dependencies": [ - "org.jetbrains.kotlin:kotlin-stdlib:jar:sources:1.5.0", - "org.jetbrains.kotlin:kotlin-stdlib-common:jar:sources:1.5.0" + "io.grpc:grpc-api:jar:sources:1.44.1", + "com.google.guava:guava:jar:sources:30.1.1-android", + "com.google.code.findbugs:jsr305:jar:sources:3.0.2", + "com.google.android:annotations:jar:sources:4.1.1.4", + "com.google.j2objc:j2objc-annotations:jar:sources:1.3", + "com.google.code.gson:gson:jar:sources:2.8.9", + "org.checkerframework:checker-compat-qual:jar:sources:2.5.5", + "com.google.guava:listenablefuture:jar:sources:9999.0-empty-to-avoid-conflict-with-guava", + "io.grpc:grpc-core:jar:sources:1.44.1", + "com.google.guava:failureaccess:jar:sources:1.0.1", + "com.google.errorprone:error_prone_annotations:jar:sources:2.9.0", + "io.perfmark:perfmark-api:jar:sources:0.23.0", + "org.codehaus.mojo:animal-sniffer-annotations:jar:sources:1.19" ], "directDependencies": [ - "org.jetbrains.kotlin:kotlin-stdlib:jar:sources:1.5.0", - "org.jetbrains.kotlin:kotlin-stdlib-common:jar:sources:1.5.0" + "com.google.guava:guava:jar:sources:30.1.1-android", + "io.grpc:grpc-core:jar:sources:1.44.1" ], - "file": "v1/https/repo1.maven.org/maven2/com/squareup/okio/okio/2.6.0/okio-2.6.0-sources.jar", + "file": "v1/https/repo1.maven.org/maven2/io/grpc/grpc-android/1.44.1/grpc-android-1.44.1-sources.jar", "mirror_urls": [ - "https://maven.google.com/com/squareup/okio/okio/2.6.0/okio-2.6.0-sources.jar", - "https://repo1.maven.org/maven2/com/squareup/okio/okio/2.6.0/okio-2.6.0-sources.jar", - "https://maven.fabric.io/public/com/squareup/okio/okio/2.6.0/okio-2.6.0-sources.jar", - "https://maven.google.com/com/squareup/okio/okio/2.6.0/okio-2.6.0-sources.jar", - "https://repo1.maven.org/maven2/com/squareup/okio/okio/2.6.0/okio-2.6.0-sources.jar" + "https://maven.google.com/io/grpc/grpc-android/1.44.1/grpc-android-1.44.1-sources.jar", + "https://repo1.maven.org/maven2/io/grpc/grpc-android/1.44.1/grpc-android-1.44.1-sources.jar", + "https://maven.fabric.io/public/io/grpc/grpc-android/1.44.1/grpc-android-1.44.1-sources.jar", + "https://maven.google.com/io/grpc/grpc-android/1.44.1/grpc-android-1.44.1-sources.jar", + "https://repo1.maven.org/maven2/io/grpc/grpc-android/1.44.1/grpc-android-1.44.1-sources.jar" ], - "sha256": "bffda723f6706a29a0406993bd5262ecc4459460baa1b248147e03a3c55b62b4", - "url": "https://repo1.maven.org/maven2/com/squareup/okio/okio/2.6.0/okio-2.6.0-sources.jar" + "sha256": "5239c86a9b850883859275886416c2c8b36eed070201058c538e1e4bdd016f5a", + "url": "https://repo1.maven.org/maven2/io/grpc/grpc-android/1.44.1/grpc-android-1.44.1-sources.jar" }, { - "coord": "com.squareup.retrofit2:converter-moshi:2.5.0", + "coord": "io.grpc:grpc-api:1.44.1", "dependencies": [ - "com.squareup.retrofit2:retrofit:2.9.0", - "com.squareup.moshi:moshi:1.11.0" + "com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava", + "com.google.j2objc:j2objc-annotations:1.3", + "com.google.code.findbugs:jsr305:3.0.2", + "com.google.guava:guava:30.1.1-android", + "com.google.errorprone:error_prone_annotations:2.9.0", + "io.grpc:grpc-context:1.44.1", + "com.google.guava:failureaccess:1.0.1", + "org.checkerframework:checker-compat-qual:2.5.5" ], "directDependencies": [ - "com.squareup.moshi:moshi:1.11.0", - "com.squareup.retrofit2:retrofit:2.9.0" + "com.google.code.findbugs:jsr305:3.0.2", + "com.google.errorprone:error_prone_annotations:2.9.0", + "com.google.guava:guava:30.1.1-android", + "io.grpc:grpc-context:1.44.1" ], - "file": "v1/https/repo1.maven.org/maven2/com/squareup/retrofit2/converter-moshi/2.5.0/converter-moshi-2.5.0.jar", + "file": "v1/https/repo1.maven.org/maven2/io/grpc/grpc-api/1.44.1/grpc-api-1.44.1.jar", "mirror_urls": [ - "https://maven.google.com/com/squareup/retrofit2/converter-moshi/2.5.0/converter-moshi-2.5.0.jar", - "https://repo1.maven.org/maven2/com/squareup/retrofit2/converter-moshi/2.5.0/converter-moshi-2.5.0.jar", - "https://maven.fabric.io/public/com/squareup/retrofit2/converter-moshi/2.5.0/converter-moshi-2.5.0.jar", - "https://maven.google.com/com/squareup/retrofit2/converter-moshi/2.5.0/converter-moshi-2.5.0.jar", - "https://repo1.maven.org/maven2/com/squareup/retrofit2/converter-moshi/2.5.0/converter-moshi-2.5.0.jar" + "https://maven.google.com/io/grpc/grpc-api/1.44.1/grpc-api-1.44.1.jar", + "https://repo1.maven.org/maven2/io/grpc/grpc-api/1.44.1/grpc-api-1.44.1.jar", + "https://maven.fabric.io/public/io/grpc/grpc-api/1.44.1/grpc-api-1.44.1.jar", + "https://maven.google.com/io/grpc/grpc-api/1.44.1/grpc-api-1.44.1.jar", + "https://repo1.maven.org/maven2/io/grpc/grpc-api/1.44.1/grpc-api-1.44.1.jar" ], - "sha256": "6bade0b754a7b8b7551e2208cb8227e697c2db553b8f12df6f1aa70c6f058600", - "url": "https://repo1.maven.org/maven2/com/squareup/retrofit2/converter-moshi/2.5.0/converter-moshi-2.5.0.jar" + "sha256": "5d2bd58e4003e6b8440b3596c0809ef5c651594d62943edb459d5fa82273bd2f", + "url": "https://repo1.maven.org/maven2/io/grpc/grpc-api/1.44.1/grpc-api-1.44.1.jar" }, { - "coord": "com.squareup.retrofit2:converter-moshi:jar:sources:2.5.0", + "coord": "io.grpc:grpc-api:jar:sources:1.44.1", "dependencies": [ - "com.squareup.retrofit2:retrofit:jar:sources:2.9.0", - "com.squareup.moshi:moshi:jar:sources:1.11.0" + "com.google.guava:guava:jar:sources:30.1.1-android", + "com.google.code.findbugs:jsr305:jar:sources:3.0.2", + "com.google.j2objc:j2objc-annotations:jar:sources:1.3", + "org.checkerframework:checker-compat-qual:jar:sources:2.5.5", + "com.google.guava:listenablefuture:jar:sources:9999.0-empty-to-avoid-conflict-with-guava", + "com.google.guava:failureaccess:jar:sources:1.0.1", + "com.google.errorprone:error_prone_annotations:jar:sources:2.9.0", + "io.grpc:grpc-context:jar:sources:1.44.1" ], "directDependencies": [ - "com.squareup.moshi:moshi:jar:sources:1.11.0", - "com.squareup.retrofit2:retrofit:jar:sources:2.9.0" + "com.google.code.findbugs:jsr305:jar:sources:3.0.2", + "com.google.errorprone:error_prone_annotations:jar:sources:2.9.0", + "com.google.guava:guava:jar:sources:30.1.1-android", + "io.grpc:grpc-context:jar:sources:1.44.1" ], - "file": "v1/https/repo1.maven.org/maven2/com/squareup/retrofit2/converter-moshi/2.5.0/converter-moshi-2.5.0-sources.jar", + "file": "v1/https/repo1.maven.org/maven2/io/grpc/grpc-api/1.44.1/grpc-api-1.44.1-sources.jar", "mirror_urls": [ - "https://maven.google.com/com/squareup/retrofit2/converter-moshi/2.5.0/converter-moshi-2.5.0-sources.jar", - "https://repo1.maven.org/maven2/com/squareup/retrofit2/converter-moshi/2.5.0/converter-moshi-2.5.0-sources.jar", - "https://maven.fabric.io/public/com/squareup/retrofit2/converter-moshi/2.5.0/converter-moshi-2.5.0-sources.jar", - "https://maven.google.com/com/squareup/retrofit2/converter-moshi/2.5.0/converter-moshi-2.5.0-sources.jar", - "https://repo1.maven.org/maven2/com/squareup/retrofit2/converter-moshi/2.5.0/converter-moshi-2.5.0-sources.jar" + "https://maven.google.com/io/grpc/grpc-api/1.44.1/grpc-api-1.44.1-sources.jar", + "https://repo1.maven.org/maven2/io/grpc/grpc-api/1.44.1/grpc-api-1.44.1-sources.jar", + "https://maven.fabric.io/public/io/grpc/grpc-api/1.44.1/grpc-api-1.44.1-sources.jar", + "https://maven.google.com/io/grpc/grpc-api/1.44.1/grpc-api-1.44.1-sources.jar", + "https://repo1.maven.org/maven2/io/grpc/grpc-api/1.44.1/grpc-api-1.44.1-sources.jar" ], - "sha256": "d36be44932f400577eccd3c060543e74c8be651b245ad9d5c96fbb79a5ecbf03", - "url": "https://repo1.maven.org/maven2/com/squareup/retrofit2/converter-moshi/2.5.0/converter-moshi-2.5.0-sources.jar" + "sha256": "4439a930dd79c5218fa39aa3fdfd570a8bef99de2aaa4437b3b787d4da1ae6f0", + "url": "https://repo1.maven.org/maven2/io/grpc/grpc-api/1.44.1/grpc-api-1.44.1-sources.jar" }, { - "coord": "com.squareup.retrofit2:retrofit-mock:2.5.0", - "dependencies": [ - "com.squareup.retrofit2:retrofit:2.9.0" - ], - "directDependencies": [ - "com.squareup.retrofit2:retrofit:2.9.0" + "coord": "io.grpc:grpc-context:1.44.1", + "dependencies": [], + "directDependencies": [], + "file": "v1/https/repo1.maven.org/maven2/io/grpc/grpc-context/1.44.1/grpc-context-1.44.1.jar", + "mirror_urls": [ + "https://maven.google.com/io/grpc/grpc-context/1.44.1/grpc-context-1.44.1.jar", + "https://repo1.maven.org/maven2/io/grpc/grpc-context/1.44.1/grpc-context-1.44.1.jar", + "https://maven.fabric.io/public/io/grpc/grpc-context/1.44.1/grpc-context-1.44.1.jar", + "https://maven.google.com/io/grpc/grpc-context/1.44.1/grpc-context-1.44.1.jar", + "https://repo1.maven.org/maven2/io/grpc/grpc-context/1.44.1/grpc-context-1.44.1.jar" ], - "file": "v1/https/repo1.maven.org/maven2/com/squareup/retrofit2/retrofit-mock/2.5.0/retrofit-mock-2.5.0.jar", + "sha256": "97059fef9e325ecfcc30429921916ebaccd436cf5601af4d706ef1f613f5ea85", + "url": "https://repo1.maven.org/maven2/io/grpc/grpc-context/1.44.1/grpc-context-1.44.1.jar" + }, + { + "coord": "io.grpc:grpc-context:jar:sources:1.44.1", + "dependencies": [], + "directDependencies": [], + "file": "v1/https/repo1.maven.org/maven2/io/grpc/grpc-context/1.44.1/grpc-context-1.44.1-sources.jar", "mirror_urls": [ - "https://maven.google.com/com/squareup/retrofit2/retrofit-mock/2.5.0/retrofit-mock-2.5.0.jar", - "https://repo1.maven.org/maven2/com/squareup/retrofit2/retrofit-mock/2.5.0/retrofit-mock-2.5.0.jar", - "https://maven.fabric.io/public/com/squareup/retrofit2/retrofit-mock/2.5.0/retrofit-mock-2.5.0.jar", - "https://maven.google.com/com/squareup/retrofit2/retrofit-mock/2.5.0/retrofit-mock-2.5.0.jar", - "https://repo1.maven.org/maven2/com/squareup/retrofit2/retrofit-mock/2.5.0/retrofit-mock-2.5.0.jar" + "https://maven.google.com/io/grpc/grpc-context/1.44.1/grpc-context-1.44.1-sources.jar", + "https://repo1.maven.org/maven2/io/grpc/grpc-context/1.44.1/grpc-context-1.44.1-sources.jar", + "https://maven.fabric.io/public/io/grpc/grpc-context/1.44.1/grpc-context-1.44.1-sources.jar", + "https://maven.google.com/io/grpc/grpc-context/1.44.1/grpc-context-1.44.1-sources.jar", + "https://repo1.maven.org/maven2/io/grpc/grpc-context/1.44.1/grpc-context-1.44.1-sources.jar" ], - "sha256": "00692755410b4367c7c12e6e4aadd3b1a28b5169e8961d94bc27ab36ece9bf29", - "url": "https://repo1.maven.org/maven2/com/squareup/retrofit2/retrofit-mock/2.5.0/retrofit-mock-2.5.0.jar" + "sha256": "6b30014c6be890bd7c1ea08aefde722deb29a6b48b404315d4d58f6bff5d85a0", + "url": "https://repo1.maven.org/maven2/io/grpc/grpc-context/1.44.1/grpc-context-1.44.1-sources.jar" }, { - "coord": "com.squareup.retrofit2:retrofit-mock:jar:sources:2.5.0", + "coord": "io.grpc:grpc-core:1.44.1", "dependencies": [ - "com.squareup.retrofit2:retrofit:jar:sources:2.9.0" + "com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava", + "com.google.j2objc:j2objc-annotations:1.3", + "com.google.code.findbugs:jsr305:3.0.2", + "com.google.android:annotations:4.1.1.4", + "com.google.guava:guava:30.1.1-android", + "org.codehaus.mojo:animal-sniffer-annotations:1.19", + "io.perfmark:perfmark-api:0.23.0", + "com.google.errorprone:error_prone_annotations:2.9.0", + "com.google.guava:failureaccess:1.0.1", + "io.grpc:grpc-api:1.44.1", + "com.google.code.gson:gson:2.8.9", + "org.checkerframework:checker-compat-qual:2.5.5" ], "directDependencies": [ - "com.squareup.retrofit2:retrofit:jar:sources:2.9.0" + "com.google.android:annotations:4.1.1.4", + "com.google.guava:guava:30.1.1-android", + "org.codehaus.mojo:animal-sniffer-annotations:1.19", + "io.perfmark:perfmark-api:0.23.0", + "com.google.errorprone:error_prone_annotations:2.9.0", + "io.grpc:grpc-api:1.44.1", + "com.google.code.gson:gson:2.8.9" ], - "file": "v1/https/repo1.maven.org/maven2/com/squareup/retrofit2/retrofit-mock/2.5.0/retrofit-mock-2.5.0-sources.jar", + "file": "v1/https/repo1.maven.org/maven2/io/grpc/grpc-core/1.44.1/grpc-core-1.44.1.jar", "mirror_urls": [ - "https://maven.google.com/com/squareup/retrofit2/retrofit-mock/2.5.0/retrofit-mock-2.5.0-sources.jar", - "https://repo1.maven.org/maven2/com/squareup/retrofit2/retrofit-mock/2.5.0/retrofit-mock-2.5.0-sources.jar", - "https://maven.fabric.io/public/com/squareup/retrofit2/retrofit-mock/2.5.0/retrofit-mock-2.5.0-sources.jar", - "https://maven.google.com/com/squareup/retrofit2/retrofit-mock/2.5.0/retrofit-mock-2.5.0-sources.jar", - "https://repo1.maven.org/maven2/com/squareup/retrofit2/retrofit-mock/2.5.0/retrofit-mock-2.5.0-sources.jar" + "https://maven.google.com/io/grpc/grpc-core/1.44.1/grpc-core-1.44.1.jar", + "https://repo1.maven.org/maven2/io/grpc/grpc-core/1.44.1/grpc-core-1.44.1.jar", + "https://maven.fabric.io/public/io/grpc/grpc-core/1.44.1/grpc-core-1.44.1.jar", + "https://maven.google.com/io/grpc/grpc-core/1.44.1/grpc-core-1.44.1.jar", + "https://repo1.maven.org/maven2/io/grpc/grpc-core/1.44.1/grpc-core-1.44.1.jar" ], - "sha256": "e0423bab50f7097f02e5a9e874a630d3b31e49bba559c6e526e443cfeae5ad92", - "url": "https://repo1.maven.org/maven2/com/squareup/retrofit2/retrofit-mock/2.5.0/retrofit-mock-2.5.0-sources.jar" + "sha256": "907dd75d9684dcd1e5664856e45aa05e072870af91796e635405f963f82431da", + "url": "https://repo1.maven.org/maven2/io/grpc/grpc-core/1.44.1/grpc-core-1.44.1.jar" }, { - "coord": "com.squareup.retrofit2:retrofit:2.9.0", + "coord": "io.grpc:grpc-core:jar:sources:1.44.1", "dependencies": [ - "com.squareup.okhttp3:okhttp:4.7.2" + "io.grpc:grpc-api:jar:sources:1.44.1", + "com.google.guava:guava:jar:sources:30.1.1-android", + "com.google.code.findbugs:jsr305:jar:sources:3.0.2", + "com.google.android:annotations:jar:sources:4.1.1.4", + "com.google.j2objc:j2objc-annotations:jar:sources:1.3", + "com.google.code.gson:gson:jar:sources:2.8.9", + "org.checkerframework:checker-compat-qual:jar:sources:2.5.5", + "com.google.guava:listenablefuture:jar:sources:9999.0-empty-to-avoid-conflict-with-guava", + "com.google.guava:failureaccess:jar:sources:1.0.1", + "com.google.errorprone:error_prone_annotations:jar:sources:2.9.0", + "io.perfmark:perfmark-api:jar:sources:0.23.0", + "org.codehaus.mojo:animal-sniffer-annotations:jar:sources:1.19" ], "directDependencies": [ - "com.squareup.okhttp3:okhttp:4.7.2" + "io.grpc:grpc-api:jar:sources:1.44.1", + "com.google.guava:guava:jar:sources:30.1.1-android", + "com.google.android:annotations:jar:sources:4.1.1.4", + "com.google.code.gson:gson:jar:sources:2.8.9", + "com.google.errorprone:error_prone_annotations:jar:sources:2.9.0", + "io.perfmark:perfmark-api:jar:sources:0.23.0", + "org.codehaus.mojo:animal-sniffer-annotations:jar:sources:1.19" ], - "file": "v1/https/repo1.maven.org/maven2/com/squareup/retrofit2/retrofit/2.9.0/retrofit-2.9.0.jar", + "file": "v1/https/repo1.maven.org/maven2/io/grpc/grpc-core/1.44.1/grpc-core-1.44.1-sources.jar", "mirror_urls": [ - "https://maven.google.com/com/squareup/retrofit2/retrofit/2.9.0/retrofit-2.9.0.jar", - "https://repo1.maven.org/maven2/com/squareup/retrofit2/retrofit/2.9.0/retrofit-2.9.0.jar", - "https://maven.fabric.io/public/com/squareup/retrofit2/retrofit/2.9.0/retrofit-2.9.0.jar", - "https://maven.google.com/com/squareup/retrofit2/retrofit/2.9.0/retrofit-2.9.0.jar", - "https://repo1.maven.org/maven2/com/squareup/retrofit2/retrofit/2.9.0/retrofit-2.9.0.jar" + "https://maven.google.com/io/grpc/grpc-core/1.44.1/grpc-core-1.44.1-sources.jar", + "https://repo1.maven.org/maven2/io/grpc/grpc-core/1.44.1/grpc-core-1.44.1-sources.jar", + "https://maven.fabric.io/public/io/grpc/grpc-core/1.44.1/grpc-core-1.44.1-sources.jar", + "https://maven.google.com/io/grpc/grpc-core/1.44.1/grpc-core-1.44.1-sources.jar", + "https://repo1.maven.org/maven2/io/grpc/grpc-core/1.44.1/grpc-core-1.44.1-sources.jar" ], - "sha256": "e6ea1929c46852f5bec66ab3357da383476cef4e8d1deefdbf195b79cc4d6581", - "url": "https://repo1.maven.org/maven2/com/squareup/retrofit2/retrofit/2.9.0/retrofit-2.9.0.jar" + "sha256": "9e468a2ef2fe437c6964fed4bf2fa5566829c2dc47b0e2017af7c4f9997e553c", + "url": "https://repo1.maven.org/maven2/io/grpc/grpc-core/1.44.1/grpc-core-1.44.1-sources.jar" }, { - "coord": "com.squareup.retrofit2:retrofit:jar:sources:2.9.0", + "coord": "io.grpc:grpc-okhttp:jar:1.44.1", "dependencies": [ - "com.squareup.okhttp3:okhttp:jar:sources:4.7.2" + "com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava", + "io.grpc:grpc-core:1.44.1", + "com.google.j2objc:j2objc-annotations:1.3", + "com.google.code.findbugs:jsr305:3.0.2", + "com.google.android:annotations:4.1.1.4", + "com.google.guava:guava:30.1.1-android", + "org.codehaus.mojo:animal-sniffer-annotations:1.19", + "io.perfmark:perfmark-api:0.23.0", + "com.google.errorprone:error_prone_annotations:2.9.0", + "com.squareup.okhttp:okhttp:2.7.5", + "com.squareup.okio:okio:2.6.0", + "com.google.guava:failureaccess:1.0.1", + "io.grpc:grpc-api:1.44.1", + "com.google.code.gson:gson:2.8.9", + "org.checkerframework:checker-compat-qual:2.5.5" ], "directDependencies": [ - "com.squareup.okhttp3:okhttp:jar:sources:4.7.2" - ], - "file": "v1/https/repo1.maven.org/maven2/com/squareup/retrofit2/retrofit/2.9.0/retrofit-2.9.0-sources.jar", - "mirror_urls": [ - "https://maven.google.com/com/squareup/retrofit2/retrofit/2.9.0/retrofit-2.9.0-sources.jar", - "https://repo1.maven.org/maven2/com/squareup/retrofit2/retrofit/2.9.0/retrofit-2.9.0-sources.jar", - "https://maven.fabric.io/public/com/squareup/retrofit2/retrofit/2.9.0/retrofit-2.9.0-sources.jar", - "https://maven.google.com/com/squareup/retrofit2/retrofit/2.9.0/retrofit-2.9.0-sources.jar", - "https://repo1.maven.org/maven2/com/squareup/retrofit2/retrofit/2.9.0/retrofit-2.9.0-sources.jar" + "io.grpc:grpc-core:1.44.1", + "com.google.guava:guava:30.1.1-android", + "io.perfmark:perfmark-api:0.23.0", + "com.squareup.okhttp:okhttp:2.7.5", + "com.squareup.okio:okio:2.6.0" ], - "sha256": "64dab37d8cdca9846df237e766a48251287c188e4ff0ac488d1664e7a6644f7a", - "url": "https://repo1.maven.org/maven2/com/squareup/retrofit2/retrofit/2.9.0/retrofit-2.9.0-sources.jar" - }, - { - "coord": "com.squareup:javapoet:1.11.1", - "dependencies": [], - "directDependencies": [], - "file": "v1/https/repo1.maven.org/maven2/com/squareup/javapoet/1.11.1/javapoet-1.11.1.jar", + "file": "v1/https/repo1.maven.org/maven2/io/grpc/grpc-okhttp/1.44.1/grpc-okhttp-1.44.1.jar", "mirror_urls": [ - "https://maven.google.com/com/squareup/javapoet/1.11.1/javapoet-1.11.1.jar", - "https://repo1.maven.org/maven2/com/squareup/javapoet/1.11.1/javapoet-1.11.1.jar", - "https://maven.fabric.io/public/com/squareup/javapoet/1.11.1/javapoet-1.11.1.jar", - "https://maven.google.com/com/squareup/javapoet/1.11.1/javapoet-1.11.1.jar", - "https://repo1.maven.org/maven2/com/squareup/javapoet/1.11.1/javapoet-1.11.1.jar" + "https://maven.google.com/io/grpc/grpc-okhttp/1.44.1/grpc-okhttp-1.44.1.jar", + "https://repo1.maven.org/maven2/io/grpc/grpc-okhttp/1.44.1/grpc-okhttp-1.44.1.jar", + "https://maven.fabric.io/public/io/grpc/grpc-okhttp/1.44.1/grpc-okhttp-1.44.1.jar", + "https://maven.google.com/io/grpc/grpc-okhttp/1.44.1/grpc-okhttp-1.44.1.jar", + "https://repo1.maven.org/maven2/io/grpc/grpc-okhttp/1.44.1/grpc-okhttp-1.44.1.jar" ], - "sha256": "9cbf2107be499ec6e95afd36b58e3ca122a24166cdd375732e51267d64058e90", - "url": "https://repo1.maven.org/maven2/com/squareup/javapoet/1.11.1/javapoet-1.11.1.jar" + "sha256": "ecd538b47b44b4638fa12b792ae2ac18c9b28c5d5a96595b1d3b75d1af424ac2", + "url": "https://repo1.maven.org/maven2/io/grpc/grpc-okhttp/1.44.1/grpc-okhttp-1.44.1.jar" }, { - "coord": "com.squareup:javapoet:jar:sources:1.11.1", - "dependencies": [], - "directDependencies": [], - "file": "v1/https/repo1.maven.org/maven2/com/squareup/javapoet/1.11.1/javapoet-1.11.1-sources.jar", - "mirror_urls": [ - "https://maven.google.com/com/squareup/javapoet/1.11.1/javapoet-1.11.1-sources.jar", - "https://repo1.maven.org/maven2/com/squareup/javapoet/1.11.1/javapoet-1.11.1-sources.jar", - "https://maven.fabric.io/public/com/squareup/javapoet/1.11.1/javapoet-1.11.1-sources.jar", - "https://maven.google.com/com/squareup/javapoet/1.11.1/javapoet-1.11.1-sources.jar", - "https://repo1.maven.org/maven2/com/squareup/javapoet/1.11.1/javapoet-1.11.1-sources.jar" + "coord": "io.grpc:grpc-okhttp:jar:sources:1.44.1", + "dependencies": [ + "io.grpc:grpc-api:jar:sources:1.44.1", + "com.google.guava:guava:jar:sources:30.1.1-android", + "com.google.code.findbugs:jsr305:jar:sources:3.0.2", + "com.google.android:annotations:jar:sources:4.1.1.4", + "com.google.j2objc:j2objc-annotations:jar:sources:1.3", + "com.google.code.gson:gson:jar:sources:2.8.9", + "com.squareup.okhttp:okhttp:jar:sources:2.7.5", + "org.checkerframework:checker-compat-qual:jar:sources:2.5.5", + "com.google.guava:listenablefuture:jar:sources:9999.0-empty-to-avoid-conflict-with-guava", + "io.grpc:grpc-core:jar:sources:1.44.1", + "com.squareup.okio:okio:jar:sources:2.6.0", + "com.google.guava:failureaccess:jar:sources:1.0.1", + "com.google.errorprone:error_prone_annotations:jar:sources:2.9.0", + "io.perfmark:perfmark-api:jar:sources:0.23.0", + "org.codehaus.mojo:animal-sniffer-annotations:jar:sources:1.19" ], - "sha256": "63d3187d924582b1afe9eb171e725d27a7e15603513890de0f8804a7fc07e9ac", - "url": "https://repo1.maven.org/maven2/com/squareup/javapoet/1.11.1/javapoet-1.11.1-sources.jar" - }, - { - "coord": "com.squareup:javawriter:2.1.1", - "dependencies": [], - "directDependencies": [], - "file": "v1/https/repo1.maven.org/maven2/com/squareup/javawriter/2.1.1/javawriter-2.1.1.jar", - "mirror_urls": [ - "https://maven.google.com/com/squareup/javawriter/2.1.1/javawriter-2.1.1.jar", - "https://repo1.maven.org/maven2/com/squareup/javawriter/2.1.1/javawriter-2.1.1.jar", - "https://maven.fabric.io/public/com/squareup/javawriter/2.1.1/javawriter-2.1.1.jar", - "https://maven.google.com/com/squareup/javawriter/2.1.1/javawriter-2.1.1.jar", - "https://repo1.maven.org/maven2/com/squareup/javawriter/2.1.1/javawriter-2.1.1.jar" + "directDependencies": [ + "com.google.guava:guava:jar:sources:30.1.1-android", + "com.squareup.okhttp:okhttp:jar:sources:2.7.5", + "io.grpc:grpc-core:jar:sources:1.44.1", + "com.squareup.okio:okio:jar:sources:2.6.0", + "io.perfmark:perfmark-api:jar:sources:0.23.0" ], - "sha256": "f699823d0081f69cbb676c1845ea222e0ada79bc88a53e5d22d8bd02d328f57e", - "url": "https://repo1.maven.org/maven2/com/squareup/javawriter/2.1.1/javawriter-2.1.1.jar" - }, - { - "coord": "com.squareup:javawriter:jar:sources:2.1.1", - "dependencies": [], - "directDependencies": [], - "file": "v1/https/repo1.maven.org/maven2/com/squareup/javawriter/2.1.1/javawriter-2.1.1-sources.jar", - "mirror_urls": [ - "https://maven.google.com/com/squareup/javawriter/2.1.1/javawriter-2.1.1-sources.jar", - "https://repo1.maven.org/maven2/com/squareup/javawriter/2.1.1/javawriter-2.1.1-sources.jar", - "https://maven.fabric.io/public/com/squareup/javawriter/2.1.1/javawriter-2.1.1-sources.jar", - "https://maven.google.com/com/squareup/javawriter/2.1.1/javawriter-2.1.1-sources.jar", - "https://repo1.maven.org/maven2/com/squareup/javawriter/2.1.1/javawriter-2.1.1-sources.jar" + "file": "v1/https/repo1.maven.org/maven2/io/grpc/grpc-okhttp/1.44.1/grpc-okhttp-1.44.1-sources.jar", + "mirror_urls": [ + "https://maven.google.com/io/grpc/grpc-okhttp/1.44.1/grpc-okhttp-1.44.1-sources.jar", + "https://repo1.maven.org/maven2/io/grpc/grpc-okhttp/1.44.1/grpc-okhttp-1.44.1-sources.jar", + "https://maven.fabric.io/public/io/grpc/grpc-okhttp/1.44.1/grpc-okhttp-1.44.1-sources.jar", + "https://maven.google.com/io/grpc/grpc-okhttp/1.44.1/grpc-okhttp-1.44.1-sources.jar", + "https://repo1.maven.org/maven2/io/grpc/grpc-okhttp/1.44.1/grpc-okhttp-1.44.1-sources.jar" ], - "sha256": "f57646206c5908c69342022c7b5ccbc15dbf605ce80421da3b96af9f86331e28", - "url": "https://repo1.maven.org/maven2/com/squareup/javawriter/2.1.1/javawriter-2.1.1-sources.jar" + "sha256": "715ad53ba3cf878d7de921a59dae09a296761b35ace4ce3316041a8f5329679b", + "url": "https://repo1.maven.org/maven2/io/grpc/grpc-okhttp/1.44.1/grpc-okhttp-1.44.1-sources.jar" }, { - "coord": "com.squareup:kotlinpoet:1.6.0", + "coord": "io.grpc:grpc-protobuf-lite:jar:1.44.1", "dependencies": [ - "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.4.10", - "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.10", - "org.jetbrains.kotlin:kotlin-reflect:1.5.0", - "org.jetbrains.kotlin:kotlin-stdlib:1.5.0" + "com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava", + "com.google.j2objc:j2objc-annotations:1.3", + "com.google.code.findbugs:jsr305:3.0.2", + "com.google.protobuf:protobuf-javalite:3.19.2", + "com.google.guava:guava:30.1.1-android", + "com.google.errorprone:error_prone_annotations:2.9.0", + "io.grpc:grpc-context:1.44.1", + "com.google.guava:failureaccess:1.0.1", + "io.grpc:grpc-api:1.44.1", + "org.checkerframework:checker-compat-qual:2.5.5" ], "directDependencies": [ - "org.jetbrains.kotlin:kotlin-reflect:1.5.0", - "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.10" + "com.google.code.findbugs:jsr305:3.0.2", + "com.google.guava:guava:30.1.1-android", + "com.google.protobuf:protobuf-javalite:3.19.2", + "io.grpc:grpc-api:1.44.1" ], - "file": "v1/https/repo1.maven.org/maven2/com/squareup/kotlinpoet/1.6.0/kotlinpoet-1.6.0.jar", + "file": "v1/https/repo1.maven.org/maven2/io/grpc/grpc-protobuf-lite/1.44.1/grpc-protobuf-lite-1.44.1.jar", "mirror_urls": [ - "https://maven.google.com/com/squareup/kotlinpoet/1.6.0/kotlinpoet-1.6.0.jar", - "https://repo1.maven.org/maven2/com/squareup/kotlinpoet/1.6.0/kotlinpoet-1.6.0.jar", - "https://maven.fabric.io/public/com/squareup/kotlinpoet/1.6.0/kotlinpoet-1.6.0.jar", - "https://maven.google.com/com/squareup/kotlinpoet/1.6.0/kotlinpoet-1.6.0.jar", - "https://repo1.maven.org/maven2/com/squareup/kotlinpoet/1.6.0/kotlinpoet-1.6.0.jar" + "https://maven.google.com/io/grpc/grpc-protobuf-lite/1.44.1/grpc-protobuf-lite-1.44.1.jar", + "https://repo1.maven.org/maven2/io/grpc/grpc-protobuf-lite/1.44.1/grpc-protobuf-lite-1.44.1.jar", + "https://maven.fabric.io/public/io/grpc/grpc-protobuf-lite/1.44.1/grpc-protobuf-lite-1.44.1.jar", + "https://maven.google.com/io/grpc/grpc-protobuf-lite/1.44.1/grpc-protobuf-lite-1.44.1.jar", + "https://repo1.maven.org/maven2/io/grpc/grpc-protobuf-lite/1.44.1/grpc-protobuf-lite-1.44.1.jar" ], - "sha256": "8085eb4c8b1ece4f32259b22f26bf880bc47b74f548e29010b0146aa6b38f24b", - "url": "https://repo1.maven.org/maven2/com/squareup/kotlinpoet/1.6.0/kotlinpoet-1.6.0.jar" + "sha256": "1e53b2f3d856ee83fe58f7b89a36180e00c79141fbc9752682d1fdb36bcb93be", + "url": "https://repo1.maven.org/maven2/io/grpc/grpc-protobuf-lite/1.44.1/grpc-protobuf-lite-1.44.1.jar" }, { - "coord": "com.squareup:kotlinpoet:jar:sources:1.6.0", + "coord": "io.grpc:grpc-protobuf-lite:jar:sources:1.44.1", "dependencies": [ - "org.jetbrains.kotlin:kotlin-stdlib-jdk8:jar:sources:1.4.10", - "org.jetbrains.kotlin:kotlin-stdlib:jar:sources:1.5.0", - "org.jetbrains.kotlin:kotlin-stdlib-jdk7:jar:sources:1.4.10", - "org.jetbrains.kotlin:kotlin-reflect:jar:sources:1.5.0" + "io.grpc:grpc-api:jar:sources:1.44.1", + "com.google.guava:guava:jar:sources:30.1.1-android", + "com.google.code.findbugs:jsr305:jar:sources:3.0.2", + "com.google.j2objc:j2objc-annotations:jar:sources:1.3", + "com.google.protobuf:protobuf-javalite:jar:sources:3.19.2", + "org.checkerframework:checker-compat-qual:jar:sources:2.5.5", + "com.google.guava:listenablefuture:jar:sources:9999.0-empty-to-avoid-conflict-with-guava", + "com.google.guava:failureaccess:jar:sources:1.0.1", + "com.google.errorprone:error_prone_annotations:jar:sources:2.9.0", + "io.grpc:grpc-context:jar:sources:1.44.1" ], "directDependencies": [ - "org.jetbrains.kotlin:kotlin-reflect:jar:sources:1.5.0", - "org.jetbrains.kotlin:kotlin-stdlib-jdk8:jar:sources:1.4.10" + "com.google.code.findbugs:jsr305:jar:sources:3.0.2", + "com.google.guava:guava:jar:sources:30.1.1-android", + "com.google.protobuf:protobuf-javalite:jar:sources:3.19.2", + "io.grpc:grpc-api:jar:sources:1.44.1" ], - "file": "v1/https/repo1.maven.org/maven2/com/squareup/kotlinpoet/1.6.0/kotlinpoet-1.6.0-sources.jar", + "file": "v1/https/repo1.maven.org/maven2/io/grpc/grpc-protobuf-lite/1.44.1/grpc-protobuf-lite-1.44.1-sources.jar", "mirror_urls": [ - "https://maven.google.com/com/squareup/kotlinpoet/1.6.0/kotlinpoet-1.6.0-sources.jar", - "https://repo1.maven.org/maven2/com/squareup/kotlinpoet/1.6.0/kotlinpoet-1.6.0-sources.jar", - "https://maven.fabric.io/public/com/squareup/kotlinpoet/1.6.0/kotlinpoet-1.6.0-sources.jar", - "https://maven.google.com/com/squareup/kotlinpoet/1.6.0/kotlinpoet-1.6.0-sources.jar", - "https://repo1.maven.org/maven2/com/squareup/kotlinpoet/1.6.0/kotlinpoet-1.6.0-sources.jar" + "https://maven.google.com/io/grpc/grpc-protobuf-lite/1.44.1/grpc-protobuf-lite-1.44.1-sources.jar", + "https://repo1.maven.org/maven2/io/grpc/grpc-protobuf-lite/1.44.1/grpc-protobuf-lite-1.44.1-sources.jar", + "https://maven.fabric.io/public/io/grpc/grpc-protobuf-lite/1.44.1/grpc-protobuf-lite-1.44.1-sources.jar", + "https://maven.google.com/io/grpc/grpc-protobuf-lite/1.44.1/grpc-protobuf-lite-1.44.1-sources.jar", + "https://repo1.maven.org/maven2/io/grpc/grpc-protobuf-lite/1.44.1/grpc-protobuf-lite-1.44.1-sources.jar" ], - "sha256": "cca9ad8636922585e3f116a885c580890d6be1a19655b0916a54c1928a7f0840", - "url": "https://repo1.maven.org/maven2/com/squareup/kotlinpoet/1.6.0/kotlinpoet-1.6.0-sources.jar" + "sha256": "7bc340a0a69b2bf204d9fb00048d8c6b517f2f8670cf4f27d0fd53c09fc6fe47", + "url": "https://repo1.maven.org/maven2/io/grpc/grpc-protobuf-lite/1.44.1/grpc-protobuf-lite-1.44.1-sources.jar" }, { - "coord": "commons-codec:commons-codec:1.10", - "dependencies": [], - "directDependencies": [], - "file": "v1/https/repo1.maven.org/maven2/commons-codec/commons-codec/1.10/commons-codec-1.10.jar", - "mirror_urls": [ - "https://maven.google.com/commons-codec/commons-codec/1.10/commons-codec-1.10.jar", - "https://repo1.maven.org/maven2/commons-codec/commons-codec/1.10/commons-codec-1.10.jar", - "https://maven.fabric.io/public/commons-codec/commons-codec/1.10/commons-codec-1.10.jar", - "https://maven.google.com/commons-codec/commons-codec/1.10/commons-codec-1.10.jar", - "https://repo1.maven.org/maven2/commons-codec/commons-codec/1.10/commons-codec-1.10.jar" + "coord": "io.grpc:grpc-stub:jar:1.44.1", + "dependencies": [ + "com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava", + "com.google.j2objc:j2objc-annotations:1.3", + "com.google.code.findbugs:jsr305:3.0.2", + "com.google.guava:guava:30.1.1-android", + "com.google.errorprone:error_prone_annotations:2.9.0", + "io.grpc:grpc-context:1.44.1", + "com.google.guava:failureaccess:1.0.1", + "io.grpc:grpc-api:1.44.1", + "org.checkerframework:checker-compat-qual:2.5.5" ], - "sha256": "4241dfa94e711d435f29a4604a3e2de5c4aa3c165e23bd066be6fc1fc4309569", - "url": "https://repo1.maven.org/maven2/commons-codec/commons-codec/1.10/commons-codec-1.10.jar" - }, - { - "coord": "commons-codec:commons-codec:jar:sources:1.10", - "dependencies": [], - "directDependencies": [], - "file": "v1/https/repo1.maven.org/maven2/commons-codec/commons-codec/1.10/commons-codec-1.10-sources.jar", - "mirror_urls": [ - "https://maven.google.com/commons-codec/commons-codec/1.10/commons-codec-1.10-sources.jar", - "https://repo1.maven.org/maven2/commons-codec/commons-codec/1.10/commons-codec-1.10-sources.jar", - "https://maven.fabric.io/public/commons-codec/commons-codec/1.10/commons-codec-1.10-sources.jar", - "https://maven.google.com/commons-codec/commons-codec/1.10/commons-codec-1.10-sources.jar", - "https://repo1.maven.org/maven2/commons-codec/commons-codec/1.10/commons-codec-1.10-sources.jar" + "directDependencies": [ + "com.google.errorprone:error_prone_annotations:2.9.0", + "com.google.guava:guava:30.1.1-android", + "io.grpc:grpc-api:1.44.1" ], - "sha256": "dfae68268ce86f1a18fc45b99317c13d6c9d252f001d37961e79a51076808986", - "url": "https://repo1.maven.org/maven2/commons-codec/commons-codec/1.10/commons-codec-1.10-sources.jar" - }, - { - "coord": "commons-io:commons-io:2.4", - "dependencies": [], - "directDependencies": [], - "file": "v1/https/repo1.maven.org/maven2/commons-io/commons-io/2.4/commons-io-2.4.jar", + "file": "v1/https/repo1.maven.org/maven2/io/grpc/grpc-stub/1.44.1/grpc-stub-1.44.1.jar", "mirror_urls": [ - "https://maven.google.com/commons-io/commons-io/2.4/commons-io-2.4.jar", - "https://repo1.maven.org/maven2/commons-io/commons-io/2.4/commons-io-2.4.jar", - "https://maven.fabric.io/public/commons-io/commons-io/2.4/commons-io-2.4.jar", - "https://maven.google.com/commons-io/commons-io/2.4/commons-io-2.4.jar", - "https://repo1.maven.org/maven2/commons-io/commons-io/2.4/commons-io-2.4.jar" + "https://maven.google.com/io/grpc/grpc-stub/1.44.1/grpc-stub-1.44.1.jar", + "https://repo1.maven.org/maven2/io/grpc/grpc-stub/1.44.1/grpc-stub-1.44.1.jar", + "https://maven.fabric.io/public/io/grpc/grpc-stub/1.44.1/grpc-stub-1.44.1.jar", + "https://maven.google.com/io/grpc/grpc-stub/1.44.1/grpc-stub-1.44.1.jar", + "https://repo1.maven.org/maven2/io/grpc/grpc-stub/1.44.1/grpc-stub-1.44.1.jar" ], - "sha256": "cc6a41dc3eaacc9e440a6bd0d2890b20d36b4ee408fe2d67122f328bb6e01581", - "url": "https://repo1.maven.org/maven2/commons-io/commons-io/2.4/commons-io-2.4.jar" + "sha256": "c34e16c085568df0ca8b22d7fe1326999d5be192deb2ae057238ec0f7707a107", + "url": "https://repo1.maven.org/maven2/io/grpc/grpc-stub/1.44.1/grpc-stub-1.44.1.jar" }, { - "coord": "commons-io:commons-io:jar:sources:2.4", - "dependencies": [], - "directDependencies": [], - "file": "v1/https/repo1.maven.org/maven2/commons-io/commons-io/2.4/commons-io-2.4-sources.jar", - "mirror_urls": [ - "https://maven.google.com/commons-io/commons-io/2.4/commons-io-2.4-sources.jar", - "https://repo1.maven.org/maven2/commons-io/commons-io/2.4/commons-io-2.4-sources.jar", - "https://maven.fabric.io/public/commons-io/commons-io/2.4/commons-io-2.4-sources.jar", - "https://maven.google.com/commons-io/commons-io/2.4/commons-io-2.4-sources.jar", - "https://repo1.maven.org/maven2/commons-io/commons-io/2.4/commons-io-2.4-sources.jar" + "coord": "io.grpc:grpc-stub:jar:sources:1.44.1", + "dependencies": [ + "io.grpc:grpc-api:jar:sources:1.44.1", + "com.google.guava:guava:jar:sources:30.1.1-android", + "com.google.code.findbugs:jsr305:jar:sources:3.0.2", + "com.google.j2objc:j2objc-annotations:jar:sources:1.3", + "org.checkerframework:checker-compat-qual:jar:sources:2.5.5", + "com.google.guava:listenablefuture:jar:sources:9999.0-empty-to-avoid-conflict-with-guava", + "com.google.guava:failureaccess:jar:sources:1.0.1", + "com.google.errorprone:error_prone_annotations:jar:sources:2.9.0", + "io.grpc:grpc-context:jar:sources:1.44.1" ], - "sha256": "d4635b348bbbf3f166d972b052bc4cac5b326c133beed7b8a1cab7ea22b61e01", - "url": "https://repo1.maven.org/maven2/commons-io/commons-io/2.4/commons-io-2.4-sources.jar" - }, - { - "coord": "de.hdodenhof:circleimageview:3.0.1", - "dependencies": [], - "directDependencies": [], - "file": "v1/https/repo1.maven.org/maven2/de/hdodenhof/circleimageview/3.0.1/circleimageview-3.0.1.aar", + "directDependencies": [ + "com.google.errorprone:error_prone_annotations:jar:sources:2.9.0", + "com.google.guava:guava:jar:sources:30.1.1-android", + "io.grpc:grpc-api:jar:sources:1.44.1" + ], + "file": "v1/https/repo1.maven.org/maven2/io/grpc/grpc-stub/1.44.1/grpc-stub-1.44.1-sources.jar", "mirror_urls": [ - "https://maven.google.com/de/hdodenhof/circleimageview/3.0.1/circleimageview-3.0.1.aar", - "https://repo1.maven.org/maven2/de/hdodenhof/circleimageview/3.0.1/circleimageview-3.0.1.aar", - "https://maven.fabric.io/public/de/hdodenhof/circleimageview/3.0.1/circleimageview-3.0.1.aar", - "https://maven.google.com/de/hdodenhof/circleimageview/3.0.1/circleimageview-3.0.1.aar", - "https://repo1.maven.org/maven2/de/hdodenhof/circleimageview/3.0.1/circleimageview-3.0.1.aar" + "https://maven.google.com/io/grpc/grpc-stub/1.44.1/grpc-stub-1.44.1-sources.jar", + "https://repo1.maven.org/maven2/io/grpc/grpc-stub/1.44.1/grpc-stub-1.44.1-sources.jar", + "https://maven.fabric.io/public/io/grpc/grpc-stub/1.44.1/grpc-stub-1.44.1-sources.jar", + "https://maven.google.com/io/grpc/grpc-stub/1.44.1/grpc-stub-1.44.1-sources.jar", + "https://repo1.maven.org/maven2/io/grpc/grpc-stub/1.44.1/grpc-stub-1.44.1-sources.jar" ], - "sha256": "7b0f088436ad4dcbb36d779fd09bf2192d9cc1e1a734bb6337904a7648f97617", - "url": "https://repo1.maven.org/maven2/de/hdodenhof/circleimageview/3.0.1/circleimageview-3.0.1.aar" + "sha256": "8f5c0bd190963ca36413a1c34b45cbb45249540913311ff028f7e5cebafcf0df", + "url": "https://repo1.maven.org/maven2/io/grpc/grpc-stub/1.44.1/grpc-stub-1.44.1-sources.jar" }, { - "coord": "de.hdodenhof:circleimageview:jar:sources:3.0.1", + "coord": "io.perfmark:perfmark-api:0.23.0", "dependencies": [], "directDependencies": [], - "file": "v1/https/repo1.maven.org/maven2/de/hdodenhof/circleimageview/3.0.1/circleimageview-3.0.1-sources.jar", + "file": "v1/https/repo1.maven.org/maven2/io/perfmark/perfmark-api/0.23.0/perfmark-api-0.23.0.jar", "mirror_urls": [ - "https://maven.google.com/de/hdodenhof/circleimageview/3.0.1/circleimageview-3.0.1-sources.jar", - "https://repo1.maven.org/maven2/de/hdodenhof/circleimageview/3.0.1/circleimageview-3.0.1-sources.jar", - "https://maven.fabric.io/public/de/hdodenhof/circleimageview/3.0.1/circleimageview-3.0.1-sources.jar", - "https://maven.google.com/de/hdodenhof/circleimageview/3.0.1/circleimageview-3.0.1-sources.jar", - "https://repo1.maven.org/maven2/de/hdodenhof/circleimageview/3.0.1/circleimageview-3.0.1-sources.jar" + "https://maven.google.com/io/perfmark/perfmark-api/0.23.0/perfmark-api-0.23.0.jar", + "https://repo1.maven.org/maven2/io/perfmark/perfmark-api/0.23.0/perfmark-api-0.23.0.jar", + "https://maven.fabric.io/public/io/perfmark/perfmark-api/0.23.0/perfmark-api-0.23.0.jar", + "https://maven.google.com/io/perfmark/perfmark-api/0.23.0/perfmark-api-0.23.0.jar", + "https://repo1.maven.org/maven2/io/perfmark/perfmark-api/0.23.0/perfmark-api-0.23.0.jar" ], - "sha256": "41ac0df4f7bab17c56b075a0c802a6f0b6d9013831d409556fdcd56bdb8a460b", - "url": "https://repo1.maven.org/maven2/de/hdodenhof/circleimageview/3.0.1/circleimageview-3.0.1-sources.jar" + "sha256": "c705b5c10c18ff3032b9e81742bc2f6b0e5607f6a6dfc0c8ad0cff75d4913042", + "url": "https://repo1.maven.org/maven2/io/perfmark/perfmark-api/0.23.0/perfmark-api-0.23.0.jar" }, { - "coord": "io.fabric.sdk.android:fabric:1.4.7", + "coord": "io.perfmark:perfmark-api:jar:sources:0.23.0", "dependencies": [], "directDependencies": [], - "file": "v1/https/maven.google.com/io/fabric/sdk/android/fabric/1.4.7/fabric-1.4.7.aar", + "file": "v1/https/repo1.maven.org/maven2/io/perfmark/perfmark-api/0.23.0/perfmark-api-0.23.0-sources.jar", "mirror_urls": [ - "https://maven.google.com/io/fabric/sdk/android/fabric/1.4.7/fabric-1.4.7.aar", - "https://repo1.maven.org/maven2/io/fabric/sdk/android/fabric/1.4.7/fabric-1.4.7.aar", - "https://maven.fabric.io/public/io/fabric/sdk/android/fabric/1.4.7/fabric-1.4.7.aar", - "https://maven.google.com/io/fabric/sdk/android/fabric/1.4.7/fabric-1.4.7.aar", - "https://repo1.maven.org/maven2/io/fabric/sdk/android/fabric/1.4.7/fabric-1.4.7.aar" + "https://maven.google.com/io/perfmark/perfmark-api/0.23.0/perfmark-api-0.23.0-sources.jar", + "https://repo1.maven.org/maven2/io/perfmark/perfmark-api/0.23.0/perfmark-api-0.23.0-sources.jar", + "https://maven.fabric.io/public/io/perfmark/perfmark-api/0.23.0/perfmark-api-0.23.0-sources.jar", + "https://maven.google.com/io/perfmark/perfmark-api/0.23.0/perfmark-api-0.23.0-sources.jar", + "https://repo1.maven.org/maven2/io/perfmark/perfmark-api/0.23.0/perfmark-api-0.23.0-sources.jar" ], - "sha256": "36df4b321ec95e31226ff5abaae73e66f3a99dedddbc2d03054c4e141c8aaa5c", - "url": "https://maven.google.com/io/fabric/sdk/android/fabric/1.4.7/fabric-1.4.7.aar" + "sha256": "8b75ae9cac9c14c8b697501adf74584130a307f2851d135e0ada4667cdf3b7b5", + "url": "https://repo1.maven.org/maven2/io/perfmark/perfmark-api/0.23.0/perfmark-api-0.23.0-sources.jar" }, { "coord": "io.xlate:yaml-json:0.1.0", @@ -7869,6 +9165,36 @@ "sha256": "52fd5b908ed38b2c543fac371c2192ff2896fec0f3ddea29f23b5db117a7ea6e", "url": "https://repo1.maven.org/maven2/org/checkerframework/checker-qual/3.13.0/checker-qual-3.13.0-sources.jar" }, + { + "coord": "org.codehaus.mojo:animal-sniffer-annotations:1.19", + "dependencies": [], + "directDependencies": [], + "file": "v1/https/repo1.maven.org/maven2/org/codehaus/mojo/animal-sniffer-annotations/1.19/animal-sniffer-annotations-1.19.jar", + "mirror_urls": [ + "https://maven.google.com/org/codehaus/mojo/animal-sniffer-annotations/1.19/animal-sniffer-annotations-1.19.jar", + "https://repo1.maven.org/maven2/org/codehaus/mojo/animal-sniffer-annotations/1.19/animal-sniffer-annotations-1.19.jar", + "https://maven.fabric.io/public/org/codehaus/mojo/animal-sniffer-annotations/1.19/animal-sniffer-annotations-1.19.jar", + "https://maven.google.com/org/codehaus/mojo/animal-sniffer-annotations/1.19/animal-sniffer-annotations-1.19.jar", + "https://repo1.maven.org/maven2/org/codehaus/mojo/animal-sniffer-annotations/1.19/animal-sniffer-annotations-1.19.jar" + ], + "sha256": "e67ec27ceeaf13ab5d54cf5fdbcc544c41b4db8d02d9f006678cca2c7c13ee9d", + "url": "https://repo1.maven.org/maven2/org/codehaus/mojo/animal-sniffer-annotations/1.19/animal-sniffer-annotations-1.19.jar" + }, + { + "coord": "org.codehaus.mojo:animal-sniffer-annotations:jar:sources:1.19", + "dependencies": [], + "directDependencies": [], + "file": "v1/https/repo1.maven.org/maven2/org/codehaus/mojo/animal-sniffer-annotations/1.19/animal-sniffer-annotations-1.19-sources.jar", + "mirror_urls": [ + "https://maven.google.com/org/codehaus/mojo/animal-sniffer-annotations/1.19/animal-sniffer-annotations-1.19-sources.jar", + "https://repo1.maven.org/maven2/org/codehaus/mojo/animal-sniffer-annotations/1.19/animal-sniffer-annotations-1.19-sources.jar", + "https://maven.fabric.io/public/org/codehaus/mojo/animal-sniffer-annotations/1.19/animal-sniffer-annotations-1.19-sources.jar", + "https://maven.google.com/org/codehaus/mojo/animal-sniffer-annotations/1.19/animal-sniffer-annotations-1.19-sources.jar", + "https://repo1.maven.org/maven2/org/codehaus/mojo/animal-sniffer-annotations/1.19/animal-sniffer-annotations-1.19-sources.jar" + ], + "sha256": "da2e67cba66639197d23c1976e6c27d0967ad4dc69e6228b934e05a0d39e2991", + "url": "https://repo1.maven.org/maven2/org/codehaus/mojo/animal-sniffer-annotations/1.19/animal-sniffer-annotations-1.19-sources.jar" + }, { "coord": "org.eclipse.parsson:parsson:1.1.2", "dependencies": [ @@ -9932,36 +11258,36 @@ { "coord": "com.google.android.gms:play-services-ads-identifier:aar:sources:17.0.0", "dependencies": [ - "com.google.android.gms:play-services-basement:aar:sources:17.0.0", "androidx.core:core:aar:sources:1.3.1", "androidx.collection:collection:jar:sources:1.1.0", - "androidx.fragment:fragment:aar:sources:1.2.0" + "androidx.fragment:fragment:aar:sources:1.2.0", + "com.google.android.gms:play-services-basement:aar:sources:18.0.0" ], "directDependencies": [ - "com.google.android.gms:play-services-basement:aar:sources:17.0.0" + "com.google.android.gms:play-services-basement:aar:sources:18.0.0" ], "file": null }, { - "coord": "com.google.android.gms:play-services-base:aar:sources:17.0.0", + "coord": "com.google.android.gms:play-services-base:aar:sources:18.0.1", "dependencies": [ "androidx.core:core:aar:sources:1.3.1", "androidx.fragment:fragment:aar:sources:1.2.0", "androidx.collection:collection:jar:sources:1.1.0", - "com.google.android.gms:play-services-tasks:aar:sources:17.0.0", - "com.google.android.gms:play-services-basement:aar:sources:17.0.0" + "com.google.android.gms:play-services-tasks:aar:sources:18.0.1", + "com.google.android.gms:play-services-basement:aar:sources:18.0.0" ], "directDependencies": [ "androidx.core:core:aar:sources:1.3.1", "androidx.fragment:fragment:aar:sources:1.2.0", "androidx.collection:collection:jar:sources:1.1.0", - "com.google.android.gms:play-services-tasks:aar:sources:17.0.0", - "com.google.android.gms:play-services-basement:aar:sources:17.0.0" + "com.google.android.gms:play-services-tasks:aar:sources:18.0.1", + "com.google.android.gms:play-services-basement:aar:sources:18.0.0" ], "file": null }, { - "coord": "com.google.android.gms:play-services-basement:aar:sources:17.0.0", + "coord": "com.google.android.gms:play-services-basement:aar:sources:18.0.0", "dependencies": [ "androidx.core:core:aar:sources:1.3.1", "androidx.collection:collection:jar:sources:1.1.0", @@ -9978,13 +11304,14 @@ "coord": "com.google.android.gms:play-services-measurement-api:aar:sources:17.5.0", "dependencies": [ "androidx.documentfile:documentfile:aar:sources:1.0.0", - "com.google.firebase:firebase-components:aar:sources:16.0.0", "androidx.print:print:aar:sources:1.0.0", + "com.google.firebase:firebase-common:aar:sources:20.1.1", "androidx.lifecycle:lifecycle-viewmodel:aar:sources:2.2.0", "androidx.core:core:aar:sources:1.3.1", "androidx.localbroadcastmanager:localbroadcastmanager:aar:sources:1.0.0", "androidx.legacy:legacy-support-core-utils:aar:sources:1.0.0", "androidx.fragment:fragment:aar:sources:1.2.0", + "com.google.firebase:firebase-components:aar:sources:17.0.0", "com.google.firebase:firebase-measurement-connector:aar:sources:18.0.0", "androidx.collection:collection:jar:sources:1.1.0", "com.google.android.gms:play-services-ads-identifier:aar:sources:17.0.0", @@ -9993,40 +11320,39 @@ "com.google.android.gms:play-services-measurement-base:aar:sources:17.5.0", "androidx.annotation:annotation:jar:sources:1.1.0", "com.google.android.gms:play-services-measurement-impl:aar:sources:17.5.0", - "com.google.firebase:firebase-common:aar:sources:19.3.0", - "com.google.android.gms:play-services-tasks:aar:sources:17.0.0", + "com.google.android.gms:play-services-tasks:aar:sources:18.0.1", "com.google.firebase:firebase-installations:aar:sources:16.3.2", "com.google.auto.value:auto-value-annotations:jar:sources:1.8.1", "androidx.loader:loader:aar:sources:1.0.0", - "com.google.android.gms:play-services-basement:aar:sources:17.0.0", "com.google.android.gms:play-services-stats:aar:sources:17.0.0", - "com.google.firebase:firebase-installations-interop:aar:sources:16.0.0" + "com.google.firebase:firebase-installations-interop:aar:sources:16.0.0", + "com.google.android.gms:play-services-basement:aar:sources:18.0.0" ], "directDependencies": [ - "com.google.firebase:firebase-components:aar:sources:16.0.0", + "com.google.firebase:firebase-common:aar:sources:20.1.1", + "com.google.firebase:firebase-components:aar:sources:17.0.0", "com.google.firebase:firebase-measurement-connector:aar:sources:18.0.0", "com.google.android.gms:play-services-ads-identifier:aar:sources:17.0.0", "com.google.android.gms:play-services-measurement-sdk-api:aar:sources:17.5.0", "com.google.android.gms:play-services-measurement-base:aar:sources:17.5.0", "com.google.android.gms:play-services-measurement-impl:aar:sources:17.5.0", - "com.google.firebase:firebase-common:aar:sources:19.3.0", - "com.google.android.gms:play-services-tasks:aar:sources:17.0.0", + "com.google.android.gms:play-services-tasks:aar:sources:18.0.1", "com.google.firebase:firebase-installations:aar:sources:16.3.2", - "com.google.android.gms:play-services-basement:aar:sources:17.0.0", - "com.google.firebase:firebase-installations-interop:aar:sources:16.0.0" + "com.google.firebase:firebase-installations-interop:aar:sources:16.0.0", + "com.google.android.gms:play-services-basement:aar:sources:18.0.0" ], "file": null }, { "coord": "com.google.android.gms:play-services-measurement-base:aar:sources:17.5.0", "dependencies": [ - "com.google.android.gms:play-services-basement:aar:sources:17.0.0", "androidx.core:core:aar:sources:1.3.1", "androidx.collection:collection:jar:sources:1.1.0", - "androidx.fragment:fragment:aar:sources:1.2.0" + "androidx.fragment:fragment:aar:sources:1.2.0", + "com.google.android.gms:play-services-basement:aar:sources:18.0.0" ], "directDependencies": [ - "com.google.android.gms:play-services-basement:aar:sources:17.0.0" + "com.google.android.gms:play-services-basement:aar:sources:18.0.0" ], "file": null }, @@ -10046,16 +11372,16 @@ "com.google.android.gms:play-services-measurement-base:aar:sources:17.5.0", "androidx.annotation:annotation:jar:sources:1.1.0", "androidx.loader:loader:aar:sources:1.0.0", - "com.google.android.gms:play-services-basement:aar:sources:17.0.0", - "com.google.android.gms:play-services-stats:aar:sources:17.0.0" + "com.google.android.gms:play-services-stats:aar:sources:17.0.0", + "com.google.android.gms:play-services-basement:aar:sources:18.0.0" ], "directDependencies": [ "androidx.core:core:aar:sources:1.3.1", "androidx.collection:collection:jar:sources:1.1.0", "com.google.android.gms:play-services-ads-identifier:aar:sources:17.0.0", "com.google.android.gms:play-services-measurement-base:aar:sources:17.5.0", - "com.google.android.gms:play-services-basement:aar:sources:17.0.0", - "com.google.android.gms:play-services-stats:aar:sources:17.0.0" + "com.google.android.gms:play-services-stats:aar:sources:17.0.0", + "com.google.android.gms:play-services-basement:aar:sources:18.0.0" ], "file": null }, @@ -10066,10 +11392,10 @@ "androidx.fragment:fragment:aar:sources:1.2.0", "androidx.collection:collection:jar:sources:1.1.0", "com.google.android.gms:play-services-measurement-base:aar:sources:17.5.0", - "com.google.android.gms:play-services-basement:aar:sources:17.0.0" + "com.google.android.gms:play-services-basement:aar:sources:18.0.0" ], "directDependencies": [ - "com.google.android.gms:play-services-basement:aar:sources:17.0.0", + "com.google.android.gms:play-services-basement:aar:sources:18.0.0", "com.google.android.gms:play-services-measurement-base:aar:sources:17.5.0" ], "file": null @@ -10091,12 +11417,12 @@ "androidx.annotation:annotation:jar:sources:1.1.0", "com.google.android.gms:play-services-measurement-impl:aar:sources:17.5.0", "androidx.loader:loader:aar:sources:1.0.0", - "com.google.android.gms:play-services-basement:aar:sources:17.0.0", - "com.google.android.gms:play-services-stats:aar:sources:17.0.0" + "com.google.android.gms:play-services-stats:aar:sources:17.0.0", + "com.google.android.gms:play-services-basement:aar:sources:18.0.0" ], "directDependencies": [ "androidx.collection:collection:jar:sources:1.1.0", - "com.google.android.gms:play-services-basement:aar:sources:17.0.0", + "com.google.android.gms:play-services-basement:aar:sources:18.0.0", "com.google.android.gms:play-services-measurement-base:aar:sources:17.5.0", "com.google.android.gms:play-services-measurement-impl:aar:sources:17.5.0" ], @@ -10119,8 +11445,8 @@ "androidx.annotation:annotation:jar:sources:1.1.0", "com.google.android.gms:play-services-measurement-impl:aar:sources:17.5.0", "androidx.loader:loader:aar:sources:1.0.0", - "com.google.android.gms:play-services-basement:aar:sources:17.0.0", - "com.google.android.gms:play-services-stats:aar:sources:17.0.0" + "com.google.android.gms:play-services-stats:aar:sources:17.0.0", + "com.google.android.gms:play-services-basement:aar:sources:18.0.0" ], "directDependencies": [ "androidx.legacy:legacy-support-core-utils:aar:sources:1.0.0", @@ -10128,8 +11454,8 @@ "com.google.android.gms:play-services-ads-identifier:aar:sources:17.0.0", "com.google.android.gms:play-services-measurement-base:aar:sources:17.5.0", "com.google.android.gms:play-services-measurement-impl:aar:sources:17.5.0", - "com.google.android.gms:play-services-basement:aar:sources:17.0.0", - "com.google.android.gms:play-services-stats:aar:sources:17.0.0" + "com.google.android.gms:play-services-stats:aar:sources:17.0.0", + "com.google.android.gms:play-services-basement:aar:sources:18.0.0" ], "file": null }, @@ -10147,24 +11473,24 @@ "androidx.lifecycle:lifecycle-livedata:aar:sources:2.2.0", "androidx.annotation:annotation:jar:sources:1.1.0", "androidx.loader:loader:aar:sources:1.0.0", - "com.google.android.gms:play-services-basement:aar:sources:17.0.0" + "com.google.android.gms:play-services-basement:aar:sources:18.0.0" ], "directDependencies": [ "androidx.legacy:legacy-support-core-utils:aar:sources:1.0.0", - "com.google.android.gms:play-services-basement:aar:sources:17.0.0" + "com.google.android.gms:play-services-basement:aar:sources:18.0.0" ], "file": null }, { - "coord": "com.google.android.gms:play-services-tasks:aar:sources:17.0.0", + "coord": "com.google.android.gms:play-services-tasks:aar:sources:18.0.1", "dependencies": [ - "com.google.android.gms:play-services-basement:aar:sources:17.0.0", "androidx.core:core:aar:sources:1.3.1", "androidx.collection:collection:jar:sources:1.1.0", - "androidx.fragment:fragment:aar:sources:1.2.0" + "androidx.fragment:fragment:aar:sources:1.2.0", + "com.google.android.gms:play-services-basement:aar:sources:18.0.0" ], "directDependencies": [ - "com.google.android.gms:play-services-basement:aar:sources:17.0.0" + "com.google.android.gms:play-services-basement:aar:sources:18.0.0" ], "file": null }, @@ -10182,17 +11508,30 @@ ], "file": null }, + { + "coord": "com.google.android.play:integrity:aar:sources:1.0.1", + "dependencies": [ + "com.google.android.gms:play-services-tasks:aar:sources:18.0.1", + "com.google.android.gms:play-services-basement:aar:sources:18.0.0" + ], + "directDependencies": [ + "com.google.android.gms:play-services-basement:aar:sources:18.0.0", + "com.google.android.gms:play-services-tasks:aar:sources:18.0.1" + ], + "file": null + }, { "coord": "com.google.firebase:firebase-analytics:jar:sources:17.5.0", "dependencies": [ "androidx.documentfile:documentfile:aar:sources:1.0.0", - "com.google.firebase:firebase-components:aar:sources:16.0.0", "androidx.print:print:aar:sources:1.0.0", + "com.google.firebase:firebase-common:aar:sources:20.1.1", "androidx.lifecycle:lifecycle-viewmodel:aar:sources:2.2.0", "androidx.core:core:aar:sources:1.3.1", "androidx.localbroadcastmanager:localbroadcastmanager:aar:sources:1.0.0", "androidx.legacy:legacy-support-core-utils:aar:sources:1.0.0", "androidx.fragment:fragment:aar:sources:1.2.0", + "com.google.firebase:firebase-components:aar:sources:17.0.0", "com.google.firebase:firebase-measurement-connector:aar:sources:18.0.0", "androidx.collection:collection:jar:sources:1.1.0", "com.google.android.gms:play-services-ads-identifier:aar:sources:17.0.0", @@ -10204,14 +11543,13 @@ "androidx.annotation:annotation:jar:sources:1.1.0", "com.google.android.gms:play-services-measurement-impl:aar:sources:17.5.0", "com.google.android.gms:play-services-measurement:aar:sources:17.5.0", - "com.google.firebase:firebase-common:aar:sources:19.3.0", - "com.google.android.gms:play-services-tasks:aar:sources:17.0.0", + "com.google.android.gms:play-services-tasks:aar:sources:18.0.1", "com.google.firebase:firebase-installations:aar:sources:16.3.2", "com.google.auto.value:auto-value-annotations:jar:sources:1.8.1", "androidx.loader:loader:aar:sources:1.0.0", - "com.google.android.gms:play-services-basement:aar:sources:17.0.0", "com.google.android.gms:play-services-stats:aar:sources:17.0.0", - "com.google.firebase:firebase-installations-interop:aar:sources:16.0.0" + "com.google.firebase:firebase-installations-interop:aar:sources:16.0.0", + "com.google.android.gms:play-services-basement:aar:sources:18.0.0" ], "directDependencies": [ "com.google.android.gms:play-services-measurement:aar:sources:17.5.0", @@ -10220,21 +11558,120 @@ ], "file": null }, + { + "coord": "com.google.firebase:firebase-auth-interop:aar:sources:19.0.2", + "dependencies": [ + "com.google.firebase:firebase-common:aar:sources:20.1.1", + "com.google.firebase:firebase-annotations:jar:sources:16.1.0", + "androidx.core:core:aar:sources:1.3.1", + "androidx.fragment:fragment:aar:sources:1.2.0", + "androidx.collection:collection:jar:sources:1.1.0", + "com.google.android.gms:play-services-tasks:aar:sources:18.0.1", + "com.google.android.gms:play-services-basement:aar:sources:18.0.0" + ], + "directDependencies": [ + "com.google.android.gms:play-services-basement:aar:sources:18.0.0", + "com.google.android.gms:play-services-tasks:aar:sources:18.0.1", + "com.google.firebase:firebase-annotations:jar:sources:16.1.0", + "com.google.firebase:firebase-common:aar:sources:20.1.1" + ], + "file": null + }, + { + "coord": "com.google.firebase:firebase-auth-ktx:jar:sources:19.3.1", + "dependencies": [ + "com.google.firebase:firebase-common-ktx:aar:sources:20.1.1", + "com.google.firebase:firebase-common:aar:sources:20.1.1", + "androidx.core:core:aar:sources:1.3.1", + "androidx.localbroadcastmanager:localbroadcastmanager:aar:sources:1.0.0", + "androidx.fragment:fragment:aar:sources:1.2.0", + "com.google.firebase:firebase-auth:aar:sources:19.3.1", + "com.google.firebase:firebase-components:aar:sources:17.0.0", + "androidx.collection:collection:jar:sources:1.1.0", + "org.jetbrains.kotlin:kotlin-stdlib-jdk7:jar:sources:1.4.10", + "androidx.annotation:annotation:jar:sources:1.1.0", + "com.google.android.gms:play-services-tasks:aar:sources:18.0.1", + "com.google.auto.value:auto-value-annotations:jar:sources:1.8.1", + "com.google.firebase:firebase-auth-interop:aar:sources:19.0.2", + "com.google.android.gms:play-services-base:aar:sources:18.0.1", + "com.google.android.gms:play-services-basement:aar:sources:18.0.0" + ], + "directDependencies": [ + "com.google.firebase:firebase-common-ktx:aar:sources:20.1.1", + "com.google.firebase:firebase-common:aar:sources:20.1.1", + "com.google.firebase:firebase-auth:aar:sources:19.3.1", + "com.google.firebase:firebase-components:aar:sources:17.0.0", + "org.jetbrains.kotlin:kotlin-stdlib-jdk7:jar:sources:1.4.10" + ], + "file": null + }, + { + "coord": "com.google.firebase:firebase-auth:aar:sources:19.3.1", + "dependencies": [ + "com.google.firebase:firebase-common:aar:sources:20.1.1", + "androidx.core:core:aar:sources:1.3.1", + "androidx.localbroadcastmanager:localbroadcastmanager:aar:sources:1.0.0", + "androidx.fragment:fragment:aar:sources:1.2.0", + "com.google.firebase:firebase-components:aar:sources:17.0.0", + "androidx.collection:collection:jar:sources:1.1.0", + "androidx.annotation:annotation:jar:sources:1.1.0", + "com.google.android.gms:play-services-tasks:aar:sources:18.0.1", + "com.google.auto.value:auto-value-annotations:jar:sources:1.8.1", + "com.google.firebase:firebase-auth-interop:aar:sources:19.0.2", + "com.google.android.gms:play-services-base:aar:sources:18.0.1", + "com.google.android.gms:play-services-basement:aar:sources:18.0.0" + ], + "directDependencies": [ + "com.google.firebase:firebase-common:aar:sources:20.1.1", + "androidx.localbroadcastmanager:localbroadcastmanager:aar:sources:1.0.0", + "androidx.fragment:fragment:aar:sources:1.2.0", + "com.google.firebase:firebase-components:aar:sources:17.0.0", + "androidx.collection:collection:jar:sources:1.1.0", + "com.google.android.gms:play-services-tasks:aar:sources:18.0.1", + "com.google.firebase:firebase-auth-interop:aar:sources:19.0.2", + "com.google.android.gms:play-services-base:aar:sources:18.0.1", + "com.google.android.gms:play-services-basement:aar:sources:18.0.0" + ], + "file": null + }, + { + "coord": "com.google.firebase:firebase-common-ktx:aar:sources:20.1.1", + "dependencies": [ + "org.jetbrains.kotlin:kotlin-stdlib:jar:sources:1.5.0", + "com.google.firebase:firebase-common:aar:sources:20.1.1", + "com.google.firebase:firebase-annotations:jar:sources:16.1.0", + "androidx.core:core:aar:sources:1.3.1", + "androidx.fragment:fragment:aar:sources:1.2.0", + "com.google.firebase:firebase-components:aar:sources:17.0.0", + "androidx.collection:collection:jar:sources:1.1.0", + "org.jetbrains.kotlin:kotlin-stdlib-jdk7:jar:sources:1.4.10", + "androidx.annotation:annotation:jar:sources:1.1.0", + "com.google.android.gms:play-services-tasks:aar:sources:18.0.1", + "com.google.android.gms:play-services-basement:aar:sources:18.0.0" + ], + "directDependencies": [ + "androidx.annotation:annotation:jar:sources:1.1.0", + "com.google.firebase:firebase-common:aar:sources:20.1.1", + "com.google.firebase:firebase-components:aar:sources:17.0.0", + "org.jetbrains.kotlin:kotlin-stdlib-jdk7:jar:sources:1.4.10" + ], + "file": null + }, { "coord": "com.google.firebase:firebase-crashlytics:jar:sources:17.1.1", "dependencies": [ "androidx.documentfile:documentfile:aar:sources:1.0.0", "com.google.android.datatransport:transport-runtime:aar:sources:2.2.3", "com.squareup.okhttp3:okhttp:jar:sources:4.7.2", - "com.google.firebase:firebase-components:aar:sources:16.0.0", "androidx.print:print:aar:sources:1.0.0", - "com.google.android.gms:play-services-base:aar:sources:17.0.0", + "com.google.firebase:firebase-common:aar:sources:20.1.1", "androidx.lifecycle:lifecycle-viewmodel:aar:sources:2.2.0", "androidx.core:core:aar:sources:1.3.1", "androidx.localbroadcastmanager:localbroadcastmanager:aar:sources:1.0.0", "com.google.firebase:firebase-iid:aar:sources:20.1.5", "androidx.legacy:legacy-support-core-utils:aar:sources:1.0.0", "androidx.fragment:fragment:aar:sources:1.2.0", + "com.google.firebase:firebase-components:aar:sources:17.0.0", "com.google.firebase:firebase-measurement-connector:aar:sources:18.0.0", "androidx.collection:collection:jar:sources:1.1.0", "com.google.dagger:dagger:jar:sources:2.28.1", @@ -10243,27 +11680,27 @@ "com.google.android.datatransport:transport-backend-cct:aar:sources:2.3.0", "com.google.firebase:firebase-encoders-json:aar:sources:16.1.0", "androidx.annotation:annotation:jar:sources:1.1.0", - "com.google.firebase:firebase-common:aar:sources:19.3.0", - "com.google.android.gms:play-services-tasks:aar:sources:17.0.0", + "com.google.android.gms:play-services-tasks:aar:sources:18.0.1", "com.google.firebase:firebase-installations:aar:sources:16.3.2", "com.google.auto.value:auto-value-annotations:jar:sources:1.8.1", "androidx.loader:loader:aar:sources:1.0.0", "com.google.firebase:firebase-iid-interop:aar:sources:17.0.0", - "com.google.android.gms:play-services-basement:aar:sources:17.0.0", "com.google.android.gms:play-services-stats:aar:sources:17.0.0", - "com.google.firebase:firebase-installations-interop:aar:sources:16.0.0" + "com.google.android.gms:play-services-base:aar:sources:18.0.1", + "com.google.firebase:firebase-installations-interop:aar:sources:16.0.0", + "com.google.android.gms:play-services-basement:aar:sources:18.0.0" ], "directDependencies": [ "com.google.android.datatransport:transport-runtime:aar:sources:2.2.3", "com.squareup.okhttp3:okhttp:jar:sources:4.7.2", - "com.google.firebase:firebase-components:aar:sources:16.0.0", + "com.google.firebase:firebase-common:aar:sources:20.1.1", "com.google.firebase:firebase-iid:aar:sources:20.1.5", + "com.google.firebase:firebase-components:aar:sources:17.0.0", "com.google.firebase:firebase-measurement-connector:aar:sources:18.0.0", "com.google.android.datatransport:transport-api:aar:sources:2.2.0", "com.google.android.datatransport:transport-backend-cct:aar:sources:2.3.0", "com.google.firebase:firebase-encoders-json:aar:sources:16.1.0", - "com.google.firebase:firebase-common:aar:sources:19.3.0", - "com.google.android.gms:play-services-tasks:aar:sources:17.0.0", + "com.google.android.gms:play-services-tasks:aar:sources:18.0.1", "com.google.firebase:firebase-iid-interop:aar:sources:17.0.0" ], "file": null @@ -10271,16 +11708,15 @@ { "coord": "com.google.firebase:firebase-iid-interop:aar:sources:17.0.0", "dependencies": [ - "com.google.android.gms:play-services-base:aar:sources:17.0.0", "androidx.core:core:aar:sources:1.3.1", "androidx.fragment:fragment:aar:sources:1.2.0", "androidx.collection:collection:jar:sources:1.1.0", - "com.google.android.gms:play-services-tasks:aar:sources:17.0.0", - "com.google.android.gms:play-services-basement:aar:sources:17.0.0" + "com.google.android.gms:play-services-base:aar:sources:18.0.1", + "com.google.android.gms:play-services-basement:aar:sources:18.0.0" ], "directDependencies": [ - "com.google.android.gms:play-services-base:aar:sources:17.0.0", - "com.google.android.gms:play-services-basement:aar:sources:17.0.0" + "com.google.android.gms:play-services-base:aar:sources:18.0.1", + "com.google.android.gms:play-services-basement:aar:sources:18.0.0" ], "file": null }, @@ -10288,74 +11724,69 @@ "coord": "com.google.firebase:firebase-iid:aar:sources:20.1.5", "dependencies": [ "androidx.documentfile:documentfile:aar:sources:1.0.0", - "com.google.firebase:firebase-components:aar:sources:16.0.0", "androidx.print:print:aar:sources:1.0.0", - "com.google.android.gms:play-services-base:aar:sources:17.0.0", + "com.google.firebase:firebase-common:aar:sources:20.1.1", "androidx.lifecycle:lifecycle-viewmodel:aar:sources:2.2.0", "androidx.core:core:aar:sources:1.3.1", "androidx.localbroadcastmanager:localbroadcastmanager:aar:sources:1.0.0", "androidx.legacy:legacy-support-core-utils:aar:sources:1.0.0", "androidx.fragment:fragment:aar:sources:1.2.0", + "com.google.firebase:firebase-components:aar:sources:17.0.0", "androidx.collection:collection:jar:sources:1.1.0", "androidx.lifecycle:lifecycle-livedata:aar:sources:2.2.0", "androidx.annotation:annotation:jar:sources:1.1.0", - "com.google.firebase:firebase-common:aar:sources:19.3.0", - "com.google.android.gms:play-services-tasks:aar:sources:17.0.0", + "com.google.android.gms:play-services-tasks:aar:sources:18.0.1", "com.google.firebase:firebase-installations:aar:sources:16.3.2", "com.google.auto.value:auto-value-annotations:jar:sources:1.8.1", "androidx.loader:loader:aar:sources:1.0.0", "com.google.firebase:firebase-iid-interop:aar:sources:17.0.0", - "com.google.android.gms:play-services-basement:aar:sources:17.0.0", "com.google.android.gms:play-services-stats:aar:sources:17.0.0", - "com.google.firebase:firebase-installations-interop:aar:sources:16.0.0" + "com.google.android.gms:play-services-base:aar:sources:18.0.1", + "com.google.firebase:firebase-installations-interop:aar:sources:16.0.0", + "com.google.android.gms:play-services-basement:aar:sources:18.0.0" ], "directDependencies": [ - "com.google.firebase:firebase-components:aar:sources:16.0.0", + "com.google.firebase:firebase-common:aar:sources:20.1.1", "androidx.core:core:aar:sources:1.3.1", "androidx.legacy:legacy-support-core-utils:aar:sources:1.0.0", + "com.google.firebase:firebase-components:aar:sources:17.0.0", "androidx.collection:collection:jar:sources:1.1.0", - "com.google.firebase:firebase-common:aar:sources:19.3.0", - "com.google.android.gms:play-services-tasks:aar:sources:17.0.0", + "com.google.android.gms:play-services-tasks:aar:sources:18.0.1", "com.google.firebase:firebase-installations:aar:sources:16.3.2", "com.google.firebase:firebase-iid-interop:aar:sources:17.0.0", - "com.google.android.gms:play-services-basement:aar:sources:17.0.0", "com.google.android.gms:play-services-stats:aar:sources:17.0.0", - "com.google.firebase:firebase-installations-interop:aar:sources:16.0.0" + "com.google.firebase:firebase-installations-interop:aar:sources:16.0.0", + "com.google.android.gms:play-services-basement:aar:sources:18.0.0" ], "file": null }, { "coord": "com.google.firebase:firebase-installations-interop:aar:sources:16.0.0", "dependencies": [ - "androidx.core:core:aar:sources:1.3.1", - "androidx.fragment:fragment:aar:sources:1.2.0", - "androidx.collection:collection:jar:sources:1.1.0", - "com.google.android.gms:play-services-tasks:aar:sources:17.0.0", - "com.google.android.gms:play-services-basement:aar:sources:17.0.0" + "com.google.android.gms:play-services-tasks:aar:sources:18.0.1" ], "directDependencies": [ - "com.google.android.gms:play-services-tasks:aar:sources:17.0.0" + "com.google.android.gms:play-services-tasks:aar:sources:18.0.1" ], "file": null }, { "coord": "com.google.firebase:firebase-installations:aar:sources:16.3.2", "dependencies": [ - "com.google.firebase:firebase-components:aar:sources:16.0.0", + "com.google.firebase:firebase-common:aar:sources:20.1.1", "androidx.core:core:aar:sources:1.3.1", "androidx.fragment:fragment:aar:sources:1.2.0", + "com.google.firebase:firebase-components:aar:sources:17.0.0", "androidx.collection:collection:jar:sources:1.1.0", - "androidx.annotation:annotation:jar:sources:1.1.0", - "com.google.firebase:firebase-common:aar:sources:19.3.0", - "com.google.android.gms:play-services-tasks:aar:sources:17.0.0", + "com.google.android.gms:play-services-tasks:aar:sources:18.0.1", "com.google.auto.value:auto-value-annotations:jar:sources:1.8.1", - "com.google.android.gms:play-services-basement:aar:sources:17.0.0", - "com.google.firebase:firebase-installations-interop:aar:sources:16.0.0" + "com.google.firebase:firebase-installations-interop:aar:sources:16.0.0", + "com.google.android.gms:play-services-basement:aar:sources:18.0.0" ], "directDependencies": [ - "com.google.android.gms:play-services-tasks:aar:sources:17.0.0", - "com.google.firebase:firebase-common:aar:sources:19.3.0", - "com.google.firebase:firebase-components:aar:sources:16.0.0", + "com.google.android.gms:play-services-tasks:aar:sources:18.0.1", + "com.google.firebase:firebase-common:aar:sources:20.1.1", + "com.google.firebase:firebase-components:aar:sources:17.0.0", "com.google.firebase:firebase-installations-interop:aar:sources:16.0.0" ], "file": null @@ -10363,13 +11794,23 @@ { "coord": "com.google.firebase:firebase-measurement-connector:aar:sources:18.0.0", "dependencies": [ - "com.google.android.gms:play-services-basement:aar:sources:17.0.0", "androidx.core:core:aar:sources:1.3.1", "androidx.collection:collection:jar:sources:1.1.0", - "androidx.fragment:fragment:aar:sources:1.2.0" + "androidx.fragment:fragment:aar:sources:1.2.0", + "com.google.android.gms:play-services-basement:aar:sources:18.0.0" + ], + "directDependencies": [ + "com.google.android.gms:play-services-basement:aar:sources:18.0.0" + ], + "file": null + }, + { + "coord": "com.google.firebase:protolite-well-known-types:aar:sources:18.0.0", + "dependencies": [ + "com.google.protobuf:protobuf-javalite:jar:sources:3.19.2" ], "directDependencies": [ - "com.google.android.gms:play-services-basement:aar:sources:17.0.0" + "com.google.protobuf:protobuf-javalite:jar:sources:3.19.2" ], "file": null }, diff --git a/third_party/versions.bzl b/third_party/versions.bzl index b51f0c4b457..f62c87f8f15 100644 --- a/third_party/versions.bzl +++ b/third_party/versions.bzl @@ -54,9 +54,15 @@ MAVEN_PRODUCTION_DEPENDENCY_VERSIONS = { "com.github.bumptech.glide:glide": "4.11.0", "com.google.android.flexbox:flexbox": "3.0.0", "com.google.android.material:material": "1.3.0", + "com.google.auto.value:auto-value-annotations": "1.8.1", "com.google.firebase:firebase-analytics": "17.5.0", + "com.google.firebase:firebase-appcheck": "16.0.0", + "com.google.firebase:firebase-appcheck-debug": "16.0.0", + "com.google.firebase:firebase-appcheck-playintegrity": "16.0.0", + "com.google.firebase:firebase-auth-ktx": "19.3.1", "com.google.firebase:firebase-common": "19.3.0", "com.google.firebase:firebase-crashlytics": "17.1.1", + "com.google.firebase:firebase-firestore-ktx": "24.2.1", "com.google.gms:google-services": "4.3.3", "com.google.guava:guava": "28.1-android", "com.google.protobuf:protobuf-javalite": "3.17.3", @@ -70,6 +76,7 @@ MAVEN_PRODUCTION_DEPENDENCY_VERSIONS = { "javax.annotation:javax.annotation-api:jar": "1.3.2", "javax.inject:javax.inject": "1", "nl.dionsegijn:konfetti": "1.2.5", + "org.checkerframework:checker-qual": "3.13.0", "org.jetbrains.kotlin:kotlin-stdlib-jdk8:jar": "1.3.72", "org.jetbrains.kotlinx:kotlinx-coroutines-android": "1.4.1", "org.jetbrains.kotlinx:kotlinx-coroutines-core": "1.4.1", diff --git a/utility/BUILD.bazel b/utility/BUILD.bazel index aff05e104d5..b69cab715d7 100644 --- a/utility/BUILD.bazel +++ b/utility/BUILD.bazel @@ -69,6 +69,7 @@ kt_android_library( ":resources", "//app:crashlytics", "//app:crashlytics_deps", + "//app:firestore_deps", "//model/src/main/proto:event_logger_java_proto_lite", "//model/src/main/proto:platform_parameter_java_proto_lite", "//third_party:androidx_appcompat_appcompat", @@ -107,6 +108,7 @@ TEST_DEPS = [ ":utility", "//app:crashlytics", "//app:crashlytics_deps", + "//app:firestore_deps", "//model/src/main/proto:test_models", "//testing", "//testing/src/main/java/org/oppia/android/testing/data:data_provider_test_monitor", diff --git a/utility/build.gradle b/utility/build.gradle index 39589a8692b..be880396432 100644 --- a/utility/build.gradle +++ b/utility/build.gradle @@ -89,6 +89,8 @@ dependencies { 'com.google.firebase:firebase-analytics-ktx:17.5.0', 'com.google.firebase:firebase-core:17.5.0', 'com.google.firebase:firebase-crashlytics:17.0.0', + 'com.google.firebase:firebase-firestore-ktx:24.2.1', + 'com.google.firebase:firebase-auth-ktx:19.3.1', 'com.google.protobuf:protobuf-javalite:3.17.3', "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version", 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.1', diff --git a/utility/src/main/java/org/oppia/android/util/extensions/ContextExtensions.kt b/utility/src/main/java/org/oppia/android/util/extensions/ContextExtensions.kt index 0aafa694bbf..065ba37f100 100644 --- a/utility/src/main/java/org/oppia/android/util/extensions/ContextExtensions.kt +++ b/utility/src/main/java/org/oppia/android/util/extensions/ContextExtensions.kt @@ -1,4 +1,4 @@ -package org.oppia.android.app.utility +package org.oppia.android.util.extensions import android.content.Context diff --git a/utility/src/main/java/org/oppia/android/util/logging/EventBundleCreator.kt b/utility/src/main/java/org/oppia/android/util/logging/EventBundleCreator.kt index 100f1c86c4c..9a31131f91c 100644 --- a/utility/src/main/java/org/oppia/android/util/logging/EventBundleCreator.kt +++ b/utility/src/main/java/org/oppia/android/util/logging/EventBundleCreator.kt @@ -1,6 +1,7 @@ package org.oppia.android.util.logging import android.content.Context +import android.content.res.Configuration import android.os.Build import android.os.Bundle import org.oppia.android.app.model.AppLanguageSelection @@ -56,8 +57,8 @@ import org.oppia.android.app.model.OppiaMetricLog.LoggableMetric.LoggableMetricT import org.oppia.android.app.model.OppiaMetricLog.LoggableMetric.LoggableMetricTypeCase.STORAGE_USAGE_METRIC import org.oppia.android.app.model.ScreenName import org.oppia.android.app.model.WrittenTranslationLanguageSelection -import org.oppia.android.app.utility.getVersionCode -import org.oppia.android.app.utility.getVersionName +import org.oppia.android.util.extensions.getVersionCode +import org.oppia.android.util.extensions.getVersionName import org.oppia.android.util.logging.EventBundleCreator.EventActivityContext.AbandonSurveyContext import org.oppia.android.util.logging.EventBundleCreator.EventActivityContext.CardContext import org.oppia.android.util.logging.EventBundleCreator.EventActivityContext.ConceptCardContext @@ -129,6 +130,9 @@ class EventBundleCreator @Inject constructor( private val appVersionCode by lazy { context.getVersionCode() } private val appVersionName by lazy { context.getVersionName() } private val eventCount by lazy { AtomicInteger() } + private val screenDensity by lazy { + Configuration().densityDpi + } /** * Fills the specified [bundle] with a logging-ready representation of [eventLog] and returns a @@ -150,6 +154,9 @@ class EventBundleCreator @Inject constructor( bundle.putString( "oppia_audio_lang", eventLog.audioTranslationLanguageSelection.toAnalyticsText() ) + bundle.putInt( + "screen_density", screenDensity + ) return eventLog.context.convertToActivityContext().also { eventContext -> // Only allow user IDs to be logged when the learner study feature is enabled. eventContext.storeValue( diff --git a/utility/src/main/java/org/oppia/android/util/logging/LogUploader.kt b/utility/src/main/java/org/oppia/android/util/logging/LogUploader.kt index 9104e66a24f..0c337ca71a6 100644 --- a/utility/src/main/java/org/oppia/android/util/logging/LogUploader.kt +++ b/utility/src/main/java/org/oppia/android/util/logging/LogUploader.kt @@ -17,4 +17,10 @@ interface LogUploader { workManager: WorkManager, workRequest: PeriodicWorkRequest ) + + /** Enqueues a [workRequest] using the [workManager] for uploading event logs that are meant for Firestore. */ + fun enqueueWorkRequestForFirestore( + workManager: WorkManager, + workRequest: PeriodicWorkRequest + ) } diff --git a/utility/src/main/java/org/oppia/android/util/logging/firebase/BUILD.bazel b/utility/src/main/java/org/oppia/android/util/logging/firebase/BUILD.bazel index be07e37c2d8..91e936b66a8 100644 --- a/utility/src/main/java/org/oppia/android/util/logging/firebase/BUILD.bazel +++ b/utility/src/main/java/org/oppia/android/util/logging/firebase/BUILD.bazel @@ -47,7 +47,9 @@ kt_android_library( visibility = ["//:oppia_prod_module_visibility"], deps = [ ":dagger", + ":debug_module", ":firebase_exception_logger", + ":firestore_logger_impl", ":prod_impl", "//third_party:com_google_firebase_firebase-analytics", "//third_party:com_google_firebase_firebase-crashlytics", @@ -82,8 +84,75 @@ kt_android_library( deps = [ ":dagger", ":debug_event_logger", + ":debug_firestore_logger_impl", ":firebase_exception_logger", ], ) +kt_android_library( + name = "firestore_logger_impl", + srcs = [ + "FirestoreEventLoggerProdImpl.kt", + ], + deps = [ + ":firestore_logger", + ":firestore_wrapper_impl", + "//third_party:androidx_work_work-runtime", + "//third_party:androidx_work_work-runtime-ktx", + "//third_party:com_google_firebase_firebase-firestore-ktx", + "//utility/src/main/java/org/oppia/android/util/logging:console_logger", + ], +) + +kt_android_library( + name = "firestore_logger", + srcs = [ + "FirestoreEventLogger.kt", + ], + visibility = ["//:oppia_api_visibility"], + deps = [ + "//model/src/main/proto:event_logger_java_proto_lite", + ], +) + +kt_android_library( + name = "debug_firestore_logger_impl", + srcs = [ + "DebugFirestoreEventLoggerImpl.kt", + ], + visibility = [ + "//app:__pkg__", + ], + deps = [ + ":firestore_logger_impl", + ":firestore_wrapper_impl", + "//third_party:javax_inject_javax_inject", + ], +) + +kt_android_library( + name = "firestore_wrapper", + srcs = [ + "FirestoreInstance.kt", + "FirestoreInstanceWrapper.kt", + ], + deps = [ + "//third_party:com_google_firebase_firebase-firestore-ktx", + "//third_party:org_jetbrains_kotlinx_kotlinx-coroutines-core", + "//utility/src/main/java/org/oppia/android/util/data:async_result", + ], +) + +kt_android_library( + name = "firestore_wrapper_impl", + srcs = [ + "FirestoreInstanceWrapperImpl.kt", + ], + visibility = ["//:oppia_prod_module_visibility"], + deps = [ + ":dagger", + ":firestore_wrapper", + ], +) + dagger_rules() diff --git a/utility/src/main/java/org/oppia/android/util/logging/firebase/DebugFirestoreEventLoggerImpl.kt b/utility/src/main/java/org/oppia/android/util/logging/firebase/DebugFirestoreEventLoggerImpl.kt new file mode 100644 index 00000000000..f5d39f998cd --- /dev/null +++ b/utility/src/main/java/org/oppia/android/util/logging/firebase/DebugFirestoreEventLoggerImpl.kt @@ -0,0 +1,33 @@ +package org.oppia.android.util.logging.firebase + +import org.oppia.android.app.model.EventLog +import java.util.concurrent.CopyOnWriteArrayList +import javax.inject.Inject +import javax.inject.Singleton + +/** + * A debug implementation of [FirestoreEventLogger] used in developer-only builds of the app. + * + * It forwards events to a production [FirestoreEventLogger] for real logging, but it also records logged + * events for later retrieval (e.g. via [getEventList]). + */ +@Singleton +class DebugFirestoreEventLoggerImpl @Inject constructor( + private val realEventLogger: FirestoreEventLoggerProdImpl +) : FirestoreEventLogger { + private val eventList = CopyOnWriteArrayList() + + override fun uploadEvent(eventLog: EventLog) { + eventList.add(eventLog) + realEventLogger.uploadEvent(eventLog) + } + + /** Returns the list of all [EventLog]s logged for Firestore. */ + fun getEventList(): List = eventList + + /** Returns the most recently logged event. */ + fun getMostRecentEvent(): EventLog = getEventList().last() + + /** Clears all the events that are currently logged. */ + fun clearAllEvents() = eventList.clear() +} diff --git a/utility/src/main/java/org/oppia/android/util/logging/firebase/DebugLogReportingModule.kt b/utility/src/main/java/org/oppia/android/util/logging/firebase/DebugLogReportingModule.kt index 1f897833e89..cfcaf2b8b30 100644 --- a/utility/src/main/java/org/oppia/android/util/logging/firebase/DebugLogReportingModule.kt +++ b/utility/src/main/java/org/oppia/android/util/logging/firebase/DebugLogReportingModule.kt @@ -27,4 +27,14 @@ class DebugLogReportingModule { factory: FirebaseAnalyticsEventLogger.Factory ): PerformanceMetricsEventLogger = factory.createPerformanceMetricEventLogger() + + @Provides + @Singleton + fun provideDebugFirestoreLogger(debugFirestoreEventLogger: DebugFirestoreEventLoggerImpl): + FirestoreEventLogger = debugFirestoreEventLogger + + @Provides + @Singleton + fun provideFirebaseFirestoreInstanceWrapper(wrapperImpl: FirestoreInstanceWrapperImpl): + FirestoreInstanceWrapper = wrapperImpl } diff --git a/utility/src/main/java/org/oppia/android/util/logging/firebase/FirebaseLogUploader.kt b/utility/src/main/java/org/oppia/android/util/logging/firebase/FirebaseLogUploader.kt index 067c7c4c815..40316ac0397 100644 --- a/utility/src/main/java/org/oppia/android/util/logging/firebase/FirebaseLogUploader.kt +++ b/utility/src/main/java/org/oppia/android/util/logging/firebase/FirebaseLogUploader.kt @@ -9,6 +9,7 @@ import javax.inject.Inject private const val OPPIA_EVENT_WORK = "OPPIA_EVENT_WORK_REQUEST" private const val OPPIA_EXCEPTION_WORK = "OPPIA_EXCEPTION_WORK_REQUEST" private const val OPPIA_PERFORMANCE_METRICS_WORK = "OPPIA_PERFORMANCE_METRICS_WORK" +private const val OPPIA_FIRESTORE_WORK = "OPPIA_FIRESTORE_WORK_REQUEST" /** Enqueues work requests for uploading stored event/exception logs to the remote service. */ class FirebaseLogUploader @Inject constructor() : @@ -46,4 +47,15 @@ class FirebaseLogUploader @Inject constructor() : workRequest ) } + + override fun enqueueWorkRequestForFirestore( + workManager: WorkManager, + workRequest: PeriodicWorkRequest + ) { + workManager.enqueueUniquePeriodicWork( + OPPIA_FIRESTORE_WORK, + ExistingPeriodicWorkPolicy.KEEP, + workRequest + ) + } } diff --git a/utility/src/main/java/org/oppia/android/util/logging/firebase/FirestoreEventLogger.kt b/utility/src/main/java/org/oppia/android/util/logging/firebase/FirestoreEventLogger.kt new file mode 100644 index 00000000000..304557108ca --- /dev/null +++ b/utility/src/main/java/org/oppia/android/util/logging/firebase/FirestoreEventLogger.kt @@ -0,0 +1,13 @@ +package org.oppia.android.util.logging.firebase + +import org.oppia.android.app.model.EventLog + +/** Logger for uploading data bundles to Firestore. */ +interface FirestoreEventLogger { + /** + * Converts eventLogs to Firestore documents and uploads or save them on disk. + * + * @param eventLog which contains all the relevant data to be reported + */ + fun uploadEvent(eventLog: EventLog) +} diff --git a/utility/src/main/java/org/oppia/android/util/logging/firebase/FirestoreEventLoggerProdImpl.kt b/utility/src/main/java/org/oppia/android/util/logging/firebase/FirestoreEventLoggerProdImpl.kt new file mode 100644 index 00000000000..5e6f133b928 --- /dev/null +++ b/utility/src/main/java/org/oppia/android/util/logging/firebase/FirestoreEventLoggerProdImpl.kt @@ -0,0 +1,31 @@ +package org.oppia.android.util.logging.firebase + +import org.oppia.android.app.model.EventLog +import org.oppia.android.util.logging.ConsoleLogger +import javax.inject.Inject + +/** Logger for uploading to Firestore. */ +class FirestoreEventLoggerProdImpl @Inject constructor( + private val consoleLogger: ConsoleLogger, + private val firestoreInstanceWrapper: FirestoreInstanceWrapper +) : FirestoreEventLogger { + /** Converts an event to a document and uploads it to Firebase Firestore. */ + override fun uploadEvent(eventLog: EventLog) { + val eventContext = eventLog.context.optionalResponse + val document = hashMapOf( + "survey_id" to eventContext.surveyDetails.surveyId, + "open_feedback_answer" to eventContext.feedbackAnswer, + "time_submitted" to eventLog.timestamp + ) + + firestoreInstanceWrapper.firestoreInstance?.firebaseFirestore + ?.collection("nps_survey_open_feedback") + ?.add(document) + ?.addOnSuccessListener { + consoleLogger.i("FirestoreEventLoggerProdImpl", "Upload to Firestore was successful") + } + ?.addOnFailureListener { e -> + consoleLogger.e("FirestoreEventLoggerProdImpl", e.toString(), e) + } + } +} diff --git a/utility/src/main/java/org/oppia/android/util/logging/firebase/FirestoreInstance.kt b/utility/src/main/java/org/oppia/android/util/logging/firebase/FirestoreInstance.kt new file mode 100644 index 00000000000..a2894cee29d --- /dev/null +++ b/utility/src/main/java/org/oppia/android/util/logging/firebase/FirestoreInstance.kt @@ -0,0 +1,8 @@ +package org.oppia.android.util.logging.firebase + +import com.google.firebase.firestore.FirebaseFirestore + +/** Wrapper for [FirebaseFirestore], used to pass an instance of [FirebaseFirestore]. */ +data class FirestoreInstance( + val firebaseFirestore: FirebaseFirestore +) diff --git a/utility/src/main/java/org/oppia/android/util/logging/firebase/FirestoreInstanceWrapper.kt b/utility/src/main/java/org/oppia/android/util/logging/firebase/FirestoreInstanceWrapper.kt new file mode 100644 index 00000000000..246bb505ad4 --- /dev/null +++ b/utility/src/main/java/org/oppia/android/util/logging/firebase/FirestoreInstanceWrapper.kt @@ -0,0 +1,7 @@ +package org.oppia.android.util.logging.firebase + +/** Interface for providing an implementation of [FirestoreInstance]. */ +interface FirestoreInstanceWrapper { + /** Returns a wrapped instance of FirebaseFirestore. */ + val firestoreInstance: FirestoreInstance? +} diff --git a/utility/src/main/java/org/oppia/android/util/logging/firebase/FirestoreInstanceWrapperImpl.kt b/utility/src/main/java/org/oppia/android/util/logging/firebase/FirestoreInstanceWrapperImpl.kt new file mode 100644 index 00000000000..039c1545509 --- /dev/null +++ b/utility/src/main/java/org/oppia/android/util/logging/firebase/FirestoreInstanceWrapperImpl.kt @@ -0,0 +1,13 @@ +package org.oppia.android.util.logging.firebase + +import com.google.firebase.firestore.ktx.firestore +import com.google.firebase.ktx.Firebase +import javax.inject.Inject + +/** Implementation of [FirestoreInstanceWrapper]. */ +class FirestoreInstanceWrapperImpl @Inject constructor() : + FirestoreInstanceWrapper { + + override val firestoreInstance: FirestoreInstance + get() = FirestoreInstance(Firebase.firestore) +} diff --git a/utility/src/main/java/org/oppia/android/util/logging/firebase/LogReportingModule.kt b/utility/src/main/java/org/oppia/android/util/logging/firebase/LogReportingModule.kt index c822eb02f2d..9ab74a2cbd3 100644 --- a/utility/src/main/java/org/oppia/android/util/logging/firebase/LogReportingModule.kt +++ b/utility/src/main/java/org/oppia/android/util/logging/firebase/LogReportingModule.kt @@ -27,4 +27,14 @@ class LogReportingModule { factory: FirebaseAnalyticsEventLogger.Factory ): PerformanceMetricsEventLogger = factory.createPerformanceMetricEventLogger() + + @Provides + @Singleton + fun provideFirestoreLogger(factory: FirestoreEventLoggerProdImpl): + FirestoreEventLogger = factory + + @Provides + @Singleton + fun provideFirebaseFirestoreInstanceWrapper(wrapperImpl: FirestoreInstanceWrapperImpl): + FirestoreInstanceWrapper = wrapperImpl } diff --git a/utility/src/main/java/org/oppia/android/util/platformparameter/FeatureFlagConstants.kt b/utility/src/main/java/org/oppia/android/util/platformparameter/FeatureFlagConstants.kt index bf366a43954..ba9dafdb620 100644 --- a/utility/src/main/java/org/oppia/android/util/platformparameter/FeatureFlagConstants.kt +++ b/utility/src/main/java/org/oppia/android/util/platformparameter/FeatureFlagConstants.kt @@ -156,3 +156,23 @@ const val APP_AND_OS_DEPRECATION = "android_enable_app_and_os_deprecation" * Default value for the feature flag corresponding to [EnableAppAndOsDeprecation]. */ const val ENABLE_APP_AND_OS_DEPRECATION_DEFAULT_VALUE = false + +/** Qualifier for the feature flag that toggles the the NPS Survey. */ +@Qualifier +annotation class EnableNpsSurvey + +/** Name of the feature flag that toggles the NPS Survey. */ +const val ENABLE_NPS_SURVEY = "enable_nps_survey" + +/** Default value of the feature flag corresponding to [EnableNpsSurvey]. */ +const val ENABLE_NPS_SURVEY_DEFAULT_VALUE = false + +/** Qualifier for the feature flag that toggles the new onboarding flow. */ +@Qualifier +annotation class EnableOnboardingFlowV2 + +/** Name of the feature flag that toggles the new onboarding flow. */ +const val ENABLE_ONBOARDING_FLOW_V2 = "enable_onboarding_flow_v2" + +/** Default value of the feature flag corresponding to [EnableOnboardingFlowV2]. */ +const val ENABLE_ONBOARDING_FLOW_V2_DEFAULT_VALUE = false diff --git a/utility/src/test/java/org/oppia/android/util/caching/testing/TestNoOpAssetRepositoryTest.kt b/utility/src/test/java/org/oppia/android/util/caching/testing/TestNoOpAssetRepositoryTest.kt index 2cb1a10f433..ea5346c2490 100644 --- a/utility/src/test/java/org/oppia/android/util/caching/testing/TestNoOpAssetRepositoryTest.kt +++ b/utility/src/test/java/org/oppia/android/util/caching/testing/TestNoOpAssetRepositoryTest.kt @@ -38,7 +38,7 @@ class TestNoOpAssetRepositoryTest { @Test fun testLoadTextFileFromLocalAssets_throwsException() { - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { assetRepository.loadTextFileFromLocalAssets("asset.json") } @@ -57,7 +57,7 @@ class TestNoOpAssetRepositoryTest { assetRepository.primeTextFileFromLocalAssets("asset.json") // Priming doesn't do anything, so the exception is still thrown. - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { assetRepository.loadTextFileFromLocalAssets("asset.json") } @@ -66,7 +66,7 @@ class TestNoOpAssetRepositoryTest { @Test fun testLoadProtoFromLocalAssets_throwsException() { - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { assetRepository.loadProtoFromLocalAssets("test", TestMessage.getDefaultInstance()) } @@ -107,7 +107,7 @@ class TestNoOpAssetRepositoryTest { @Test fun testLoadRemoteBinaryAsset_throwsException() { - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { assetRepository.loadRemoteBinaryAsset("https://example.com/test.pb") } @@ -117,7 +117,7 @@ class TestNoOpAssetRepositoryTest { @Test fun testLoadImageAssetFromLocalAssets_throwsException() { - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { assetRepository.loadImageAssetFromLocalAssets("https://example.com/test.png") } @@ -137,7 +137,7 @@ class TestNoOpAssetRepositoryTest { assetRepository.primeRemoteBinaryAsset("https://example.com/test.pb") // Priming doesn't do anything, so the exception is still thrown. - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { assetRepository.loadRemoteBinaryAsset("https://example.com/test.pb") } diff --git a/utility/src/test/java/org/oppia/android/util/data/AsyncDataSubscriptionManagerTest.kt b/utility/src/test/java/org/oppia/android/util/data/AsyncDataSubscriptionManagerTest.kt index 8a9c0b627d9..0926b2fd323 100644 --- a/utility/src/test/java/org/oppia/android/util/data/AsyncDataSubscriptionManagerTest.kt +++ b/utility/src/test/java/org/oppia/android/util/data/AsyncDataSubscriptionManagerTest.kt @@ -258,7 +258,7 @@ class AsyncDataSubscriptionManagerTest { @Test fun testAssociateIds_sameId_throwsException() { - val error = assertThrows(IllegalStateException::class) { + val error = assertThrows() { asyncDataSubscriptionManager.associateIds("same_id", "same_id") } @@ -430,7 +430,7 @@ class AsyncDataSubscriptionManagerTest { asyncDataSubscriptionManager.subscribe("child_id", mockSubscriptionCallback2.toAsyncChange()) asyncDataSubscriptionManager.associateIds("child_id", "parent_id") - val error = assertThrows(IllegalStateException::class) { + val error = assertThrows() { asyncDataSubscriptionManager.associateIds("parent_id", "child_id") } @@ -446,7 +446,7 @@ class AsyncDataSubscriptionManagerTest { asyncDataSubscriptionManager.associateIds("child_id1", "parent_id") asyncDataSubscriptionManager.associateIds("child_id2", "child_id1") - val error = assertThrows(IllegalStateException::class) { + val error = assertThrows() { asyncDataSubscriptionManager.associateIds("parent_id", "child_id1") } diff --git a/utility/src/test/java/org/oppia/android/util/data/InMemoryBlockingCacheTest.kt b/utility/src/test/java/org/oppia/android/util/data/InMemoryBlockingCacheTest.kt index e5e2a69b59b..4dc2cc0fc5a 100644 --- a/utility/src/test/java/org/oppia/android/util/data/InMemoryBlockingCacheTest.kt +++ b/utility/src/test/java/org/oppia/android/util/data/InMemoryBlockingCacheTest.kt @@ -207,7 +207,7 @@ class InMemoryBlockingCacheTest { val deferredRead = cache.readIfPresentAsync() val exception = - assertThrows(IllegalStateException::class) { awaitCompletion(deferredRead) } + assertThrows() { awaitCompletion(deferredRead) } assertThat(exception).hasMessageThat() .contains("Expected to read the cache only after it's been created") } @@ -302,7 +302,7 @@ class InMemoryBlockingCacheTest { // The operation should fail since the method expects the cache to be initialized. val exception = - assertThrows(IllegalStateException::class) { awaitCompletion(deferredUpdate) } + assertThrows() { awaitCompletion(deferredUpdate) } assertThat(exception).hasMessageThat() .contains("Expected to update the cache only after it's been created") } @@ -422,7 +422,7 @@ class InMemoryBlockingCacheTest { // Deleting the cache should result in readIfPresent()'s expectations to fail. val exception = - assertThrows(IllegalStateException::class) { awaitCompletion(deferredRead) } + assertThrows() { awaitCompletion(deferredRead) } assertThat(exception).hasMessageThat() .contains("Expected to read the cache only after it's been created") } @@ -456,7 +456,7 @@ class InMemoryBlockingCacheTest { // The operation should fail since the method expects the cache to be initialized. val exception = - assertThrows(IllegalStateException::class) { awaitCompletion(deferredUpdate) } + assertThrows() { awaitCompletion(deferredUpdate) } assertThat(exception).hasMessageThat() .contains("Expected to update the cache only after it's been created") } diff --git a/utility/src/test/java/org/oppia/android/util/locale/AndroidLocaleFactoryTest.kt b/utility/src/test/java/org/oppia/android/util/locale/AndroidLocaleFactoryTest.kt index c0b45f7e9fd..c009baad4e0 100644 --- a/utility/src/test/java/org/oppia/android/util/locale/AndroidLocaleFactoryTest.kt +++ b/utility/src/test/java/org/oppia/android/util/locale/AndroidLocaleFactoryTest.kt @@ -51,7 +51,7 @@ class AndroidLocaleFactoryTest { @Test fun testCreateLocale_default_throwsException() { - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { androidLocaleFactory.createAndroidLocale(OppiaLocaleContext.getDefaultInstance()) } @@ -513,7 +513,7 @@ class AndroidLocaleFactoryTest { regionDefinition = REGION_INDIA ) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { androidLocaleFactory.createAndroidLocale(context) } @@ -566,7 +566,7 @@ class AndroidLocaleFactoryTest { regionDefinition = REGION_INDIA ) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { androidLocaleFactory.createAndroidLocale(context) } @@ -945,7 +945,7 @@ class AndroidLocaleFactoryTest { regionDefinition = REGION_INDIA ) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { androidLocaleFactory.createAndroidLocale(context) } @@ -998,7 +998,7 @@ class AndroidLocaleFactoryTest { regionDefinition = REGION_INDIA ) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { androidLocaleFactory.createAndroidLocale(context) } @@ -1377,7 +1377,7 @@ class AndroidLocaleFactoryTest { regionDefinition = REGION_INDIA ) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { androidLocaleFactory.createAndroidLocale(context) } @@ -1430,7 +1430,7 @@ class AndroidLocaleFactoryTest { regionDefinition = REGION_INDIA ) - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { androidLocaleFactory.createAndroidLocale(context) } diff --git a/utility/src/test/java/org/oppia/android/util/locale/DisplayLocaleImplTest.kt b/utility/src/test/java/org/oppia/android/util/locale/DisplayLocaleImplTest.kt index 8786f31948b..e300a47d6fa 100644 --- a/utility/src/test/java/org/oppia/android/util/locale/DisplayLocaleImplTest.kt +++ b/utility/src/test/java/org/oppia/android/util/locale/DisplayLocaleImplTest.kt @@ -354,7 +354,7 @@ class DisplayLocaleImplTest { val impl = createDisplayLocaleImpl(US_ENGLISH_CONTEXT) val resources = context.resources - assertThrows(Resources.NotFoundException::class) { + assertThrows() { impl.run { resources.getStringInLocale(-1) } } } @@ -397,7 +397,7 @@ class DisplayLocaleImplTest { val impl = createDisplayLocaleImpl(US_ENGLISH_CONTEXT) val resources = context.resources - assertThrows(Resources.NotFoundException::class) { + assertThrows() { impl.run { resources.getStringInLocaleWithWrapping(-1) } } } @@ -440,7 +440,7 @@ class DisplayLocaleImplTest { val impl = createDisplayLocaleImpl(US_ENGLISH_CONTEXT) val resources = context.resources - assertThrows(Resources.NotFoundException::class) { + assertThrows() { impl.run { resources.getStringInLocaleWithoutWrapping(-1) } } } @@ -460,7 +460,7 @@ class DisplayLocaleImplTest { val impl = createDisplayLocaleImpl(US_ENGLISH_CONTEXT) val resources = context.resources - assertThrows(Resources.NotFoundException::class) { + assertThrows() { impl.run { resources.getStringArrayInLocale(-1) } } } @@ -496,7 +496,7 @@ class DisplayLocaleImplTest { val impl = createDisplayLocaleImpl(US_ENGLISH_CONTEXT) val resources = context.resources - assertThrows(Resources.NotFoundException::class) { + assertThrows() { impl.run { resources.getQuantityStringInLocale(-1, 0) } } } @@ -535,7 +535,7 @@ class DisplayLocaleImplTest { val impl = createDisplayLocaleImpl(US_ENGLISH_CONTEXT) val resources = context.resources - assertThrows(Resources.NotFoundException::class) { + assertThrows() { impl.run { resources.getQuantityStringInLocaleWithWrapping(-1, 0) } } } @@ -574,7 +574,7 @@ class DisplayLocaleImplTest { val impl = createDisplayLocaleImpl(US_ENGLISH_CONTEXT) val resources = context.resources - assertThrows(Resources.NotFoundException::class) { + assertThrows() { impl.run { resources.getQuantityStringInLocaleWithoutWrapping(-1, 0) } } } @@ -610,7 +610,7 @@ class DisplayLocaleImplTest { val impl = createDisplayLocaleImpl(US_ENGLISH_CONTEXT) val resources = context.resources - assertThrows(Resources.NotFoundException::class) { + assertThrows() { impl.run { resources.getQuantityTextInLocale(-1, 0) } } } diff --git a/utility/src/test/java/org/oppia/android/util/locale/testing/TestOppiaBidiFormatterTest.kt b/utility/src/test/java/org/oppia/android/util/locale/testing/TestOppiaBidiFormatterTest.kt index d56be1961ae..91eefeac704 100644 --- a/utility/src/test/java/org/oppia/android/util/locale/testing/TestOppiaBidiFormatterTest.kt +++ b/utility/src/test/java/org/oppia/android/util/locale/testing/TestOppiaBidiFormatterTest.kt @@ -92,7 +92,7 @@ class TestOppiaBidiFormatterTest { val wrappedStr = formatter.wrapText("test str") // Try to wrap the string again. - val exception = assertThrows(IllegalStateException::class) { formatter.wrapText(wrappedStr) } + val exception = assertThrows() { formatter.wrapText(wrappedStr) } assertThat(exception).hasMessageThat() .contains("Error: encountered string that's already been wrapped: test str") diff --git a/utility/src/test/java/org/oppia/android/util/logging/EventBundleCreatorTest.kt b/utility/src/test/java/org/oppia/android/util/logging/EventBundleCreatorTest.kt index db424118e1f..7cb8ef98c35 100644 --- a/utility/src/test/java/org/oppia/android/util/logging/EventBundleCreatorTest.kt +++ b/utility/src/test/java/org/oppia/android/util/logging/EventBundleCreatorTest.kt @@ -176,7 +176,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(EventLog.getDefaultInstance(), bundle) assertThat(typeName).isEqualTo("ERROR_internal_logging_failure") - assertThat(bundle).hasSize(10) + assertThat(bundle).hasSize(11) assertThat(bundle).longInt("timestamp").isEqualTo(0) assertThat(bundle).string("priority").isEqualTo("unspecified_priority") assertThat(bundle).integer("event_type").isEqualTo(ACTIVITYCONTEXT_NOT_SET.number) @@ -222,7 +222,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("ERROR_internal_logging_failure") - assertThat(bundle).hasSize(10) + assertThat(bundle).hasSize(11) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(ACTIVITYCONTEXT_NOT_SET.number) @@ -570,7 +570,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("open_exploration_player_screen") - assertThat(bundle).hasSize(16) + assertThat(bundle).hasSize(17) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(OPEN_EXPLORATION_ACTIVITY.number) @@ -594,7 +594,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("open_exploration_player_screen") - assertThat(bundle).hasSize(18) + assertThat(bundle).hasSize(19) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(OPEN_EXPLORATION_ACTIVITY.number) @@ -620,7 +620,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("select_topic_info_tab") - assertThat(bundle).hasSize(11) + assertThat(bundle).hasSize(12) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(OPEN_INFO_TAB.number) @@ -639,7 +639,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("select_topic_lessons_tab") - assertThat(bundle).hasSize(11) + assertThat(bundle).hasSize(12) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(OPEN_LESSONS_TAB.number) @@ -821,7 +821,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("select_topic_practice_tab") - assertThat(bundle).hasSize(11) + assertThat(bundle).hasSize(12) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(OPEN_PRACTICE_TAB.number) @@ -840,7 +840,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("select_topic_revision_tab") - assertThat(bundle).hasSize(11) + assertThat(bundle).hasSize(12) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(OPEN_REVISION_TAB.number) @@ -859,7 +859,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("open_question_player_screen") - assertThat(bundle).hasSize(12) + assertThat(bundle).hasSize(13) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(OPEN_QUESTION_PLAYER.number) @@ -879,7 +879,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("open_story_chapter_list_screen") - assertThat(bundle).hasSize(12) + assertThat(bundle).hasSize(13) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(OPEN_STORY_ACTIVITY.number) @@ -899,7 +899,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("open_concept_card") - assertThat(bundle).hasSize(11) + assertThat(bundle).hasSize(12) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(OPEN_CONCEPT_CARD.number) @@ -918,7 +918,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("open_revision_card") - assertThat(bundle).hasSize(12) + assertThat(bundle).hasSize(13) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(OPEN_REVISION_CARD.number) @@ -938,7 +938,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("close_revision_card") - assertThat(bundle).hasSize(12) + assertThat(bundle).hasSize(13) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(CLOSE_REVISION_CARD.number) @@ -958,7 +958,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("start_exploration_card") - assertThat(bundle).hasSize(17) + assertThat(bundle).hasSize(18) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(START_CARD_CONTEXT.number) @@ -983,7 +983,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("start_exploration_card") - assertThat(bundle).hasSize(19) + assertThat(bundle).hasSize(20) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(START_CARD_CONTEXT.number) @@ -1010,7 +1010,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("end_exploration_card") - assertThat(bundle).hasSize(17) + assertThat(bundle).hasSize(18) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(END_CARD_CONTEXT.number) @@ -1035,7 +1035,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("end_exploration_card") - assertThat(bundle).hasSize(19) + assertThat(bundle).hasSize(20) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(END_CARD_CONTEXT.number) @@ -1062,7 +1062,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("unlock_hint") - assertThat(bundle).hasSize(17) + assertThat(bundle).hasSize(18) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(HINT_UNLOCKED_CONTEXT.number) @@ -1087,7 +1087,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("unlock_hint") - assertThat(bundle).hasSize(19) + assertThat(bundle).hasSize(20) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(HINT_UNLOCKED_CONTEXT.number) @@ -1114,7 +1114,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("reveal_hint") - assertThat(bundle).hasSize(17) + assertThat(bundle).hasSize(18) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(ACCESS_HINT_CONTEXT.number) @@ -1139,7 +1139,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("reveal_hint") - assertThat(bundle).hasSize(19) + assertThat(bundle).hasSize(20) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(ACCESS_HINT_CONTEXT.number) @@ -1166,7 +1166,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("unlock_solution") - assertThat(bundle).hasSize(16) + assertThat(bundle).hasSize(17) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(SOLUTION_UNLOCKED_CONTEXT.number) @@ -1190,7 +1190,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("unlock_solution") - assertThat(bundle).hasSize(18) + assertThat(bundle).hasSize(19) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(SOLUTION_UNLOCKED_CONTEXT.number) @@ -1216,7 +1216,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("reveal_solution") - assertThat(bundle).hasSize(16) + assertThat(bundle).hasSize(17) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(ACCESS_SOLUTION_CONTEXT.number) @@ -1240,7 +1240,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("reveal_solution") - assertThat(bundle).hasSize(18) + assertThat(bundle).hasSize(19) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(ACCESS_SOLUTION_CONTEXT.number) @@ -1266,7 +1266,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("submit_answer") - assertThat(bundle).hasSize(18) + assertThat(bundle).hasSize(19) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(SUBMIT_ANSWER_CONTEXT.number) @@ -1292,7 +1292,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("submit_answer") - assertThat(bundle).hasSize(20) + assertThat(bundle).hasSize(21) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(SUBMIT_ANSWER_CONTEXT.number) @@ -1320,7 +1320,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("click_play_voiceover_button") - assertThat(bundle).hasSize(18) + assertThat(bundle).hasSize(19) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(PLAY_VOICE_OVER_CONTEXT.number) @@ -1346,7 +1346,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("click_play_voiceover_button") - assertThat(bundle).hasSize(20) + assertThat(bundle).hasSize(21) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(PLAY_VOICE_OVER_CONTEXT.number) @@ -1374,7 +1374,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("click_pause_voiceover_button") - assertThat(bundle).hasSize(18) + assertThat(bundle).hasSize(19) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(PAUSE_VOICE_OVER_CONTEXT.number) @@ -1400,7 +1400,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("click_pause_voiceover_button") - assertThat(bundle).hasSize(20) + assertThat(bundle).hasSize(21) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(PAUSE_VOICE_OVER_CONTEXT.number) @@ -1428,7 +1428,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("send_app_to_background") - assertThat(bundle).hasSize(10) + assertThat(bundle).hasSize(11) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(APP_IN_BACKGROUND_CONTEXT.number) @@ -1446,7 +1446,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("send_app_to_background") - assertThat(bundle).hasSize(12) + assertThat(bundle).hasSize(13) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(APP_IN_BACKGROUND_CONTEXT.number) @@ -1466,7 +1466,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("bring_app_to_foreground") - assertThat(bundle).hasSize(10) + assertThat(bundle).hasSize(11) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(APP_IN_FOREGROUND_CONTEXT.number) @@ -1484,7 +1484,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("bring_app_to_foreground") - assertThat(bundle).hasSize(12) + assertThat(bundle).hasSize(13) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(APP_IN_FOREGROUND_CONTEXT.number) @@ -1504,7 +1504,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("leave_exploration") - assertThat(bundle).hasSize(16) + assertThat(bundle).hasSize(17) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(EXIT_EXPLORATION_CONTEXT.number) @@ -1528,7 +1528,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("leave_exploration") - assertThat(bundle).hasSize(18) + assertThat(bundle).hasSize(19) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(EXIT_EXPLORATION_CONTEXT.number) @@ -1554,7 +1554,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("complete_exploration") - assertThat(bundle).hasSize(16) + assertThat(bundle).hasSize(17) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(FINISH_EXPLORATION_CONTEXT.number) @@ -1578,7 +1578,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("complete_exploration") - assertThat(bundle).hasSize(18) + assertThat(bundle).hasSize(19) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(FINISH_EXPLORATION_CONTEXT.number) @@ -1604,7 +1604,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("resume_in_progress_exploration") - assertThat(bundle).hasSize(10) + assertThat(bundle).hasSize(11) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(RESUME_EXPLORATION_CONTEXT.number) @@ -1622,7 +1622,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("resume_in_progress_exploration") - assertThat(bundle).hasSize(12) + assertThat(bundle).hasSize(13) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(RESUME_EXPLORATION_CONTEXT.number) @@ -1642,7 +1642,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("restart_in_progress_exploration") - assertThat(bundle).hasSize(10) + assertThat(bundle).hasSize(11) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(START_OVER_EXPLORATION_CONTEXT.number) @@ -1660,7 +1660,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("restart_in_progress_exploration") - assertThat(bundle).hasSize(12) + assertThat(bundle).hasSize(13) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(START_OVER_EXPLORATION_CONTEXT.number) @@ -1680,7 +1680,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("delete_profile") - assertThat(bundle).hasSize(10) + assertThat(bundle).hasSize(11) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(DELETE_PROFILE_CONTEXT.number) @@ -1698,7 +1698,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("delete_profile") - assertThat(bundle).hasSize(12) + assertThat(bundle).hasSize(13) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(DELETE_PROFILE_CONTEXT.number) @@ -1718,7 +1718,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("open_home_screen") - assertThat(bundle).hasSize(10) + assertThat(bundle).hasSize(11) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(OPEN_HOME.number) @@ -1736,7 +1736,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("open_profile_chooser_screen") - assertThat(bundle).hasSize(10) + assertThat(bundle).hasSize(11) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(OPEN_PROFILE_CHOOSER.number) @@ -1754,7 +1754,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("reach_invested_engagement") - assertThat(bundle).hasSize(16) + assertThat(bundle).hasSize(17) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(REACH_INVESTED_ENGAGEMENT.number) @@ -1778,7 +1778,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("reach_invested_engagement") - assertThat(bundle).hasSize(18) + assertThat(bundle).hasSize(19) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(REACH_INVESTED_ENGAGEMENT.number) @@ -1804,7 +1804,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("click_switch_language_in_lesson") - assertThat(bundle).hasSize(18) + assertThat(bundle).hasSize(19) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(SWITCH_IN_LESSON_LANGUAGE.number) @@ -1830,7 +1830,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("click_switch_language_in_lesson") - assertThat(bundle).hasSize(20) + assertThat(bundle).hasSize(21) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(SWITCH_IN_LESSON_LANGUAGE.number) @@ -1858,7 +1858,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("ERROR_internal_logging_failure") - assertThat(bundle).hasSize(10) + assertThat(bundle).hasSize(11) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(INSTALL_ID_FOR_FAILED_ANALYTICS_LOG.number) @@ -1876,7 +1876,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("ERROR_internal_logging_failure") - assertThat(bundle).hasSize(11) + assertThat(bundle).hasSize(12) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(INSTALL_ID_FOR_FAILED_ANALYTICS_LOG.number) diff --git a/utility/src/test/java/org/oppia/android/util/logging/KenyaAlphaEventBundleCreatorTest.kt b/utility/src/test/java/org/oppia/android/util/logging/KenyaAlphaEventBundleCreatorTest.kt index 3ec4c2f5169..ccc9f65bf3f 100644 --- a/utility/src/test/java/org/oppia/android/util/logging/KenyaAlphaEventBundleCreatorTest.kt +++ b/utility/src/test/java/org/oppia/android/util/logging/KenyaAlphaEventBundleCreatorTest.kt @@ -132,7 +132,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(EventLog.getDefaultInstance(), bundle) assertThat(typeName).isEqualTo("unknown_activity_context") - assertThat(bundle).hasSize(10) + assertThat(bundle).hasSize(11) assertThat(bundle).longInt("timestamp").isEqualTo(0) assertThat(bundle).string("priority").isEqualTo("unspecified_priority") assertThat(bundle).integer("event_type").isEqualTo(ACTIVITYCONTEXT_NOT_SET.number) @@ -150,7 +150,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("unknown_activity_context") - assertThat(bundle).hasSize(10) + assertThat(bundle).hasSize(11) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(ACTIVITYCONTEXT_NOT_SET.number) @@ -190,7 +190,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("open_exploration_activity") - assertThat(bundle).hasSize(16) + assertThat(bundle).hasSize(17) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(OPEN_EXPLORATION_ACTIVITY.number) @@ -214,7 +214,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("open_exploration_activity") - assertThat(bundle).hasSize(18) + assertThat(bundle).hasSize(19) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(OPEN_EXPLORATION_ACTIVITY.number) @@ -240,7 +240,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("open_info_tab") - assertThat(bundle).hasSize(11) + assertThat(bundle).hasSize(12) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(OPEN_INFO_TAB.number) @@ -259,7 +259,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("open_lessons_tab") - assertThat(bundle).hasSize(11) + assertThat(bundle).hasSize(12) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(OPEN_LESSONS_TAB.number) @@ -278,7 +278,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("open_practice_tab") - assertThat(bundle).hasSize(11) + assertThat(bundle).hasSize(12) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(OPEN_PRACTICE_TAB.number) @@ -297,7 +297,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("open_revision_tab") - assertThat(bundle).hasSize(11) + assertThat(bundle).hasSize(12) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(OPEN_REVISION_TAB.number) @@ -316,7 +316,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("open_question_player") - assertThat(bundle).hasSize(12) + assertThat(bundle).hasSize(13) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(OPEN_QUESTION_PLAYER.number) @@ -336,7 +336,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("open_story_activity") - assertThat(bundle).hasSize(12) + assertThat(bundle).hasSize(13) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(OPEN_STORY_ACTIVITY.number) @@ -356,7 +356,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("open_concept_card") - assertThat(bundle).hasSize(11) + assertThat(bundle).hasSize(12) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(OPEN_CONCEPT_CARD.number) @@ -375,7 +375,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("open_revision_card") - assertThat(bundle).hasSize(12) + assertThat(bundle).hasSize(13) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(OPEN_REVISION_CARD.number) @@ -395,7 +395,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("close_revision_card") - assertThat(bundle).hasSize(12) + assertThat(bundle).hasSize(13) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(CLOSE_REVISION_CARD.number) @@ -415,7 +415,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("start_card_context") - assertThat(bundle).hasSize(17) + assertThat(bundle).hasSize(18) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(START_CARD_CONTEXT.number) @@ -440,7 +440,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("start_card_context") - assertThat(bundle).hasSize(19) + assertThat(bundle).hasSize(20) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(START_CARD_CONTEXT.number) @@ -467,7 +467,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("end_card_context") - assertThat(bundle).hasSize(17) + assertThat(bundle).hasSize(18) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(END_CARD_CONTEXT.number) @@ -492,7 +492,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("end_card_context") - assertThat(bundle).hasSize(19) + assertThat(bundle).hasSize(20) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(END_CARD_CONTEXT.number) @@ -519,7 +519,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("hint_offered_context") - assertThat(bundle).hasSize(17) + assertThat(bundle).hasSize(18) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(HINT_UNLOCKED_CONTEXT.number) @@ -544,7 +544,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("hint_offered_context") - assertThat(bundle).hasSize(19) + assertThat(bundle).hasSize(20) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(HINT_UNLOCKED_CONTEXT.number) @@ -571,7 +571,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("access_hint_context") - assertThat(bundle).hasSize(17) + assertThat(bundle).hasSize(18) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(ACCESS_HINT_CONTEXT.number) @@ -596,7 +596,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("access_hint_context") - assertThat(bundle).hasSize(19) + assertThat(bundle).hasSize(20) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(ACCESS_HINT_CONTEXT.number) @@ -623,7 +623,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("solution_offered_context") - assertThat(bundle).hasSize(16) + assertThat(bundle).hasSize(17) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(SOLUTION_UNLOCKED_CONTEXT.number) @@ -647,7 +647,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("solution_offered_context") - assertThat(bundle).hasSize(18) + assertThat(bundle).hasSize(19) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(SOLUTION_UNLOCKED_CONTEXT.number) @@ -673,7 +673,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("access_solution_context") - assertThat(bundle).hasSize(16) + assertThat(bundle).hasSize(17) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(ACCESS_SOLUTION_CONTEXT.number) @@ -697,7 +697,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("access_solution_context") - assertThat(bundle).hasSize(18) + assertThat(bundle).hasSize(19) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(ACCESS_SOLUTION_CONTEXT.number) @@ -723,7 +723,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("submit_answer_context") - assertThat(bundle).hasSize(18) + assertThat(bundle).hasSize(19) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(SUBMIT_ANSWER_CONTEXT.number) @@ -749,7 +749,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("submit_answer_context") - assertThat(bundle).hasSize(20) + assertThat(bundle).hasSize(21) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(SUBMIT_ANSWER_CONTEXT.number) @@ -777,7 +777,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("play_voice_over_context") - assertThat(bundle).hasSize(18) + assertThat(bundle).hasSize(19) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(PLAY_VOICE_OVER_CONTEXT.number) @@ -803,7 +803,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("play_voice_over_context") - assertThat(bundle).hasSize(20) + assertThat(bundle).hasSize(21) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(PLAY_VOICE_OVER_CONTEXT.number) @@ -831,7 +831,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("pause_voice_over_context") - assertThat(bundle).hasSize(18) + assertThat(bundle).hasSize(19) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(PAUSE_VOICE_OVER_CONTEXT.number) @@ -857,7 +857,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("pause_voice_over_context") - assertThat(bundle).hasSize(20) + assertThat(bundle).hasSize(21) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(PAUSE_VOICE_OVER_CONTEXT.number) @@ -885,7 +885,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("app_in_background_context") - assertThat(bundle).hasSize(10) + assertThat(bundle).hasSize(11) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(APP_IN_BACKGROUND_CONTEXT.number) @@ -903,7 +903,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("app_in_background_context") - assertThat(bundle).hasSize(12) + assertThat(bundle).hasSize(13) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(APP_IN_BACKGROUND_CONTEXT.number) @@ -923,7 +923,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("app_in_foreground_context") - assertThat(bundle).hasSize(10) + assertThat(bundle).hasSize(11) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(APP_IN_FOREGROUND_CONTEXT.number) @@ -941,7 +941,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("app_in_foreground_context") - assertThat(bundle).hasSize(12) + assertThat(bundle).hasSize(13) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(APP_IN_FOREGROUND_CONTEXT.number) @@ -961,7 +961,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("exit_exploration_context") - assertThat(bundle).hasSize(16) + assertThat(bundle).hasSize(17) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(EXIT_EXPLORATION_CONTEXT.number) @@ -985,7 +985,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("exit_exploration_context") - assertThat(bundle).hasSize(18) + assertThat(bundle).hasSize(19) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(EXIT_EXPLORATION_CONTEXT.number) @@ -1011,7 +1011,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("finish_exploration_context") - assertThat(bundle).hasSize(16) + assertThat(bundle).hasSize(17) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(FINISH_EXPLORATION_CONTEXT.number) @@ -1035,7 +1035,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("finish_exploration_context") - assertThat(bundle).hasSize(18) + assertThat(bundle).hasSize(19) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(FINISH_EXPLORATION_CONTEXT.number) @@ -1061,7 +1061,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("resume_exploration_context") - assertThat(bundle).hasSize(10) + assertThat(bundle).hasSize(11) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(RESUME_EXPLORATION_CONTEXT.number) @@ -1079,7 +1079,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("resume_exploration_context") - assertThat(bundle).hasSize(12) + assertThat(bundle).hasSize(13) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(RESUME_EXPLORATION_CONTEXT.number) @@ -1099,7 +1099,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("start_over_exploration_context") - assertThat(bundle).hasSize(10) + assertThat(bundle).hasSize(11) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(START_OVER_EXPLORATION_CONTEXT.number) @@ -1117,7 +1117,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("start_over_exploration_context") - assertThat(bundle).hasSize(12) + assertThat(bundle).hasSize(13) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(START_OVER_EXPLORATION_CONTEXT.number) @@ -1137,7 +1137,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("delete_profile_context") - assertThat(bundle).hasSize(10) + assertThat(bundle).hasSize(11) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(DELETE_PROFILE_CONTEXT.number) @@ -1155,7 +1155,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("delete_profile_context") - assertThat(bundle).hasSize(12) + assertThat(bundle).hasSize(13) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(DELETE_PROFILE_CONTEXT.number) @@ -1175,7 +1175,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("open_home") - assertThat(bundle).hasSize(10) + assertThat(bundle).hasSize(11) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(OPEN_HOME.number) @@ -1193,7 +1193,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("open_profile_chooser") - assertThat(bundle).hasSize(10) + assertThat(bundle).hasSize(11) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(OPEN_PROFILE_CHOOSER.number) @@ -1211,7 +1211,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("switch_in_lesson_language") - assertThat(bundle).hasSize(18) + assertThat(bundle).hasSize(19) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(SWITCH_IN_LESSON_LANGUAGE.number) @@ -1237,7 +1237,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("switch_in_lesson_language") - assertThat(bundle).hasSize(20) + assertThat(bundle).hasSize(21) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(SWITCH_IN_LESSON_LANGUAGE.number) @@ -1265,7 +1265,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("failed_analytics_log") - assertThat(bundle).hasSize(10) + assertThat(bundle).hasSize(11) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(INSTALL_ID_FOR_FAILED_ANALYTICS_LOG.number) @@ -1283,7 +1283,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("failed_analytics_log") - assertThat(bundle).hasSize(11) + assertThat(bundle).hasSize(12) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(INSTALL_ID_FOR_FAILED_ANALYTICS_LOG.number) diff --git a/utility/src/test/java/org/oppia/android/util/logging/SyncStatusManagerTestBase.kt b/utility/src/test/java/org/oppia/android/util/logging/SyncStatusManagerTestBase.kt index c19dcfa6d3d..8690cc70ae8 100644 --- a/utility/src/test/java/org/oppia/android/util/logging/SyncStatusManagerTestBase.kt +++ b/utility/src/test/java/org/oppia/android/util/logging/SyncStatusManagerTestBase.kt @@ -56,7 +56,7 @@ abstract class SyncStatusManagerTestBase { fun testInitializeEventLogStore_twice_throwsException() { impl.initializeEventLogStore(logsCacheStore) - val error = assertThrows(IllegalStateException::class) { + val error = assertThrows() { impl.initializeEventLogStore(logsCacheStore) } diff --git a/utility/src/test/java/org/oppia/android/util/logging/firebase/BUILD.bazel b/utility/src/test/java/org/oppia/android/util/logging/firebase/BUILD.bazel index 7d96eebedab..3ae5970b336 100644 --- a/utility/src/test/java/org/oppia/android/util/logging/firebase/BUILD.bazel +++ b/utility/src/test/java/org/oppia/android/util/logging/firebase/BUILD.bazel @@ -29,4 +29,29 @@ oppia_android_test( ], ) +oppia_android_test( + name = "DebugFirestoreEventLoggerImplTest", + srcs = ["DebugFirestoreEventLoggerImplTest.kt"], + custom_package = "org.oppia.android.util.logging.firebase", + test_class = "org.oppia.android.util.logging.firebase.DebugFirestoreEventLoggerImplTest", + test_manifest = "//utility:test_manifest", + deps = [ + ":dagger", + "//testing", + "//testing/src/main/java/org/oppia/android/testing/robolectric:test_module", + "//testing/src/main/java/org/oppia/android/testing/threading:test_module", + "//testing/src/main/java/org/oppia/android/testing/time:test_module", + "//third_party:androidx_test_ext_junit", + "//third_party:androidx_test_ext_truth", + "//third_party:com_google_truth_truth", + "//third_party:org_robolectric_robolectric", + "//third_party:robolectric_android-all", + "//utility/src/main/java/org/oppia/android/util/locale/testing:test_module", + "//utility/src/main/java/org/oppia/android/util/logging:standard_event_logging_configuration_module", + "//utility/src/main/java/org/oppia/android/util/logging/firebase:debug_module", + "//utility/src/main/java/org/oppia/android/util/logging/firebase:prod_module", + "//utility/src/main/java/org/oppia/android/util/networking:debug_module", + ], +) + dagger_rules() diff --git a/utility/src/test/java/org/oppia/android/util/logging/firebase/DebugFirestoreEventLoggerImplTest.kt b/utility/src/test/java/org/oppia/android/util/logging/firebase/DebugFirestoreEventLoggerImplTest.kt new file mode 100644 index 00000000000..32d83a0d91c --- /dev/null +++ b/utility/src/test/java/org/oppia/android/util/logging/firebase/DebugFirestoreEventLoggerImplTest.kt @@ -0,0 +1,193 @@ +package org.oppia.android.util.logging.firebase + +import android.app.Application +import android.content.Context +import androidx.test.core.app.ApplicationProvider +import androidx.test.ext.junit.runners.AndroidJUnit4 +import com.google.common.truth.Truth.assertThat +import dagger.BindsInstance +import dagger.Component +import dagger.Module +import dagger.Provides +import org.junit.Before +import org.junit.Test +import org.junit.runner.RunWith +import org.oppia.android.app.model.EventLog +import org.oppia.android.testing.FakeFirestoreInstanceWrapperImpl +import org.oppia.android.testing.assertThrows +import org.oppia.android.testing.robolectric.RobolectricModule +import org.oppia.android.testing.threading.TestDispatcherModule +import org.oppia.android.testing.time.FakeOppiaClockModule +import org.oppia.android.util.locale.testing.LocaleTestModule +import org.oppia.android.util.logging.EnableConsoleLog +import org.oppia.android.util.logging.EnableFileLog +import org.oppia.android.util.logging.GlobalLogLevel +import org.oppia.android.util.logging.LogLevel +import org.robolectric.annotation.Config +import org.robolectric.annotation.LooperMode +import javax.inject.Inject +import javax.inject.Singleton + +/** Tests for [DebugFirestoreEventLoggerImpl]. */ +// FunctionName: test names are conventionally named with underscores. +@Suppress("FunctionName") +@RunWith(AndroidJUnit4::class) +@LooperMode(LooperMode.Mode.PAUSED) +@Config(manifest = Config.NONE) +class DebugFirestoreEventLoggerImplTest { + @Inject + lateinit var debugFirestoreLoggerImpl: DebugFirestoreEventLoggerImpl + + @Inject + lateinit var eventLogger: FirestoreEventLogger + + private val eventLog1 = EventLog.newBuilder().setPriority(EventLog.Priority.ESSENTIAL).build() + private val eventLog2 = EventLog.newBuilder().setPriority(EventLog.Priority.ESSENTIAL).build() + + @Before + fun setUp() { + setUpTestApplicationComponent() + } + + @Test + fun testDebugFirestoreEventLogger_logEvent_returnsEvent() { + eventLogger.uploadEvent(eventLog1) + val event = debugFirestoreLoggerImpl.getMostRecentEvent() + + assertThat(event).isEqualTo(eventLog1) + assertThat(event.priority).isEqualTo(EventLog.Priority.ESSENTIAL) + } + + @Test + fun testDebugFirestoreEventLogger_logEventTwice_returnsLatestEvent() { + eventLogger.uploadEvent(eventLog1) + eventLogger.uploadEvent(eventLog2) + val event = debugFirestoreLoggerImpl.getMostRecentEvent() + + assertThat(event).isEqualTo(eventLog2) + } + + @Test + fun testDebugFirestoreEventLogger_logEvent_clearAllEvents_logEventAgain_returnsLatestEvent() { + eventLogger.uploadEvent(eventLog1) + debugFirestoreLoggerImpl.clearAllEvents() + debugFirestoreLoggerImpl.uploadEvent(eventLog2) + val event = debugFirestoreLoggerImpl.getMostRecentEvent() + + assertThat(event).isEqualTo(eventLog2) + } + + @Test + fun testDebugFirestoreEventLogger_logNothing_getMostRecent_returnsFailure() { + assertThrows() { debugFirestoreLoggerImpl.getMostRecentEvent() } + } + + @Test + fun testDebugFirestoreEventLogger_logEvent_clearAllEvents_getMostRecent_returnsFailure() { + eventLogger.uploadEvent(eventLog1) + debugFirestoreLoggerImpl.clearAllEvents() + + val eventException = assertThrows() { + debugFirestoreLoggerImpl.getMostRecentEvent() + } + + assertThat(eventException).isInstanceOf(NoSuchElementException::class.java) + } + + @Test + fun testDebugFirestoreEventLogger_clearAllEvents_returnsEmptyList() { + debugFirestoreLoggerImpl.clearAllEvents() + val isListEmpty = debugFirestoreLoggerImpl.getEventList().isEmpty() + + assertThat(isListEmpty).isTrue() + } + + @Test + fun testDebugFirestoreEventLogger_logEvent_clearAllEvents_returnsEmptyList() { + eventLogger.uploadEvent(eventLog1) + debugFirestoreLoggerImpl.clearAllEvents() + val isListEmpty = debugFirestoreLoggerImpl.getEventList().isEmpty() + + assertThat(isListEmpty).isTrue() + } + + @Test + fun testDebugFirestoreEventLogger_logMultipleEvents_clearAllEvents_returnsEmptyList() { + eventLogger.uploadEvent(eventLog1) + eventLogger.uploadEvent(eventLog2) + debugFirestoreLoggerImpl.clearAllEvents() + val isListEmpty = debugFirestoreLoggerImpl.getEventList().isEmpty() + + assertThat(isListEmpty).isTrue() + } + + @Test + fun testDebugFirestoreEventLogger_logEvent_returnsNonEmptyList() { + eventLogger.uploadEvent(eventLog1) + val isListEmpty = debugFirestoreLoggerImpl.getEventList().isEmpty() + + assertThat(isListEmpty).isFalse() + } + + private fun setUpTestApplicationComponent() { + DaggerDebugFirestoreEventLoggerImplTest_TestApplicationComponent.builder() + .setApplication(ApplicationProvider.getApplicationContext()) + .build() + .inject(this) + } + + // TODO(#89): Move this to a common test application component. + @Module + class TestModule { + @Provides + @Singleton + fun provideContext(application: Application): Context { + return application + } + + // TODO(#59): Either isolate these to their own shared test module, or use the real logging + // module in tests to avoid needing to specify these settings for tests. + @EnableConsoleLog + @Provides + fun provideEnableConsoleLog(): Boolean = true + + @EnableFileLog + @Provides + fun provideEnableFileLog(): Boolean = false + + @GlobalLogLevel + @Provides + fun provideGlobalLogLevel(): LogLevel = LogLevel.VERBOSE + + @Provides + @Singleton + fun provideDebugFirestoreLogger(debugFirestoreEventLogger: DebugFirestoreEventLoggerImpl): + FirestoreEventLogger = debugFirestoreEventLogger + + @Provides + @Singleton + fun provideFirebaseFirestoreInstanceWrapper( + debugWrapperImpl: FakeFirestoreInstanceWrapperImpl + ): FirestoreInstanceWrapper = debugWrapperImpl + } + + // TODO(#89): Move this to a common test application component. + @Singleton + @Component( + modules = [ + TestModule::class, RobolectricModule::class, + TestDispatcherModule::class, FakeOppiaClockModule::class, LocaleTestModule::class + ] + ) + + interface TestApplicationComponent { + @Component.Builder + interface Builder { + @BindsInstance + fun setApplication(application: Application): Builder + fun build(): TestApplicationComponent + } + + fun inject(debugEventLoggerTest: DebugFirestoreEventLoggerImplTest) + } +} diff --git a/utility/src/test/java/org/oppia/android/util/math/FractionExtensionsTest.kt b/utility/src/test/java/org/oppia/android/util/math/FractionExtensionsTest.kt index 3913e7b6dda..f44bc197f98 100644 --- a/utility/src/test/java/org/oppia/android/util/math/FractionExtensionsTest.kt +++ b/utility/src/test/java/org/oppia/android/util/math/FractionExtensionsTest.kt @@ -444,7 +444,7 @@ class FractionExtensionsTest { val zeroDenominatorFraction = Fraction.getDefaultInstance() // Converting to simplest form results in a divide by zero in this case. - assertThrows(ArithmeticException::class) { zeroDenominatorFraction.toSimplestForm() } + assertThrows() { zeroDenominatorFraction.toSimplestForm() } } @Test @@ -518,7 +518,7 @@ class FractionExtensionsTest { val zeroDenominatorFraction = Fraction.getDefaultInstance() // Converting to simplest form results in a divide by zero in this case. - assertThrows(ArithmeticException::class) { zeroDenominatorFraction.toProperForm() } + assertThrows() { zeroDenominatorFraction.toProperForm() } } @Test @@ -1062,7 +1062,7 @@ class FractionExtensionsTest { val lhsFraction = ZERO_FRACTION val rhsFraction = ZERO_FRACTION - assertThrows(Exception::class) { lhsFraction / rhsFraction } + assertThrows() { lhsFraction / rhsFraction } } @Test @@ -1070,7 +1070,7 @@ class FractionExtensionsTest { val lhsFraction = ONE_FRACTION val rhsFraction = ZERO_FRACTION - assertThrows(Exception::class) { lhsFraction / rhsFraction } + assertThrows() { lhsFraction / rhsFraction } } @Test @@ -1078,7 +1078,7 @@ class FractionExtensionsTest { val lhsFraction = TWO_FRACTION val rhsFraction = ZERO_FRACTION - assertThrows(Exception::class) { lhsFraction / rhsFraction } + assertThrows() { lhsFraction / rhsFraction } } @Test diff --git a/utility/src/test/java/org/oppia/android/util/math/FractionParserTest.kt b/utility/src/test/java/org/oppia/android/util/math/FractionParserTest.kt index 6079f7ec92c..81d07c867fa 100644 --- a/utility/src/test/java/org/oppia/android/util/math/FractionParserTest.kt +++ b/utility/src/test/java/org/oppia/android/util/math/FractionParserTest.kt @@ -173,7 +173,7 @@ class FractionParserTest { val parseFraction = fractionParser.parseFraction("7 1/2 4/5") assertThat(parseFraction).isEqualTo(null) - val exception = assertThrows(IllegalArgumentException::class) { + val exception = assertThrows() { fractionParser.parseFractionFromString("7 1/2 4/5") } assertThat(exception).hasMessageThat().contains("Incorrectly formatted fraction: 7 1/2 4/5") @@ -184,7 +184,7 @@ class FractionParserTest { val parseFraction = fractionParser.parseFraction("abc") assertThat(parseFraction).isEqualTo(null) - val exception = assertThrows(IllegalArgumentException::class) { + val exception = assertThrows() { fractionParser.parseFractionFromString("abc") } assertThat(exception).hasMessageThat().contains("Incorrectly formatted fraction: abc") diff --git a/utility/src/test/java/org/oppia/android/util/math/PeekableIteratorTest.kt b/utility/src/test/java/org/oppia/android/util/math/PeekableIteratorTest.kt index 0b6cddc7dbe..e342081aab0 100644 --- a/utility/src/test/java/org/oppia/android/util/math/PeekableIteratorTest.kt +++ b/utility/src/test/java/org/oppia/android/util/math/PeekableIteratorTest.kt @@ -55,7 +55,7 @@ class PeekableIteratorTest { val sequence = sequenceOf() val iterator = sequence.toPeekableIterator() - assertThrows(NoSuchElementException::class) { iterator.next() } + assertThrows() { iterator.next() } } @Test diff --git a/utility/src/test/java/org/oppia/android/util/math/RealExtensionsTest.kt b/utility/src/test/java/org/oppia/android/util/math/RealExtensionsTest.kt index fee8d4e00e7..bfcb4dba53d 100644 --- a/utility/src/test/java/org/oppia/android/util/math/RealExtensionsTest.kt +++ b/utility/src/test/java/org/oppia/android/util/math/RealExtensionsTest.kt @@ -252,7 +252,7 @@ class RealExtensionsTest { fun testIsNegative_default_throwsException() { val defaultReal = Real.getDefaultInstance() - val exception = assertThrows(IllegalStateException::class) { defaultReal.isNegative() } + val exception = assertThrows() { defaultReal.isNegative() } assertThat(exception).hasMessageThat().contains("Invalid real") } @@ -309,7 +309,7 @@ class RealExtensionsTest { val first = Real.getDefaultInstance() val second = TWO_REAL - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { first.isApproximatelyEqualTo(second) } @@ -321,7 +321,7 @@ class RealExtensionsTest { val first = TWO_REAL val second = Real.getDefaultInstance() - val exception = assertThrows(IllegalStateException::class) { + val exception = assertThrows() { first.isApproximatelyEqualTo(second) } @@ -659,7 +659,7 @@ class RealExtensionsTest { fun testIsApproximatelyZero_default_throwsException() { val defaultReal = Real.getDefaultInstance() - val exception = assertThrows(IllegalStateException::class) { defaultReal.isApproximatelyZero() } + val exception = assertThrows() { defaultReal.isApproximatelyZero() } assertThat(exception).hasMessageThat().contains("Invalid real") } @@ -732,7 +732,7 @@ class RealExtensionsTest { fun testToDouble_default_returnsZeroDouble() { val defaultReal = Real.getDefaultInstance() - val exception = assertThrows(IllegalStateException::class) { defaultReal.toDouble() } + val exception = assertThrows() { defaultReal.toDouble() } assertThat(exception).hasMessageThat().contains("Invalid real") } @@ -783,7 +783,7 @@ class RealExtensionsTest { fun testAsWholeNumber_default_throwsException() { val defaultReal = Real.getDefaultInstance() - val exception = assertThrows(IllegalStateException::class) { defaultReal.asWholeNumber() } + val exception = assertThrows() { defaultReal.asWholeNumber() } assertThat(exception).hasMessageThat().contains("Invalid real") } @@ -925,7 +925,7 @@ class RealExtensionsTest { fun testUnaryMinus_default_throwsException() { val defaultReal = Real.getDefaultInstance() - val exception = assertThrows(IllegalStateException::class) { -defaultReal } + val exception = assertThrows() { -defaultReal } assertThat(exception).hasMessageThat().contains("Invalid real") } @@ -1782,7 +1782,7 @@ class RealExtensionsTest { val lhsReal = createIntegerReal(2) val rhsReal = createIntegerReal(0) - assertThrows(ArithmeticException::class) { lhsReal / rhsReal } + assertThrows() { lhsReal / rhsReal } } @Test @@ -1790,7 +1790,7 @@ class RealExtensionsTest { val lhsReal = createIntegerReal(2) val rhsReal = createRationalReal(ZERO_FRACTION) - assertThrows(ArithmeticException::class) { lhsReal / rhsReal } + assertThrows() { lhsReal / rhsReal } } @Test @@ -1808,7 +1808,7 @@ class RealExtensionsTest { val lhsReal = ONE_AND_ONE_HALF_REAL val rhsReal = createIntegerReal(0) - assertThrows(ArithmeticException::class) { lhsReal / rhsReal } + assertThrows() { lhsReal / rhsReal } } @Test @@ -1816,7 +1816,7 @@ class RealExtensionsTest { val lhsReal = ONE_AND_ONE_HALF_REAL val rhsReal = createRationalReal(ZERO_FRACTION) - assertThrows(ArithmeticException::class) { lhsReal / rhsReal } + assertThrows() { lhsReal / rhsReal } } @Test @@ -2188,7 +2188,7 @@ class RealExtensionsTest { fun testSqrt_defaultReal_throwsException() { val real = Real.getDefaultInstance() - val exception = assertThrows(IllegalStateException::class) { sqrt(real) } + val exception = assertThrows() { sqrt(real) } assertThat(exception).hasMessageThat().contains("Invalid real") } diff --git a/wiki/Bazel-Setup-Instructions-for-Windows.md b/wiki/Bazel-Setup-Instructions-for-Windows.md index 7a72fa86c34..4200c5a8ead 100644 --- a/wiki/Bazel-Setup-Instructions-for-Windows.md +++ b/wiki/Bazel-Setup-Instructions-for-Windows.md @@ -53,18 +53,36 @@ After that, follow each of the subsections below as needed to install prerequisi **Java** -JDK 8 is required for the Android build tools, and we suggest installing OpenJDK: +Bazel Setup requires both JDK 8 and JDK>=17 to complete the setup. + +- JDK >= 17 is required for [Android Package Manager](#3-installing-the-android-sdk). +- JDK 8 is required for the [Android build tools](#6-verifying-the-build), and we suggest installing OpenJDK. + +(Note: Our recommendation is to install both JDK 8 and JDK 17 and always make sure to run sdkmanager commands with JDK 17 and build commands with JDK 8. `sudo update-alternatives --config java` is used to set the default Java version). + +**Install JDK 8** ```sh sudo apt install openjdk-8-jdk-headless ``` -#### For Fedora 25+ +**Install JDK 17** + +```sh +sudo apt install openjdk-17-jdk +``` + +#### For Fedora 25+ + - Install JDK 8 by running this command on the terminal: ``` sudo dnf install java-1.8.0-openjdk ``` -- Set the default Java version to jdk-8 by running the following command `sudo update-alternatives --config java` and selecting the number with jdk-8. + +- Install JDK 17 by running this command on the terminal: +``` +sudo dnf install java-17-openjdk +``` #### Follow [these instructions](https://www.java.com/en/download/help/path.html) to correctly set up $JAVA_HOME. @@ -76,6 +94,28 @@ Unfortunately, some of the Bazel build actions in the Android pipeline require P sudo apt install python ``` +(This might throw an error - **E**: Package 'python' has no installation candidate) + +Alternatively, installl Python 2 using: + +```sh +sudo apt install python2 +``` + +To make python2 command accessible as python create a symbolic link from python2 to python: + +```sh +sudo ln -s /usr/bin/python2 /usr/bin/python +``` + +**GCC** + +Install gcc using the following command: + +```sh +sudo apt install gcc +``` + ### 3. Installing the Android SDK We need to be able to run Linux-compatible Android utilities which requires installing a Linux version of the Android SDK. Since we can't install Android Studio in the subsystem, we need to do this via CLI commands. The steps below are extracted from [this article](https://proandroiddev.com/how-to-setup-android-sdk-without-android-studio-6d60d0f2812a). @@ -86,10 +126,10 @@ First, prepare the environment for the SDK by creating the default directory to mkdir -p $HOME/Android/Sdk ``` -Second, navigate to https://developer.android.com/studio#command-tools in a web browser (in Windows) and select to download the latest **Linux** command tools (even though you're using Windows, the Linux commandline tools are needed--the Windows version will not work with these instructions). Once downloaded, copy the zip file to the new SDK location (note that the ``/c/mnt/...`` path is based on ``C:\Users\\Downloads`` being the default download location--this may not be the case on your system) with your Windows username filled in for ````: +Second, navigate to https://developer.android.com/studio#command-tools in a web browser (in Windows) and select to download the latest **Linux** command tools (even though you're using Windows, the Linux commandline tools are needed--the Windows version will not work with these instructions). Once downloaded, copy the zip file to the new SDK location (note that the ``/mnt/c/...`` path is based on ``C:\Users\\Downloads`` being the default download location--this may not be the case on your system) with your Windows username filled in for ````: ```sh -cp /c/mnt/Users//Downloads/commandlinetools*.zip $HOME/Android/Sdk +cp /mnt/c/Users//Downloads/commandlinetools*.zip $HOME/Android/Sdk ``` After that, change to the directory, unzip the archive, and remove it: @@ -121,12 +161,23 @@ source ~/.bashrc (The last line reloads your Bash configuration file so that the variable adjustments above become live in your local terminal). -The ``sdkmanager`` command can now be used to install the necessary packages. Run each of the following commands in succession (you may need to accept licenses for the SDK packages in the same way you would when using Android Studio): +The ``sdkmanager`` command can now be used to install the necessary packages. + +**Set the default Java version to JDK-17** + +Prior to executing the sdkmanager commands, make sure to set the default Java version to jdk-17 by running the following command: + +```sh +sudo update-alternatives --config java +``` +Select the number with JDK-17. + +Run each of the following commands in succession (you may need to accept licenses for the SDK packages in the same way you would when using Android Studio): ```sh sdkmanager sdkmanager --install "platform-tools" -sdkmanager --install "platforms;android-28" +sdkmanager --install "platforms;android-33" sdkmanager --install "build-tools;29.0.2" ``` @@ -155,14 +206,40 @@ The Oppia Android repository generally expects to live under an 'opensource' dir ```sh mkdir $HOME/opensource +cd $HOME/opensource +``` + +Clone the [oppia-android](https://github.com/oppia/oppia-android) repository into the opensource directory. + +```sh +git clone https://github.com/oppia/oppia-android.git ``` From there, follow [these instructions](https://github.com/oppia/oppia-bazel-tools#readme) in order to prepare your environment to support Oppia Android builds. +To configure your development environment and set up essential tools, execute the following setup script from the oppia-android directory. + +```sh +scripts/setup.sh +``` + ### 6. Verifying the build At this point, your system should be able to build Oppia Android. To verify, try building the APK (from your subsystem terminal -- note that this & all other Bazel commands must be run from the root of the ‘oppia-android’ directory otherwise they will fail): +To build, it is necessary to configure JDK 8 as the default. To accomplish this, follow these steps: + +**Set Default version to JDK 8** + +Prior to executing the build commands, make sure to set the default Java version to jdk-8 by running the following command: + +```sh +sudo update-alternatives --config java +``` + +Select the number with JDK-8 + +**Build** ```sh bazel build //:oppia ``` diff --git a/wiki/Contributing-to-Oppia-Android.md b/wiki/Contributing-to-Oppia-Android.md index 1aa80e75d28..5464afe4e07 100644 --- a/wiki/Contributing-to-Oppia-Android.md +++ b/wiki/Contributing-to-Oppia-Android.md @@ -53,7 +53,7 @@ When you've found an issue you'd like to tackle: You are also welcome to tackle non-starter issues, but for those, you might need to be more independent, because we might not know how to solve them either! -Once you've merged PRs that correspond to **two** different pre-existing GitHub issues, please fill in [this form](https://forms.gle/NxPjimCMqsSTNUgu5) to become an Oppia collaborator! This will grant you access to the repository, and allow you to join a team. (But please don't create your own issues and then make PRs for them -- that won't count.) +Once you've merged PRs that correspond to **two** different pre-existing GitHub issues, please fill in [this form](https://forms.gle/NxPjimCMqsSTNUgu5) to be considered for a place on a team at Oppia Android! A team lead will evaluate your contributions and give you access to the repository so that you can assign yourself to issues. (But please don't create your own issues and then make PRs for them -- that won't count.) diff --git a/wiki/RTL-Guidelines.md b/wiki/RTL-Guidelines.md index cd16760ecd4..090fd31798b 100644 --- a/wiki/RTL-Guidelines.md +++ b/wiki/RTL-Guidelines.md @@ -1,6 +1,7 @@ ## Table of Contents - [What is RTL?](#what-is-rtl) +- [How to enable RTL](#how-to-enable-rtl) - [What changes in RTL?](#what-changes-in-rtl) - [Testing app for RTL Layouts](#testing-app-for-rtl-layouts) - [Reference Documentation](#reference-documentation) @@ -19,6 +20,23 @@ In general, the passage of time is depicted as left to right for LTR languages, When a UI is changed from LTR to RTL (or vice-versa), it’s often called mirroring. An RTL layout is the mirror image of an LTR layout, and it affects layout, text, and graphics. +# How to enable RTL? + +#### Option 1: + +- **Unlock Developer Options:** Go to your phone's Settings, scroll down to "About Phone," and tap on it. Find the "Build Number" and tap on it 7 times. You'll see a message saying "You are now a developer!" +- **Access Developer Options:** Go back to the main Settings menu, scroll down, and you should now see "Developer Options" above "About Phone." +- **Enable Developer Options:** Tap on "Developer Options" and scroll down until you find "Force RTL layout direction." +- **Enable RTL Mode:** Toggle the switch next to "Force RTL layout direction" to turn it on. Your phone's interface will switch to Right-to-Left mode. + +Enable RTL + +#### Option 2: + +- Enable the "**Arabic**" language on your Android device or emulator. + +Enable RTL + # What changes in RTL? When a UI is mirrored, these changes occur: