Skip to content

Fix the build problems in issue 22 related to FFI #24

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
24 changes: 13 additions & 11 deletions .github/workflows/dargon2_flutter_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ name: dargon2_flutter

on:
push:
branches: [main]
pull_request:
branches: [main]

defaults:
run:
Expand All @@ -13,23 +15,23 @@ jobs:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup Java
uses: actions/setup-java@v2
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'zulu'
- name: Gradle cache
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}-${{ hashFiles('**/buildSrc/**/*.kt') }}
- name: AVD cache
uses: actions/cache@v2
uses: actions/cache@v4
id: avd-cache
with:
path: |
Expand All @@ -56,9 +58,9 @@ jobs:
mv ../../dargon2_flutter_mobile/pubspec.test.yaml ../../dargon2_flutter_mobile/pubspec.yaml
mv ../../dargon2_flutter_desktop/pubspec.test.yaml ../../dargon2_flutter_desktop/pubspec.yaml
mv ../../dargon2_flutter_platform_interface/pubspec.test.yaml ../../dargon2_flutter_platform_interface/pubspec.yaml
mv ../../../dargon2_core/pubspec.test.yaml ../../../dargon2_core/pubspec.yaml
mv ../../../dargon2_core/pubspec.test.yaml ../../../dargon2_core/pubspec.yaml
- name: Run Integration Tests
uses: reactivecircus/android-emulator-runner@v2.22.0
uses: reactivecircus/android-emulator-runner@v2.30.1
with:
api-level: 33
target: google_apis
Expand All @@ -67,10 +69,10 @@ jobs:
script: flutter test integration_test/

test_ios:
runs-on: macos-latest
runs-on: macos-14
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
submodules: recursive
- name: Download Flutter
Expand All @@ -85,7 +87,7 @@ jobs:
- name: Start Simulator
run: |
UDID=$(
xcrun simctl list devices | grep "iPhone 13 (" | awk -F"[()]" '{print $2}' | awk 'NR==1{print $1}'
xcrun simctl list devices | grep "iPhone 15 (" | awk -F"[()]" '{print $2}' | awk 'NR==1{print $1}'
)
xcrun simctl boot "${UDID:?No Simulator with this name found}"
- name: Use Test Pubspec Files
Expand All @@ -108,7 +110,7 @@ jobs:
test_web:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
- name: Use Test Pubspec Files
run: |
Expand Down Expand Up @@ -146,7 +148,7 @@ jobs:
FLUTTER_CHANNEL: stable
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
submodules: recursive
- name: Download Flutter
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/dargon2_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ name: dargon2

on:
push:
branches: [main]
pull_request:
branches: [main]

defaults:
run:
Expand All @@ -27,4 +29,4 @@ jobs:
- name: Install dependencies
run: dart pub get
- name: Run tests
run: dart pub run test
run: dart --enable_deprecated_wait_for test
3 changes: 3 additions & 0 deletions dargon2_flutter/dargon2_flutter_desktop/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,13 @@ flutter:
platforms:
linux:
pluginClass: Dargon2FlutterDesktopPlugin
ffiPlugin: true
macos:
pluginClass: Dargon2FlutterDesktopPlugin
ffiPlugin: true
windows:
pluginClass: Dargon2FlutterDesktopPlugin
ffiPlugin: true

# To add assets to your plugin package, add an assets section, like this:
# assets:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-all.zip
2 changes: 2 additions & 0 deletions dargon2_flutter/dargon2_flutter_mobile/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,7 @@ flutter:
platforms:
android:
dartPluginClass: DArgon2Mobile
ffiPlugin: true
ios:
dartPluginClass: DArgon2Mobile
ffiPlugin: true