[health 13.3.2] Migrate Android build to Built-in Kotlin (plugin applies KGP)
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 68/100
- Issue type
- Refactor
- Clarity
- Clearly specified
- Activity status
- Active
- Domain
- build-system, mobile
Research direction
Read the Flutter plugin-author guide linked in the issue and inspect packages/health/android/build.gradle. Compare the migration approach with the in-progress changes in issues #1297 and #1310. Update the Android build to use Built-in Kotlin, then verify the plugin builds without applying KGP; the issue describes the current warning and affected Flutter setting.
Written by the indexing model from the issue text.
Description
Description
Please migrate the Android build of health (13.3.2) to Built-in Kotlin, as described in the Flutter guide for plugin authors: https://docs.flutter.dev/release/breaking-changes/migrate-to-built-in-kotlin/for-plugin-authors
On Flutter 3.47.9 (stable), every Android build of an app that depends on health prints:
Your app uses the following plugins that apply Kotlin Gradle Plugin (KGP): health. Future versions of Flutter will fail to build if your app uses plugins that apply KGP.
Today this is only a warning. Flutter has said that apps using plugins which apply KGP will fail to build in a future release. Because of that, apps that depend on health can't move to android.builtInKotlin=true, and they will eventually be stuck on an older Flutter version.
packages/health/android/build.gradle currently:
- declares
org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.22inbuildscript - applies
kotlin-androidunconditionally - configures the compiler through
android { kotlinOptions { ... } }
Additional information
- Wrapping
apply plugin: 'kotlin-android'in a check ofandroid.builtInKotlinis not a durable fix. In flutter/flutter#189770, the Flutter team said they discourage that pattern and that it will stop building once the KGP detection is tightened. The direct migration in the plugin-author guide is the supported path. - The same migration is already in progress for other plugins in this repo (#1297, #1310), so the
healthchange could follow the same approach. - #1300 removed a KGP warning that came from
device_info_plus. This request is about the warning caused byhealth's own build file.
Thanks for maintaining the plugin.
- Dominant language
- Dart
- Stars
- 610
- Forks
- 731
- Avg merge
- 3m
- Merged PRs (30d)
- 2
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from carp-dk/flutter-plugins
-
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
carp-dk/flutter-plugins#1312 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
carp-dk/flutter-plugins#1297 · 2 comments ·
-
activity_recognition bugfix
Difficulty 4/5 3-5 days Newbie friendliness 35/100
carp-dk/flutter-plugins#1291 ·
-
[movesense_plus 1.2.0] Better handling connection error to connected deviceMay be free again @bardram claimed this 276 days ago, and no pull request is open. Openbugfix improvement movesense_plus
carp-dk/flutter-plugins#1286 · 1 assignee ·
-
improvement
Difficulty 3/5 1-2 days Newbie friendliness 20/100
carp-dk/flutter-plugins#1271 · 1 comment ·
All issues in carp-dk/flutter-plugins
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
firebase/flutterfire#18918 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
customerio/customerio-flutter#441 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
newrelic/newrelic-flutter-agent#256 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
jhomlala/betterplayer#1646 ·
Maintainers usually reply within 1 day
-
Feature
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
amplitude/Amplitude-Flutter#337 · 1 comment ·
Maintainers usually reply within 1 day