-
Notifications
You must be signed in to change notification settings - Fork 9.8k
Migration of shared_preferences to kotlin, upgraded flutter base repository. #3139
Migration of shared_preferences to kotlin, upgraded flutter base repository. #3139
Conversation
- build.gradle: added sourceSets to handle kotlin, upgraded SdkVersion, and added dependency for kotlin-stdlib - gradle-wrapper.properties: Upgrade gradle from 5.1.1 to 5.6.2 - gradle.properties: Added android.useAndroidX and enableJetifier.
Due to flutter now is capable to handle flutter activities more efficiently, there's no need to have 2 FlutterActivities
Created kotlin managment inside example/android/build.gradle
SharedPreferencesPlugin.java has been replaced with SharedPreferencesPlugin.kt
Files are moved from java folder into kotlin folder
- EmbeddingV1Activity has been replaced with EmbeddingV1Activity.kt - For a reason the application of registrarFor isn't recognized by kotlin even when the import has been applied, however everything works perfectly
The class MethodCallHandlerImpl has been replaced with a kotlin version, also it has been added a validation to check persistence from android side.
Thanks for the submission! We’re currently working through a large backlog of PRs, and this will require non-trivial review, so it will take some time before we’re able to review it. As explained in CONTRIBUTING.md, votes for the corresponding issue are the primary way we’re prioritizing non-trivial reviews, so if you want to prioritize this, filing an issue describing the benefits would be the first step. For this PR specifically, note that we don't currently use Kotlin for any plugins, so the first step in moving forward here would be a decision about whether to add a new language to this repository; if you're interested in pursuing that conversation an issue on that subject, or even a design doc would be a good idea. We apologize for the long delay in triaging this PR. We’re in the process of overhauling our PR triage system to respond much more quickly, as well as working through the backlog. |
Thanks for the response @stuartmorgan the migration of the plugin into flutter was something that i considered necessary, i wish to help on the migration of the code base of the flutter plugins(due to the efficient that comes from kotlin) however if you considers necessary we can continue in an issue or as you suggested a Design Document. |
Adding a new language to the repository (meaning another language that people maintaining the plugins here have to be familiar with and context switch between, in addition to the 4 we already have), or rewriting every Android plugin implementation, are both major decisions that should be discussed in a proposal via design document. |
https://flutter.dev/go/flutter-plugin-languages has since been written up as a proposal for language migration, but there is still no resolution on that. It's something that the platform teams will continue to evaluate, but currently there's no plan to adopt Kotlin. Given that there's no timeline on that, I'm going to close this; it's already bitrotted significantly, and will continue to do so as long as there's no path for it to move forward. Thanks for your interest though, and if in the future we decide to adopt Kotlin here please feel free to contribute to migrations! |
Description
Related Issues
none
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]
). This will ensure a smooth and quick review process.///
).flutter analyze
) does not report any problems on my PR.Breaking Change
Does your PR require plugin users to manually update their apps to accommodate your change?