Skip to content
This repository has been archived by the owner on May 30, 2021. It is now read-only.

Commit

Permalink
Feature/null safety (#17)
Browse files Browse the repository at this point in the history
* chore: run dart migration on Flutter 2.2.0

* chore: import original package's analysis_options.yaml

* feat: import original package's code

* chore: update github workflow

* chore: for github ci

* refactor: apply the original's new directory structure

* refactor: apply the original's new directory structure

* chore: upgrade example project's min iOS version to 13.0

* update: change the type of onSeekable stream

* chore: upgrade gradle
  • Loading branch information
reedom committed May 24, 2021
1 parent f9b02f0 commit bfd5367
Show file tree
Hide file tree
Showing 185 changed files with 2,363 additions and 2,062 deletions.
148 changes: 86 additions & 62 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
build:
Expand All @@ -12,74 +15,95 @@ jobs:
- uses: actions/checkout@v1
- uses: subosito/flutter-action@v1
with:
channel: beta
flutter-version: '1.22.x'
- run: flutter pub get
- run: ./scripts/format.sh
- run: flutter test
channel: stable

- name: Lint (analyze and format)
run: ./scripts/lint.sh

- name: Dartdoc
run: ./scripts/dartdoc.sh

- name: Run tests
run: ./scripts/test.sh

android-drive:
web:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: subosito/flutter-action@v1
with:
channel: stable

- name: Example App - Build web app
working-directory: ./packages/audioplayers/example
run: |
flutter pub get
flutter build web
android:
runs-on: macOS-latest

steps:
# - uses: malinskiy/action-android/install-sdk@release/0.0.7
# Replaced with a fork because of this issue https://github.com/Malinskiy/action-android/issues/32
- uses: horie1024/action-android/install-sdk@release/0.0.9
- uses: actions/checkout@v1
- uses: subosito/flutter-action@v1
with:
channel: beta
flutter-version: '1.22.x'
- name: Build example app
working-directory: ./example
run: "flutter pub get"
- name: Use specific Java version for sdkmanager to work
uses: joschi/setup-jdk@v2
with:
java-version: 'openjdk8'
architecture: 'x64'
- uses: malinskiy/action-android/install-sdk@release/0.0.8
- uses: actions/checkout@v1
- uses: subosito/flutter-action@v1
with:
channel: stable

- name: Example App - Build android APK
working-directory: ./packages/audioplayers/example
run: |
flutter pub get
flutter build apk --release
- name: Use specific Java version for sdkmanager to work
uses: joschi/setup-jdk@v2
with:
java-version: 'openjdk8'
architecture: 'x64'

- name: Download Android Emulator Image
run: |
echo "y" | $ANDROID_HOME/tools/bin/sdkmanager --install "system-images;android-29;google_apis;x86"
echo "no" | $ANDROID_HOME/tools/bin/avdmanager create avd --force --name emu --device "Nexus 5X" -k 'system-images;android-29;google_apis;x86'
$ANDROID_HOME/emulator/emulator -list-avds
- name: "Start Android Emulator"
timeout-minutes: 10
run: |
echo "Starting emulator"
ls "$ANDROID_HOME/tools/bin/"
$ANDROID_HOME/tools/bin/sdkmanager "platform-tools" "platforms;android-28"
echo "$ANDROID_HOME/platform-tools"
ls "$ANDROID_HOME/"
ls "$ANDROID_HOME/platform-tools"
nohup $ANDROID_HOME/emulator/emulator -avd emu -no-audio -no-snapshot -no-window &
$ANDROID_HOME/platform-tools/adb wait-for-device shell 'while [[ -z $(getprop sys.boot_completed | tr -d '\r') ]]; do sleep 1; done; input keyevent 82'
$ANDROID_HOME/platform-tools/adb devices
echo "Emulator started"
- name: "Run Flutter Driver tests"
working-directory: ./example
run: "flutter drive --target=test_driver/app.dart"
- name: Download Android Emulator Image
run: |
echo "y" | $ANDROID_HOME/tools/bin/sdkmanager --install "system-images;android-29;google_apis;x86"
echo "no" | $ANDROID_HOME/tools/bin/avdmanager create avd --force --name emu --device "Nexus 5X" -k 'system-images;android-29;google_apis;x86'
$ANDROID_HOME/emulator/emulator -list-avds
- name: "Start Android Emulator"
timeout-minutes: 10
run: |
echo "Starting emulator"
ls "$ANDROID_HOME/tools/bin/"
$ANDROID_HOME/tools/bin/sdkmanager "platform-tools" "platforms;android-28"
echo "$ANDROID_HOME/platform-tools"
ls "$ANDROID_HOME/"
ls "$ANDROID_HOME/platform-tools"
nohup $ANDROID_HOME/emulator/emulator -avd emu -no-audio -no-snapshot -no-window &
$ANDROID_HOME/platform-tools/adb wait-for-device shell 'while [[ -z $(getprop sys.boot_completed | tr -d '\r') ]]; do sleep 1; done; input keyevent 82'
$ANDROID_HOME/platform-tools/adb devices
echo "Emulator started"
- name: "Run Flutter Driver tests"
working-directory: ./packages/audioplayers/example
run: echo 'Skipped (WIP)'
# run: "flutter drive --target=test_driver/app.dart"

ios-drive:
ios:
runs-on: macOS-latest

steps:
- name: List all simulators
run: "xcrun instruments -s"
- name: Start Simulator
run: |
UDID=$(xcrun instruments -s | grep "iPhone" | sed -n 1p | awk -F ' *[][]' '{ print $2 }')
echo "Using simulator $UUID"
xcrun simctl boot "${UDID:?No Simulator with this name iPhone found}"
- uses: actions/checkout@v1
- uses: subosito/flutter-action@v1
with:
channel: beta
flutter-version: '1.22.x'
- name: Build example app
working-directory: ./example
run: "flutter pub get"
- name: Run Flutter Driver tests
working-directory: ./example
run: "flutter drive --target=test_driver/app.dart"
- name: List all simulators
run: "xcrun instruments -s"
- name: Start Simulator
run: |
UDID=$(xcrun instruments -s | grep "iPhone" | sed -n 1p | awk -F ' *[][]' '{ print $2 }')
echo "Using simulator $UUID"
xcrun simctl boot "${UDID:?No Simulator with this name iPhone found}"
- uses: actions/checkout@v1
- uses: subosito/flutter-action@v1
with:
channel: stable
- name: Example App - Build iOS
working-directory: ./packages/audioplayers/example
run: |
flutter pub get
flutter build ios --release --no-codesign
- name: Run Flutter Driver tests
working-directory: ./packages/audioplayers/example
run: echo 'Skipped (WIP)'
# run: "flutter drive --target=test_driver/app.dart"
87 changes: 0 additions & 87 deletions .github/workflows/pull-request.yaml

This file was deleted.

11 changes: 0 additions & 11 deletions analysis_options.yaml

This file was deleted.

52 changes: 0 additions & 52 deletions darwin/Classes/Utils.swift

This file was deleted.

15 changes: 0 additions & 15 deletions example/audioplayer_example.iml

This file was deleted.

12 changes: 0 additions & 12 deletions example/audioplayer_example_android.iml

This file was deleted.

Loading

0 comments on commit bfd5367

Please sign in to comment.