diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index be84c1f3..c5c0ebcb 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -26,10 +26,10 @@ jobs: # Steps represent a sequence of tasks that will be executed as part of the job steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 # Make sure the stable version of Flutter is available - - uses: subosito/flutter-action@v1 + - uses: subosito/flutter-action@v2 with: channel: 'stable' @@ -40,7 +40,7 @@ jobs: # Run Flutter Format to ensure formatting is valid - name: Run Flutter Format - run: flutter format --set-exit-if-changed . + run: dart format --set-exit-if-changed . working-directory: ${{env.source-directory}} analyze: @@ -55,10 +55,10 @@ jobs: # Steps represent a sequence of tasks that will be executed as part of the job steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 # Make sure the stable version of Flutter is available - - uses: subosito/flutter-action@v1 + - uses: subosito/flutter-action@v2 with: channel: 'stable' @@ -85,15 +85,16 @@ jobs: # Steps represent a sequence of tasks that will be executed as part of the job steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 # Ensure correct JAVA version is installed. - - uses: actions/setup-java@v1 + - uses: actions/setup-java@v3 with: - java-version: '12.x' + distribution: 'zulu' + java-version: '17' # Make sure the stable version of Flutter is available - - uses: subosito/flutter-action@v1 + - uses: subosito/flutter-action@v2 with: channel: 'stable' @@ -120,10 +121,10 @@ jobs: # Steps represent a sequence of tasks that will be executed as part of the job steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 # Make sure the stable version of Flutter is available - - uses: subosito/flutter-action@v1 + - uses: subosito/flutter-action@v2 with: channel: 'stable' @@ -150,10 +151,10 @@ jobs: # Steps represent a sequence of tasks that will be executed as part of the job steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 # Make sure the stable version of Flutter is available - - uses: subosito/flutter-action@v1 + - uses: subosito/flutter-action@v2 with: channel: 'stable' @@ -185,10 +186,10 @@ jobs: # Steps represent a sequence of tasks that will be executed as part of the job steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 # Make sure the stable version of Flutter is available - - uses: subosito/flutter-action@v1 + - uses: subosito/flutter-action@v2 with: channel: 'stable' @@ -224,10 +225,10 @@ jobs: - run: sudo apt-get install -y ninja-build libgtk-3-dev libblkid-dev # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 # Make sure the stable version of Flutter is available - - uses: subosito/flutter-action@v1 + - uses: subosito/flutter-action@v2 with: channel: 'stable' @@ -264,10 +265,10 @@ jobs: # Steps represent a sequence of tasks that will be executed as part of the job steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 # Make sure the stable version of Flutter is available - - uses: subosito/flutter-action@v1 + - uses: subosito/flutter-action@v2 with: channel: 'stable' @@ -292,10 +293,10 @@ jobs: # Steps represent a sequence of tasks that will be executed as part of the job steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 # Make sure the stable version of Flutter is available - - uses: subosito/flutter-action@v1 + - uses: subosito/flutter-action@v2 with: channel: 'stable' @@ -310,8 +311,8 @@ jobs: working-directory: ${{env.source-directory}} # Upload code coverage information - - uses: codecov/codecov-action@v1 + - uses: codecov/codecov-action@v3 with: - file: ${{env.source-directory}}/coverage/lcov.info # optional - name: CacheManager # optional - fail_ci_if_error: true \ No newline at end of file + files: ${{env.source-directory}}/coverage/lcov.info + name: CacheManager + fail_ci_if_error: true diff --git a/flutter_cache_manager/.gitignore b/flutter_cache_manager/.gitignore index 09941d42..24476c5d 100644 --- a/flutter_cache_manager/.gitignore +++ b/flutter_cache_manager/.gitignore @@ -1,6 +1,5 @@ # Miscellaneous *.class -*.lock *.log *.pyc *.swp @@ -8,9 +7,8 @@ .atom/ .buildlog/ .history -.project .svn/ -bin/ +migrate_working_dir/ # IntelliJ related *.iml @@ -18,78 +16,29 @@ bin/ *.iws .idea/ -# Android Studio related -android/.classpath -android/.settings/ - -# Visual Studio Code related -.vscode/ - -# Flutter repo-specific -/bin/cache/ -/bin/mingit/ -/dev/benchmarks/mega_gallery/ -/dev/bots/.recipe_deps -/dev/bots/android_tools/ -/dev/docs/doc/ -/dev/docs/lib/ -/dev/docs/pubspec.yaml -/packages/flutter/coverage/ -version +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ # Flutter/Dart/Pub related **/doc/api/ +**/ios/Flutter/.last_build_id .dart_tool/ .flutter-plugins +.flutter-plugins-dependencies .packages .pub-cache/ .pub/ -build/ -flutter_*.png -linked_*.ds -unlinked.ds -unlinked_spec.ds -flutter_export_environment.sh +/build/ -# Android related -**/android/**/gradle-wrapper.jar -**/android/.gradle -**/android/captures/ -**/android/gradlew -**/android/gradlew.bat -**/android/local.properties -**/android/**/GeneratedPluginRegistrant.java +# Symbolication related +app.*.symbols -# iOS/XCode related -**/ios/**/*.mode1v3 -**/ios/**/*.mode2v3 -**/ios/**/*.moved-aside -**/ios/**/*.pbxuser -**/ios/**/*.perspectivev3 -**/ios/**/*sync/ -**/ios/**/.sconsign.dblite -**/ios/**/.tags* -**/ios/**/.vagrant/ -**/ios/**/DerivedData/ -**/ios/**/Icon? -**/ios/**/Pods/ -**/ios/**/.symlinks/ -**/ios/**/profile -**/ios/**/xcuserdata -**/ios/.generated/ -**/ios/Flutter/App.framework -**/ios/Flutter/Flutter.framework -**/ios/Flutter/Generated.xcconfig -**/ios/Flutter/app.flx -**/ios/Flutter/app.zip -**/ios/Flutter/flutter_assets/ -**/ios/ServiceDefinitions.json -**/ios/Runner/GeneratedPluginRegistrant.* +# Obfuscation related +app.*.map.json -# Exceptions to above rules. -!**/ios/**/default.mode1v3 -!**/ios/**/default.mode2v3 -!**/ios/**/default.pbxuser -!**/ios/**/default.perspectivev3 -!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages -example/.flutter-plugins-dependencies +# Android Studio will place build artifacts here +/android/app/debug +/android/app/profile +/android/app/release diff --git a/flutter_cache_manager/CHANGELOG.md b/flutter_cache_manager/CHANGELOG.md index f6b26e89..a857d3b0 100644 --- a/flutter_cache_manager/CHANGELOG.md +++ b/flutter_cache_manager/CHANGELOG.md @@ -1,3 +1,11 @@ +## [3.3.2] - 2024-04-25 +* Updates dependencies to their latest versions. + +## [3.3.1] - 2023-07-03 +* Support Dart 3.0.0 for http ^1.0.0 and file ^7.0.0 +* Update example +* Add topics + ## [3.3.0] - 2021-11-29 * Added option to manage the log level. Doesn't print failed downloads by default anymore. You can set it like this: ```dart diff --git a/flutter_cache_manager/analysis_options.yaml b/flutter_cache_manager/analysis_options.yaml index fce4255c..f9b30346 100644 --- a/flutter_cache_manager/analysis_options.yaml +++ b/flutter_cache_manager/analysis_options.yaml @@ -1,91 +1 @@ -include: package:pedantic/analysis_options.1.8.0.yaml - -analyzer: - strong-mode: - implicit-casts: false - # implicit-dynamic: false - errors: - unused_import: warning - unused_local_variable: warning - dead_code: warning - invalid_override_of_non_virtual_member: error - -linter: - rules: - - always_declare_return_types - - annotate_overrides - - avoid_empty_else - - avoid_function_literals_in_foreach_calls - - avoid_init_to_null - - avoid_void_async - - await_only_futures - # - avoid_implementing_value_types - - avoid_null_checks_in_equality_operators - - avoid_renaming_method_parameters - - avoid_return_types_on_setters - - avoid_returning_null - - avoid_returning_null_for_void - - avoid_types_as_parameter_names - - avoid_relative_lib_imports - - avoid_unused_constructor_parameters - - camel_case_types - - cancel_subscriptions - #- cascade_invocations - #- comment_references - #- constant_identifier_names - - control_flow_in_finally - - directives_ordering - - empty_catches - - empty_constructor_bodies - - empty_statements - - hash_and_equals - #- implementation_imports - - invariant_booleans - - iterable_contains_unrelated_type - - library_names - - library_prefixes - - list_remove_unrelated_type - - no_adjacent_strings_in_list - - no_duplicate_case_values - - non_constant_identifier_names - - omit_local_variable_types - #- only_throw_errors - - overridden_fields - - package_api_docs - - package_names - - package_prefixed_library_names - - prefer_adjacent_string_concatenation - - prefer_collection_literals - - prefer_conditional_assignment - - prefer_const_constructors - - prefer_contains - - prefer_equal_for_default_values - - prefer_final_fields - - prefer_initializing_formals - #- prefer_int_literals - #- prefer_interpolation_to_compose_strings - - prefer_is_empty - - prefer_is_not_empty - - prefer_single_quotes - - prefer_typing_uninitialized_variables - - recursive_getters - - slash_for_doc_comments - - sort_pub_dependencies - - test_types_in_equals - - throw_in_finally - - type_init_formals - - unawaited_futures - - unnecessary_await_in_return - - unnecessary_brace_in_string_interps - - unnecessary_getters_setters - - unnecessary_lambdas - - unnecessary_null_aware_assignments - - unnecessary_statements - - unnecessary_this - - unrelated_type_equality_checks - - use_rethrow_when_possible - - valid_regexps - # Additional Dart 2.3 lints - - prefer_spread_collections - - prefer_if_elements_to_conditional_expressions - - prefer_for_elements_to_map_fromIterable +include: package:flutter_lints/flutter.yaml diff --git a/flutter_cache_manager/example/.gitignore b/flutter_cache_manager/example/.gitignore index 01f4ac79..24476c5d 100644 --- a/flutter_cache_manager/example/.gitignore +++ b/flutter_cache_manager/example/.gitignore @@ -1,6 +1,5 @@ # Miscellaneous *.class -*.lock *.log *.pyc *.swp @@ -9,6 +8,7 @@ .buildlog/ .history .svn/ +migrate_working_dir/ # IntelliJ related *.iml @@ -16,57 +16,29 @@ *.iws .idea/ -# Visual Studio Code related -.vscode/ +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ # Flutter/Dart/Pub related **/doc/api/ +**/ios/Flutter/.last_build_id .dart_tool/ .flutter-plugins +.flutter-plugins-dependencies .packages .pub-cache/ .pub/ -build/ +/build/ -# Android related -**/android/**/gradle-wrapper.jar -**/android/.gradle -**/android/captures/ -**/android/gradlew -**/android/gradlew.bat -**/android/local.properties -**/android/**/GeneratedPluginRegistrant.java +# Symbolication related +app.*.symbols -# iOS/XCode related -**/ios/**/*.mode1v3 -**/ios/**/*.mode2v3 -**/ios/**/*.moved-aside -**/ios/**/*.pbxuser -**/ios/**/*.perspectivev3 -**/ios/**/*sync/ -**/ios/**/.sconsign.dblite -**/ios/**/.tags* -**/ios/**/.vagrant/ -**/ios/**/DerivedData/ -**/ios/**/Icon? -**/ios/**/Pods/ -**/ios/**/.symlinks/ -**/ios/**/profile -**/ios/**/xcuserdata -**/ios/.generated/ -**/ios/Flutter/App.framework -**/ios/Flutter/Flutter.framework -**/ios/Flutter/Generated.xcconfig -**/ios/Flutter/app.flx -**/ios/Flutter/app.zip -**/ios/Flutter/flutter_assets/ -**/ios/Flutter/flutter_export_environment.sh -**/ios/ServiceDefinitions.json -**/ios/Runner/GeneratedPluginRegistrant.* +# Obfuscation related +app.*.map.json -# Exceptions to above rules. -!**/ios/**/default.mode1v3 -!**/ios/**/default.mode2v3 -!**/ios/**/default.pbxuser -!**/ios/**/default.perspectivev3 -!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages +# Android Studio will place build artifacts here +/android/app/debug +/android/app/profile +/android/app/release diff --git a/flutter_cache_manager/example/README.md b/flutter_cache_manager/example/README.md index 64a12f6b..75a7c517 100644 --- a/flutter_cache_manager/example/README.md +++ b/flutter_cache_manager/example/README.md @@ -1,8 +1 @@ -# example - -A new Flutter project. - -## Getting Started - -For help getting started with Flutter, view our online -[documentation](https://flutter.io/). +# A project that showcases usage of flutter_cache_manager diff --git a/flutter_cache_manager/example/analysis_options.yaml b/flutter_cache_manager/example/analysis_options.yaml index 61b6c4de..f9b30346 100644 --- a/flutter_cache_manager/example/analysis_options.yaml +++ b/flutter_cache_manager/example/analysis_options.yaml @@ -1,29 +1 @@ -# This file configures the analyzer, which statically analyzes Dart code to -# check for errors, warnings, and lints. -# -# The issues identified by the analyzer are surfaced in the UI of Dart-enabled -# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be -# invoked from the command line by running `flutter analyze`. - -# The following line activates a set of recommended lints for Flutter apps, -# packages, and plugins designed to encourage good coding practices. include: package:flutter_lints/flutter.yaml - -linter: - # The lint rules applied to this project can be customized in the - # section below to disable rules from the `package:flutter_lints/flutter.yaml` - # included above or to enable additional rules. A list of all available lints - # and their documentation is published at - # https://dart-lang.github.io/linter/lints/index.html. - # - # Instead of disabling a lint rule for the entire project in the - # section below, it can also be suppressed for a single line of code - # or a specific dart file by using the `// ignore: name_of_lint` and - # `// ignore_for_file: name_of_lint` syntax on the line or in the file - # producing the lint. - rules: - # avoid_print: false # Uncomment to disable the `avoid_print` rule - # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule - -# Additional information about this file can be found at -# https://dart.dev/guides/language/analysis-options diff --git a/flutter_cache_manager/example/android/app/build.gradle b/flutter_cache_manager/example/android/app/build.gradle index 56bfa9b7..9192d00d 100644 --- a/flutter_cache_manager/example/android/app/build.gradle +++ b/flutter_cache_manager/example/android/app/build.gradle @@ -26,7 +26,9 @@ apply plugin: 'kotlin-android' apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" android { - compileSdkVersion 30 + namespace "com.baseflow.example" + compileSdkVersion 33 + ndkVersion flutter.ndkVersion compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 @@ -42,10 +44,9 @@ android { } defaultConfig { - // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId "com.example.example" - minSdkVersion 16 - targetSdkVersion 30 + applicationId "com.baseflow.example" + minSdkVersion 21 + targetSdkVersion 33 versionCode flutterVersionCode.toInteger() versionName flutterVersionName } diff --git a/flutter_cache_manager/example/android/app/src/debug/AndroidManifest.xml b/flutter_cache_manager/example/android/app/src/debug/AndroidManifest.xml index c208884f..399f6981 100644 --- a/flutter_cache_manager/example/android/app/src/debug/AndroidManifest.xml +++ b/flutter_cache_manager/example/android/app/src/debug/AndroidManifest.xml @@ -1,6 +1,6 @@ - - diff --git a/flutter_cache_manager/example/android/app/src/main/AndroidManifest.xml b/flutter_cache_manager/example/android/app/src/main/AndroidManifest.xml index 34dd77ef..19b862ec 100644 --- a/flutter_cache_manager/example/android/app/src/main/AndroidManifest.xml +++ b/flutter_cache_manager/example/android/app/src/main/AndroidManifest.xml @@ -1,10 +1,11 @@ - - + - - diff --git a/flutter_cache_manager/example/android/app/src/main/kotlin/com/example/example/MainActivity.kt b/flutter_cache_manager/example/android/app/src/main/kotlin/com/baseflow/example/MainActivity.kt similarity index 76% rename from flutter_cache_manager/example/android/app/src/main/kotlin/com/example/example/MainActivity.kt rename to flutter_cache_manager/example/android/app/src/main/kotlin/com/baseflow/example/MainActivity.kt index e793a000..1751a1f6 100644 --- a/flutter_cache_manager/example/android/app/src/main/kotlin/com/example/example/MainActivity.kt +++ b/flutter_cache_manager/example/android/app/src/main/kotlin/com/baseflow/example/MainActivity.kt @@ -1,4 +1,4 @@ -package com.example.example +package com.baseflow.example import io.flutter.embedding.android.FlutterActivity diff --git a/flutter_cache_manager/example/android/app/src/main/res/values-night/styles.xml b/flutter_cache_manager/example/android/app/src/main/res/values-night/styles.xml index 449a9f93..06952be7 100644 --- a/flutter_cache_manager/example/android/app/src/main/res/values-night/styles.xml +++ b/flutter_cache_manager/example/android/app/src/main/res/values-night/styles.xml @@ -3,14 +3,14 @@