Skip to content

Conversation

@deminearchiver
Copy link
Contributor

@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
  • Migrate from discontinued flutter_markdown to flutter_markdown_plus

@deminearchiver
Copy link
Contributor 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
Contributor 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
Contributor 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
Contributor 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

@deminearchiver deminearchiver force-pushed the build-system-improvements branch from 97e80a0 to 868e2ef Compare December 8, 2025 14:37
@deminearchiver deminearchiver marked this pull request as ready for review December 14, 2025 04:17
@deminearchiver deminearchiver marked this pull request as draft December 14, 2025 18:22
- 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
Renamed the flavor dimension to align with Flutter's recommendations. Changed keystore properties to casts, and allowed the store file to be nullable. Introduced handling of an absent key.properties file during release builds.
The following case is now properly being handled:
```
Execution failed for task ':app:packageRelease'.
> A failure occurred while executing com.android.build.gradle.tasks.PackageAndroidArtifact$IncrementalSplitterRunnable
   > SigningConfig "release" is missing required property "storeFile".
```
@deminearchiver deminearchiver force-pushed the build-system-improvements branch from 838d023 to 73ee705 Compare December 15, 2025 10:31
@deminearchiver deminearchiver marked this pull request as ready for review December 15, 2025 10:32
@deminearchiver
Copy link
Contributor Author

deminearchiver commented Dec 15, 2025

@ImranR98 I think I'm done here. Could you please review this PR to make sure everything is alright? I'm not in a hurry, take your time.

I added a workaround to only show the signing warning when building for release. It works, but I'm not sure about how reliable it is. I think it'll satisfy this use case though.

@deminearchiver
Copy link
Contributor Author

I have verified that the latest dependency upgrade doesn't affect any app behaviors. Outdated versions of certain packages were constrained like that because Obtainium was using the equations package. But it has been updated a few days ago and unblocked dependency upgrades for us.

@ImranR98 I know you might be busy currently, but just reminding you to take a look at this whenever you can.

@ImranR98
Copy link
Owner

Thanks, yes busier than usual lately. Will get around to this and other PRs by next weekend.

@ImranR98 ImranR98 merged commit fba5947 into ImranR98:main Jan 17, 2026
@ImranR98
Copy link
Owner

Thanks @deminearchiver, merged.

@ImranR98
Copy link
Owner

Fyi I did have to make one change: https://github.com/ImranR98/Obtainium/pull/2718/files

I use GitHub actions to create unsigned release builds, then sign them manually offline later -- that means I can use GH for a more reproducible/stable build environment without giving them my signing key. Didn't occur to me when looking at the PR earlier.

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