diff --git a/README.md b/README.md index 8e6d2880..9c320270 100644 --- a/README.md +++ b/README.md @@ -10,21 +10,6 @@ Visit [flutter.dev/games](https://flutter.dev/games) for more information. If you're new to Flutter, you first need to install the [Flutter SDK](https://flutter.dev/). - - - - - Try in IDX - - - ## Organization The projects in this repository are divided into two broad categories: diff --git a/idx-template.json b/idx-template.json deleted file mode 100644 index 0d7075b1..00000000 --- a/idx-template.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "name": "Flutter Casual Games Toolkit", - "description": "Flutter Casual Games Toolkit", - "categories": ["Mobile"], - "icon": "https://www.gstatic.com/images/branding/productlogos/flutter/v6/192px.svg", - "publisher": "Google LLC", - "host": { - "virtualization": "true" - }, - "params": [ - { - "id": "template", - "name": "Template", - "type": "enum", - "default": "templates/basic", - "options": { - "templates/basic": "Basic", - "templates/card": "Card", - "templates/endless_runner": "Endless Runner", - "samples/ads": "Ads (Sample)", - "samples/crossword": "Crossword (Sample)" - } - } - ] -} diff --git a/idx-template.nix b/idx-template.nix deleted file mode 100644 index 5cf92f24..00000000 --- a/idx-template.nix +++ /dev/null @@ -1,22 +0,0 @@ -{pkgs, template ? "templates/basic", ...}: { - packages = [ - pkgs.curl - pkgs.gnutar - pkgs.xz - pkgs.git - pkgs.busybox - ]; - bootstrap = '' - mkdir "$out" - ${ - if template == "samples/ads" then "cp -r ${./samples/ads}/. \"$out\"" - else if template == "samples/crossword" then "cp -r ${./samples/crossword}/. \"$out\"" - else if template == "samples/multiplayer" then "cp -r ${./samples/multiplayer}/. \"$out\"" - else if template == "templates/basic" then "cp -r ${./templates/basic}/. \"$out\"" - else if template == "templates/card" then "cp -r ${./templates/card}/. \"$out\"" - else if template == "templates/endless_runner" then "cp -r ${./templates/endless_runner}/. \"$out\"" - else "cp -r ${./templates/basic}/. \"$out\"" - } - chmod -R u+w "$out" - ''; -} diff --git a/samples/ads/.idx/dev.nix b/samples/ads/.idx/dev.nix deleted file mode 100644 index f92fab1c..00000000 --- a/samples/ads/.idx/dev.nix +++ /dev/null @@ -1,62 +0,0 @@ -# To learn more about how to use Nix to configure your environment -# see: https://developers.google.com/idx/guides/customize-idx-env -{ pkgs, ... }: { - # Which nixpkgs channel to use. - channel = "stable-24.05"; # or "unstable" - # Use https://search.nixos.org/packages to find packages - packages = [ - pkgs.nodePackages.firebase-tools - pkgs.jdk17 - pkgs.unzip - ]; - # Sets environment variables in the workspace - env = { - PATH = ["/home/user/.pub-cache/bin" "/home/user/flutter/bin" "./.flutter-sdk/flutter/bin"]; - }; - idx = { - # Search for the extensions you want on https://open-vsx.org/ and use "publisher.id" - extensions = [ - "Dart-Code.flutter" - "Dart-Code.dart-code" - ]; - 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"; - }; - }; - # Enable previews and customize configuration - previews = { - enable = true; - previews = { - android = { - command = ["flutter" "run" "--machine" "-d" "android" "-d" "localhost:5555"]; - manager = "flutter"; - }; - }; - }; - }; -} diff --git a/samples/crossword/.idx/dev.nix b/samples/crossword/.idx/dev.nix deleted file mode 100644 index f92fab1c..00000000 --- a/samples/crossword/.idx/dev.nix +++ /dev/null @@ -1,62 +0,0 @@ -# To learn more about how to use Nix to configure your environment -# see: https://developers.google.com/idx/guides/customize-idx-env -{ pkgs, ... }: { - # Which nixpkgs channel to use. - channel = "stable-24.05"; # or "unstable" - # Use https://search.nixos.org/packages to find packages - packages = [ - pkgs.nodePackages.firebase-tools - pkgs.jdk17 - pkgs.unzip - ]; - # Sets environment variables in the workspace - env = { - PATH = ["/home/user/.pub-cache/bin" "/home/user/flutter/bin" "./.flutter-sdk/flutter/bin"]; - }; - idx = { - # Search for the extensions you want on https://open-vsx.org/ and use "publisher.id" - extensions = [ - "Dart-Code.flutter" - "Dart-Code.dart-code" - ]; - 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"; - }; - }; - # Enable previews and customize configuration - previews = { - enable = true; - previews = { - android = { - command = ["flutter" "run" "--machine" "-d" "android" "-d" "localhost:5555"]; - manager = "flutter"; - }; - }; - }; - }; -} diff --git a/samples/multiplayer/.idx/dev.nix b/samples/multiplayer/.idx/dev.nix deleted file mode 100644 index 1b277135..00000000 --- a/samples/multiplayer/.idx/dev.nix +++ /dev/null @@ -1,66 +0,0 @@ -# To learn more about how to use Nix to configure your environment -# see: https://developers.google.com/idx/guides/customize-idx-env -{ pkgs, ... }: { - # Which nixpkgs channel to use. - channel = "stable-24.05"; # or "unstable" - # Use https://search.nixos.org/packages to find packages - packages = [ - pkgs.nodePackages.firebase-tools - pkgs.jdk17 - pkgs.unzip - ]; - # Sets environment variables in the workspace - env = { - PATH = ["/home/user/.pub-cache/bin" "/home/user/flutter/bin" "./.flutter-sdk/flutter/bin"]; - }; - idx = { - # Search for the extensions you want on https://open-vsx.org/ and use "publisher.id" - extensions = [ - "Dart-Code.flutter" - "Dart-Code.dart-code" - ]; - 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"; - }; - }; - # Enable previews and customize configuration - previews = { - enable = true; - previews = { - 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" "localhost:5555"]; - manager = "flutter"; - }; - }; - }; - }; -} diff --git a/templates/basic/.idx/dev.nix b/templates/basic/.idx/dev.nix deleted file mode 100644 index 1b277135..00000000 --- a/templates/basic/.idx/dev.nix +++ /dev/null @@ -1,66 +0,0 @@ -# To learn more about how to use Nix to configure your environment -# see: https://developers.google.com/idx/guides/customize-idx-env -{ pkgs, ... }: { - # Which nixpkgs channel to use. - channel = "stable-24.05"; # or "unstable" - # Use https://search.nixos.org/packages to find packages - packages = [ - pkgs.nodePackages.firebase-tools - pkgs.jdk17 - pkgs.unzip - ]; - # Sets environment variables in the workspace - env = { - PATH = ["/home/user/.pub-cache/bin" "/home/user/flutter/bin" "./.flutter-sdk/flutter/bin"]; - }; - idx = { - # Search for the extensions you want on https://open-vsx.org/ and use "publisher.id" - extensions = [ - "Dart-Code.flutter" - "Dart-Code.dart-code" - ]; - 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"; - }; - }; - # Enable previews and customize configuration - previews = { - enable = true; - previews = { - 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" "localhost:5555"]; - manager = "flutter"; - }; - }; - }; - }; -} diff --git a/templates/card/.idx/dev.nix b/templates/card/.idx/dev.nix deleted file mode 100644 index 1b277135..00000000 --- a/templates/card/.idx/dev.nix +++ /dev/null @@ -1,66 +0,0 @@ -# To learn more about how to use Nix to configure your environment -# see: https://developers.google.com/idx/guides/customize-idx-env -{ pkgs, ... }: { - # Which nixpkgs channel to use. - channel = "stable-24.05"; # or "unstable" - # Use https://search.nixos.org/packages to find packages - packages = [ - pkgs.nodePackages.firebase-tools - pkgs.jdk17 - pkgs.unzip - ]; - # Sets environment variables in the workspace - env = { - PATH = ["/home/user/.pub-cache/bin" "/home/user/flutter/bin" "./.flutter-sdk/flutter/bin"]; - }; - idx = { - # Search for the extensions you want on https://open-vsx.org/ and use "publisher.id" - extensions = [ - "Dart-Code.flutter" - "Dart-Code.dart-code" - ]; - 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"; - }; - }; - # Enable previews and customize configuration - previews = { - enable = true; - previews = { - 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" "localhost:5555"]; - manager = "flutter"; - }; - }; - }; - }; -} diff --git a/templates/endless_runner/.idx/dev.nix b/templates/endless_runner/.idx/dev.nix deleted file mode 100644 index 1b277135..00000000 --- a/templates/endless_runner/.idx/dev.nix +++ /dev/null @@ -1,66 +0,0 @@ -# To learn more about how to use Nix to configure your environment -# see: https://developers.google.com/idx/guides/customize-idx-env -{ pkgs, ... }: { - # Which nixpkgs channel to use. - channel = "stable-24.05"; # or "unstable" - # Use https://search.nixos.org/packages to find packages - packages = [ - pkgs.nodePackages.firebase-tools - pkgs.jdk17 - pkgs.unzip - ]; - # Sets environment variables in the workspace - env = { - PATH = ["/home/user/.pub-cache/bin" "/home/user/flutter/bin" "./.flutter-sdk/flutter/bin"]; - }; - idx = { - # Search for the extensions you want on https://open-vsx.org/ and use "publisher.id" - extensions = [ - "Dart-Code.flutter" - "Dart-Code.dart-code" - ]; - 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"; - }; - }; - # Enable previews and customize configuration - previews = { - enable = true; - previews = { - 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" "localhost:5555"]; - manager = "flutter"; - }; - }; - }; - }; -}