Skip to content

Conversation

@deminearchiver
Copy link

@deminearchiver deminearchiver commented Nov 22, 2025

This is a draft pull request, I'll mark it as open as soon as it can be considered ready.

Suggestions and comments are always welcome, though!

This pull request will be the first in a hopefully large set of pull request focusing on improving certain aspects of Obtainium's functionality and development.

For example, I am not ready to contribute to Obtainium if it is not using at least the latest stable Flutter version, as it makes development uncomfortable for me by making me have to install another Flutter version. I think other developers looking to contribute to this project are going to support the initiative of making the developer experience a little bit better.

The main goal of this pull request is to improve the developer experience for contributing to Obtainium without introducing code style and linting changes. I will try to limit the changes to configuration files only. I will not be modifying anything Docker or Bash related.

Changes planned in this pull request:

  • Migrate to Flutter 3.38:

    • Change Flutter SDK version constraint to >=3.38.0
    • Bump Java version to 17
    • Bump com.android.application plugin version to 8.11.1
    • Bump org.jetbrains.kotlin.android plugin version to 2.2.20
    • Bump ndkVersion to 28.2.13676358
    • Bump Gradle Wrapper to 8.14
  • Migrate to Dart 3.10:

    • Change Dart SDK version constraint to ^3.10.1
  • Upgrade background_fetch to 1.5.0:

    • Change background_fetch version constraint to ^1.5.0
    • Remove custom repository in android/build.gradle.kts
  • Improve Android build system configuration

    • Make having a keystore.properties file optional for release builds - show a warning during build and use the debug signing config
    • TBA
  • Migrate from discontinued flutter_markdown to flutter_markdown_plus

@deminearchiver
Copy link
Author

Please don't mind unexpected changes to pubspec.lock. I have ran flutter pub get with Flutter 3.38, and it seems some dependency constraints were relaxed in this version, such as meta: 1.17.0.

@ImranR98
Copy link
Owner

Nice! This looks good so far.

Note I usually run flutter upgrade and flutter pub upgrade --major-versions (followed by some manual testing) before putting out releases. I always assumed this would upgrade all packages (even across major version changes) except where there are compat issues. So I'm surprised to see that background_fetch is not already the latest (even flutter pub outdated doesn't show it as outdated).

@deminearchiver
Copy link
Author

deminearchiver commented Nov 23, 2025

Note I usually run flutter upgrade and flutter pub upgrade --major-versions (followed by some manual testing) before putting out releases. I always assumed this would upgrade all packages (even across major version changes) except where there are compat issues. So I'm surprised to see that background_fetch is not already the latest (even flutter pub outdated doesn't show it as outdated).

I usually run flutter upgrade --tighten --major-versions so that dependency constraints in pubspec.yaml are updated along with dependencies.

Following is the output of flutter upgrade --tighten --major-versions --dry-run:

> animations 2.1.1 (was 2.1.0)
> app_links 7.0.0 (was 6.4.1)
  characters 1.4.0 (1.4.1 available)
> cross_file 0.3.5+1 (was 0.3.5)
> file_picker 10.3.7 (was 10.3.3)
  flex_seed_scheme 3.6.1 (4.0.1 available)
  flutter_local_notifications 18.0.1 (19.5.0 available)
  flutter_local_notifications_linux 5.0.0 (6.0.0 available)
  flutter_local_notifications_platform_interface 8.0.0 (9.1.0 available)
  flutter_markdown 0.7.7+1 (discontinued replaced by flutter_markdown_plus)
> flutter_plugin_android_lifecycle 2.0.33 (was 2.0.32)
> http 1.6.0 (was 1.5.0)
  matcher 0.12.17 (0.12.18 available)
  material_color_utilities 0.11.1 (0.13.0 available)
+ objective_c 9.1.0
> path_provider_android 2.2.22 (was 2.2.20)
> path_provider_foundation 2.5.0 (was 2.4.3)
  petitparser 5.4.0 (7.0.1 available)
+ pub_semver 2.2.0
> shared_preferences_android 2.4.17 (was 2.4.15)
> shared_preferences_foundation 2.5.6 (was 2.5.5)
  test_api 0.7.7 (0.7.8 available)
> url_launcher_android 6.3.28 (was 6.3.24)
> url_launcher_ios 6.3.6 (was 6.3.5)
> url_launcher_linux 3.2.2 (was 3.2.1)
> url_launcher_macos 3.2.5 (was 3.2.4)
> url_launcher_windows 3.1.5 (was 3.1.4)
> webview_flutter_android 4.10.9 (was 4.10.5)
> webview_flutter_wkwebview 3.23.4 (was 3.23.2)
  xml 6.3.0 (6.6.1 available)
Would change 19 dependencies.
1 package is discontinued.
10 packages have newer versions incompatible with dependency constraints.

I have reviewed breaking changes on the packages that would get a major or a minor bump, here's a quick summary:

  • app_links: Breaking changes only on the iOS platform.
  • http: Change the behavior of Request.body so that a charset parameter is only added for text and XML media types. This change doesn't seem to affect the app behavior, as Request.body is not used in Obtainium's codebase.

About the discontinued package: flutter_markdown is discontinued; see flutter/flutter#162966. The flutter_markdown_plus package is a maintained version and a direct replacement for the discontinued flutter_markdown package. I'm leaving this up to you, as this dependency change won't affect anything.

@deminearchiver
Copy link
Author

deminearchiver commented Nov 23, 2025

Here's the final chart for all changed constraints:

Changed 13 constraints in pubspec.yaml:
  app_links: ^6.4.0 -> ^7.0.0
  provider: ^6.1.5 -> ^6.1.5+1
  http: ^1.4.0 -> ^1.6.0
  dynamic_color: ^1.7.0 -> ^1.8.1
  url_launcher: ^6.3.1 -> ^6.3.2
  permission_handler: ^12.0.0+1 -> ^12.0.1
  device_info_plus: ^12.1.0 -> ^12.2.0
  file_picker: ^10.1.9 -> ^10.3.7
  animations: ^2.0.11 -> ^2.1.1
  share_plus: ^12.0.0 -> ^12.0.1
  easy_localization: ^3.0.7+1 -> ^3.0.8
  crypto: ^3.0.6 -> ^3.0.7
  flex_color_picker: ^3.7.1 -> ^3.7.2

The actual packages that got upgraded were mentioned in my previous comment.

@ImranR98
Copy link
Owner

Thanks, I did not know about --tighten. Yes we may as well update the markdown package too.

@deminearchiver deminearchiver force-pushed the build-system-improvements branch 2 times, most recently from 287a1a1 to 140f725 Compare November 25, 2025 05:29
@deminearchiver
Copy link
Author

deminearchiver commented Nov 28, 2025

I'm afraid that I will be going to a hackathon the following week so this PR will unfortunately have to wait a bit.

TODO for me (@deminearchiver) when I come back:

  • Update dependencies again (some packages got important updates)
  • Implement Gradle keystore fallback to debug in release builds

- Bumped Dart SDK to 3.10.1
- Bumped Flutter SDK to 3.38.0
- Bumped NDK to 28.2.13676358
- Bumped com.android.application to 8.11.1
- Bumped org.jetbrains.kotlin.android to 2.2.20
- Bumped Java to 17
- Changed formatting in Gradle configuration files to align with a fresh Flutter project's
@deminearchiver deminearchiver force-pushed the build-system-improvements branch from 97e80a0 to 868e2ef Compare December 8, 2025 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants