Skip to content

Commit

Permalink
feat: Support flutter desktop (#600)
Browse files Browse the repository at this point in the history
  • Loading branch information
littleGnAl committed Feb 21, 2022
1 parent 52cbacb commit 2c4a133
Show file tree
Hide file tree
Showing 393 changed files with 74,521 additions and 15,018 deletions.
128 changes: 104 additions & 24 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,23 @@
name: CI

on:
# pull_request_target:
# types: [opened, synchronize]
# branches:
# - master
# # Temporarily allow check on dev/flutter2-iris branch
# - 'dev/flutter2-iris'

push:
branches: [ master ]
branches:
- master
# Temporarily allow check on dev/flutter2-iris branch
- 'dev/flutter2-iris'
pull_request:
branches: [ master ]
branches:
- master
# Temporarily allow check on dev/flutter2-iris branch
- 'dev/flutter2-iris'

jobs:
# DO NOT run flutter test as this time, because the unit test is broken, will re-enable it
Expand All @@ -19,61 +32,128 @@ jobs:
# java-version: '11'
# - uses: subosito/flutter-action@v1
# with:
# flutter-version: '2.5.3'
# flutter-version: '2.10.0'
# - run: flutter pub get
# - run: flutter test

integration_test_android:
name: Run Flutter Android Integration Tests
runs-on: macos-11
timeout-minutes: 60
env:
TEST_APP_ID: ${{ secrets.MY_APP_ID }}
steps:
- uses: actions/checkout@v1
- uses: actions/setup-java@v1
with:
java-version: '11'
- uses: subosito/flutter-action@v1
with:
flutter-version: '2.10.0'
- name: run flutter android integration tests
uses: reactivecircus/android-emulator-runner@v2.21.0
with:
api-level: 31
arch: x86_64
profile: Nexus 6
script: bash ci/run_flutter_integration_test.sh

integration_test_ios:
name: Run Flutter iOS Integration Tests
runs-on: macos-11
timeout-minutes: 60
env:
TEST_APP_ID: ${{ secrets.MY_APP_ID }}
steps:
- uses: actions/checkout@v1
- uses: subosito/flutter-action@v1
with:
flutter-version: '2.10.0'
- uses: futureware-tech/simulator-action@v1
with:
model: 'iPhone 13 Pro Max'
- run: bash ci/run_flutter_integration_test.sh

integration_test_macos:
name: Run Flutter macOS Integration Tests
runs-on: macos-11
timeout-minutes: 60
env:
TEST_APP_ID: ${{ secrets.MY_APP_ID }}
steps:
- uses: actions/checkout@v1
- uses: subosito/flutter-action@v1
with:
flutter-version: '2.10.0'
- run: flutter config --enable-macos-desktop
- run: bash ci/run_flutter_macos_integration_test.sh

integration_test_windows:
name: Run Flutter Windows Integration Tests
runs-on: windows-2019
timeout-minutes: 60
env:
TEST_APP_ID: ${{ secrets.MY_APP_ID }}
steps:
- uses: actions/checkout@v1
- uses: subosito/flutter-action@v1
with:
flutter-version: '2.10.0'
- run: flutter config --enable-windows-desktop
- run: bash ci/run_flutter_macos_integration_test.sh

unittest_android:
name: Run Android Unit Test
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v1
- uses: actions/setup-java@v1
with:
java-version: '11'
- uses: subosito/flutter-action@v1
with:
flutter-version: '2.5.3'
flutter-version: '2.10.0'
- run: flutter pub get
- run: bash ci/run_android_test.sh

unittest_ios:
name: Run iOS Unit Test
runs-on: macos-11
timeout-minutes: 60
steps:
- uses: actions/checkout@v1
- uses: subosito/flutter-action@v1
with:
flutter-version: '2.5.3'
flutter-version: '2.10.0'
- run: flutter pub get
- run: bash ci/run_ios_test.sh
# Temporay disable the android build since it will fail cause by
# "No toolchains found in the NDK toolchains folder for ABI with prefix: arm-linux-androideabi" error on ci.
# This issue can be refer: https://github.com/gradle/gradle/issues/12440#issuecomment-606188282
# TODO(littlegnal): Upgrade the AGP version to solve this issue, and re-enable this build.
# build_android:
# name: Build Android
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v1
# - uses: actions/setup-java@v1
# with:
# java-version: '11'
# with:
# flutter-version: '2.5.3'
# - run: flutter pub get
# - name: Run flutter build apk
# run: flutter build apk
# working-directory: example

build_android:
name: Build Android
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-java@v1
with:
java-version: '11'
- uses: subosito/flutter-action@v1
with:
flutter-version: '2.10.0'
- run: flutter pub get
- name: Run flutter build apk
run: flutter build apk
working-directory: example

build_ios:
name: Build iOS
runs-on: macos-11
timeout-minutes: 60
steps:
- uses: actions/checkout@v1
- uses: subosito/flutter-action@v1
with:
flutter-version: '2.5.3'
flutter-version: '2.10.0'
- run: flutter pub get
- name: Run flutter build ios --no-codesign
run: flutter build ios --no-codesign
Expand Down
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[submodule "web"]
path = web
url = https://github.com/AgoraIO-Community/Iris-Rtc-Web.git
[submodule "integration_test_app/iris_integration_test/third_party/googletest"]
path = integration_test_app/iris_integration_test/third_party/googletest
url = https://github.com/google/googletest.git
4 changes: 2 additions & 2 deletions .metadata
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# This file should be version controlled and should not be manually edited.

version:
revision: 5391447fae6209bb21a89e6a5a6583cac1af9b4b
channel: beta
revision: c5a4b4029c0798f37c4a39b479d7cb75daa7b05c
channel: stable

project_type: plugin
1 change: 1 addition & 0 deletions .pubignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
integration_test_app/
34 changes: 34 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,20 @@
* add RtcEngineContext instead of RtcEngineConfig ([5dd294f](https://github.com/AgoraIO/Flutter-SDK/commit/5dd294fa95799dcc19d69775c19a13aeed61e2a2))
* support native SDK 3.4.5 ([d1d8433](https://github.com/AgoraIO/Flutter-SDK/commit/d1d84330c9fcc1367cfe8160fe8c6d593c7bac9c))

# [4.1.0-alpha.2](https://github.com/AgoraIO/Flutter-SDK/compare/v4.1.0-alpha.1...v4.1.0-alpha.2) (2021-06-16)


### Bug Fixes

* web build error ([8c57eae](https://github.com/AgoraIO/Flutter-SDK/commit/8c57eae792e3d02cedeb52b87c5350e65a6be7f9))

# [4.1.0-alpha.1](https://github.com/AgoraIO/Flutter-SDK/compare/v4.1.0-alpha.0...v4.1.0-alpha.1) (2021-06-16)


### Features

* support screen share for desktop

## [4.0.2](https://github.com/AgoraIO/Flutter-SDK/compare/v4.0.1...v4.0.2) (2021-06-09)


Expand All @@ -83,6 +97,26 @@
* Android build error ([3af4476](https://github.com/AgoraIO/Flutter-SDK/commit/3af44762ad765cde99024e2b080d4c88f34cfc09))
* enum type cast bug, close [#345](https://github.com/AgoraIO/Flutter-SDK/issues/345) ([85d720d](https://github.com/AgoraIO/Flutter-SDK/commit/85d720d1f13a7ff340419135a9d397be798b750f))

# [4.1.0-alpha.0](https://github.com/AgoraIO/Flutter-SDK/compare/v4.0.1...v4.1.0-alpha.0) (2021-06-04)


### Bug Fixes

* Android build error ([3af4476](https://github.com/AgoraIO/Flutter-SDK/commit/3af44762ad765cde99024e2b080d4c88f34cfc09))
* build error ([8c80c1e](https://github.com/AgoraIO/Flutter-SDK/commit/8c80c1e43f86de3d62b281473f92f217513e139a))
* mac render crash ([dee5ab9](https://github.com/AgoraIO/Flutter-SDK/commit/dee5ab9d0245859113b3411adfab60baad6ac7b4))
* mobile `RtcStats` key error ([70cb58e](https://github.com/AgoraIO/Flutter-SDK/commit/70cb58efcfce21352f3f77076abe8c3f62998d6c))
* remove unless import ([668650f](https://github.com/AgoraIO/Flutter-SDK/commit/668650f95fc052089f37898e6a7b5a735f08a3b5))
* render error ([f409099](https://github.com/AgoraIO/Flutter-SDK/commit/f409099398f8d7d51c449bba00a0128fde90b113))
* Web call `Platform` API error ([d760093](https://github.com/AgoraIO/Flutter-SDK/commit/d760093a5e3368108e54f9995c1956d9caaa8460))


### Features

* add `rtc_device_manager.dart` ([94e27c9](https://github.com/AgoraIO/Flutter-SDK/commit/94e27c91fb2efe630751551d1cfddc1ba657a735))
* add device manager for Web ([18b5d90](https://github.com/AgoraIO/Flutter-SDK/commit/18b5d90ec320bff090dcb01cc8717c0781dd5a38))
* add DeviceManager for windows ([dcf5630](https://github.com/AgoraIO/Flutter-SDK/commit/dcf56308c04b9d6da0aba31b5a3c04b4087db388))

## [4.0.1](https://github.com/AgoraIO/Flutter-SDK/compare/v4.0.0...v4.0.1) (2021-05-19)


Expand Down
18 changes: 9 additions & 9 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# Contribute your code

We are glad you are here! Everyone is welcome to contribute code
via pull requests, to help people asking for
help, to add to our documentation, or to help out in any other way.
We are glad you are here! Everyone is welcome to contribute code via pull requests, to help people who ask for help, to add to our documentation, or to help out in any other way.

This document briefly describes some guidance on how you can contribute
to this repository.
This document briefly describes some guidance on how you can contribute to this repository.

## Source code structures

1. **[lib/rtc_engine.dart](lib/rtc_engine.dart)**: Dart APIs wrapper, api message channels to native modules.
2. **[example](example)**: Example demo for quick start/showcase.
3. **[ios/Classes/AgoraRtcEnginePlugin.m](ios/Classes/AgoraRtcEnginePlugin.m)**: iOS native implementation to handle dart message channel api calls.
4. **[android/src/main/kotlin/io/agora/agora_rtc_engine/AgoraRtcEnginePlugin.kt](android/src/main/kotlin/io/agora/agora_rtc_engine/AgoraRtcEnginePlugin.kt)**: Android native implementation to handle dart message channel api calls.
1. **[lib/rtc_engine.dart](lib/rtc_engine.dart)**: The entry of Dart API.
2. **[example](example)**: API Examples.
3. **[android](android)**: Android native implementation.
4. **[ios](ios)**: iOS native implementation.
5. **[macos](macos)**: Mac native implementation.
6. **[windows](windows)**: Windows native implementation.
7. **[web](lib/agora_rtc_engine_web.dart)**: Web implementation.

While creating PR, below materials could be helpful:

Expand Down
Loading

0 comments on commit 2c4a133

Please sign in to comment.