diff --git a/.github/workflows/cipd_packages b/.github/workflows/cipd_packages new file mode 100644 index 000000000..ff320c35d --- /dev/null +++ b/.github/workflows/cipd_packages @@ -0,0 +1 @@ +flutter/android/ndk/${platform} version:r27.0.10869015 diff --git a/.github/workflows/dart.yaml b/.github/workflows/dart.yaml index 77f8a6855..3f400c2c3 100644 --- a/.github/workflows/dart.yaml +++ b/.github/workflows/dart.yaml @@ -44,10 +44,8 @@ jobs: with: sdk: ${{ matrix.sdk }} - - uses: nttld/setup-ndk@dbacc5871a0fac6eef9a09d2ca86bc8bf79432c3 - with: - ndk-version: r25b - if: ${{ matrix.sdk == 'stable' }} + - run: git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git + - run: depot_tools/cipd ensure -root $HOME/Android/sdk/ -ensure-file $GITHUB_WORKSPACE/.github/workflows/cipd_packages - run: dart pub get diff --git a/.github/workflows/native_toolchain_c.yaml b/.github/workflows/native_toolchain_c.yaml index b7ed07641..39070002f 100644 --- a/.github/workflows/native_toolchain_c.yaml +++ b/.github/workflows/native_toolchain_c.yaml @@ -36,10 +36,8 @@ jobs: with: sdk: ${{ matrix.sdk }} - - uses: nttld/setup-ndk@dbacc5871a0fac6eef9a09d2ca86bc8bf79432c3 - with: - ndk-version: r25b - if: ${{ matrix.sdk == 'stable' }} + - run: git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git + - run: depot_tools/cipd ensure -root $HOME/Android/sdk/ -ensure-file $GITHUB_WORKSPACE/.github/workflows/cipd_packages - run: dart pub get diff --git a/pkgs/native_toolchain_c/lib/src/cbuilder/run_cbuilder.dart b/pkgs/native_toolchain_c/lib/src/cbuilder/run_cbuilder.dart index b5ccd6c16..56af019a6 100644 --- a/pkgs/native_toolchain_c/lib/src/cbuilder/run_cbuilder.dart +++ b/pkgs/native_toolchain_c/lib/src/cbuilder/run_cbuilder.dart @@ -285,6 +285,7 @@ class RunCBuilder { Target.androidArm64: 'aarch64-linux-android', Target.androidIA32: 'i686-linux-android', Target.androidX64: 'x86_64-linux-android', + Target.androidRiscv64: 'riscv64-linux-android', }; static const appleClangMacosTargetFlags = { diff --git a/pkgs/native_toolchain_c/pubspec.yaml b/pkgs/native_toolchain_c/pubspec.yaml index 87aaa5ddf..606547ca6 100644 --- a/pkgs/native_toolchain_c/pubspec.yaml +++ b/pkgs/native_toolchain_c/pubspec.yaml @@ -19,7 +19,7 @@ dependencies: glob: ^2.1.1 logging: ^1.1.1 meta: ^1.9.1 - native_assets_cli: ^0.3.0 + native_assets_cli: ^0.3.1 pub_semver: ^2.1.3 dev_dependencies: diff --git a/pkgs/native_toolchain_c/test/cbuilder/cbuilder_cross_android_test.dart b/pkgs/native_toolchain_c/test/cbuilder/cbuilder_cross_android_test.dart index 3c4acb20c..d84cc6ca1 100644 --- a/pkgs/native_toolchain_c/test/cbuilder/cbuilder_cross_android_test.dart +++ b/pkgs/native_toolchain_c/test/cbuilder/cbuilder_cross_android_test.dart @@ -17,6 +17,7 @@ void main() { Target.androidArm64, Target.androidIA32, Target.androidX64, + Target.androidRiscv64, ]; const readElfMachine = { @@ -24,6 +25,7 @@ void main() { Target.androidArm64: 'AArch64', Target.androidIA32: 'Intel 80386', Target.androidX64: 'Advanced Micro Devices X86-64', + Target.androidRiscv64: 'RISC-V', }; const objdumpFileFormat = { @@ -31,6 +33,7 @@ void main() { Target.androidArm64: 'elf64-littleaarch64', Target.androidIA32: 'elf32-i386', Target.androidX64: 'elf64-x86-64', + Target.androidRiscv64: 'elf64-littleriscv', }; /// From https://docs.flutter.dev/reference/supported-platforms.