add flutter example app test

This commit is contained in:
mlsmaycon
2026-04-28 03:41:36 +02:00
parent 154b81645a
commit 555f5233cc
88 changed files with 18364 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
#!/usr/bin/env bash
set -euo pipefail
project_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
tmp_dir="$(mktemp -d)"
cleanup() {
rm -rf "$tmp_dir"
}
trap cleanup EXIT
command -v flutter >/dev/null 2>&1 || {
echo "flutter is not installed"
exit 1
}
cp "$project_dir/pubspec.yaml" "$tmp_dir/pubspec.yaml"
cp "$project_dir/analysis_options.yaml" "$tmp_dir/analysis_options.yaml"
cp -R "$project_dir/lib" "$tmp_dir/lib"
cp -R "$project_dir/test" "$tmp_dir/test"
flutter create \
--platforms=windows,macos,linux \
--project-name=netbird_flutter_ui \
--org=io.netbird \
"$project_dir"
cp "$tmp_dir/pubspec.yaml" "$project_dir/pubspec.yaml"
cp "$tmp_dir/analysis_options.yaml" "$project_dir/analysis_options.yaml"
rm -rf "$project_dir/lib"
cp -R "$tmp_dir/lib" "$project_dir/lib"
rm -rf "$project_dir/test"
cp -R "$tmp_dir/test" "$project_dir/test"
cd "$project_dir"
flutter pub get

View File

@@ -0,0 +1,29 @@
#!/usr/bin/env bash
set -euo pipefail
project_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
repo_dir="$(cd "$project_dir/../.." && pwd)"
command -v protoc >/dev/null 2>&1 || {
echo "protoc is not installed"
exit 1
}
command -v dart >/dev/null 2>&1 || {
echo "dart is not installed"
exit 1
}
export PATH="$PATH:$HOME/.pub-cache/bin"
if ! command -v protoc-gen-dart >/dev/null 2>&1; then
dart pub global activate protoc_plugin
fi
mkdir -p "$project_dir/lib/src/generated"
protoc \
-I "$repo_dir/client/proto" \
--dart_out=grpc:"$project_dir/lib/src/generated" \
"$repo_dir/client/proto/daemon.proto"