upgrade deps
This commit is contained in:
@@ -2,15 +2,15 @@ group = "eu.lensai.flutter_mozilla_components"
|
||||
version = "1.0-SNAPSHOT"
|
||||
|
||||
buildscript {
|
||||
ext.kotlin_version = "1.9.22"
|
||||
ext.mozillaComponentsVersion = '136.0.20250127162202'
|
||||
ext.kotlin_version = "2.1.20"
|
||||
ext.mozillaComponentsVersion = '139.0.20250417022706'
|
||||
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath("com.android.tools.build:gradle:8.7.0")
|
||||
classpath("com.android.tools.build:gradle:8.7.3")
|
||||
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version")
|
||||
}
|
||||
}
|
||||
@@ -135,13 +135,13 @@ dependencies {
|
||||
implementation "org.mozilla.components:feature-webnotifications:$mozillaComponentsVersion"
|
||||
implementation "org.mozilla.components:ui-widgets:$mozillaComponentsVersion"
|
||||
|
||||
implementation 'androidx.coordinatorlayout:coordinatorlayout:1.2.0'
|
||||
implementation 'androidx.coordinatorlayout:coordinatorlayout:1.3.0'
|
||||
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
|
||||
implementation 'androidx.preference:preference-ktx:1.2.1'
|
||||
implementation 'com.google.android.material:material:1.12.0'
|
||||
//https://stackoverflow.com/questions/73782320/onbackinvokedcallback-is-not-enabled-for-the-application-in-set-androidenableo
|
||||
implementation 'androidx.activity:activity-ktx:1.10.0'
|
||||
implementation 'androidx.paging:paging-runtime-ktx:3.3.5'
|
||||
implementation 'androidx.activity:activity-ktx:1.10.1'
|
||||
implementation 'androidx.paging:paging-runtime-ktx:3.3.6'
|
||||
|
||||
testImplementation("org.jetbrains.kotlin:kotlin-test")
|
||||
testImplementation("org.mockito:mockito-core:5.15.2")
|
||||
|
||||
+4
-4
@@ -22,7 +22,7 @@ import mozilla.components.concept.engine.EngineView
|
||||
import mozilla.components.feature.app.links.AppLinksFeature
|
||||
import mozilla.components.feature.downloads.DownloadsFeature
|
||||
import mozilla.components.feature.downloads.manager.FetchDownloadManager
|
||||
import mozilla.components.feature.downloads.temporary.ShareDownloadFeature
|
||||
import mozilla.components.feature.downloads.temporary.ShareResourceFeature
|
||||
import mozilla.components.feature.media.fullscreen.MediaSessionFullscreenFeature
|
||||
import mozilla.components.feature.privatemode.feature.SecureWindowFeature
|
||||
import mozilla.components.feature.prompts.PromptFeature
|
||||
@@ -48,7 +48,7 @@ import mozilla.components.support.locale.ActivityContextWrapper
|
||||
@SuppressWarnings("LargeClass")
|
||||
abstract class BaseBrowserFragment : Fragment(), UserInteractionHandler, ActivityResultHandler {
|
||||
private val sessionFeature = ViewBoundFeatureWrapper<SessionFeature>()
|
||||
private val shareDownloadsFeature = ViewBoundFeatureWrapper<ShareDownloadFeature>()
|
||||
private val shareResourceFeature = ViewBoundFeatureWrapper<ShareResourceFeature>()
|
||||
private val downloadsFeature = ViewBoundFeatureWrapper<DownloadsFeature>()
|
||||
private val appLinksFeature = ViewBoundFeatureWrapper<AppLinksFeature>()
|
||||
private val promptFeature = ViewBoundFeatureWrapper<PromptFeature>()
|
||||
@@ -151,8 +151,8 @@ abstract class BaseBrowserFragment : Fragment(), UserInteractionHandler, Activit
|
||||
view = view,
|
||||
)
|
||||
|
||||
shareDownloadsFeature.set(
|
||||
ShareDownloadFeature(
|
||||
shareResourceFeature.set(
|
||||
ShareResourceFeature(
|
||||
context = requireContext().applicationContext,
|
||||
httpClient = components.core.client,
|
||||
store = components.core.store,
|
||||
|
||||
+4
@@ -16,6 +16,8 @@ import eu.lensai.flutter_mozilla_components.pigeons.GeckoTabContentEvents
|
||||
import eu.lensai.flutter_mozilla_components.pigeons.ReaderViewController
|
||||
import mozilla.components.concept.engine.EngineView
|
||||
import mozilla.components.concept.engine.selection.SelectionActionDelegate
|
||||
import mozilla.components.feature.downloads.DefaultFileSizeFormatter
|
||||
import mozilla.components.feature.downloads.FileSizeFormatter
|
||||
import mozilla.components.support.base.android.NotificationsDelegate
|
||||
|
||||
class Components(private val context: Context,
|
||||
@@ -42,4 +44,6 @@ class Components(private val context: Context,
|
||||
notificationManagerCompat,
|
||||
)
|
||||
}
|
||||
|
||||
val fileSizeFormatter: FileSizeFormatter by lazy { DefaultFileSizeFormatter(context) }
|
||||
}
|
||||
+3
@@ -103,6 +103,7 @@ class WebExtensionPromptFeature(
|
||||
addon = addon,
|
||||
promptRequest = promptRequest,
|
||||
permissions = promptRequest.permissions,
|
||||
origins = promptRequest.origins,
|
||||
)
|
||||
}
|
||||
|
||||
@@ -156,12 +157,14 @@ class WebExtensionPromptFeature(
|
||||
addon: Addon,
|
||||
promptRequest: WebExtensionPromptRequest.AfterInstallation.Permissions,
|
||||
permissions: List<String> = emptyList(),
|
||||
origins: List<String> = emptyList(),
|
||||
forOptionalPermissions: Boolean = false,
|
||||
) {
|
||||
if (!isInstallationInProgress && !hasExistingPermissionDialogFragment()) {
|
||||
val dialog = PermissionsDialogFragment.newInstance(
|
||||
addon = addon,
|
||||
permissions = permissions,
|
||||
origins = origins,
|
||||
forOptionalPermissions = forOptionalPermissions,
|
||||
onPositiveButtonClicked = { _, privateBrowsingAllowed ->
|
||||
handlePermissions(
|
||||
|
||||
+5
-14
@@ -7,7 +7,8 @@ import eu.lensai.flutter_mozilla_components.pigeons.GeckoDownloadsApi
|
||||
import eu.lensai.flutter_mozilla_components.pigeons.ShareInternetResourceState
|
||||
import mozilla.components.browser.state.action.ContentAction
|
||||
import mozilla.components.browser.state.action.CopyInternetResourceAction
|
||||
import mozilla.components.browser.state.action.ShareInternetResourceAction
|
||||
import mozilla.components.browser.state.action.ShareResourceAction
|
||||
import mozilla.components.browser.state.state.content.ShareResourceState
|
||||
import java.util.UUID
|
||||
|
||||
class GeckoDownloadsApiImpl : GeckoDownloadsApi {
|
||||
@@ -29,11 +30,11 @@ class GeckoDownloadsApiImpl : GeckoDownloadsApi {
|
||||
}
|
||||
|
||||
override fun shareInternetResource(tabId: String, state: ShareInternetResourceState) {
|
||||
components.core.store.dispatch(ShareInternetResourceAction.AddShareAction(tabId, state.toMozillaShareInternetResourceState()))
|
||||
components.core.store.dispatch(ShareResourceAction.AddShareAction(tabId, state.toMozillaShareInternetResourceState()))
|
||||
}
|
||||
|
||||
private fun ShareInternetResourceState.toMozillaShareInternetResourceState(): mozilla.components.browser.state.state.content.ShareInternetResourceState {
|
||||
return mozilla.components.browser.state.state.content.ShareInternetResourceState(
|
||||
private fun ShareInternetResourceState.toMozillaShareInternetResourceState(): ShareResourceState.InternetResource {
|
||||
return ShareResourceState.InternetResource(
|
||||
url = url,
|
||||
contentType = contentType,
|
||||
private = private,
|
||||
@@ -42,16 +43,6 @@ class GeckoDownloadsApiImpl : GeckoDownloadsApi {
|
||||
)
|
||||
}
|
||||
|
||||
fun mozilla.components.browser.state.state.content.ShareInternetResourceState.toPigeonShareInternetResourceState(): eu.lensai.flutter_mozilla_components.pigeons.ShareInternetResourceState {
|
||||
return eu.lensai.flutter_mozilla_components.pigeons.ShareInternetResourceState(
|
||||
url = url,
|
||||
contentType = contentType,
|
||||
private = private,
|
||||
referrerUrl = referrerUrl
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
private fun DownloadState.toMozillaDownloadState(): mozilla.components.browser.state.state.content.DownloadState {
|
||||
return mozilla.components.browser.state.state.content.DownloadState(
|
||||
url = url,
|
||||
|
||||
+2
-2
@@ -11,7 +11,7 @@ import mozilla.components.concept.engine.webextension.MessageHandler
|
||||
import mozilla.components.concept.engine.webextension.Port
|
||||
import mozilla.components.concept.engine.webextension.WebExtensionRuntime
|
||||
import mozilla.components.support.base.log.logger.Logger
|
||||
import mozilla.components.support.webextensions.WebExtensionController
|
||||
import mozilla.components.support.webextensions.BuiltInWebExtensionController
|
||||
import org.json.JSONArray
|
||||
import org.json.JSONObject
|
||||
import org.mozilla.gecko.util.ThreadUtils.runOnUiThread
|
||||
@@ -30,7 +30,7 @@ object BrowserExtensionFeature {
|
||||
|
||||
@VisibleForTesting
|
||||
// This is an internal var to make it mutable for unit testing purposes only
|
||||
internal var extensionController = WebExtensionController(
|
||||
internal var extensionController = BuiltInWebExtensionController(
|
||||
PREF_MANAGER_REPORTER_EXTENSION_ID,
|
||||
PREF_MANAGER_REPORTER_EXTENSION_URL,
|
||||
PREF_MANAGER_REPORTER_MESSAGING_ID
|
||||
|
||||
+2
-2
@@ -10,7 +10,7 @@ import mozilla.components.concept.engine.webextension.MessageHandler
|
||||
import mozilla.components.concept.engine.webextension.Port
|
||||
import mozilla.components.concept.engine.webextension.WebExtensionRuntime
|
||||
import mozilla.components.support.base.log.logger.Logger
|
||||
import mozilla.components.support.webextensions.WebExtensionController
|
||||
import mozilla.components.support.webextensions.BuiltInWebExtensionController
|
||||
import org.json.JSONObject
|
||||
|
||||
object ContainerProxyFeature {
|
||||
@@ -26,7 +26,7 @@ object ContainerProxyFeature {
|
||||
|
||||
@VisibleForTesting
|
||||
// This is an internal var to make it mutable for unit testing purposes only
|
||||
internal var extensionController = WebExtensionController(
|
||||
internal var extensionController = BuiltInWebExtensionController(
|
||||
CONTAINER_PROXY_REPORTER_EXTENSION_ID,
|
||||
CONTAINER_PROXY_REPORTER_EXTENSION_URL,
|
||||
CONTAINER_PROXY_REPORTER_MESSAGING_ID,
|
||||
|
||||
+2
-2
@@ -10,7 +10,7 @@ import mozilla.components.concept.engine.webextension.MessageHandler
|
||||
import mozilla.components.concept.engine.webextension.Port
|
||||
import mozilla.components.concept.engine.webextension.WebExtensionRuntime
|
||||
import mozilla.components.support.base.log.logger.Logger
|
||||
import mozilla.components.support.webextensions.WebExtensionController
|
||||
import mozilla.components.support.webextensions.BuiltInWebExtensionController
|
||||
import org.json.JSONObject
|
||||
|
||||
interface ResultConsumer<T> {
|
||||
@@ -35,7 +35,7 @@ object CookieManagerFeature {
|
||||
|
||||
@VisibleForTesting
|
||||
// This is an internal var to make it mutable for unit testing purposes only
|
||||
internal var extensionController = WebExtensionController(
|
||||
internal var extensionController = BuiltInWebExtensionController(
|
||||
COOKIE_MANAGER_REPORTER_EXTENSION_ID,
|
||||
COOKIE_MANAGER_REPORTER_EXTENSION_URL,
|
||||
COOKIE_MANAGER_REPORTER_MESSAGING_ID,
|
||||
|
||||
+2
-2
@@ -10,7 +10,7 @@ import mozilla.components.concept.engine.webextension.MessageHandler
|
||||
import mozilla.components.concept.engine.webextension.Port
|
||||
import mozilla.components.concept.engine.webextension.WebExtensionRuntime
|
||||
import mozilla.components.support.base.log.logger.Logger
|
||||
import mozilla.components.support.webextensions.WebExtensionController
|
||||
import mozilla.components.support.webextensions.BuiltInWebExtensionController
|
||||
import org.json.JSONObject
|
||||
|
||||
object PrefManagerFeature {
|
||||
@@ -26,7 +26,7 @@ object PrefManagerFeature {
|
||||
|
||||
@VisibleForTesting
|
||||
// This is an internal var to make it mutable for unit testing purposes only
|
||||
internal var extensionController = WebExtensionController(
|
||||
internal var extensionController = BuiltInWebExtensionController(
|
||||
PREF_MANAGER_REPORTER_EXTENSION_ID,
|
||||
PREF_MANAGER_REPORTER_EXTENSION_URL,
|
||||
PREF_MANAGER_REPORTER_MESSAGING_ID,
|
||||
|
||||
+2
-2
@@ -16,7 +16,7 @@ import mozilla.components.support.ktx.android.org.json.tryGetInt
|
||||
import mozilla.components.support.ktx.android.org.json.tryGetString
|
||||
import mozilla.components.support.ktx.kotlinx.coroutines.flow.filterChanged
|
||||
import mozilla.components.support.ktx.kotlinx.coroutines.flow.ifAnyChanged
|
||||
import mozilla.components.support.webextensions.WebExtensionController
|
||||
import mozilla.components.support.webextensions.BuiltInWebExtensionController
|
||||
import org.json.JSONObject
|
||||
|
||||
class ReadabilityExtractFeature(
|
||||
@@ -61,7 +61,7 @@ class ReadabilityExtractFeature(
|
||||
private var sessionScope: CoroutineScope? = null
|
||||
private var historyScope: CoroutineScope? = null
|
||||
|
||||
private var extensionController = WebExtensionController(
|
||||
private var extensionController = BuiltInWebExtensionController(
|
||||
READER_EXTRACT_EXTENSION_ID,
|
||||
READER_EXTRACT_EXTENSION_URL,
|
||||
READER_EXTRACT_CONTENT_PORT,
|
||||
|
||||
+2
@@ -3,6 +3,7 @@ package eu.lensai.flutter_mozilla_components.services
|
||||
import eu.lensai.flutter_mozilla_components.GlobalComponents
|
||||
import mozilla.components.browser.state.store.BrowserStore
|
||||
import mozilla.components.feature.downloads.AbstractFetchDownloadService
|
||||
import mozilla.components.feature.downloads.FileSizeFormatter
|
||||
import mozilla.components.support.base.android.NotificationsDelegate
|
||||
|
||||
class DownloadService : AbstractFetchDownloadService() {
|
||||
@@ -13,4 +14,5 @@ class DownloadService : AbstractFetchDownloadService() {
|
||||
override val httpClient by lazy { components.core.client }
|
||||
override val store: BrowserStore by lazy { components.core.store }
|
||||
override val notificationsDelegate: NotificationsDelegate by lazy { components.notificationsDelegate }
|
||||
override val fileSizeFormatter: FileSizeFormatter by lazy { components.fileSizeFormatter }
|
||||
}
|
||||
@@ -19,7 +19,7 @@ pluginManagement {
|
||||
plugins {
|
||||
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
|
||||
id "com.android.application" version "8.7.0" apply false
|
||||
id "org.jetbrains.kotlin.android" version "1.9.22" apply false
|
||||
id "org.jetbrains.kotlin.android" version "2.1.20" apply false
|
||||
}
|
||||
|
||||
include ":app"
|
||||
|
||||
@@ -16,7 +16,7 @@ dev_dependencies:
|
||||
flutter_test:
|
||||
sdk: flutter
|
||||
lint: ^2.8.0
|
||||
pigeon: ^24.2.2
|
||||
pigeon: ^25.3.1
|
||||
|
||||
# For information on the generic Dart part of this file, see the
|
||||
# following page: https://dart.dev/tools/pub/pubspec
|
||||
|
||||
Reference in New Issue
Block a user