[pigeon] Prevents premature finalization from unused Dart instance for ProxyApis (#9231)
1. The Dart InstanceManager.addHostCreatedInstance is only ever used to respond to native calls that create a new instance right before the instance is returned in a host method call or passed in a flutter method call. So, addHostCreatedInstance now only adds a strong referenced instance and not the weak referenced instance. This will ensure the weak referenced instance is not created until it is being passed to a user immediately.
2. The Dart InstanceManager.remove now asserts that the strong referenced instance isn't removed before the weak referenced instance. This should prevent future scenarios where the user is holding a weak referenced instance while the native side no longer has any reference.
Fixes https://github.com/flutter/flutter/issues/168531
## 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.
[pigeon] Prevents premature finalization from unused Dart instance for ProxyApis (#9231)
1. The Dart InstanceManager.addHostCreatedInstance is only ever used to respond to native calls that create a new instance right before the instance is returned in a host method call or passed in a flutter method call. So, addHostCreatedInstance now only adds a strong referenced instance and not the weak referenced instance. This will ensure the weak referenced instance is not created until it is being passed to a user immediately.
2. The Dart InstanceManager.remove now asserts that the strong referenced instance isn't removed before the weak referenced instance. This should prevent future scenarios where the user is holding a weak referenced instance while the native side no longer has any reference.
Fixes https://github.com/flutter/flutter/issues/168531
## 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.
[pigeon] Add local-only Java integration tests (#2854)
* Move generated code to a new shared bundle.
* Consolidate the example app code
* Replace stale TODOs with explanatory comments
* Move integration tests
* Add Java implementation
* Add test script commands
* Autoformat
[pigeon] Consolidate platform test harnesses part 1 - harnesses (#2809)
* Add README explaining structure
* Initial test plugin; unchanged from template
* Initial seconday test plugin; unchanged from template
* Misc template cleanup, and add generated files.
* README cleanup
* Analyzer fix
* Autoformat
* Misc repo check fixes
* Roll back Gradle and AGP version for macOS CI
* Delete unneeded template files
* Adjust READMEs
* Add integration test issue reference
* Remove obsolete workaround from CI
* Revert script change that doesn't belong here
* Revert autoformat that belongs to a later PR
* Autoformat
[pigeon] Consolidate platform test harnesses part 1 - harnesses (#2809)
* Add README explaining structure
* Initial test plugin; unchanged from template
* Initial seconday test plugin; unchanged from template
* Misc template cleanup, and add generated files.
* README cleanup
* Analyzer fix
* Autoformat
* Misc repo check fixes
* Roll back Gradle and AGP version for macOS CI
* Delete unneeded template files
* Adjust READMEs
* Add integration test issue reference
* Remove obsolete workaround from CI
* Revert script change that doesn't belong here
* Revert autoformat that belongs to a later PR
* Autoformat
[pigeon] Consolidate platform test harnesses part 1 - harnesses (#2809)
* Add README explaining structure
* Initial test plugin; unchanged from template
* Initial seconday test plugin; unchanged from template
* Misc template cleanup, and add generated files.
* README cleanup
* Analyzer fix
* Autoformat
* Misc repo check fixes
* Roll back Gradle and AGP version for macOS CI
* Delete unneeded template files
* Adjust READMEs
* Add integration test issue reference
* Remove obsolete workaround from CI
* Revert script change that doesn't belong here
* Revert autoformat that belongs to a later PR
* Autoformat
[pigeon] Unify iOS and macOS test plugins (#9100)
Updates the iOS and macOS test plugin harnesses to use shared darwin source support, so that we don't have two copies of everything. This will reduce the complexity of maintaining/updating the test harnesses going forward.