-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: flutter v3: create client (#461)
- Loading branch information
1 parent
7553f47
commit 7cb8b86
Showing
27 changed files
with
10,829 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Hint that these are generated. Practically this means: | ||
# - collapse diffs by default and | ||
# - don't count these during language analysis | ||
# https://docs.github.com/en/repositories/working-with-files/managing-files/customizing-how-changed-files-appear-on-github | ||
**/generated/** linguist-generated=true | ||
**/bridge_generated.* linguist-generated=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
name: test bindings_flutter | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
env: | ||
LD_LIBRARY_PATH: ${{ github.workspace }}/bindings_flutter | ||
jobs: | ||
build_android: | ||
runs-on: warp-macos-13-arm64-6x | ||
defaults: | ||
run: | ||
working-directory: ./bindings_flutter | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-java@v2 | ||
with: | ||
distribution: 'zulu' | ||
java-version: '11' | ||
- uses: dtolnay/rust-toolchain@stable | ||
with: | ||
targets: aarch64-linux-android,armv7-linux-androideabi,x86_64-linux-android,i686-linux-android | ||
- uses: Swatinem/rust-cache@v2 | ||
- uses: subosito/flutter-action@v2 | ||
with: | ||
flutter-version: '3.16.8' | ||
channel: 'stable' | ||
- run: flutter pub get | ||
- run: cargo install cargo-expand | ||
- run: cargo install flutter_rust_bridge_codegen --version 2.0.0-dev.22 | ||
- run: flutter_rust_bridge_codegen generate | ||
- run: scripts/build-android.sh | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: xmtp_bindings_flutter.jniLibs.tar.gz | ||
path: bindings_flutter/platform-build/xmtp_bindings_flutter.jniLibs.tar.gz | ||
retention-days: 1 | ||
build_linux: | ||
runs-on: warp-ubuntu-latest-x64-4x | ||
defaults: | ||
run: | ||
working-directory: ./bindings_flutter | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: dtolnay/rust-toolchain@stable | ||
with: | ||
# targets: aarch64-unknown-linux-gnu,x86_64-unknown-linux-gnu | ||
targets: x86_64-unknown-linux-gnu | ||
- uses: Swatinem/rust-cache@v2 | ||
- uses: subosito/flutter-action@v2 | ||
with: | ||
flutter-version: '3.16.8' | ||
channel: 'stable' | ||
- uses: goto-bus-stop/setup-zig@v2 | ||
- run: flutter pub get | ||
- run: cargo install cargo-expand | ||
- run: cargo install flutter_rust_bridge_codegen --version 2.0.0-dev.22 | ||
- run: flutter_rust_bridge_codegen generate | ||
- run: scripts/build-linux.sh | ||
- run: cp target/x86_64-unknown-linux-gnu/release/libxmtp_bindings_flutter.so ./libxmtp_bindings_flutter.so | ||
- run: dev/up | ||
working-directory: ./ | ||
- run: flutter test | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: xmtp_bindings_flutter.linux.tar.gz | ||
path: bindings_flutter/platform-build/xmtp_bindings_flutter.linux.tar.gz | ||
retention-days: 1 | ||
build_apple: | ||
runs-on: warp-macos-13-arm64-6x | ||
defaults: | ||
run: | ||
working-directory: ./bindings_flutter | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: dtolnay/rust-toolchain@stable | ||
with: | ||
targets: aarch64-apple-ios,x86_64-apple-ios,aarch64-apple-ios-sim,aarch64-apple-darwin,x86_64-apple-darwin | ||
- uses: Swatinem/rust-cache@v2 | ||
- uses: subosito/flutter-action@v2 | ||
with: | ||
flutter-version: '3.16.8' | ||
channel: 'stable' | ||
- run: flutter pub get | ||
- run: cargo install cargo-expand | ||
- run: cargo install flutter_rust_bridge_codegen --version 2.0.0-dev.22 | ||
- run: flutter_rust_bridge_codegen generate | ||
- run: scripts/build-apple.sh | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: xmtp_bindings_flutter.xcframework.zip | ||
path: bindings_flutter/platform-build/xmtp_bindings_flutter.xcframework.zip | ||
retention-days: 1 | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: libxmtp_bindings_flutter.dylib | ||
path: bindings_flutter/platform-build/libxmtp_bindings_flutter.dylib | ||
retention-days: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# See `.flutter_rust_bridge.yml` | ||
platform-build/ | ||
libxmtp_bindings_flutter.dylib | ||
libxmtp_bindings_flutter.so | ||
|
||
|
||
# See https://www.dartlang.org/guides/libraries/private-files | ||
|
||
.flutter-plugins | ||
.flutter-plugins-dependencies | ||
|
||
# Files and directories created by pub | ||
.dart_tool/ | ||
.packages | ||
build/ | ||
# If you're building an application, you may want to check-in your pubspec.lock | ||
pubspec.lock | ||
|
||
# IntelliJ related | ||
*.iml | ||
*.ipr | ||
*.iws | ||
.idea/ | ||
|
||
# Directory created by dartdoc | ||
# If you don't generate documentation locally you can remove this line. | ||
doc/api/ | ||
|
||
# Avoid committing generated Javascript files: | ||
*.dart.js | ||
*.info.json # Produced by the --dump-info flag. | ||
*.js # When generated by dart2js. Don't specify *.js if your | ||
# project includes source files written in JavaScript. | ||
*.js_ | ||
*.js.deps | ||
*.js.map |
Oops, something went wrong.