refactor: Remove unused dependencies and add CI check

This commit is contained in:
Christian Kußowski 2026-03-16 09:43:16 +01:00
parent e0738cca97
commit 7128ba98b2
No known key found for this signature in database
GPG key ID: E067ECD60F1A0652
6 changed files with 9 additions and 90 deletions

View file

@ -28,6 +28,10 @@ jobs:
- name: Check license compliance - name: Check license compliance
run: dart run license_checker check-licenses -c licenses.yaml --problematic run: dart run license_checker check-licenses -c licenses.yaml --problematic
- run: flutter analyze - run: flutter analyze
- name: Search unused dependencies
run: |
dart pub global activate dependency_validator
dart pub global run dependency_validator
- run: dart run dart_code_linter:metrics analyze lib --reporter=github - run: dart run dart_code_linter:metrics analyze lib --reporter=github
- run: dart run dart_code_linter:metrics check-unused-code lib - run: dart run dart_code_linter:metrics check-unused-code lib
- run: dart run dart_code_linter:metrics check-unused-files lib - run: dart run dart_code_linter:metrics check-unused-files lib

View file

@ -0,0 +1,3 @@
ignore:
- handy_window
- sqlcipher_flutter_libs

View file

@ -242,7 +242,7 @@ packages:
source: hosted source: hosted
version: "1.0.2" version: "1.0.2"
cupertino_icons: cupertino_icons:
dependency: "direct main" dependency: transitive
description: description:
name: cupertino_icons name: cupertino_icons
sha256: ba631d1c7f7bef6b729a622b7b752645a2d076dba9976925b8f25725a30e1ee6 sha256: ba631d1c7f7bef6b729a622b7b752645a2d076dba9976925b8f25725a30e1ee6
@ -462,11 +462,6 @@ packages:
description: flutter description: flutter
source: sdk source: sdk
version: "0.0.0" version: "0.0.0"
flutter_driver:
dependency: transitive
description: flutter
source: sdk
version: "0.0.0"
flutter_foreground_task: flutter_foreground_task:
dependency: "direct main" dependency: "direct main"
description: description:
@ -674,11 +669,6 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "4.0.0" version: "4.0.0"
fuchsia_remote_debug_protocol:
dependency: transitive
description: flutter
source: sdk
version: "0.0.0"
geoclue: geoclue:
dependency: transitive dependency: transitive
description: description:
@ -911,11 +901,6 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "4.6.0" version: "4.6.0"
integration_test:
dependency: "direct dev"
description: flutter
source: sdk
version: "0.0.0"
intl: intl:
dependency: "direct main" dependency: "direct main"
description: description:
@ -1013,7 +998,7 @@ packages:
source: hosted source: hosted
version: "1.6.2" version: "1.6.2"
linkify: linkify:
dependency: "direct main" dependency: transitive
description: description:
name: linkify name: linkify
sha256: "4139ea77f4651ab9c315b577da2dd108d9aa0bd84b5d03d33323f1970c645832" sha256: "4139ea77f4651ab9c315b577da2dd108d9aa0bd84b5d03d33323f1970c645832"
@ -1252,54 +1237,6 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.3.0" version: "2.3.0"
permission_handler:
dependency: "direct main"
description:
name: permission_handler
sha256: bc917da36261b00137bbc8896bf1482169cd76f866282368948f032c8c1caae1
url: "https://pub.dev"
source: hosted
version: "12.0.1"
permission_handler_android:
dependency: transitive
description:
name: permission_handler_android
sha256: "1e3bc410ca1bf84662104b100eb126e066cb55791b7451307f9708d4007350e6"
url: "https://pub.dev"
source: hosted
version: "13.0.1"
permission_handler_apple:
dependency: transitive
description:
name: permission_handler_apple
sha256: f000131e755c54cf4d84a5d8bd6e4149e262cc31c5a8b1d698de1ac85fa41023
url: "https://pub.dev"
source: hosted
version: "9.4.7"
permission_handler_html:
dependency: transitive
description:
name: permission_handler_html
sha256: "38f000e83355abb3392140f6bc3030660cfaef189e1f87824facb76300b4ff24"
url: "https://pub.dev"
source: hosted
version: "0.1.3+5"
permission_handler_platform_interface:
dependency: transitive
description:
name: permission_handler_platform_interface
sha256: eb99b295153abce5d683cac8c02e22faab63e50679b937fa1bf67d58bb282878
url: "https://pub.dev"
source: hosted
version: "4.3.0"
permission_handler_windows:
dependency: transitive
description:
name: permission_handler_windows
sha256: "1a790728016f79a41216d88672dbc5df30e686e811ad4e698bfc51f76ad91f1e"
url: "https://pub.dev"
source: hosted
version: "0.2.1"
petitparser: petitparser:
dependency: transitive dependency: transitive
description: description:
@ -1801,14 +1738,6 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.3.0" version: "0.3.0"
sync_http:
dependency: transitive
description:
name: sync_http
sha256: "7f0cd72eca000d2e026bcd6f990b81d0ca06022ef4e32fb257b30d3d1014a961"
url: "https://pub.dev"
source: hosted
version: "0.3.1"
synchronized: synchronized:
dependency: transitive dependency: transitive
description: description:
@ -2170,14 +2099,6 @@ packages:
url: "https://github.com/google/webcrypto.dart.git" url: "https://github.com/google/webcrypto.dart.git"
source: git source: git
version: "0.6.0" version: "0.6.0"
webdriver:
dependency: transitive
description:
name: webdriver
sha256: "2f3a14ca026957870cfd9c635b83507e0e51d8091568e90129fbf805aba7cade"
url: "https://pub.dev"
source: hosted
version: "3.1.0"
webkit_inspection_protocol: webkit_inspection_protocol:
dependency: transitive dependency: transitive
description: description:

View file

@ -17,7 +17,6 @@ dependencies:
chewie: ^1.13.0 chewie: ^1.13.0
collection: ^1.18.0 collection: ^1.18.0
cross_file: ^0.3.5 cross_file: ^0.3.5
cupertino_icons: any
desktop_drop: ^0.7.0 desktop_drop: ^0.7.0
desktop_notifications: ^0.6.3 desktop_notifications: ^0.6.3
device_info_plus: ^12.3.0 device_info_plus: ^12.3.0
@ -50,7 +49,6 @@ dependencies:
intl: any intl: any
just_audio: ^0.10.5 just_audio: ^0.10.5
latlong2: ^0.9.1 latlong2: ^0.9.1
linkify: ^5.0.0
matrix: ^6.2.0 matrix: ^6.2.0
mime: ^2.0.0 mime: ^2.0.0
native_imaging: ^0.4.0 native_imaging: ^0.4.0
@ -59,7 +57,6 @@ dependencies:
particles_network: ^1.9.3 particles_network: ^1.9.3
path: ^1.9.0 path: ^1.9.0
path_provider: ^2.1.2 path_provider: ^2.1.2
permission_handler: ^12.0.1
pretty_qr_code: ^3.6.0 pretty_qr_code: ^3.6.0
provider: ^6.0.2 provider: ^6.0.2
punycode: ^1.0.0 punycode: ^1.0.0
@ -90,8 +87,6 @@ dev_dependencies:
flutter_test: flutter_test:
sdk: flutter sdk: flutter
import_sorter: ^4.6.0 import_sorter: ^4.6.0
integration_test:
sdk: flutter
license_checker: ^1.6.2 license_checker: ^1.6.2
translations_cleaner: ^0.1.1 translations_cleaner: ^0.1.1

View file

@ -14,7 +14,6 @@
#include <flutter_secure_storage_windows/flutter_secure_storage_windows_plugin.h> #include <flutter_secure_storage_windows/flutter_secure_storage_windows_plugin.h>
#include <flutter_webrtc/flutter_web_r_t_c_plugin.h> #include <flutter_webrtc/flutter_web_r_t_c_plugin.h>
#include <geolocator_windows/geolocator_windows.h> #include <geolocator_windows/geolocator_windows.h>
#include <permission_handler_windows/permission_handler_windows_plugin.h>
#include <record_windows/record_windows_plugin_c_api.h> #include <record_windows/record_windows_plugin_c_api.h>
#include <screen_retriever_windows/screen_retriever_windows_plugin_c_api.h> #include <screen_retriever_windows/screen_retriever_windows_plugin_c_api.h>
#include <share_plus/share_plus_windows_plugin_c_api.h> #include <share_plus/share_plus_windows_plugin_c_api.h>
@ -41,8 +40,6 @@ void RegisterPlugins(flutter::PluginRegistry* registry) {
registry->GetRegistrarForPlugin("FlutterWebRTCPlugin")); registry->GetRegistrarForPlugin("FlutterWebRTCPlugin"));
GeolocatorWindowsRegisterWithRegistrar( GeolocatorWindowsRegisterWithRegistrar(
registry->GetRegistrarForPlugin("GeolocatorWindows")); registry->GetRegistrarForPlugin("GeolocatorWindows"));
PermissionHandlerWindowsPluginRegisterWithRegistrar(
registry->GetRegistrarForPlugin("PermissionHandlerWindowsPlugin"));
RecordWindowsPluginCApiRegisterWithRegistrar( RecordWindowsPluginCApiRegisterWithRegistrar(
registry->GetRegistrarForPlugin("RecordWindowsPluginCApi")); registry->GetRegistrarForPlugin("RecordWindowsPluginCApi"));
ScreenRetrieverWindowsPluginCApiRegisterWithRegistrar( ScreenRetrieverWindowsPluginCApiRegisterWithRegistrar(

View file

@ -11,7 +11,6 @@ list(APPEND FLUTTER_PLUGIN_LIST
flutter_secure_storage_windows flutter_secure_storage_windows
flutter_webrtc flutter_webrtc
geolocator_windows geolocator_windows
permission_handler_windows
record_windows record_windows
screen_retriever_windows screen_retriever_windows
share_plus share_plus