Closed timtebeek closed 2 weeks ago
Hello @timtebeek Could I offer some help here?
Hello @timtebeek Could I offer some help here?
Hi! Yes sure, welcome to contribute! I've added a rough skeleton; from there it's a matter of defining a first few steps to adopt newer SDK API versions. Perhaps there's a few good one-to-one replacements you know of that could be implemented as a declarative recipe? Feel free to open a draft pull request with the changes you've identified, and then we'll take it from there.
Thanks!! on it
Hello @timtebeek .Here is a draft PR to understand if I am in the right direction. Please check and let me know
Hello @timtebeek .Here is a draft PR to understand if I am in the right direction. Please check and let me know
Did you mean to include a link? I'm not seeing any draft PR or fork under your GitHub account.
yes i was supposed to attach the link. https://github.com/elastic/elasticsearch/pull/112883 @timtebeek
yes i was supposed to attach the link. elastic/elasticsearch#112883 @timtebeek
I don't think that's quite right. Please join our OSS Slack to discuss your approach before going forward.
I've added a recipe to change the SDK version in build.gradle files already
We can keep this issue open to gather further ideas for recipes that can hook into this framework of migration recipes.
The Android SDK is quite a complex beast when it comes to versioning:
These are relatively simple to model (I am working on a PR for that).
Besides that:
Android Studio has migrations and hits for that built-in, not sure if these are documented somewhere (exhaustively) and/or this code can be leveraged.
With https://github.com/openrewrite/rewrite-android/pull/3 merged I think we have enough of a basic structure covered that can be extended by folks looking to add specific migrations. Anyone is welcome to log additional issues or open up a draft pull request with desired migration steps.
What problem are you trying to solve?
Provide a skeleton structure for recipes that migrate folks between various Android versions.
There's a few helpful first steps and useful resources we can pull from to provide a first couple steps, and then fill out more details in separate issues and pull requests.
What precondition(s) should be checked before applying this recipe?
AGP used.
Describe the situation before applying the recipe
Describe the situation after applying the recipe
Any additional context
The Android SDK docs provide a helpful reference of changes between Android versions; in particular the Removals are good to see:
There's also the next announced deprecations per version:
In addition to the API differences, there's also instructions to upgrading the SDK & AGP: