From 20637916607b72968c999be8c62763541b421c56 Mon Sep 17 00:00:00 2001 From: Fabian Freund Date: Fri, 18 Apr 2025 21:44:44 +0200 Subject: [PATCH] upgrade deps --- TODO.md | 5 +-- app/android/build.gradle | 2 +- app/android/settings.gradle | 4 +- app/pubspec.yaml | 38 +++++++++++++------ app/pubspec_overrides.yaml | 12 +++++- .../android/build.gradle | 12 +++--- .../BaseBrowserFragment.kt | 8 ++-- .../flutter_mozilla_components/Components.kt | 4 ++ .../addons/WebExtensionPromptFeature.kt | 3 ++ .../api/GeckoDownloadsApiImpl.kt | 19 +++------- .../feature/BrowserExtensionFeature.kt | 4 +- .../feature/ContainerProxyFeature.kt | 4 +- .../feature/CookieManagerFeature.kt | 4 +- .../feature/PrefManagerFeature.kt | 4 +- .../feature/ReadabilityExtractFeature.kt | 4 +- .../services/DownloadService.kt | 2 + .../example/android/settings.gradle | 2 +- .../flutter_mozilla_components/pubspec.yaml | 2 +- 18 files changed, 78 insertions(+), 55 deletions(-) diff --git a/TODO.md b/TODO.md index 2f610aea..c06b2c8f 100644 --- a/TODO.md +++ b/TODO.md @@ -1,4 +1 @@ -* refactor all providers.dart and split them up -* check on various occasions if/wehn create new tab and update of current tab isntead -* improve opening speed of website widget -* \ No newline at end of file +* check al sqlite IS with and conditions to match values with and where both params are optional \ No newline at end of file diff --git a/app/android/build.gradle b/app/android/build.gradle index 89f64dac..54f73e4f 100644 --- a/app/android/build.gradle +++ b/app/android/build.gradle @@ -5,7 +5,7 @@ ext { } buildscript { - ext.kotlin_version = '1.9.22' + ext.kotlin_version = '2.1.20' } allprojects { diff --git a/app/android/settings.gradle b/app/android/settings.gradle index 892133c0..402c18f3 100644 --- a/app/android/settings.gradle +++ b/app/android/settings.gradle @@ -18,8 +18,8 @@ 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 "com.android.application" version '8.9.1' apply false + id "org.jetbrains.kotlin.android" version "2.1.20" apply false } include ":app" diff --git a/app/pubspec.yaml b/app/pubspec.yaml index af47f2f1..4fb482d0 100644 --- a/app/pubspec.yaml +++ b/app/pubspec.yaml @@ -7,7 +7,7 @@ environment: sdk: '>=3.7.0 <4.0.0' dependencies: - background_fetch: ^1.3.7 + background_fetch: ^1.3.8 collection: ^1.19.1 copy_with_extension: ^6.0.1 crypto: ^3.0.6 @@ -15,7 +15,7 @@ dependencies: dynamic_color: ^1.7.0 exceptions: ^0.6.1 fading_scroll: ^0.9.1 - fast_equatable: ^1.3.0 + fast_equatable: ^1.3.1 flutter: sdk: flutter flutter_auto_size_text: ^4.1.0 @@ -26,7 +26,7 @@ dependencies: path: ../../flutter_chat_ui/packages/flutter_chat_ui flutter_highlight: ^0.7.0 flutter_hooks: ^0.21.2 - flutter_markdown: ^0.7.6+2 + flutter_markdown: ^0.7.7 flutter_material_design_icons: ^1.1.7447 flutter_mozilla_components: path: ../packages/flutter_mozilla_components @@ -39,18 +39,24 @@ dependencies: ref: web_search flutter_slidable: ^4.0.0 flutter_svg: ^2.0.17 - go_router: ^14.8.1 + go_router: ^15.0.0 google_fonts: ^6.2.1 home_widget: ^0.7.0+1 hooks_riverpod: ^2.6.1 - html: ^0.15.5 + html: ^0.15.5+1 http: ^1.3.0 intl: ^0.19.0 json_annotation: ^4.9.0 langchain: - path: ../../langchain_dart/packages/langchain - langchain_openai: - path: ../../langchain_dart/packages/langchain_openai + git: + url: https://github.com/FaFre/langchain_dart.git + ref: static_objectbox + path: packages/langchain + langchain_openai: + git: + url: https://github.com/FaFre/langchain_dart.git + ref: static_objectbox + path: packages/langchain_openai lexo_rank: git: url: https://github.com/FaFre/lexo_rank.git @@ -62,7 +68,7 @@ dependencies: path: ^1.9.1 path_provider: ^2.1.5 pocketbase: ^0.22.0 - provider: ^6.1.2 + provider: ^6.1.4 riverpod: ^2.6.1 riverpod_annotation: ^2.6.1 rss_dart: ^1.0.12 @@ -74,7 +80,7 @@ dependencies: git: url: https://github.com/FaFre/speech_to_text_google_dialog.git sqlite3: ^2.7.5 - sqlite3_flutter_libs: ^0.5.31 + sqlite3_flutter_libs: ^0.5.32 sqlite3_vec: git: https://github.com/FaFre/sqlite3_vec.git text_scroll: ^0.2.0 @@ -95,6 +101,16 @@ dependency_overrides: path: ../../flutter_chat_ui/packages/cross_cache flutter_chat_core: path: ../../flutter_chat_ui/packages/flutter_chat_core + langchain_core: + git: + url: https://github.com/FaFre/langchain_dart.git + ref: static_objectbox + path: packages/langchain_core + tavily_dart: + git: + url: https://github.com/FaFre/langchain_dart.git + ref: static_objectbox + path: packages/tavily_dart dev_dependencies: build_runner: ^2.4.15 @@ -105,7 +121,7 @@ dev_dependencies: fast_equatable_lint: ^0.3.1 flutter_launcher_icons: ^0.14.3 go_router_builder: ^2.8.2 - json_serializable: ^6.9.4 + json_serializable: ^6.9.5 lint: ^2.8.0 riverpod_generator: ^2.6.4 riverpod_lint: ^2.6.4 diff --git a/app/pubspec_overrides.yaml b/app/pubspec_overrides.yaml index ebda4ae3..acae63fa 100644 --- a/app/pubspec_overrides.yaml +++ b/app/pubspec_overrides.yaml @@ -1,4 +1,4 @@ -# melos_managed_dependency_overrides: flutter_mozilla_components,cross_cache,flutter_chat_core +# melos_managed_dependency_overrides: flutter_mozilla_components,cross_cache,flutter_chat_core,langchain_core,tavily_dart dependency_overrides: flutter_mozilla_components: path: ../packages/flutter_mozilla_components @@ -6,3 +6,13 @@ dependency_overrides: path: ../../flutter_chat_ui/packages/cross_cache flutter_chat_core: path: ../../flutter_chat_ui/packages/flutter_chat_core + langchain_core: + git: + url: https://github.com/FaFre/langchain_dart.git + ref: static_objectbox + path: packages/langchain_core + tavily_dart: + git: + url: https://github.com/FaFre/langchain_dart.git + ref: static_objectbox + path: packages/tavily_dart diff --git a/packages/flutter_mozilla_components/android/build.gradle b/packages/flutter_mozilla_components/android/build.gradle index 5e98f9e6..e5474e47 100644 --- a/packages/flutter_mozilla_components/android/build.gradle +++ b/packages/flutter_mozilla_components/android/build.gradle @@ -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") diff --git a/packages/flutter_mozilla_components/android/src/main/kotlin/eu/lensai/flutter_mozilla_components/BaseBrowserFragment.kt b/packages/flutter_mozilla_components/android/src/main/kotlin/eu/lensai/flutter_mozilla_components/BaseBrowserFragment.kt index d7ee1bc3..23e7ca25 100644 --- a/packages/flutter_mozilla_components/android/src/main/kotlin/eu/lensai/flutter_mozilla_components/BaseBrowserFragment.kt +++ b/packages/flutter_mozilla_components/android/src/main/kotlin/eu/lensai/flutter_mozilla_components/BaseBrowserFragment.kt @@ -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() - private val shareDownloadsFeature = ViewBoundFeatureWrapper() + private val shareResourceFeature = ViewBoundFeatureWrapper() private val downloadsFeature = ViewBoundFeatureWrapper() private val appLinksFeature = ViewBoundFeatureWrapper() private val promptFeature = ViewBoundFeatureWrapper() @@ -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, diff --git a/packages/flutter_mozilla_components/android/src/main/kotlin/eu/lensai/flutter_mozilla_components/Components.kt b/packages/flutter_mozilla_components/android/src/main/kotlin/eu/lensai/flutter_mozilla_components/Components.kt index fff9ab53..9f00e76c 100644 --- a/packages/flutter_mozilla_components/android/src/main/kotlin/eu/lensai/flutter_mozilla_components/Components.kt +++ b/packages/flutter_mozilla_components/android/src/main/kotlin/eu/lensai/flutter_mozilla_components/Components.kt @@ -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) } } \ No newline at end of file diff --git a/packages/flutter_mozilla_components/android/src/main/kotlin/eu/lensai/flutter_mozilla_components/addons/WebExtensionPromptFeature.kt b/packages/flutter_mozilla_components/android/src/main/kotlin/eu/lensai/flutter_mozilla_components/addons/WebExtensionPromptFeature.kt index 3c0dabc3..fe63efe9 100644 --- a/packages/flutter_mozilla_components/android/src/main/kotlin/eu/lensai/flutter_mozilla_components/addons/WebExtensionPromptFeature.kt +++ b/packages/flutter_mozilla_components/android/src/main/kotlin/eu/lensai/flutter_mozilla_components/addons/WebExtensionPromptFeature.kt @@ -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 = emptyList(), + origins: List = emptyList(), forOptionalPermissions: Boolean = false, ) { if (!isInstallationInProgress && !hasExistingPermissionDialogFragment()) { val dialog = PermissionsDialogFragment.newInstance( addon = addon, permissions = permissions, + origins = origins, forOptionalPermissions = forOptionalPermissions, onPositiveButtonClicked = { _, privateBrowsingAllowed -> handlePermissions( diff --git a/packages/flutter_mozilla_components/android/src/main/kotlin/eu/lensai/flutter_mozilla_components/api/GeckoDownloadsApiImpl.kt b/packages/flutter_mozilla_components/android/src/main/kotlin/eu/lensai/flutter_mozilla_components/api/GeckoDownloadsApiImpl.kt index fec1933c..8e4a33d4 100644 --- a/packages/flutter_mozilla_components/android/src/main/kotlin/eu/lensai/flutter_mozilla_components/api/GeckoDownloadsApiImpl.kt +++ b/packages/flutter_mozilla_components/android/src/main/kotlin/eu/lensai/flutter_mozilla_components/api/GeckoDownloadsApiImpl.kt @@ -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, diff --git a/packages/flutter_mozilla_components/android/src/main/kotlin/eu/lensai/flutter_mozilla_components/feature/BrowserExtensionFeature.kt b/packages/flutter_mozilla_components/android/src/main/kotlin/eu/lensai/flutter_mozilla_components/feature/BrowserExtensionFeature.kt index ae7e6174..e7c3825b 100644 --- a/packages/flutter_mozilla_components/android/src/main/kotlin/eu/lensai/flutter_mozilla_components/feature/BrowserExtensionFeature.kt +++ b/packages/flutter_mozilla_components/android/src/main/kotlin/eu/lensai/flutter_mozilla_components/feature/BrowserExtensionFeature.kt @@ -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 diff --git a/packages/flutter_mozilla_components/android/src/main/kotlin/eu/lensai/flutter_mozilla_components/feature/ContainerProxyFeature.kt b/packages/flutter_mozilla_components/android/src/main/kotlin/eu/lensai/flutter_mozilla_components/feature/ContainerProxyFeature.kt index 85a80725..f672edb2 100644 --- a/packages/flutter_mozilla_components/android/src/main/kotlin/eu/lensai/flutter_mozilla_components/feature/ContainerProxyFeature.kt +++ b/packages/flutter_mozilla_components/android/src/main/kotlin/eu/lensai/flutter_mozilla_components/feature/ContainerProxyFeature.kt @@ -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, diff --git a/packages/flutter_mozilla_components/android/src/main/kotlin/eu/lensai/flutter_mozilla_components/feature/CookieManagerFeature.kt b/packages/flutter_mozilla_components/android/src/main/kotlin/eu/lensai/flutter_mozilla_components/feature/CookieManagerFeature.kt index 68ce55f0..3497a61d 100644 --- a/packages/flutter_mozilla_components/android/src/main/kotlin/eu/lensai/flutter_mozilla_components/feature/CookieManagerFeature.kt +++ b/packages/flutter_mozilla_components/android/src/main/kotlin/eu/lensai/flutter_mozilla_components/feature/CookieManagerFeature.kt @@ -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 { @@ -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, diff --git a/packages/flutter_mozilla_components/android/src/main/kotlin/eu/lensai/flutter_mozilla_components/feature/PrefManagerFeature.kt b/packages/flutter_mozilla_components/android/src/main/kotlin/eu/lensai/flutter_mozilla_components/feature/PrefManagerFeature.kt index 2175ba0a..c4d12e16 100644 --- a/packages/flutter_mozilla_components/android/src/main/kotlin/eu/lensai/flutter_mozilla_components/feature/PrefManagerFeature.kt +++ b/packages/flutter_mozilla_components/android/src/main/kotlin/eu/lensai/flutter_mozilla_components/feature/PrefManagerFeature.kt @@ -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, diff --git a/packages/flutter_mozilla_components/android/src/main/kotlin/eu/lensai/flutter_mozilla_components/feature/ReadabilityExtractFeature.kt b/packages/flutter_mozilla_components/android/src/main/kotlin/eu/lensai/flutter_mozilla_components/feature/ReadabilityExtractFeature.kt index ae0e1364..a5231743 100644 --- a/packages/flutter_mozilla_components/android/src/main/kotlin/eu/lensai/flutter_mozilla_components/feature/ReadabilityExtractFeature.kt +++ b/packages/flutter_mozilla_components/android/src/main/kotlin/eu/lensai/flutter_mozilla_components/feature/ReadabilityExtractFeature.kt @@ -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, diff --git a/packages/flutter_mozilla_components/android/src/main/kotlin/eu/lensai/flutter_mozilla_components/services/DownloadService.kt b/packages/flutter_mozilla_components/android/src/main/kotlin/eu/lensai/flutter_mozilla_components/services/DownloadService.kt index 684fc735..4044a7b9 100644 --- a/packages/flutter_mozilla_components/android/src/main/kotlin/eu/lensai/flutter_mozilla_components/services/DownloadService.kt +++ b/packages/flutter_mozilla_components/android/src/main/kotlin/eu/lensai/flutter_mozilla_components/services/DownloadService.kt @@ -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 } } \ No newline at end of file diff --git a/packages/flutter_mozilla_components/example/android/settings.gradle b/packages/flutter_mozilla_components/example/android/settings.gradle index 892133c0..2774ed97 100644 --- a/packages/flutter_mozilla_components/example/android/settings.gradle +++ b/packages/flutter_mozilla_components/example/android/settings.gradle @@ -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" diff --git a/packages/flutter_mozilla_components/pubspec.yaml b/packages/flutter_mozilla_components/pubspec.yaml index 4447f0a7..90f1e91c 100644 --- a/packages/flutter_mozilla_components/pubspec.yaml +++ b/packages/flutter_mozilla_components/pubspec.yaml @@ -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