1. 21 Jul, 2023 1 commit
  2. 13 Jul, 2023 1 commit
    • Matan Lurey's avatar
      Always escape when writing pubspec.yaml's 'description' field. (#130096) · 03749051
      Matan Lurey authored
      Closes https://github.com/flutter/flutter/issues/80013.
      
      **Before**:
      
      ```
      $ flutter create test1 --description "a: b"
      Creating project test1...
      Error detected in pubspec.yaml:
      Error on line 2, column 15: Mapping values are not allowed here. Did you miss a colon earlier?
        ╷
      2 │ description: a: b
        │               ^
        ╵
      Please correct the pubspec.yaml file at /Users/matan/Developer/scratch/test1/pubspec.yaml
      ```
      
      **After**:
      
      ```
      $ flutter create test1 --description "a: b"
      Creating project test1...
      Resolving dependencies in test1... 
      Got dependencies in test1.
      Wrote 129 files.
      
      All done!
      You can find general documentation for Flutter at: https://docs.flutter.dev/
      Detailed API documentation is available at: https://api.flutter.dev/
      If you prefer video documentation, consider: https://www.youtube.com/c/flutterdev
      
      In order to run your application, type:
      
        $ cd test1
        $ flutter run
      
      Your application code is in test1/lib/main.dart.
      ```
      
      ---
      
      It's worth noting that this _always_ escapes a non-empty project description, which means that descriptions that were not previously wrapped in `"`s' will be. I'm not sure how worth it is to do a _conditional_ escape (i.e. only escape if not escaping would cause a problem), but willing to change.
      
      Side-note: I had no idea where to list this test in the (very large) `create_test.dart`, so I did my best :)
      03749051
  3. 23 May, 2023 2 commits
    • Ian Hickson's avatar
      Give channel descriptions in `flutter channel`, use branch instead of upstream... · 9c7a9e77
      Ian Hickson authored
      Give channel descriptions in `flutter channel`, use branch instead of upstream for channel name (#126936)
      
      ## How we determine the channel name
      
      Historically, we used the current branch's upstream to figure out the current channel name. I have no idea why. I traced it back to https://github.com/flutter/flutter/pull/446/files where @abarth implement this and I reviewed that PR and left no comment on it at the time.
      
      I think this is confusing. You can be on a branch and it tells you that your channel is different. That seems weird.
      
      This PR changes the logic to uses the current branch as the channel name.
      
      ## How we display channels
      
      The main reason this PR exists is to add channel descriptions to the `flutter channel` list:
      
      ```
      ianh@burmese:~/dev/flutter/packages/flutter_tools$ flutter channel
      Flutter channels:
        master (tip of tree, for contributors)
        main (tip of tree, follows master channel)
        beta (updated monthly, recommended for experienced users)
        stable (updated quarterly, for new users and for production app releases)
      * foo_bar
      
      Currently not on an official channel.
      ianh@burmese:~/dev/flutter/packages/flutter_tools$
      ```
      
      ## Other changes
      
      I made a few other changes while I was at it:
      
      * If you're not on an official channel, we used to imply `--show-all`, but now we don't, we just show the official channels plus yours. This avoids flooding the screen in the case the user is on a weird channel and just wants to know what channel they're on.
      * I made the tool more consistent about how it handles unofficial branches. Now it's always `[user branch]`.
      * I slightly adjusted how unknown versions are rendered so it's clearer the version is unknown rather than just having the word "Unknown" floating in the output without context.
      * Simplified some of the code.
      * Made some of the tests more strict (checking all output rather than just some aspects of it).
      * Changed the MockFlutterVersion to implement the FlutterVersion API more strictly.
      * I made sure we escape the output to `.metadata` to avoid potential injection bugs (previously we just inlined the version and channel name verbatim with no escaping, which is super sketchy).
      * Tweaked the help text for the `downgrade` command to be clearer.
      * Removed some misleading text in some error messages.
      * Made the `.metadata` generator consistent with the template file.
      * Removed some obsolete code to do with the `dev` branch.
      
      ## Reviewer notes
      
      I'm worried that there are implications to some of these changes that I am not aware of, so please don't assume I know what I'm doing when reviewing this code. :-)
      9c7a9e77
    • Camille Simon's avatar
      [Android] Adds `namespace` to module build file templates (#126963) · 31a665c3
      Camille Simon authored
      Adds `namespace` to module `build.gradle` file templates.
      
      Fixes https://github.com/flutter/flutter/issues/126403.
      31a665c3
  4. 12 May, 2023 1 commit
  5. 02 May, 2023 1 commit
    • Jenn Magder's avatar
      Migrate Xcode projects last version checks to Xcode 14.3 (#125827) · 1861ac47
      Jenn Magder authored
      1. Add iOS and macOS migration to mark "last upgraded" Xcode version to 14.3 to prevent `Update to recommended settings` warning.
      2. Update iOS and macOS templates to same.
      3. Update iOS template to set `BuildIndependentTargetsInParallel` to YES as suggested.  I didn't add a migration for this since it seems like a minor optimization and I don't think it's worth a potentially botched/corrupted migration.
      4. Run all example/integration test project to see migrator work.
      5. Add some missing test projects to the build shard since I noticed they were missing and I had to build those manually outside `SHARD=build_tests`.
      
      Fixes https://github.com/flutter/flutter/issues/125817
      See https://github.com/flutter/flutter/pull/90304 for Xcode 13 example.
      1861ac47
  6. 29 Apr, 2023 1 commit
  7. 21 Mar, 2023 2 commits
  8. 06 Mar, 2023 1 commit
  9. 23 Feb, 2023 1 commit
  10. 15 Feb, 2023 2 commits
    • stuartmorgan's avatar
      Add Linux unit tests to plugin template (#120814) · e65dfba8
      stuartmorgan authored
      * Add Linux unit tests to plugin template
      
      Adds an example native unit test to the plugin template for Linux,
      matching the structure we use for our 1P plugin unit tests. Once these
      have been added for all platforms+languages, they will be documented on
      a new plugin development page to explain their use.
      
      While ideally we would adjust the engine APIs first to allow for testing
      the method call handler directly, it's unclear when we will have time
      for that work, and for a complex plugin most of the testing wouldn't be
      at that layer anyway, so having the structure in place with the
      limitations documented is still a significant improvement over having
      nothing in the template.
      
      Part of https://github.com/flutter/flutter/issues/82458
      
      * Add creation test
      
      * Add integration tests
      
      * Missing newlines
      
      * test owner
      
      * Typo
      e65dfba8
    • stuartmorgan's avatar
      Add Android unit tests to plugin template (#120720) · ef49f566
      stuartmorgan authored
      * Add Java tests
      
      * Add Kotlin
      
      * Add integration testing
      
      * Add cerate tests
      ef49f566
  11. 24 Jan, 2023 1 commit
    • stuartmorgan's avatar
      Add Windows unit tests to plugin template (#118638) · e3c51a2f
      stuartmorgan authored
      * Add Windows unit tests to plugin template
      
      Adds an example native unit test to the plugin template for Windows,
      matching the format we use for our 1P plugin example app unit tests.
      Once these have been added for all platforms+languages, they will be
      documented on a new plugin development page to explain their use.
      
      Since we don't appear to be running our current plugin e2e tests for
      Windows, this adds a new configuration to run them. I haven't
      `led`-tested this, so it may not work, but this will give a starting
      point for getting them running.
      
      Part of https://github.com/flutter/flutter/issues/82458
      
      * Minor fix
      
      * Add test owner
      
      * Fix typo
      
      * Fix test feature flag
      e3c51a2f
  12. 21 Dec, 2022 1 commit
  13. 15 Dec, 2022 1 commit
    • stuartmorgan's avatar
      Add an integration test to plugin template example (#117062) · f1d157bc
      stuartmorgan authored
      * Add an integration test to plugin template example
      
      Dart unit tests don't exercise host-side plugin code at all, so the
      example tests in the plugin template currently have very little
      meaningful coverage. This adds an integration test to the example app
      when creating a plugin, so that there's an example of how to actually
      test that a complete round-trip plugin call works.
      
      This is done as a separate template that's currently only used by the
      plugin template because I don't know what a good example for a
      non-plugin case would be that isn't largely just a duplicate of the
      widget tests. However, the integration test pre-includes conditionals
      around the parts that are plugin-specific so that it can more easily be
      expanded to other use cases later (e.g., in
      https://github.com/flutter/flutter/issues/68818).
      
      Part of https://github.com/flutter/flutter/issues/82458
      
      * Add integration test to expected dependencies of a plugin app
      
      * Test fixes
      
      * Make an explicit test case
      f1d157bc
  14. 02 Dec, 2022 1 commit
    • Jackson Gardner's avatar
      Platform binaries reland (#115502) · db1c3e20
      Jackson Gardner authored
      You can now specify a --local-web-sdk flag to point to a wasm_release folder. This will make it so that only artifacts that pertain to the web sdk are overridden to point to the wasm_release folder. Other artifacts (such as impellerc) will pull from the cache, or from the --local-engine path if that is specified.
      
      This also uses precompiled platform kernel files for both ddc and dart2js
      db1c3e20
  15. 01 Dec, 2022 1 commit
    • Nehal Patel's avatar
      Removes retries from "dart pub get" and un-buffers its stdout/stderr output (#115801) · 3b15d6a5
      Nehal Patel authored
      * Removes retries from "pub get" and proxies its stdout output
      
      * Fix issue where ErrorHandlingProcessManager does not forward "mode" parameter to backing ProcessManager's "start" method
      
      * Make "pub get" use ProcessStartMode.inheritStdio instead of forwarding bytes to stdout and stderr
      
      * Fix tests
      
      * Remove unused env var
      
      * Add back 'Running "flutter pub get"...' status log
      
      * Fix indent
      
      * Add Pub.test() constructor which lets tests mock stdio
      3b15d6a5
  16. 10 Nov, 2022 1 commit
  17. 03 Nov, 2022 1 commit
  18. 24 Oct, 2022 1 commit
  19. 18 Oct, 2022 1 commit
  20. 19 Sep, 2022 1 commit
  21. 10 Sep, 2022 1 commit
  22. 09 Sep, 2022 1 commit
  23. 08 Sep, 2022 1 commit
  24. 06 Sep, 2022 1 commit
  25. 29 Aug, 2022 2 commits
  26. 25 Jul, 2022 1 commit
  27. 12 Jul, 2022 1 commit
  28. 29 Jun, 2022 1 commit
  29. 24 Jun, 2022 1 commit
  30. 13 May, 2022 1 commit
  31. 02 May, 2022 1 commit
  32. 27 Apr, 2022 1 commit
  33. 26 Apr, 2022 1 commit
  34. 14 Apr, 2022 1 commit
  35. 13 Apr, 2022 1 commit
    • Callum Moffat's avatar
      Support trackpad gestures in framework (#89944) · 30a50180
      Callum Moffat authored
      * Implement trackpad gestures in framework
      
      * Touch and Pan/Zoom pointers have separate IDs now
      
      * Handle trackpad pointer device type
      
      * Respect supportedDevices for pan/zoom events
      
      * Update after rebase
      
      * Fix check failures
      
      * Avoid error with very short drags
      
      * Address feedback
      
      * Refactor drag event handler
      
      * Address more feedback
      
      * Add some missing punctuation
      30a50180
  36. 12 Apr, 2022 1 commit