File tree Expand file tree Collapse file tree 2 files changed +25
-0
lines changed Expand file tree Collapse file tree 2 files changed +25
-0
lines changed Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+ set -euo pipefail
3
+
4
+ if [[ -n ${CI: +x} ]]; then
5
+ echo " Running in CI – setting up Flutter SDK first"
6
+ # Note: keep version in sync with other binding generation scripts.
7
+ curl -Lv https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_3.27.3-stable.tar.xz --output /tmp/flutter.tar.xz
8
+ tar xf /tmp/flutter.tar.xz -C /tmp
9
+ export PATH=" /tmp/flutter/bin:$PATH "
10
+ which flutter
11
+ flutter --version
12
+ fi
13
+
14
+ # Move to the Flutter package root (…/flutter).
15
+ cd " $( dirname " $0 " ) /../"
16
+
17
+ binding_path=" lib/src/native/java/binding.dart"
18
+
19
+ # Regenerate the bindings.
20
+ dart run jnigen --config ffi-jni.yaml
21
+
22
+ # Format the generated code so that it passes CI linters.
23
+ dart format " $binding_path "
Original file line number Diff line number Diff line change @@ -20,6 +20,8 @@ get-repo)
20
20
set-version)
21
21
newValue=" ${BASH_REMATCH[1]} $2 "
22
22
echo " ${content/ ${BASH_REMATCH[0]} / $newValue } " > $file
23
+ # Regenerate Dart JNI bindings so they stay in sync with the updated Android SDK version.
24
+ ../scripts/generate-jni-bindings.sh " $2 "
23
25
;;
24
26
* )
25
27
echo " Unknown argument $1 "
You can’t perform that action at this time.
0 commit comments