Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
135 commits
Select commit Hold shift + click to select a range
b9b0b5e
kotlin jni impementation
tarrinneal Oct 30, 2025
e599d1e
analyzer
tarrinneal Oct 30, 2025
726975d
test fixes w jetski
tarrinneal Oct 30, 2025
f636cdb
Merge branch 'main' of https://github.com/flutter/packages into Kamyshin
tarrinneal Nov 6, 2025
72a305e
remove future code
tarrinneal Nov 7, 2025
4e59659
Merge branch 'main' of https://github.com/flutter/packages into Kamyshin
tarrinneal Nov 11, 2025
e22c55a
Merge branch 'main' of https://github.com/flutter/packages into Kamyshin
tarrinneal Nov 11, 2025
3f0be1d
Merge remote-tracking branch 'origin/Frillback' into Kamyshin
tarrinneal Jan 20, 2026
0d09615
minor cleanup
tarrinneal Jan 21, 2026
e0f23a9
Merge branch 'main' of https://github.com/flutter/packages into Kamyshin
tarrinneal Jan 21, 2026
025376c
omit types
tarrinneal Jan 22, 2026
aa01700
Merge branch 'main' of https://github.com/flutter/packages into Kamyshin
tarrinneal Jan 22, 2026
6a0df05
format
tarrinneal Jan 22, 2026
022ed51
flutter api
tarrinneal Feb 11, 2026
43f2e5a
fix swift optional bug
tarrinneal Feb 12, 2026
5fd46e8
add nullable tests and more sync tests
tarrinneal Feb 12, 2026
a0c56ab
flutter api async methods
tarrinneal Feb 24, 2026
2c252ae
error handling and tests
tarrinneal Feb 25, 2026
5072a47
basic thread tests
tarrinneal Feb 25, 2026
b0cd2ec
fix swftFunction
tarrinneal Feb 26, 2026
38bd37e
add back tests for named/optional params
tarrinneal Feb 26, 2026
850cb2e
Merge branch 'main' of https://github.com/flutter/packages into Kamyshin
tarrinneal Feb 26, 2026
9bb4bc5
fix const gen adapter classes
tarrinneal Feb 26, 2026
0c7ef63
performance improvements to typedData and isEquals
tarrinneal Feb 27, 2026
110ab70
stuff that I'm going to move to a different branch
tarrinneal Feb 28, 2026
82065a8
Improve efficiency in some methods
tarrinneal Feb 28, 2026
9861c00
analyze this
tarrinneal Feb 28, 2026
11daedd
format
tarrinneal Mar 2, 2026
e197fc0
less repeating, and less listing
tarrinneal Mar 3, 2026
cbf4096
allow individual class types to not have colliding hashes
tarrinneal Mar 3, 2026
935aa47
improve deep equals for non-collections
tarrinneal Mar 3, 2026
4e9541f
allowing for NaN or other cases where identical is better
tarrinneal Mar 3, 2026
f30b44c
more tests, add other languages, unify behavior across platforms
tarrinneal Mar 3, 2026
08a79f3
first pass at gobject
tarrinneal Mar 3, 2026
8cb51ac
Merge branch 'main' of https://github.com/flutter/packages into effic
tarrinneal Mar 3, 2026
ddc41c2
analyze
tarrinneal Mar 3, 2026
4ad3636
delete random extra files
tarrinneal Mar 3, 2026
0a08ef5
fix kotlin generator change that broke unit test
tarrinneal Mar 3, 2026
5855b23
fix broken gobject and cpp code
tarrinneal Mar 4, 2026
f99e64a
more bugs on languages I can't compile locally
tarrinneal Mar 4, 2026
101fb0f
last few issues I hope
tarrinneal Mar 4, 2026
7309d17
not being able to run things locally sucks
tarrinneal Mar 4, 2026
24d0f23
bigobj
tarrinneal Mar 4, 2026
21ad393
consolidate tests
tarrinneal Mar 4, 2026
94a58c8
revert project files
tarrinneal Mar 4, 2026
3fdd987
More consistency across languages
tarrinneal Mar 4, 2026
b920f50
revert -0.0 changes
tarrinneal Mar 4, 2026
7df481e
gen example
tarrinneal Mar 5, 2026
25021e7
Merge branch 'main' of https://github.com/flutter/packages into effic
tarrinneal Mar 5, 2026
4cbfdcd
memecmp
tarrinneal Mar 5, 2026
8c75a36
re-normalize -0.0 in hash methods to create consistent behavior acros…
tarrinneal Mar 5, 2026
655229c
finish tests
tarrinneal Mar 5, 2026
80d8bbc
lints and reverting of accidentally pushed files
tarrinneal Mar 5, 2026
a57dd6f
hopeful test fix
tarrinneal Mar 5, 2026
4ded545
delete file that shouldn't ever have existed
tarrinneal Mar 5, 2026
8698cb5
more tests and windows method rework
tarrinneal Mar 5, 2026
7355a96
bug fixes and more robust map==
tarrinneal Mar 5, 2026
45d8207
fix linix
tarrinneal Mar 5, 2026
ad236e7
Merge branch 'main' of https://github.com/flutter/packages into Kamyshin
tarrinneal Mar 5, 2026
97b8e8c
one last linux fix
tarrinneal Mar 5, 2026
38cffb2
nits and nats
tarrinneal Mar 6, 2026
ff33669
jnigen config yaml -> dart
tarrinneal Mar 10, 2026
a2a80b5
dentist has been busy today
tarrinneal Mar 11, 2026
b5b4506
Merge branch 'main' of https://github.com/flutter/packages into effic
tarrinneal Mar 11, 2026
1305a1d
fix std::map hash
tarrinneal Mar 11, 2026
a5ce9cc
even more better
tarrinneal Mar 11, 2026
6d92541
Merge branch 'main' of https://github.com/flutter/packages into effic
tarrinneal Mar 11, 2026
eba918b
revert dumb change
tarrinneal Mar 11, 2026
8d55afd
Merge branch 'main' of https://github.com/flutter/packages into Kamyshin
tarrinneal Mar 11, 2026
5097bdc
namespace
tarrinneal Mar 11, 2026
0a5adee
Triple checked methods
tarrinneal Mar 12, 2026
a3e5531
update to jnigen 16, with some manual changes
tarrinneal Mar 17, 2026
51d7b7c
jni error handling
tarrinneal Mar 18, 2026
9ca1762
remove dead code
tarrinneal Mar 18, 2026
69c20d2
Adds prefixing for classes that will have collisions within the same …
tarrinneal Mar 19, 2026
214299f
remove similar methods and fix datatype methods to avoid poorly shape…
tarrinneal Mar 19, 2026
393c5c8
lock ffi hash
tarrinneal Mar 19, 2026
18f5c23
Merge branch 'main' of https://github.com/flutter/packages into Kamyshin
tarrinneal Mar 19, 2026
7b8e9ec
reorg ni classes, remove duplicated error handling code
tarrinneal Mar 20, 2026
944a09a
Merge branch 'main' of https://github.com/flutter/packages into Kamyshin
tarrinneal Mar 20, 2026
d4d8f92
fix spm build issues
tarrinneal Mar 20, 2026
88bade6
revert swift messenger changes
tarrinneal Mar 20, 2026
4c90953
revert unintentional proxy api changes
tarrinneal Mar 20, 2026
a5a1593
remove incidental changes and crusty stuff
tarrinneal Mar 20, 2026
09d3960
Merge branch 'effic' into Kamyshin and move some files around
tarrinneal Mar 24, 2026
b9f0e4d
revert command changes and format, add license, update allowed deps
tarrinneal Mar 25, 2026
6534809
Merge branch 'main' of https://github.com/flutter/packages into Kamyshin
tarrinneal Mar 25, 2026
05589c7
nothing change to merge
tarrinneal Mar 25, 2026
2a3c8d1
revert nothing change
tarrinneal Mar 25, 2026
0a2c280
upgrade jnigen again
tarrinneal Mar 26, 2026
aabc90a
revert kotlin version
tarrinneal Mar 26, 2026
6ac09ea
Merge branch 'main' of https://github.com/flutter/packages into Kamyshin
tarrinneal Mar 28, 2026
31b0806
update to latest hash, alter script to fix new issue
tarrinneal Mar 30, 2026
e3c9c69
Merge branch 'main' of https://github.com/flutter/packages into Kamyshin
tarrinneal Mar 31, 2026
246b1a3
readme and bump jnigen version, remove script
tarrinneal Mar 31, 2026
6951605
rename enum for number type in swift
tarrinneal Mar 31, 2026
d47a1ad
fix lints and refine multi step generation code
tarrinneal Apr 2, 2026
f422d9d
add missing args to cli tool, change jnigen build process to not prev…
tarrinneal Apr 2, 2026
835f8f5
Merge branch 'main' of https://github.com/flutter/packages into Kamyshin
tarrinneal Apr 8, 2026
d765ce7
gen
tarrinneal Apr 9, 2026
898ec56
nits and nats
tarrinneal Apr 16, 2026
5c53127
Merge branch 'main' of https://github.com/flutter/packages into Kamyshin
tarrinneal Apr 17, 2026
aa7372b
remove build apk
tarrinneal Apr 23, 2026
dd5e68c
fix jni kotlin package
tarrinneal Apr 28, 2026
e202db9
relative paths and appDir comments
tarrinneal Apr 28, 2026
812c750
uncoment comments
tarrinneal Apr 29, 2026
eff7d08
nits
tarrinneal Apr 30, 2026
3d271c9
Merge branch 'main' of https://github.com/flutter/packages into Kamyshin
tarrinneal May 4, 2026
f945e36
relocate, rename and revert files
tarrinneal May 4, 2026
98dedbf
update ffi instructoins
tarrinneal May 5, 2026
2167218
update readme's and add header
tarrinneal May 6, 2026
2d2b115
Merge branch 'Kamyshin' of https://github.com/tarrinneal/packages int…
tarrinneal May 6, 2026
fe2a3ce
use flags
tarrinneal May 6, 2026
36f37d1
ez
tarrinneal May 6, 2026
6bc9813
cleaner
tarrinneal May 6, 2026
8c778d8
check for deps
tarrinneal May 7, 2026
625df07
unimp
tarrinneal May 7, 2026
85e3f30
add example
tarrinneal May 19, 2026
0bcef49
Merge branch 'main' of https://github.com/flutter/packages into Kamyshin
tarrinneal Jun 10, 2026
75217be
Merge branch 'main' of https://github.com/flutter/packages into Kamyshin
tarrinneal Jun 12, 2026
aa2cb69
weird formatting issues with objc headers
tarrinneal Jun 12, 2026
4de0740
fix dependancy issues
tarrinneal Jun 24, 2026
0fe78ed
Merge branch 'Kamyshin' of https://github.com/tarrinneal/packages int…
tarrinneal Jun 24, 2026
4880a8b
don't generate jni code when not using jni
tarrinneal Jun 24, 2026
7108341
update example app to not be dumb (in one way)
tarrinneal Jun 30, 2026
0ef8cb0
some comments
tarrinneal Jul 10, 2026
f4bb882
Merge branch 'main' of https://github.com/flutter/packages into Kamyshin
tarrinneal Jul 19, 2026
45b76ae
gradle matching
tarrinneal Jul 19, 2026
549d97e
Merge branch 'main' of https://github.com/flutter/packages into Kamyshin
tarrinneal Jul 22, 2026
6ddffdb
kotlin versions and ios sdk validation
tarrinneal Jul 22, 2026
724515c
nullability and isPrimitive
tarrinneal Jul 22, 2026
940b768
clean up, switches mostly
tarrinneal Jul 23, 2026
e32af70
native interop
tarrinneal Jul 23, 2026
47968c5
more generation?
tarrinneal Jul 23, 2026
8b16252
deregister
tarrinneal Jul 24, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ updates:
- /packages/path_provider/path_provider/example/android/app
- /packages/path_provider/path_provider_android/example/android/app
- /packages/pigeon/example/app/android/app
- /packages/pigeon/example/native_interop_app/android/app
- /packages/pigeon/platform_tests/test_plugin/example/android/app
- /packages/pigeon/platform_tests/alternate_language_test_plugin/example/android/app
- /packages/quick_actions/quick_actions_android/example/android/app
Expand Down
2 changes: 2 additions & 0 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ analyzer:
# Ignore generated files
- '**/*.pb.dart'
- '**/*.g.dart'
- '**/*.jni.dart'
- '**/*.ffi.dart'
- '**/*.mocks.dart' # Mockito @GenerateMocks

formatter:
Expand Down
1 change: 1 addition & 0 deletions packages/pigeon/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ local.properties
gradle-wrapper.jar
bin/pigeon.dart.dill
**/subdirectory/does/not/exist/**
*.g.o
5 changes: 5 additions & 0 deletions packages/pigeon/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 27.4.0

* [swift] [kotlin] Adds experimental support for FFI and JNI.
* Exposes missing PigeonOptions and language-specific configurations as command-line arguments.

## 27.3.0

* Adds support for sharing constants across platforms.
Expand Down
35 changes: 34 additions & 1 deletion packages/pigeon/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,42 @@ the threading model for handling HostApi methods can be selected with the

### Multi-Instance Support

Host and Flutter APIs now support the ability to provide a unique message channel suffix string
Host and Flutter APIs support the ability to provide a unique message channel suffix string
to the api to allow for multiple instances to be created and operate in parallel.

### Communication Options: Method Channels vs. Native Interop

Pigeon supports two distinct models for communication between Dart and native code:

1. **Method Channels (Message-Passing)**: The standard Flutter communication model. It serializes data into binary buffers via `StandardMessageCodec` and transmits them asynchronously over platform channels.
2. **Native Interop (Direct FFI & JNI)\*Experimental\***: A direct, memory-bound function call model utilizing Dart FFI (for Swift/Objective-C on iOS/macOS) and JNI (for Kotlin/Java on Android).

#### Quick Comparison

| Feature | Method Channels | Native Interop |
| :--- | :--- | :--- |
| **Communication Mechanism** | Asynchronous message passing over platform channels | Direct memory-bound function calls (Dart FFI / JNI) |
Comment thread
tarrinneal marked this conversation as resolved.
| **Platform Support** | All supported platforms (Android, iOS, macOS, Windows, Linux) | Android, iOS, and macOS |
| **Serialization Overhead** | High (serialization and multiple copies) | Low (minimal copying) |
| **Latency** | Higher (requires message loop scheduling) | Extremely low (direct execution) |
| **Synchronous Host Calls** | Not supported | Fully supported |
| **Setup Complexity** | Simple | Complex (requires external tools) |
| **Code Generation Steps** | Single-step (running Pigeon generates everything) | Multi-step (requires running Pigeon, then running generated config scripts) |

#### When to Choose Which Model

- **Consider Method Channels if**:
- Your plugin targets Windows or Linux (Native Interop is not supported on these platforms).
- Your plugin primarily passes simple data objects or has low-frequency communication.
- You want a simpler setup with no external dependencies or additional command-line tools.
- Your data classes contain many nested fields or custom collections where conversion overhead might offset performance gains. There are plans to address this issue in the future.
- **Consider Native Interop if**:
- Your plugin targets only Android, iOS, and/or macOS.
- Your plugin handles high-frequency messaging, large typed arrays (e.g., image processing, sensor data streams), or latency-sensitive communication where serialization overhead is a bottleneck.
- You need synchronous execution for platform APIs on the host thread.

For detailed information on setup, prerequisites, and instructions on how to use Native Interop, see the [Native Interop Guide](./native_interop_guide.md).

### Constants

Pigeon supports generating top-level constants in the generated files. Constants can be defined at the top level of the Pigeon file:
Expand Down
6 changes: 3 additions & 3 deletions packages/pigeon/example/app/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# pigeon_example_app
# Pigeon Method Channel Example Application

This demonstrates using Pigeon for platform communication directly in an
application, rather than in a plugin.
This demonstrates using standard Method Channel-based platform communication generated by Pigeon directly in an application, rather than in a plugin.

To update the generated code, run:
```sh
cd ../..
dart tool/generate.dart
```

Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// Copyright 2013 The Flutter Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

package dev.flutter.pigeon_example_app

// #docregion concurrency-style
suspend fun echoAsync(value: String): String {
return value
}
// #enddocregion concurrency-style
2 changes: 1 addition & 1 deletion packages/pigeon/example/app/android/settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ pluginManagement {
plugins {
id("dev.flutter.flutter-plugin-loader") version "1.0.0"
id("com.android.application") version "9.1.0" apply false
id("org.jetbrains.kotlin.android") version "2.4.0" apply false
id("org.jetbrains.kotlin.android") version "2.3.20" apply false
id("com.google.cloud.artifactregistry.gradle-plugin") version "2.2.1"
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,19 +55,19 @@ enum EventChannelMessagesPigeonInternal {
case is (Void, Void):
return true

case (let lhsArray, let rhsArray) as ([Any?], [Any?]):
case (let lhsArray, let rhsArray) as ([Double], [Double]):
guard lhsArray.count == rhsArray.count else { return false }
for (index, element) in lhsArray.enumerated() {
if !deepEquals(element, rhsArray[index]) {
if !doubleEquals(element, rhsArray[index]) {
return false
}
}
return true

case (let lhsArray, let rhsArray) as ([Double], [Double]):
case (let lhsArray, let rhsArray) as ([Any?], [Any?]):
guard lhsArray.count == rhsArray.count else { return false }
for (index, element) in lhsArray.enumerated() {
if !doubleEquals(element, rhsArray[index]) {
if !deepEquals(element, rhsArray[index]) {
return false
}
}
Expand Down
10 changes: 5 additions & 5 deletions packages/pigeon/example/app/ios/Runner/Messages.g.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ final class PigeonError: Error {

var localizedDescription: String {
return
"PigeonError(code: \(code), message: \(message ?? "<nil>"), details: \(details ?? "<nil>")"
"PigeonError(code: \(code), message: \(message ?? "<nil>"), details: \(details ?? "<nil>"))"
}
}

Expand Down Expand Up @@ -110,19 +110,19 @@ enum MessagesPigeonInternal {
case is (Void, Void):
return true

case (let lhsArray, let rhsArray) as ([Any?], [Any?]):
case (let lhsArray, let rhsArray) as ([Double], [Double]):
guard lhsArray.count == rhsArray.count else { return false }
for (index, element) in lhsArray.enumerated() {
if !deepEquals(element, rhsArray[index]) {
if !doubleEquals(element, rhsArray[index]) {
return false
}
}
return true

case (let lhsArray, let rhsArray) as ([Double], [Double]):
case (let lhsArray, let rhsArray) as ([Any?], [Any?]):
guard lhsArray.count == rhsArray.count else { return false }
for (index, element) in lhsArray.enumerated() {
if !doubleEquals(element, rhsArray[index]) {
if !deepEquals(element, rhsArray[index]) {
return false
}
}
Expand Down
17 changes: 17 additions & 0 deletions packages/pigeon/example/app/ios/Runner/NativeInteropExample.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Copyright 2013 The Flutter Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import Foundation

// #docregion callback-style
func echoAsync(_ value: String, completion: @escaping (Result<String, Error>) -> Void) {
completion(.success(value))
}
// #enddocregion callback-style

// #docregion concurrency-style
func echoAsync(_ value: String) async throws -> String {
return value
}
// #enddocregion concurrency-style
2 changes: 1 addition & 1 deletion packages/pigeon/example/app/lib/src/messages.g.dart
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,8 @@ class ExampleHostApi {
pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty
? '.$messageChannelSuffix'
: '';
final BinaryMessenger? pigeonVar_binaryMessenger;

final BinaryMessenger? pigeonVar_binaryMessenger;
static const MessageCodec<Object?> pigeonChannelCodec = _PigeonCodec();

final String pigeonVar_messageChannelSuffix;
Expand Down
38 changes: 38 additions & 0 deletions packages/pigeon/example/app/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,41 @@ dev_dependencies:

flutter:
uses-material-design: true

dependency_overrides:
ffi:
git:
url: https://github.com/dart-lang/native/
path: pkgs/ffi
ref: 27890daeab690209603a979c7fbb54b22a3c878f
ffigen:
git:
url: https://github.com/dart-lang/native/
path: pkgs/ffigen
ref: 27890daeab690209603a979c7fbb54b22a3c878f
jni:
git:
url: https://github.com/dart-lang/native/
path: pkgs/jni
ref: 27890daeab690209603a979c7fbb54b22a3c878f
jnigen:
git:
url: https://github.com/dart-lang/native/
path: pkgs/jnigen
ref: 27890daeab690209603a979c7fbb54b22a3c878f
objective_c:
git:
url: https://github.com/dart-lang/native/
path: pkgs/objective_c
ref: 27890daeab690209603a979c7fbb54b22a3c878f
swift2objc:
git:
url: https://github.com/dart-lang/native/
path: pkgs/swift2objc
ref: 27890daeab690209603a979c7fbb54b22a3c878f
swiftgen:
git:
url: https://github.com/dart-lang/native/
path: pkgs/swiftgen
ref: 27890daeab690209603a979c7fbb54b22a3c878f

46 changes: 46 additions & 0 deletions packages/pigeon/example/native_interop_app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Miscellaneous
*.class
*.log
*.pyc
*.swp
.DS_Store
.atom/
.build/
.buildlog/
.history
.svn/
.swiftpm/
migrate_working_dir/

# IntelliJ related
*.iml
*.ipr
*.iws
.idea/

# The .vscode folder contains launch configuration and tasks you configure in
# VS Code which you may wish to be included in version control, so this line
# is commented out by default.
#.vscode/

# Flutter/Dart/Pub related
**/doc/api/
**/ios/Flutter/.last_build_id
.dart_tool/
.flutter-plugins
.flutter-plugins-dependencies
.packages
.pub-cache/
.pub/
/build/

# Symbolication related
app.*.symbols

# Obfuscation related
app.*.map.json

# Android Studio will place build artifacts here
/android/app/debug
/android/app/profile
/android/app/release
45 changes: 45 additions & 0 deletions packages/pigeon/example/native_interop_app/.metadata
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# This file tracks properties of this Flutter project.
# Used by Flutter tool to assess capabilities and perform upgrades etc.
#
# This file should be version controlled.

version:
revision: 4d9e56e694b656610ab87fcf2efbcd226e0ed8cf
channel: stable

project_type: app

# Tracks metadata for the flutter migrate command
migration:
platforms:
- platform: root
create_revision: 4d9e56e694b656610ab87fcf2efbcd226e0ed8cf
base_revision: 4d9e56e694b656610ab87fcf2efbcd226e0ed8cf
- platform: android
create_revision: 4d9e56e694b656610ab87fcf2efbcd226e0ed8cf
base_revision: 4d9e56e694b656610ab87fcf2efbcd226e0ed8cf
- platform: ios
create_revision: 4d9e56e694b656610ab87fcf2efbcd226e0ed8cf
base_revision: 4d9e56e694b656610ab87fcf2efbcd226e0ed8cf
- platform: linux
create_revision: 4d9e56e694b656610ab87fcf2efbcd226e0ed8cf
base_revision: 4d9e56e694b656610ab87fcf2efbcd226e0ed8cf
- platform: macos
create_revision: 4d9e56e694b656610ab87fcf2efbcd226e0ed8cf
base_revision: 4d9e56e694b656610ab87fcf2efbcd226e0ed8cf
- platform: web
create_revision: 4d9e56e694b656610ab87fcf2efbcd226e0ed8cf
base_revision: 4d9e56e694b656610ab87fcf2efbcd226e0ed8cf
- platform: windows
create_revision: 4d9e56e694b656610ab87fcf2efbcd226e0ed8cf
base_revision: 4d9e56e694b656610ab87fcf2efbcd226e0ed8cf

# User provided section

# List of Local paths (relative to this file) that should be
# ignored by the migrate tool.
#
# Files that are not part of the templates will be ignored by default.
unmanaged_files:
- 'lib/main.dart'
- 'ios/Runner.xcodeproj/project.pbxproj'
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
buildFlags:
_pluginToolsConfigGlobalKey:
- "--no-tree-shake-icons"
- "--dart-define=buildmode=testing"
10 changes: 10 additions & 0 deletions packages/pigeon/example/native_interop_app/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Pigeon Native Interop Example Application

This demonstrates using Pigeon's Native Interop feature (direct FFI and JNI function calls) for platform communication directly in an application, rather than in a plugin.

To update the generated code, run:
```sh
cd ../..
dart tool/generate.dart
```

13 changes: 13 additions & 0 deletions packages/pigeon/example/native_interop_app/android/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
gradle-wrapper.jar
/.gradle
/captures/
/gradlew
/gradlew.bat
/local.properties
GeneratedPluginRegistrant.java

# Remember to never publicly share your keystore.
# See https://flutter.dev/to/reference-keystore
key.properties
**/*.keystore
**/*.jks
Comment thread
tarrinneal marked this conversation as resolved.
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
plugins {
id("com.android.application")
id("dev.flutter.flutter-gradle-plugin")
}

android {
namespace = "dev.flutter.pigeon_example_app"
compileSdk = flutter.compileSdkVersion
ndkVersion = flutter.ndkVersion

compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

defaultConfig {
applicationId = "dev.flutter.pigeon_example_app"
minSdk = flutter.minSdkVersion
targetSdk = flutter.targetSdkVersion
versionCode = flutter.versionCode
versionName = flutter.versionName
}

buildTypes {
release {
signingConfig = signingConfigs.getByName("debug")
}
}
}

kotlin {
compilerOptions {
jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17
}
}

flutter {
source = "../.."
}
Loading
Loading