[in_app_purchase] Switch to Kotlin Pigeon (#11608) Replaces the Java Pigeon generator with the Kotlin Pigeon generator, and adjusts the project accordingly: - Adds Kotlin build setings to Gradle. - Updates API signatures and number handling for Kotlin/Java generator differences. - Adds generic Java/Kotlin compat shim to create Result objects from Java, since those haven't been added to the Pigeon generator yet. - Updates tests to use constructors instead of builders, since the Kotlin generator doesn't create builders. - Updates tests to use a fake result value, instead of mocking the Java Pigeon response object. Most of this conversion was done by Gemini; I gave it my previous "Switch to Kotlin Pigeon" PRs for context, and let it do most of the work. Once it had a passing conversion I did some manual cleanup and warning fixing. This also converts Translator.java, which does SDK<->Pigeon type conversion, to Kotlin, per discussion in the linked issue: - I used Android Studio's auto-converter. - I did some manual cleanup (e.g., fixing nullability where it assumed nullable because the Java wasn't annotated, simplifying some switch return statements). - I added parameter names to all the constructors, so it's easy to see that the params are being passed correctly in review both now and in future changes. - I had Gemini do a pass over it to make the Kotlin simpler or more idiomatic. The big improvement was it replacing a bunch of manual list construction with `map`s. - Removed `currencyCodeFromSymbol`, which has been dead code for years. These steps are separate commits in case it's useful to review them separately Fixes https://github.com/flutter/flutter/issues/185545 ## Pre-Review Checklist [^1]: Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling.
This repo is a companion repo to the main flutter repo. It contains the source code for Flutter's first-party packages (i.e., packages developed by the core Flutter team). Check the packages directory to see all packages.
These packages are also available on pub.
Please file any issues, bugs, or feature requests in the main flutter repo. Issues pertaining to this repository are labeled “package”.
If you wish to contribute a new package to the Flutter ecosystem, please see the documentation for developing packages. You can store your package source code in any GitHub repository (the present repo is only intended for packages developed by the core Flutter team). Once your package is ready you can publish to the pub repository.
If you wish to contribute a change to any of the existing packages in this repo, please review our contribution guide, and send a pull request.
These are the packages hosted in this repository: