Skip to content

Commit

Permalink
fix onCreate hook
Browse files Browse the repository at this point in the history
  • Loading branch information
rodydavis committed Nov 1, 2024
1 parent 8bc197f commit c8f03d4
Show file tree
Hide file tree
Showing 6 changed files with 145 additions and 8 deletions.
25 changes: 24 additions & 1 deletion samples/ads/.idx/dev.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,29 @@
workspace = {
# Runs when a workspace is first created with this `dev.nix` file
onCreate = {
build-flutter = ''
cd /home/user/myapp/android
./gradlew \
--parallel \
-Pverbose=true \
-Ptarget-platform=android-x86 \
-Ptarget=/home/user/myapp/lib/main.dart \
-Pbase-application-name=android.app.Application \
-Pdart-defines=RkxVVFRFUl9XRUJfQ0FOVkFTS0lUX1VSTD1odHRwczovL3d3dy5nc3RhdGljLmNvbS9mbHV0dGVyLWNhbnZhc2tpdC85NzU1MDkwN2I3MGY0ZjNiMzI4YjZjMTYwMGRmMjFmYWMxYTE4ODlhLw== \
-Pdart-obfuscation=false \
-Ptrack-widget-creation=true \
-Ptree-shake-icons=false \
-Pfilesystem-scheme=org-dartlang-root \
assembleDebug
# TODO: Execute web build in debug mode.
# flutter run does this transparently either way
# https://github.com/flutter/flutter/issues/96283#issuecomment-1144750411
# flutter build web --profile --dart-define=Dart2jsOptimization=O0
adb -s localhost:5555 wait-for-device
'';
installDependencies = "flutter pub get";
};
};
Expand All @@ -30,7 +53,7 @@
enable = true;
previews = {
android = {
command = ["flutter" "run" "--machine" "-d" "android" "-d" "emulator-5554"];
command = ["flutter" "run" "--machine" "-d" "android" "-d" "localhost:5555"];
manager = "flutter";
};
};
Expand Down
25 changes: 24 additions & 1 deletion samples/crossword/.idx/dev.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,29 @@
workspace = {
# Runs when a workspace is first created with this `dev.nix` file
onCreate = {
build-flutter = ''
cd /home/user/myapp/android
./gradlew \
--parallel \
-Pverbose=true \
-Ptarget-platform=android-x86 \
-Ptarget=/home/user/myapp/lib/main.dart \
-Pbase-application-name=android.app.Application \
-Pdart-defines=RkxVVFRFUl9XRUJfQ0FOVkFTS0lUX1VSTD1odHRwczovL3d3dy5nc3RhdGljLmNvbS9mbHV0dGVyLWNhbnZhc2tpdC85NzU1MDkwN2I3MGY0ZjNiMzI4YjZjMTYwMGRmMjFmYWMxYTE4ODlhLw== \
-Pdart-obfuscation=false \
-Ptrack-widget-creation=true \
-Ptree-shake-icons=false \
-Pfilesystem-scheme=org-dartlang-root \
assembleDebug
# TODO: Execute web build in debug mode.
# flutter run does this transparently either way
# https://github.com/flutter/flutter/issues/96283#issuecomment-1144750411
# flutter build web --profile --dart-define=Dart2jsOptimization=O0
adb -s localhost:5555 wait-for-device
'';
installDependencies = "flutter pub get";
};
};
Expand All @@ -30,7 +53,7 @@
enable = true;
previews = {
android = {
command = ["flutter" "run" "--machine" "-d" "android" "-d" "emulator-5554"];
command = ["flutter" "run" "--machine" "-d" "android" "-d" "localhost:5555"];
manager = "flutter";
};
};
Expand Down
26 changes: 24 additions & 2 deletions samples/multiplayer/.idx/dev.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,29 @@
workspace = {
# Runs when a workspace is first created with this `dev.nix` file
onCreate = {
build-flutter = ''
cd /home/user/myapp/android
./gradlew \
--parallel \
-Pverbose=true \
-Ptarget-platform=android-x86 \
-Ptarget=/home/user/myapp/lib/main.dart \
-Pbase-application-name=android.app.Application \
-Pdart-defines=RkxVVFRFUl9XRUJfQ0FOVkFTS0lUX1VSTD1odHRwczovL3d3dy5nc3RhdGljLmNvbS9mbHV0dGVyLWNhbnZhc2tpdC85NzU1MDkwN2I3MGY0ZjNiMzI4YjZjMTYwMGRmMjFmYWMxYTE4ODlhLw== \
-Pdart-obfuscation=false \
-Ptrack-widget-creation=true \
-Ptree-shake-icons=false \
-Pfilesystem-scheme=org-dartlang-root \
assembleDebug
# TODO: Execute web build in debug mode.
# flutter run does this transparently either way
# https://github.com/flutter/flutter/issues/96283#issuecomment-1144750411
# flutter build web --profile --dart-define=Dart2jsOptimization=O0
adb -s localhost:5555 wait-for-device
'';
installDependencies = "flutter pub get";
};
};
Expand All @@ -32,10 +55,9 @@
web = {
command = ["flutter" "run" "--machine" "-d" "web-server" "--web-hostname" "0.0.0.0" "--web-port" "$PORT"];
manager = "flutter";

};
android = {
command = ["flutter" "run" "--machine" "-d" "android" "-d" "emulator-5554"];
command = ["flutter" "run" "--machine" "-d" "android" "-d" "localhost:5555"];
manager = "flutter";
};
};
Expand Down
25 changes: 24 additions & 1 deletion templates/basic/.idx/dev.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,29 @@
workspace = {
# Runs when a workspace is first created with this `dev.nix` file
onCreate = {
build-flutter = ''
cd /home/user/myapp/android
./gradlew \
--parallel \
-Pverbose=true \
-Ptarget-platform=android-x86 \
-Ptarget=/home/user/myapp/lib/main.dart \
-Pbase-application-name=android.app.Application \
-Pdart-defines=RkxVVFRFUl9XRUJfQ0FOVkFTS0lUX1VSTD1odHRwczovL3d3dy5nc3RhdGljLmNvbS9mbHV0dGVyLWNhbnZhc2tpdC85NzU1MDkwN2I3MGY0ZjNiMzI4YjZjMTYwMGRmMjFmYWMxYTE4ODlhLw== \
-Pdart-obfuscation=false \
-Ptrack-widget-creation=true \
-Ptree-shake-icons=false \
-Pfilesystem-scheme=org-dartlang-root \
assembleDebug
# TODO: Execute web build in debug mode.
# flutter run does this transparently either way
# https://github.com/flutter/flutter/issues/96283#issuecomment-1144750411
# flutter build web --profile --dart-define=Dart2jsOptimization=O0
adb -s localhost:5555 wait-for-device
'';
installDependencies = "flutter pub get";
};
};
Expand All @@ -34,7 +57,7 @@
manager = "flutter";
};
android = {
command = ["flutter" "run" "--machine" "-d" "android" "-d" "emulator-5554"];
command = ["flutter" "run" "--machine" "-d" "android" "-d" "localhost:5555"];
manager = "flutter";
};
};
Expand Down
27 changes: 25 additions & 2 deletions templates/card/.idx/dev.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,29 @@
workspace = {
# Runs when a workspace is first created with this `dev.nix` file
onCreate = {
build-flutter = ''
cd /home/user/myapp/android
./gradlew \
--parallel \
-Pverbose=true \
-Ptarget-platform=android-x86 \
-Ptarget=/home/user/myapp/lib/main.dart \
-Pbase-application-name=android.app.Application \
-Pdart-defines=RkxVVFRFUl9XRUJfQ0FOVkFTS0lUX1VSTD1odHRwczovL3d3dy5nc3RhdGljLmNvbS9mbHV0dGVyLWNhbnZhc2tpdC85NzU1MDkwN2I3MGY0ZjNiMzI4YjZjMTYwMGRmMjFmYWMxYTE4ODlhLw== \
-Pdart-obfuscation=false \
-Ptrack-widget-creation=true \
-Ptree-shake-icons=false \
-Pfilesystem-scheme=org-dartlang-root \
assembleDebug
# TODO: Execute web build in debug mode.
# flutter run does this transparently either way
# https://github.com/flutter/flutter/issues/96283#issuecomment-1144750411
# flutter build web --profile --dart-define=Dart2jsOptimization=O0
adb -s localhost:5555 wait-for-device
'';
installDependencies = "flutter pub get";
};
};
Expand All @@ -31,10 +54,10 @@
previews = {
web = {
command = ["flutter" "run" "--machine" "-d" "web-server" "--web-hostname" "0.0.0.0" "--web-port" "$PORT"];
manager = "flutter";
manager = "flutter";
};
android = {
command = ["flutter" "run" "--machine" "-d" "android" "-d" "emulator-5554"];
command = ["flutter" "run" "--machine" "-d" "android" "-d" "localhost:5555"];
manager = "flutter";
};
};
Expand Down
25 changes: 24 additions & 1 deletion templates/endless_runner/.idx/dev.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,29 @@
workspace = {
# Runs when a workspace is first created with this `dev.nix` file
onCreate = {
build-flutter = ''
cd /home/user/myapp/android
./gradlew \
--parallel \
-Pverbose=true \
-Ptarget-platform=android-x86 \
-Ptarget=/home/user/myapp/lib/main.dart \
-Pbase-application-name=android.app.Application \
-Pdart-defines=RkxVVFRFUl9XRUJfQ0FOVkFTS0lUX1VSTD1odHRwczovL3d3dy5nc3RhdGljLmNvbS9mbHV0dGVyLWNhbnZhc2tpdC85NzU1MDkwN2I3MGY0ZjNiMzI4YjZjMTYwMGRmMjFmYWMxYTE4ODlhLw== \
-Pdart-obfuscation=false \
-Ptrack-widget-creation=true \
-Ptree-shake-icons=false \
-Pfilesystem-scheme=org-dartlang-root \
assembleDebug
# TODO: Execute web build in debug mode.
# flutter run does this transparently either way
# https://github.com/flutter/flutter/issues/96283#issuecomment-1144750411
# flutter build web --profile --dart-define=Dart2jsOptimization=O0
adb -s localhost:5555 wait-for-device
'';
installDependencies = "flutter pub get";
};
};
Expand All @@ -34,7 +57,7 @@
manager = "flutter";
};
android = {
command = ["flutter" "run" "--machine" "-d" "android" "-d" "emulator-5554"];
command = ["flutter" "run" "--machine" "-d" "android" "-d" "localhost:5555"];
manager = "flutter";
};
};
Expand Down

0 comments on commit c8f03d4

Please sign in to comment.