Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
192 changes: 192 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,192 @@
name: CI

on:
pull_request:
push:
branches:
- main
- master

env:
FLUTTER_VERSION: '3.38.9'

jobs:
pigeon_contracts:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
- run: dart run melos bootstrap
- run: dart run pigeon --input pigeons/midi_api.dart
- run: git diff --exit-code -- packages/flutter_midi_command_platform_interface/lib/src/pigeon packages/flutter_midi_command_android/android/src/main/kotlin/com/invisiblewrench/fluttermidicommand/pigeon packages/flutter_midi_command_darwin/ios/Classes/pigeon

dart_checks:
runs-on: ubuntu-latest
needs: pigeon_contracts
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
- run: dart pub global activate melos
- run: melos bootstrap
- run: melos run analyze
- run: melos run test
- run: melos run test:web:chrome

native_android_checks:
runs-on: ubuntu-latest
needs: pigeon_contracts
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
- run: dart pub global activate melos
- run: melos bootstrap
- name: Android native unit tests
run: bash ./example/android/gradlew -p example/android :flutter_midi_command_android:testDebugUnitTest

native_darwin_checks:
runs-on: macos-latest
needs: pigeon_contracts
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
- run: dart pub global activate melos
- run: melos bootstrap
- name: Darwin native tests
run: melos run test:native:darwin

native_linux_checks:
runs-on: ubuntu-latest
needs: pigeon_contracts
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
- run: dart pub global activate melos
- run: melos bootstrap
- name: Linux backend tests
run: melos run test:native:linux

native_windows_checks:
runs-on: windows-latest
needs: pigeon_contracts
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
- run: dart pub global activate melos
- run: melos bootstrap
- name: Windows backend tests
run: melos run test:native:windows

example_android:
runs-on: ubuntu-latest
needs: [dart_checks, native_android_checks]
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
- run: dart pub global activate melos
- run: melos bootstrap
- name: Build example app (Android)
run: melos run build:example:android
- name: Enable KVM
run: |
sudo tee /etc/udev/rules.d/99-kvm4all.rules <<'EOF'
KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"
EOF
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
- name: Run smoke test (Android emulator)
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 35
arch: x86_64
target: google_apis
profile: pixel_6
disable-animations: true
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -no-snapshot -no-snapshot-save
script: melos run test:example:integration:android
env:
ANDROID_DEVICE_ID: emulator-5554
ANDROID_SMOKE_MAX_ATTEMPTS: "3"

example_linux:
runs-on: ubuntu-latest
needs: [dart_checks, native_linux_checks]
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
- name: Install Linux build dependencies
run: |
sudo apt-get update
sudo apt-get install -y clang cmake ninja-build pkg-config libgtk-3-dev xvfb
- run: dart pub global activate melos
- run: melos bootstrap
- name: Build example app (Linux)
run: melos run build:example:linux
- name: Run smoke test (Linux)
run: xvfb-run -a melos run test:example:integration:linux

example_apple:
runs-on: macos-latest
needs: [dart_checks, native_darwin_checks]
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
- run: dart pub global activate melos
- run: melos bootstrap
- name: Build example app (iOS)
run: melos run build:example:ios
- name: Build example app (macOS)
run: melos run build:example:macos
- name: Run smoke test (macOS)
run: melos run test:example:integration:macos
- name: Run smoke test (iOS simulator)
run: melos run test:example:integration:ios
env:
IOS_SMOKE_MAX_ATTEMPTS: "3"

example_windows:
runs-on: windows-latest
needs: [dart_checks, native_windows_checks]
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
- run: dart pub global activate melos
- run: melos bootstrap
- name: Build example app (Windows)
run: melos run build:example:windows
- name: Run smoke test (Windows)
run: melos run test:example:integration:windows

example_web:
runs-on: ubuntu-latest
needs: dart_checks
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
- run: dart pub global activate melos
- run: melos bootstrap
- name: Build example app (Web)
run: melos run build:example:web
- name: Run smoke test (Web Chrome)
run: melos run test:example:integration:web
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ pubspec.lock
build/
local.properties
.idea/
*.iml
packages/flutter_midi_command_darwin/ios/.build/
22 changes: 22 additions & 0 deletions .pubignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Workspace-only dependency linking.
pubspec_overrides.yaml
example/pubspec_overrides.yaml
packages/**/pubspec_overrides.yaml

# Federated implementations are published as separate packages.
packages/

# Local IDE/workspace artifacts.
*.iml
.idea/

# Generated API docs are published separately.
doc/api/

# Build and tool caches.
build/
**/build/
.dart_tool/
**/.dart_tool/
.pub/
**/.pub/
12 changes: 11 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
## 1.0.0
- Restructured into a melos-managed federated monorepo.
- Bumped federated subpackages to 1.0.0 for the major API transition.
- Introduced shared BLE transport package (`flutter_midi_command_ble`) and optional BLE wiring via `configureBleTransport`.
- Migrated host API contracts to generated Pigeon interfaces.
- Added typed host models (`MidiDeviceType`, `MidiHostDevice`, `MidiPort`, `MidiPacket`) across platform bridges.
- Added web implementation package (`flutter_midi_command_web`) using browser Web MIDI.
- Added transport capabilities/policies and stronger async connection semantics (`connectToDevice` completes on connection).
- Added a typed MIDI parser/generator API (`MidiMessageParser` and `MidiMessage.parse`) with support for running status, realtime interleaving, SysEx, and NRPN/RPN message flows.
- Expanded test coverage across shared logic, platform interface, BLE transport, and web backend.

## 0.5.3
Adds a runtime check to ensure MIDI is available on the android device before starting. See #125 for further details.
Make plugin work with Flutter 3.27.0 and Android Studio Lady Bug. #127
Expand Down Expand Up @@ -238,4 +249,3 @@ Readme and formatting
Initial Release.
Functioning discovery and connection to MIDI devices on Android and iOS, as well as BLE MIDI devices on Android.
Functioning sending and receiving of MIDI data

Loading