Commit Graph

20735 Commits

Author SHA1 Message Date
Reid Baker
2383400fe0 Add Java-Gradle-AGP validation to flutter analyze (#123916)
https://github.com/flutter/flutter/issues/123917

Doc covering a broad set of issues related to android studio updating. 

https://docs.google.com/document/d/1hTXkjbUrBnXgu8NQsth1c3aEqo77rWoEj8CcsQ39wwQ/edit?pli=1#

Specifically this pr: 
- Adds new functions to find a projects AGP, Gradle and java versions,
and tests.
- Adds new functions that take versions and parse if the versions are
compatible with each other, and tests.
- Adds validator for `flutter analyze --suggestions` that evaluates the
java/gradle/agp versions and checks if they are compatible, and
integration test.
- Updates the version of gradle used by
dev/integration_tests/flutter_gallery/ to the minimum supported by java
18 so that the integration tests pass (It is unknown why the java
version is 18.9 instead of 11)
- Moves `isWithinVersionRange` to version.dart, and tests. 
- Adds FakeAndroidStudio to fakes to be used in multiple tests but does
not remove existing copies.

Metrics will be included as part of the definition of done for this bug
but not as part of this cl. It is already too big.

Known work still left in this pr: 
* Understand why analyze integration tests are failing. 


Example output if Java and gradle are not compatible: 
```
┌───────────────────────────────────────────────────────────────────┐
│ General Info                                                      │
│ [✓] App Name: espresso_example                                    │
│ [✓] Supported Platforms: android                                  │
│ [✓] Is Flutter Package: yes                                       │
│ [✓] Uses Material Design: yes                                     │
│ [✓] Is Plugin: no                                                 │
│ [✗] Java/Gradle/Android Gradle Plugin:                            │
│                                                                   │
│ Incompatible Java/Gradle versions.                                │
│                                                                   │
│ Java Version: 17.0.6, Gradle Version: 7.0.2                       │
│                                                                   │
│ See the link below for more information.                          │
│ https://docs.gradle.org/current/userguide/compatibility.html#java │
│                                                                   │
└───────────────────────────────────────────────────────────────────┘
```
Example output if Gradle and AGP are not compatible
```
┌─────────────────────────────────────────────────────────────────────────────┐
│ General Info                                                                │
│ [✓] App Name: espresso_example                                              │
│ [✓] Supported Platforms: android                                            │
│ [✓] Is Flutter Package: yes                                                 │
│ [✓] Uses Material Design: yes                                               │
│ [✓] Is Plugin: no                                                           │
│ [✗] Java/Gradle/Android Gradle Plugin: Incompatible Gradle/AGP versions.    │
│                                                                             │
│ Gradle Version: 7.0.2, AGP Version: 7.4.2                                   │
│                                                                             │
│ Update gradle to at least "7.5".                                            │
│ See the link below for more information:                                    │
│ https://developer.android.com/studio/releases/gradle-plugin#updating-gradle │
│                                                                             │
│ Incompatible Java/Gradle versions.                                          │
│                                                                             │
│ Java Version: 17.0.6, Gradle Version: 7.0.2                                 │
│                                                                             │
│ See the link below for more information:                                    │
│ https://docs.gradle.org/current/userguide/compatibility.html#java           │
│                                                                             │
└─────────────────────────────────────────────────────────────────────────────┘
```
Example output if Java/Gradle/Agp are not compatible. 
```

┌─────────────────────────────────────────────────────────────────────────────┐
│ General Info                                                                │
│ [✓] App Name: espresso_example                                              │
│ [✓] Supported Platforms: android                                            │
│ [✓] Is Flutter Package: yes                                                 │
│ [✓] Uses Material Design: yes                                               │
│ [✓] Is Plugin: no                                                           │
│ [✗] Java/Gradle/Android Gradle Plugin: Incompatible Gradle/AGP versions.    │
│                                                                             │
│ Gradle Version: 7.0.2, AGP Version: 7.4.2                                   │
│                                                                             │
│ Update gradle to at least "7.5".                                            │
│ See the link below for more information:                                    │
│ https://developer.android.com/studio/releases/gradle-plugin#updating-gradle │
│                                                                             │
│ Incompatible Java/Gradle versions.                                          │
│                                                                             │
│ Java Version: 17.0.6, Gradle Version: 7.0.2                                 │
│                                                                             │
│ See the link below for more information:                                    │
│ https://docs.gradle.org/current/userguide/compatibility.html#java           │
│                                                                             │
└─────────────────────────────────────────────────────────────────────────────┘
```

Commit messages
- Add function to gradle_utils.dart that gets the gradle version from
wrapper or system and add a test for each situation
- Add method to get agp version, add method to validate agp against
gradle version, update documentation, add tests for agp validation.
- Update dart doc for validateGradleAndAgp to describe where the info
came from and corner case behavior, create function to validate java and
gradle and hardcode return to false
- Fill out and test java gradle compatibility function in gradle_utils
- Hook up java gradle evaluateion to hasValidJavaGradleAgpVersions with
hardcoded java version
- Add java --version output parsing and tests
- Add getJavaBinary test
- Update comment in android_sdk for mac behavior with java_home -v

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [ ] All existing and new tests are passing.
2023-04-05 14:36:05 -04:00
Elias Yishak
a32f0bb7a0 Add analytics package + setTelemetry method attached (#124015)
The first of many PRs for transitioning to `package:unified_analytics`.
This PR is only focused on disabling and enabling telemetry via the
`flutter config --[no-]analytics` flag

Fixes: https://github.com/flutter/flutter/issues/121617

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#overview
[Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene
[test-exempt]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes
[Discord]: https://github.com/flutter/flutter/wiki/Chat

---------

Co-authored-by: Christopher Fujino <fujino@google.com>
Co-authored-by: Christopher Fujino <christopherfujino@gmail.com>
2023-04-05 14:08:56 -04:00
Michael Goderbauer
daaa32bc06 Add CustomDimensions.commandRunIsTest (#124135) 2023-04-05 09:30:36 -07:00
Kate Lovett
0cfcdeec89 Revert "Fix scrolling in the Drawer and NavigationDrawer triggers AppBar's scrolledUnderElevation" (#124226)
Revert "Fix scrolling in the  `Drawer` and `NavigationDrawer` triggers AppBar's scrolledUnderElevation"
2023-04-05 16:10:32 +00:00
Chris Bracken
e5fc6f65b9 [macOS] Remigrate principal class to NSApplication (#124173)
In #122336 we migrated the principal class from NSApplication to
FlutterApplication in the app Info.plist. We removed the need for
FlutterApplication in https://github.com/flutter/engine/pull/40929. This
reverses the migration for anyone who previously upgraded on the Flutter
master branch.

Issue: https://github.com/flutter/flutter/issues/30735

## Pre-launch Checklist

- [X] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [X] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [X] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [X] I signed the [CLA].
- [X] I listed at least one issue that this PR fixes in the description
above.
- [X] I updated/added relevant documentation (doc comments with `///`).
- [X] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [X] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#overview
[Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene
[test-exempt]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes
[Discord]: https://github.com/flutter/flutter/wiki/Chat
2023-04-05 09:05:37 -07:00
Danny Tuppeny
1a6a20cdc6 [flutter_tools] Include mode in app.start event, and forward app.start to DAP clients (#121239)
[flutter_tools] Include mode in app.start event, and forward app.start to DAP clients
2023-04-05 05:39:09 +00:00
hellohuanlin
d1b8527f6b [platform_view]fix iOS platform view's focus node leakage (#124066)
[platform_view]fix iOS platform view's focus node leakage
2023-04-05 03:56:51 +00:00
Ben Konyi
d83c510de9 Reland "Serve DevTools when running flutter test (#123607)" (#124058)
Originally reverted due to a misattributed hot reload benchmark
regression.

This reverts commit f5bce716e1.
2023-04-04 19:44:14 -04:00
Taha Tesser
38805a4392 Fix clipBehavior for Drawer with shape and add clipBehavior property. (#124104) 2023-04-04 16:23:32 -07:00
chunhtai
9e4b5fb7d9 Adds i18n to widget layer (#123620)
Adds i18n to widget layer
2023-04-04 22:57:35 +00:00
Rydmike
be5a84295d FIX: SegmentedButton segments background cannot be made transparent (#123293) 2023-04-04 15:38:20 -07:00
Jackson Gardner
37d4e7d60e Always use the canvaskit path from the web sdk. (#123915)
Always use the canvaskit path from the web sdk.
2023-04-04 22:36:43 +00:00
Victoria Ashworth
842873c2fc Allow --ipv6 flag for flutter attach on iOS devices (#123822)
Allow --ipv6 flag for flutter attach on iOS devices
2023-04-04 22:33:28 +00:00
Victoria Ashworth
dbc18bbdb8 Add flag to filter by device connection interface (#124034)
Add flag to filter by device connection interface
2023-04-04 22:33:26 +00:00
Christopher Fujino
b2c65acd5a [flutter_tools] Remove --no-sound-null-safety #4 (#124039)
Re-land of https://github.com/flutter/flutter/pull/123297 without any of
the commits at the end attempting to fix customer-testing.

Fixes https://github.com/flutter/flutter/issues/118810
2023-04-04 15:25:27 -07:00
Victoria Ashworth
34d2c8d030 Better support for wireless devices in IDEs (#123716)
Better support for wireless devices in IDEs
2023-04-04 20:39:38 +00:00
Greg Spencer
e3bc8efd39 Rename Sample classes (#124080)
Rename Sample classes
2023-04-04 20:34:29 +00:00
Mitchell Goodwin
c8a3dbaf06 Add adaptive constructor to Radio and RadioListTile (#123816)
Add adaptive constructor to Radio and RadioListTile
2023-04-04 20:33:02 +00:00
Victoria Ashworth
d6593dee96 Make flutter_adapter_test more resilient to pub output (#124139)
Make flutter_adapter_test more resilient to pub output
2023-04-04 19:36:39 +00:00
Elliott Brooks
840993be38 [flutter_tools] Pass app entrypoint to DWDS version 19.0.0 (#124138) 2023-04-04 12:34:07 -07:00
Michael Goderbauer
25a2dfb302 Rename RenderView.window to RenderView.view (#124060) 2023-04-04 11:22:22 -07:00
godofredoc
89caeebd10 Update localizations. (#124099) 2023-04-04 09:00:17 -07:00
Tae Hyung Kim
fb6e83a6fd Add Welsh to Material Flutter (and update some other translations) (#124094)
Reverts flutter/flutter#124088

This PR should properly incorporate the new Welsh translations into
Flutter (and maybe some other strings that seem to be updated in TC).

I think the other translation changes come from this issue:
https://github.com/flutter/flutter/issues/115181.

Fixes https://github.com/flutter/flutter/issues/120124.
2023-04-03 21:36:04 -07:00
Zachary Anderson
10587456a5 Revert "Add Welsh to Material Flutter (and update some other translations)" (#124088)
Revert "Add Welsh to Material Flutter (and update some other translations)"
2023-04-04 01:59:40 +00:00
Tae Hyung Kim
b3146897f2 Add Welsh to Material Flutter (and update some other translations) (#123575)
This PR should properly incorporate the new Welsh translations into
Flutter (and maybe some other strings that seem to be updated in TC).

I think the other translation changes come from this issue:
https://github.com/flutter/flutter/issues/115181.

Fixes #120124.
2023-04-03 17:55:37 -07:00
Jenn Magder
d4934fb6ab Add readlink -f flag to CocoaPods script to workaround Xcode 14.3 issue (#124062) 2023-04-03 16:55:00 -07:00
Flutter GitHub Bot
0046a25e39 Roll pub packages (#123899)
Roll pub packages
2023-04-03 16:56:56 +00:00
Taha Tesser
4d501ab0ff Fix some MaterialBanner properties aren't respected when presented by ScaffoldMessenger (#124024)
Fix some `MaterialBanner` properties aren't respected when presented by `ScaffoldMessenger`
2023-04-03 16:38:14 +00:00
Casey Hillers
6fe54f8811 Revert "[flutter_tools] Remove --no-sound-null-safety #3" (#123969)
Revert "[flutter_tools] Remove --no-sound-null-safety #3"
2023-04-03 00:19:22 +00:00
Hans Muller
0c365bd9a8 M3 DatePicker landscape header text style is now TextTheme.headlineSmall (#123732)
M3 DatePicker landscape header text style is now TextTheme.headlineSmall
2023-04-01 01:14:38 +00:00
Kate Lovett
dd7d4b9521 Fix docs and error messages for scroll directions + sample code (#123819)
Fix docs and error messages for scroll directions + sample code
2023-03-31 23:46:59 +00:00
Michael Goderbauer
293114ac5a Hyperlink dart docs around BinaryMessenger deprecations (#123798)
Hyperlink dart docs around BinaryMessenger deprecations
2023-03-31 23:04:22 +00:00
Justin McCandless
d5e25f220e TextField in a ListView becomes unresponsive (#123734)
TextField in a ListView becomes unresponsive
2023-03-31 21:37:39 +00:00
Qun Cheng
db5434e566 Fix menu width issue for DropdownMenu (#123823) 2023-03-31 13:50:29 -07:00
Camille Simon
52cacd9d1d [iOS] Add spell check suggestions toolbar on tap (#119189)
[iOS] Add spell check suggestions toolbar on tap
2023-03-31 19:47:22 +00:00
Henry Riehl
9a344c2604 Add option to keep ``MenuAnchor` open after `MenuItem`` tap (#123723)
Add option to keep ```MenuAnchor``` open after ```MenuItem``` tap
2023-03-31 17:22:59 +00:00
Justin McCandless
63e30480cd Add secondary tap capabilities to TableRowInkWell (#123036)
Added new parameters onSecondaryTap and onSecondaryTapDown
2023-03-31 09:42:16 -07:00
Danny Tuppeny
a5fc8b2bd4 Roll pub packages (#123854)
Roll pub packages
2023-03-31 16:41:18 +00:00
Bernardo Ferrari
f5415a42d3 SemanticsFlag/SemanticsAction enum migration (part 2) (#123817)
`SemanticsFlag`/`SemanticsAction` enum migration (part 2)
2023-03-31 16:19:22 +00:00
Chinmay Garde
f6c2b10e1a [Impeller] Plumb through the impeller-force-gl flag. (#123828)
[Impeller] Plumb through the impeller-force-gl flag.
2023-03-31 15:13:10 +00:00
Dan Field
ad7e2f7b78 Disable Fuchsia SDK usage unless opted in (#123084)
Disable Fuchsia SDK usage unless opted in
2023-03-31 02:31:07 +00:00
Greg Price
6a92b93fea Fix state leak in rendering/editable_test; remove no-shuffle (#123806)
Fix state leak in rendering/editable_test (framework shuffle-all 2/n)
2023-03-31 00:09:01 +00:00
Taha Tesser
be2388595e Fix TableRow with no children throws unnamed assertion (#123770)
Fix `TableRow` with no children throws unnamed assertion
2023-03-30 22:26:51 +00:00
Zachary Anderson
f5bce716e1 Revert "Serve DevTools when running flutter test (#123607)" (#123810)
This reverts commit c3de901538.
2023-03-30 14:56:13 -07:00
Chinmay Garde
7d31fe32f8 [Impeller] Plumb through the enable-vulkan-validation flag. (#123808)
[Impeller] Plumb through the enable-vulkan-validation flag.
2023-03-30 21:34:19 +00:00
Jenn Magder
64800c79e9 Setup channels during IntegrationTest registration on iOS (#123729)
Setup channels during IntegrationTest registration on iOS
2023-03-30 20:26:43 +00:00
Qun Cheng
90776462e9 Fix bottom app bar height and end-contained fab location (#123746)
Fix bottom app bar height and end-contained fab location
2023-03-30 19:50:00 +00:00
Greg Price
a28aae918e Remove no-shuffle from framework tests, part 1: easy cases (#123751)
Remove no-shuffle from framework tests, part 1: easy cases
2023-03-30 18:28:51 +00:00
Henry Riehl
5f71179480 Wire up MenuAnchor clipBehaviour property (#123632)
Wire up MenuAnchor clipBehaviour property
2023-03-30 17:11:26 +00:00
Michael Goderbauer
8c5d223bab Revert "Workaround for exhaustivness bug in dart2js (#123242)" (#123727)
Revert "Workaround for exhaustivness bug in dart2js (#123242)"
2023-03-30 16:19:14 +00:00