Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Commit

Permalink
For #11753 - Update compose to 1.1.0 and Kotlin to 1.6.10
Browse files Browse the repository at this point in the history
This also required updating room to >= 2.4.0.
This new version adds a deprecation of the `MigrationTestHelper` api used in
`LoginExceptionStorageTest` that is to be later fixed in #11765.

activity_compose was also update to the latest stable version to ensure a
better match with the latest stable version for compose.
  • Loading branch information
Mugurell committed Feb 23, 2022
1 parent 300df48 commit 0d11f7a
Show file tree
Hide file tree
Showing 25 changed files with 81 additions and 3 deletions.
6 changes: 3 additions & 3 deletions buildSrc/src/main/java/Dependencies.kt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

// Synchronized version numbers for dependencies used by (some) modules
object Versions {
const val kotlin = "1.5.31"
const val kotlin = "1.6.10"
const val coroutines = "1.5.2"

const val junit = "4.12"
Expand Down Expand Up @@ -35,7 +35,7 @@ object Versions {

const val material = "1.2.1"

const val compose_version = "1.0.5"
const val compose_version = "1.1.0"

object AndroidX {
const val activityCompose = "1.4.0"
Expand All @@ -54,7 +54,7 @@ object Versions {
const val test = "1.3.0"
const val test_ext = "1.1.2"
const val espresso = "3.3.0"
const val room = "2.3.0"
const val room = "2.4.1"
const val paging = "2.1.2"
const val palette = "1.0.0"
const val preferences = "1.1.1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -587,6 +587,9 @@ class GeckoEngineSession(
onLaunchIntentRequest(url = url, appIntent = appIntent)
}
}
else -> {
// no-op
}
}
}
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,9 @@ internal fun PopupWindow.displayPopup(currentData: MenuPositioningData) {

is BrowserMenuPlacement.AnchoredToTop.ManualAnchoring,
is BrowserMenuPlacement.AnchoredToBottom.ManualAnchoring -> showAtAnchorLocation(currentData)
else -> {
// no-op
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ internal class LinkingMiddleware(
is EngineAction.UnlinkEngineSessionAction -> {
unlink(context, action)
}
else -> {
// no-op
}
}

next(action)
Expand All @@ -58,6 +61,9 @@ internal class LinkingMiddleware(
engineObserver = link(context, action.engineSession, tab, action.skipLoading)
}
}
else -> {
// no-op
}
}

engineObserver?.let {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ internal class TabsRemovedMiddleware(
is CustomTabListAction.RemoveCustomTabAction -> context.state.findCustomTab(action.tabId)?.let {
onTabsRemoved(context, listOf(it))
}
else -> {
// no-op
}
}

next(action)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ internal class WebExtensionMiddleware : Middleware<BrowserState, BrowserAction>
activeTab?.engineState?.engineSession?.markActiveForWebExtensions(false)
}
}
else -> {
// no-op
}
}

next(action)
Expand All @@ -43,6 +46,9 @@ internal class WebExtensionMiddleware : Middleware<BrowserState, BrowserAction>
is EngineAction.LinkEngineSessionAction -> {
switchActiveStateIfNeeded(context)
}
else -> {
// no-op
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ class ThumbnailsMiddleware(
is TabListAction.RemoveTabsAction -> {
action.tabIds.forEach { thumbnailStorage.deleteThumbnail(it) }
}
else -> {
// no-op
}
}

next(action)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ class ContainerMiddleware(
is InitAction -> initializeContainers(context.store)
is ContainerAction.AddContainerAction -> addContainer(action)
is ContainerAction.RemoveContainerAction -> removeContainer(context.store, action)
else -> {
// no-op
}
}

next(action)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ class OnDeviceDownloadStorageTest {
private lateinit var database: DownloadsDatabase

@get:Rule
@Suppress("DEPRECATION")
val helper: MigrationTestHelper = MigrationTestHelper(
InstrumentationRegistry.getInstrumentation(),
DownloadsDatabase::class.java.canonicalName,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ class DownloadMiddleware(
return
}
}
else -> {
// no-op
}
}

next(action)
Expand All @@ -84,6 +87,9 @@ class DownloadMiddleware(
}
is DownloadAction.AddDownloadAction -> sendDownloadIntent(action.download)
is DownloadAction.RestoreDownloadStateAction -> sendDownloadIntent(action.download)
else -> {
// no-op
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ class LoginExceptionStorageTest {
var instantTaskExecutorRule = InstantTaskExecutorRule()

@get:Rule
@Suppress("DEPRECATION")
val helper: MigrationTestHelper = MigrationTestHelper(
InstrumentationRegistry.getInstrumentation(),
LoginExceptionStorage::class.java.canonicalName,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,9 @@ class PromptFeature private constructor(
it.onDeny()
}
is Dismissible -> it.onDismiss()
else -> {
// no-op
}
}
}
}
Expand Down Expand Up @@ -502,6 +505,9 @@ class PromptFeature private constructor(
}

is Repost -> it.onConfirm()
else -> {
// no-op
}
}
}
}
Expand All @@ -517,6 +523,9 @@ class PromptFeature private constructor(
store.consumePromptFrom(sessionId, promptRequestUID, activePrompt) {
when (it) {
is TimeSelection -> it.onClear()
else -> {
// no-op
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ class PromptMiddleware : Middleware<BrowserState, BrowserAction> {
return
}
}
else -> {
// no-op
}
}

next(action)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,9 @@ internal class SaveLoginDialogFragment : PromptDialogFragment() {
context?.getString(R.string.mozac_feature_prompt_update_confirmation)
)
}
else -> {
// no-op
}
}
}
validateStateUpdate?.invokeOnCompletion {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ class ManifestDatabaseMigrationTest {
private val TEST_DB = "migration-test"

@Rule @JvmField
@Suppress("DEPRECATION")
val helper: MigrationTestHelper = MigrationTestHelper(
InstrumentationRegistry.getInstrumentation(),
ManifestDatabase::class.java.canonicalName,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,9 @@ class ReaderViewMiddleware : Middleware<BrowserState, BrowserAction> {
context.dispatch(ContentAction.UpdateUrlAction(tab.id, url))
}
}
else -> {
// no-op
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ class RecentlyClosedMiddleware(
is InitAction -> {
initializeRecentlyClosed(context.store)
}
else -> {
// no-op
}
}

next(action)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ class SearchMiddleware(
is SearchAction.UpdateCustomSearchEngineAction -> saveCustomSearchEngine(action)
is SearchAction.RemoveCustomSearchEngineAction -> removeCustomSearchEngine(action)
is SearchAction.SelectSearchEngineAction -> updateSearchEngineSelection(action)
else -> {
// no-op
}
}

next(action)
Expand All @@ -65,6 +68,9 @@ class SearchMiddleware(
updateHiddenSearchEngines(context.state.search.hiddenSearchEngines)
is SearchAction.AddAdditionalSearchEngineAction, is SearchAction.RemoveAdditionalSearchEngineAction ->
updateAdditionalSearchEngines(context.state.search.additionalSearchEngines)
else -> {
// no-op
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ class LastAccessMiddleware : Middleware<BrowserState, BrowserAction> {
context.dispatchUpdateActionForId(action.sessionId)
}
}
else -> {
// no-op
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ class OnDeviceSitePermissionsStorageTest {
private lateinit var database: SitePermissionsDatabase

@get:Rule
@Suppress("DEPRECATION")
val helper: MigrationTestHelper = MigrationTestHelper(
InstrumentationRegistry.getInstrumentation(),
SitePermissionsDatabase::class.java.canonicalName,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -897,6 +897,9 @@ class SitePermissionsFeature(
is ContentAudioCapture, is ContentAudioMicrophone -> {
systemPermissions.add(RECORD_AUDIO)
}
else -> {
// no-op
}
}
}
return systemPermissions.all { context.isPermissionGranted((it)) }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ internal interface TabCollectionDao {
)
fun getTabCollections(): Flow<List<TabCollectionWithTabs>>

@Transaction
@Query(
"""
SELECT *
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ class WindowFeature(
)
windowRequest.start()
}
else -> {
// no-op
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ class OnDevicePinnedSitesStorageTest {
var instantTaskExecutorRule = InstantTaskExecutorRule()

@get:Rule
@Suppress("DEPRECATION")
val helper: MigrationTestHelper = MigrationTestHelper(
InstrumentationRegistry.getInstrumentation(),
TopSiteDatabase::class.java.canonicalName,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ class LocaleMiddleware(
when (action) {
is LocaleAction.RestoreLocaleStateAction -> restoreLocale(context.store)
is LocaleAction.UpdateLocaleAction -> updateLocale(action.locale)
else -> {
// no-op
}
}

next(action)
Expand Down

1 comment on commit 0d11f7a

@firefoxci-taskcluster
Copy link

Choose a reason for hiding this comment

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

Uh oh! Looks like an error! Details

Failed to fetch task artifact public/github/customCheckRunText.md for GitHub integration.
Make sure the artifact exists on the worker or other location.

Please sign in to comment.