forked from nordicsemi/Flutter-nRF-Connect-Device-Manager
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgen.sh
More file actions
executable file
·22 lines (18 loc) · 715 Bytes
/
gen.sh
File metadata and controls
executable file
·22 lines (18 loc) · 715 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh
which protoc
if [ $? -eq 0 ]; then
echo 'Protobuf is ready...'
else
echo 'Installing protobuf'
brew install protobuf
echo 'Installing swift-protobuf'
brew install swift-protobuf
echo 'building dart proto'
fi
dart pub install
export PATH="$PATH":"$HOME/.pub-cache/bin"
dart pub global activate protoc_plugin
protoc --dart_out=./ --experimental_allow_proto3_optional lib/proto/flutter_mcu.proto
protoc --swift_out=ios/Classes/ lib/proto/flutter_mcu.proto --experimental_allow_proto3_optional
# ANDR_OUT_DIR=lite:android/src/main/kotlin/no/nordicsemi/android/mcumgr_flutter/gen
# protoc --kotlin_out=$ANDR_OUT_DIR lib/proto/flutter_mcu.proto --experimental_allow_proto3_optional