Commit Graph

1874 Commits

Author SHA1 Message Date
Daco Harkes
48f87a5fe7
[native assets] Roll dependencies (#168139)
Roll packages to the ones published today.

Note that `native_assets_cli` was split up into `hooks` and
`code_assets`, and `native_assets_builder` was renamed to
`hooks_runner`.
2025-05-02 08:19:21 +00:00
Victor Sanni
96d1b99211
Condense nav bar large title in landscape mode (#166956)
## Rotation demo



https://github.com/user-attachments/assets/b59d6875-dff7-4b40-9525-565dfd8a2554



### Portrait mode .automatic



https://github.com/user-attachments/assets/88f4f3a2-0f13-4c92-b601-20c20e13f7dc



### Landscape mode .automatic



https://github.com/user-attachments/assets/dd5e2373-82e3-41fc-8e83-4002ce5e848e



### Portrait mode .always



https://github.com/user-attachments/assets/623d131a-f71b-430d-b84c-0b4519919f56



### Landscape mode .always



https://github.com/user-attachments/assets/5980e8fe-a981-482d-9f77-97f9ab7495c7



Fixes [CupertinoSliverNavigationBar doesn't become compact in landscape
mode](https://github.com/flutter/flutter/issues/39254)

<details>
<summary>Sample code</summary>

```dart

import 'package:flutter/cupertino.dart';

void main() => runApp(const NavBarBlueApp());

class NavBarBlueApp extends StatelessWidget {
  const NavBarBlueApp({super.key});

  @override
  Widget build(BuildContext context) {
    return CupertinoApp(
      theme: CupertinoThemeData(),
      home: MainPage(),
    );
  }
}

class MainPage extends StatelessWidget {
  const MainPage({super.key});

  @override
  Widget build(BuildContext context) {
    return CupertinoPageScaffold(
      child: SafeArea(
        child: CustomScrollView(
          slivers: [
            CupertinoSliverNavigationBar.search(
              stretch: true,
              searchField: CupertinoSearchTextField(
                  suffixMode: OverlayVisibilityMode.always,
                  suffixIcon: Icon(
                    CupertinoIcons.mic_solid,
                  )),
              largeTitle: Text('Lists'),
              bottomMode: NavigationBarBottomMode.always,
            ),
            SliverList(
              delegate: SliverChildBuilderDelegate(
                (BuildContext context, int index) {
                  return CupertinoListTile(
                    title: Text('Entry $index'),
                  );
                },
                childCount: 20,
              ),
            ),
          ],
        ),
      ),
    );
  }
}


```

</details>
2025-05-01 04:42:56 +00:00
flutter-pub-roller-bot
651ff0a8f2
Roll pub packages (#168119)
This PR was generated by `flutter update-packages --force-upgrade`.
2025-05-01 04:42:56 +00:00
Chris Bracken
4c5d0de983
macOS: Update minimum macOS version to 10.15 (#168101)
This updates the Flutter minimum macOS version from 10.14 to 10.15 adds
a migrator for existing apps, and updates our own examples, tests, and
benchmark apps to 10.15. A follow-up patch will drop macOS 10.15
`@available` checks in the embedder.

This is required in order to use Swift in the embedder and not need to
bundle the Swift runtime libs in every app that uses Flutter. Swift
stable ABI was introduced in macOS 10.14.4.

As of March 2025, usage of macOS 10.14 is approximately 1.2~1.8%
depending on source of statistics, see example public usage data here:
https://gs.statcounter.com/macos-version-market-share/desktop/worldwide

This patch makes the following changes:
1. Updates mac_deployment_target from 12.0 to 13.0.
2. Changes templates to `MACOSX_DEPLOYMENT_TARGET`, `MinimumOSVersion`,
and Podfile `platform :osx` to 10.15.
3. Adds migrator for Podfile part to migrate `platform :osx, '10.14'` ->
`platform :osx, '10.15'`
4. Compiles with `-mmacosx-version-min=10.15`
5. Runs the migrator on all example apps and integration tests.
6. Updates examples, tests to macOS 10.15 deployment target

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

## 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] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [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/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#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/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
2025-05-01 04:02:25 +00:00
Daco Harkes
04616f8dde
[native assets] Roll dependencies (#167984)
Roll forward dependencies to the ones published today.
2025-04-29 13:29:16 +00:00
Gray Mackall
ce51065f81
[HCPP] Add filltype support for clipPath mutator (#167571)
Fixes https://github.com/flutter/flutter/issues/164808.

Also overhauls the test app so that we can apply clippers independently
of each other.

Looks like (with a weirdly small box)

<img
src="https://github.com/user-attachments/assets/b290ea2e-79b8-46cd-93c2-5fe6024ba5d2"
width="200" />

## 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] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [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/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#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/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md

---------

Co-authored-by: Gray Mackall <mackall@google.com>
2025-04-24 20:16:04 +00:00
Chris Bracken
09d4dabd6d
iOS: Update minimum iOS version to 13.0 (#167737)
This updates the Flutter minimum iOS version from 12.0 to 13.0, adds a
migrator for existing apps, and updates our own examples, tests, and
benchmark apps to 13.0. A follow-up patch will drop iOS 13 `@available`
checks in the embedder.

This is required in order to use Swift in the embedder and not need to
bundle the Swift runtime libs in every app that uses Flutter. Swift
stable ABI

As of March 2025, usage of iOS is well below 1%, see example public
usage data here:
https://telemetrydeck.com/survey/apple/iOS/majorSystemVersions/

This patch makes the following changes:
1. Updates ios_deployment_target from 12.0 to 13.0.
2. Changes templates to `IPHONEOS_DEPLOYMENT_TARGET`,
`MinimumOSVersion`, and Podfile `platform :ios` to 12.0.
3. Adds migrator for Podfile part to migrate `platform :ios, '11.0'` ->
`platform :ios, '12.0'`
4. Compiles with `-miphoneos-version-min=12.0`
5. Runs the migrator on all example apps and integration tests.
6. Updates examples, tests to iOS 13 deployment target

It also updates `verify_exported.dart`:
* iOS 13 introduces stricter separation of const and non-const global
symbols. Previously, these were declared in the Mach-O `__DATA` section
which may be mapped read-write, but now they're in a dedicated
`__DATA_CONST` section which is mapped read-only. This adds
`(__DATA_CONST,__const)` to the allowlist with the same enforcement on
exported symbol naming as before.

See also (ios_deployment_target):
* https://github.com/flutter/buildroot/pull/808
* https://github.com/flutter/buildroot/pull/574

See also (template, migrator):
* https://github.com/flutter/flutter/pull/62902
* https://github.com/flutter/flutter/pull/85174
* https://github.com/flutter/flutter/pull/101963
* https://github.com/flutter/flutter/pull/140478

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

## 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] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [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/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#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/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
2025-04-24 20:15:13 +00:00
Daco Harkes
992b6cb5b1
[native assets] Roll dependencies (#167665)
Roll forward deps to the ones published today.
2025-04-24 15:16:13 +00:00
flutter-pub-roller-bot
e0b5546ebd
Roll pub packages (#167680)
This PR was generated by `flutter update-packages --force-upgrade`.
2025-04-23 21:18:16 +00:00
Loïc Sharma
08a59c2802
[iOS] Hide keyboard on hot restart (#167013)
This hides the keyboard and text input context menu if you hot restart
your iOS app.

Before | After
-- | --
<video
src="https://github.com/user-attachments/assets/7ca5dbfe-a809-478c-9b36-4c168527b176"
/> | <video
src="https://github.com/user-attachments/assets/d1a48c16-f171-4d22-baa4-5c40488d055b"
/>

Part of https://github.com/flutter/flutter/issues/10713

## 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] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [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/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#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/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
2025-04-22 23:33:02 +00:00
Polina Cherkasova
eea3fdf2a8
Increase pinned version of leak tracker to enable access to experimental tracking on web. (#167502) 2025-04-21 23:48:15 +00:00
Reid Baker
f20bc39cc0
Add kotlin compatability to build file validation (#167143)
Fixes https://github.com/flutter/flutter/issues/161443 

* adds a new gradle task like `javaVersion` named `kgpVersion` that
prints the version of kgp.
* adds gradle_utils.dart method for getting kgp version
* * kgp method is moved to utilities and we attempt to use a plugin
method before reflection.
* adds methods or  evaluating KGP + gradle and KGP + AGP compatibility. 
* * It turns out that we have been using incompatible versions that
happen to work with the subset of kotlin we are using.
* Uses new kgp methods in flutter analyze --suggestions as part of the
existing agp/java/gradle compatibility matrix.
* adds new tests for all new functionality
* Adds comments to sections of the code I found could use them. 
* Modifies flutter gallery to use a compatible version of kotlin and
update its lockfiles.


## 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] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.
2025-04-18 16:32:08 +00:00
Daco Harkes
de299444bc
[native assets] Roll dependencies (#167287)
Roll for https://github.com/dart-lang/native/issues/2187.
2025-04-16 19:10:40 +00:00
Ben Konyi
3595e7dad0
[ Widget Preview ] Add support for theme and brightness properties on Preview (#167001)
The `theme` parameter of `Preview(...)` allows for developers to provide
a callback that returns a `PreviewThemeData` instance which can contain
theming data for Material and Cupertino widgets in both light and dark
modes. The provided theme data will be injected into the widget tree and
applied to the previewed widget.

The `brightness` parameter allows for developers to specify an initial
brightness setting (e.g., light vs dark mode) for the previewed widget.
If not provided, the current system default is used.

A new button has also been added to each widget preview card that allows
for toggling between light and dark mode for individual previews.

**Demo:**


https://github.com/user-attachments/assets/f0a4a3bc-25d2-49b0-a5f6-9149eccfc1d4

Fixes https://github.com/flutter/flutter/issues/166436
Fixes https://github.com/flutter/flutter/issues/166275
Fixes https://github.com/flutter/flutter/issues/166279
Fixes https://github.com/flutter/flutter/issues/166437
2025-04-15 17:51:40 +00:00
Loïc Sharma
37e79eb90c
[iOS/macOS] Add Xcode error if dev dependencies are incorrect (#165916)
Recently, the Flutter tool was updated to remove dev dependencies for
release builds and add dev dependencies for debug/profile builds.

However when building from Xcode directly, dev dependencies are not
enabled/disabled. As a result, it was possible for debug builds to not
have dev dependencies (or vice versa). Example:

1. `flutter build ios --release` - Release build using Flutter tool.
Disables dev dependencies
2. `open ios/Runner.xcworkspace` - Open the iOS project in Xcode
3. In Xcode, **Product** > **Build** - Do a debug build

Previously, step 3 would result in debug artifacts that are missing dev
dependencies. This PR now makes this an error:


![image](https://github.com/user-attachments/assets/621c4a8f-1c19-44b9-8866-93bef6b4a384)

Part of https://github.com/flutter/flutter/issues/163874

## Implementation

The Flutter tool now writes a `FLUTTER_DEV_DEPENDENCIES_ENABLED` in the
generated config file. This tracks whether the currently generated
project has dev dependencies.

In the Xcode build:

1. The Xcode backend script passes the
`FLUTTER_DEV_DEPENDENCIES_ENABLED` config to `flutter assemble` using
the `DevDependenciesEnabled` define
6. The new `CheckDevDependencies` target verifies dev dependencies:
1. It checks if the dev dependencies status is correct for the current
build mode
2. It checks whether the app has dev dependencies by reading the
`.flutter-plugins-dependencies` file. If the app has no dev
dependencies, the error is suppressed.

## 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] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [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/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#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/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
2025-04-11 19:34:38 +00:00
Daco Harkes
dfa1ee63da
[native assets] Roll dependencies (#166969)
Roll forward deps to the ones published today.

Note: `package:native_assets_cli` has a lower-bound on a Dart SDK dev
version to signal for which version of Dart and Flutter it is compatible
with. This means all these packages now have pre-release versions. Since
native assets is in experimental mode and not available on the
stable/beta branches, this is as expected.

Test exempt: Covered by existing tests, only rolling forward deps.
2025-04-11 10:06:17 +00:00
Daco Harkes
0d64c7292c
[native assets] Support user-defines in pubspec (#166940)
This PR is the dual of
https://dart-review.googlesource.com/c/sdk/+/420700 in the Dart SDK.

This PR adds support for user-defines for hooks in the root package
`pubspec.yaml`.

```yaml
hooks:
  user_defines:
    hook_user_defines: # package name
      magic_value: 1000
```

For more design considerations see:

* https://github.com/dart-lang/native/issues/39

### Testing

This PR is covered by
`test/integration.shard/isolated/native_assets_test.dart`.

In this PR, we add a new test project
`dev/integration_tests/hook_user_defines/` and add a dependency on that
project in the mentioned test.

The integration test already covers `flutter run`, `flutter test`, and
`flutter build`.
2025-04-11 06:20:42 +00:00
Daco Harkes
f35d118814
[native assets] Roll dependencies (#166862)
Updating the dart-lang/native dependencies to the ones published
yesterday.

Incorporates a fix for:

* https://github.com/dart-lang/native/issues/2149
* Note that a bunch of tests were relying on ignoring build assets. The
tests have been fixed.

And the new `AssetRouting` syntax in the build hook for sending assets
to the link hook:

* https://github.com/dart-lang/native/pull/2164

Does not include support for user-defines in the pubspec yet. Will do
this in a follow up PR.

* https://github.com/dart-lang/native/pull/2165
2025-04-10 06:46:25 +00:00
flutter-pub-roller-bot
b9c2634652
Roll pub packages (#166810)
This PR was generated by `flutter update-packages --force-upgrade`.
2025-04-09 04:55:08 +00:00
flutter-pub-roller-bot
d3be3dec42
Roll pub packages (#166779)
This PR was generated by `flutter update-packages --force-upgrade`.
2025-04-09 01:55:08 +00:00
flutter-pub-roller-bot
cc556aecae
Roll pub packages (#166503)
This PR was generated by `flutter update-packages --force-upgrade`.

---------

Co-authored-by: Ben Konyi <bkonyi@google.com>
2025-04-08 00:41:20 +00:00
Daco Harkes
dec31cbab6
[native_assets] Roll dependencies (#166282)
Updating the dart-lang/native dependencies to the ones published today.

No functional changes, but `CodeAsset` does not expose an `architecture`
and `os ` anymore (https://github.com/dart-lang/native/issues/2127).
Instead these should be taken from what is passed in for the
`CodeConfig`. This PR refactors the `DartBuildResult` to carry around
the `Target` with `CodeAsset`s as `FlutterCodeAsset`s.

(This PR avoid refactoring relevant code due to
https://github.com/flutter/flutter/pull/164094 already refactoring this
code.)
2025-04-03 05:42:31 +00:00
Kishan Rathore
3bf6754d48
Migrate to Theme.brightnessOf method (#163950)
Refactor: Migrate to Theme.brightnessOf method
fixes: #163837

## 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 `///`).
- [ ] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.
2025-04-03 00:34:53 +00:00
flutter-pub-roller-bot
2976ed00ce
Roll pub packages (#166043)
This PR was generated by `flutter update-packages --force-upgrade`.
2025-04-02 22:38:54 +00:00
Jonah Williams
c68c971e4c
[android_engine_test] disable old HC mode tests. (#166293)
Fixes https://github.com/flutter/flutter/issues/165032

These tests are flaky due to existing bugs in old HC mode.
2025-04-01 00:41:49 +00:00
Ben Konyi
edf0322cf0
Remove <meta content="IE=Edge" http-equiv="X-UA-Compatible"> (#166252)
Fixes https://github.com/flutter/flutter/issues/166166
2025-03-31 16:03:56 +00:00
Ben Konyi
16fc684886
Fix build_android_host_app_with_module_source device lab tests (#166077)
Fixes a type error where String was expected but JavaVersion was
inferred.
2025-03-27 17:42:48 +00:00
Ben Konyi
7cb926a33d
Reapply "[ Device Lab ] Upgrade Device Lab projects to Java 18" (#166016) (#166059)
This reverts commit
8dccbc33df.

Find/replace didn't catch the use of `jvmTarget = "1.8"` in
`dev/integration_tests/android_engine_test/android/app/build.gradle` and
`android_engine_test` needed to have `"com.android.application"`
updated.
2025-03-27 15:07:22 +00:00
flutter-pub-roller-bot
dff327e4f5
Roll pub packages (#165932)
This PR was generated by `flutter update-packages --force-upgrade`.
2025-03-27 04:27:26 +00:00
Ben Konyi
8dccbc33df
Revert "[ Device Lab ] Upgrade Device Lab projects to Java 18" (#166016)
Reverts flutter/flutter#165987

Reason for revert: multiple gradlew failures on devicelab tests
2025-03-26 20:51:02 +00:00
Ben Konyi
c376ca22dd
[ Device Lab ] Upgrade Device Lab projects to Java 18 (#165987)
Should resolve issues related to the following messages being output on
stderr:

```
warning: [options] source value 8 is obsolete and will be removed in a future release"
warning: [options] target value 8 is obsolete and will be removed in a future release
warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
```

Fixes https://github.com/flutter/flutter/issues/165973
2025-03-26 15:32:27 +00:00
chunhtai
bf6481104d
Revert "Add set semantics enabled API and wire iOS a11y bridge (#1612… (#165901)
…65)"

This reverts commit 26037dff87.

<!--
Thanks for filing a pull request!
Reviewers are typically assigned within a week of filing a request.
To learn more about code review, see our documentation on Tree Hygiene:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
-->

PR causes internal test failures

## Pre-launch Checklist

- [ ] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [ ] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [ ] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [ ] I signed the [CLA].
- [ ] I listed at least one issue that this PR fixes in the description
above.
- [ ] I updated/added relevant documentation (doc comments with `///`).
- [ ] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [ ] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [ ] 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/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#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/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
2025-03-25 18:24:46 +00:00
chunhtai
26037dff87
Add set semantics enabled API and wire iOS a11y bridge (#161265)
fixes https://github.com/flutter/flutter/issues/158399

old pr https://github.com/flutter/engine/pull/56691

previously the only correct way to enable semantics is that ios
embedding receive signal from native OS, it call SetSemanticsEnabled to
shell and then to dart to enable semantics tree generation.

If for some reason framework decide to enable semantics first, e.g.
through SemanticsBinding.instance.ensureSemantics(typically due to
integration test or ci that wants to test semantics), the update will be
dropped in shell. Even if it later on receive signal from native OS to
turn on semantics, it can't construct the complete accessibility tree in
embedding because the updatesemantics sends diff update and previous
updates are gone forever. It will end up in a broken state.

This pr changes so that the only source of truth will be in the
framework side. When framework starts generating the the semantics tree,
it will call SetSemanticsTreeEnabled through dart:ui, and the embedding
needs to prepare itself to accept semantics update after receiving the
message.

This however require some refactoring on iOS embedding because it will
only create a11y bridge when receiving OS notification when assitive
technologies turns on.

This requires three phase transition

add an empty dart:ui API setSemanticsTreeEnabled
makes framework calls the empty API.
merge this pr with actual implementation of setSemanticsTreeEnabled

I will do the android part in a separate pr


## Pre-launch Checklist

- [ ] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [ ] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [ ] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [ ] I signed the [CLA].
- [ ] I listed at least one issue that this PR fixes in the description
above.
- [ ] I updated/added relevant documentation (doc comments with `///`).
- [ ] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [ ] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [ ] 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/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#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/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
2025-03-24 20:11:13 +00:00
Daco Harkes
ff97c28f20
[native assets] Roll dependencies (#165574)
Updating the dart-lang/native dependencies to the ones published today.
2025-03-21 20:46:08 +00:00
Sangam Shrestha
d261411b4c
Remove redundant useMaterial3: true (#163376)
<!--
Thanks for filing a pull request!
Reviewers are typically assigned within a week of filing a request.
To learn more about code review, see our documentation on Tree Hygiene:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
-->

This PR removes redundant useMaterial3: true as described in
https://github.com/flutter/flutter/issues/162818

*List which issues are fixed by this PR. You must list at least one
issue. An issue is not required if the PR fixes something trivial like a
typo.*

- https://github.com/flutter/flutter/issues/162818

## 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] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [ ] 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/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#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/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md

---------

Co-authored-by: Qun Cheng <36861262+QuncCccccc@users.noreply.github.com>
2025-03-14 17:50:20 +00:00
Reid Baker
463e751640
Convert AppLinkSettings to kotlin (#164391)
Fixes #162107

Commands that were helpful when working on this pr. 
`dart dev/tools/bin/generate_gradle_lockfiles.dart
--no-gradle-generation` from flutter/flutter root.
`./gradlew test` from packages/flutter_tools/gradle. 
`git add -- ":*.lockfile"` for adding only lockfile changes. 
`../../bin/cache/dart-sdk/bin/dart bin/test_runner.dart test -t
android_java11_dependency_smoke_tests` from dev/devicelab
`ktlint --editorconfig=dev/bots/test/analyze-test-input/.editorconfig
--baseline=dev/bots/test/analyze-test-input/ktlint-baseline.xml
packages/flutter_tools/gradle/src/ --format` formatting kotlin code.
Need ktlint 1.5


## 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] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.
2025-03-11 17:00:17 +00:00
Gray Mackall
c45b835577
[hcpp] Add tests for transform mutator (#164664)
Adds tests covering all transform cases (rotation, flipping, scaling,
translation).

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

## 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] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [ ] 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/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#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/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md

---------

Co-authored-by: Gray Mackall <mackall@google.com>
2025-03-06 18:18:19 +00:00
flutter-pub-roller-bot
7cdea599da
Roll pub packages (#164721)
This PR was generated by `flutter update-packages --force-upgrade`.
2025-03-06 18:01:43 +00:00
Harri Kirik
e4c726ab89
Fix to Linux_pixel_7pro integration_ui_keyboard_resize test flakiness (#162308)
## `integration_ui_keyboard_resize` flakiness reduction

This PR addresses flakiness in the `integration_ui_keyboard_resize` test
(issue #161300) and slightly improves its performance.

**Issue summary:**

The `integration_ui_keyboard_resize` test occasionally fails because the
device keyboard does not reliably open at the start of the test. This PR
mitigates one cause of this flakiness, though other potential underlying
issues may still exist. See #161300 for a detailed investigation.

**Changes and rationale:**

1.  **Improved keyboard detection logic (flakiness reduction):**
* The core change moves `await driver.tap(defaultTextField);` *inside*
the loop that checks for layout changes. This ensures the test
repeatedly attempts to open the keyboard *while* waiting for the
expected layout shift, significantly improving reliability.
    *   **Local testing results (MacBook Pro M1 + Pixel 8 Pro):**
* **Original implementation:** Consistent failures within the first 15
iterations.
* **This PR:** Ran consistently for at least 300 iterations (out of
2000) before any failure, with some runs exceeding 900 iterations.

2.  **`enableTextEntryEmulation` configuration improvement:**
* The `keyboard_resize.dart` app is *exclusively* used for testing and
requires `enableTextEntryEmulation: false` for proper device keyboard
interaction.
* This PR sets `enableTextEntryEmulation: false` directly within the
app's `enableFlutterDriverExtension` setup. This simplifies the test
setup, avoids cross-thread communication, and prevents the app from
appearing broken when run independently (as manual text input wouldn't
work otherwise).

3.  **UI enhancements for manual testing:**
* Added `SafeArea` and `InputDecoration` to `keyboard_resize.dart`. This
ensures the `TextField` is fully visible and usable during manual
testing (it was previously obscured by the Android status bar). This
improves the developer experience when debugging the app directly.

4.  **Optimized polling for speed:**
* Reduced the polling interval and increased the number of polling
iterations (maintaining the overall timeout). This change resulted in a
~2-second speed improvement per test iteration during local testing.

**Further flakiness improvement discussion and ideas**
See the discussion at https://github.com/flutter/flutter/issues/161300

**Testing and reproduction:**

To reproduce the original flakiness and verify the fix (reproducibility
may vary based on setup; see
https://github.com/flutter/flutter/issues/161300#issuecomment-2618952501):

1. **Disable automatic reboots:** Comment out the `await
checkForRebootRequired();` line in
9e273d5e6e/dev/devicelab/lib/framework/framework.dart (L240-L243)
2. **Disable automatic retries:** Set `static const int retryNumber =
0;` in
9e273d5e6e/dev/devicelab/lib/framework/cocoon.dart (L56-L57)
3. **Install `hyperfine`:** This is a command-line benchmarking tool
(e.g., `brew install hyperfine` on macOS).
4. **Connect a device/emulator:** Connect a physical Android device or
start an emulator.
5. **Run repeated tests:** Use `hyperfine` to run the test multiple
times and capture the output:
    ```bash
hyperfine -r 100 'dart bin/test_runner.dart test -t
integration_ui_keyboard_resize > log.txt'
    ```
2025-03-05 08:36:07 +00:00
Gray Mackall
1301475873
Implement clipPath Mutator for hcpp (#164525)
Implements `clipPath` mutator for hcpp.

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



https://github.com/user-attachments/assets/2c98e621-c73e-40ca-bc76-77de1a3826a0


## 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] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [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/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#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/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md

---------

Co-authored-by: Gray Mackall <mackall@google.com>
2025-03-05 06:45:21 +00:00
flutter-pub-roller-bot
0a294891b6
Roll pub packages (#164556)
This PR was generated by `flutter update-packages --force-upgrade`.
2025-03-04 17:41:24 +00:00
Matej Knopp
b831b269c5
Add PlatformDispatcher.engineId (#163476)
Fixes https://github.com/flutter/flutter/issues/163430.

This PR adds `engineId` field to `PlatformDispatcher`. When provided by
the engine, this can be used to retrieve the engine instance from native
code.

Dart code:
```dart
final identifier = PlatformDispatcher.instance.engineId!;
```

macOS, iOS: 
```objc
FlutterEngine *engine = [FlutterEngine engineForIdentifier: identifier];
```

Android:
```java
FlutterEngine engine = FlutterEngine.engineForId(identifier);
```

Linux
```cpp
FlEngine *engine = fl_engine_for_id(identifier);
```

Windows
```cpp
FlutterDesktopEngineRef engine = FlutterDesktopEngineForId(identifier);
```

*If you had to change anything in the [flutter/tests] repo, include a
link to the migration guide as per the [breaking change policy].*

## 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] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [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/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#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/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
2025-02-28 22:20:11 +00:00
Reid Baker
845c7779b8
Align jvmTarget usages across codebase, while editing build.gradle files align them with android version documentation (#164200)
Related to #149836
Find all jvmTarget definitions that do not use JavaVersion.* then update
them.
While editing those files align the usages with
docs/contributing/Android-API-And-Related-Versions.md.

Documentation source that this pr follows
https://github.com/flutter/flutter/pull/164198/files#diff-ee6ec18be8d752e2696c8ccc8bec2f202dfc29a43b3b4f9d8041aa6bc3e852a1


This pr is expected to cause no behavioral changes.
This pr makes logical sense after
https://github.com/flutter/flutter/pull/164198 but can be landed in any
order.

## 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 `///`).
- [ ] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.
2025-02-28 17:48:21 +00:00
Reid Baker
89f1eba3c8
remove last usages of min/compile/target SdkVersion, align sourceCompatibility across repo and update android version documentation (#164198)
Related to #149836
- Remove last usages of minSdkVersion/compileSdkVersion/targetSdkVersion
in favor of minSdk/compileSdk/targetSdk. That do not also use
`flutter.minSdkVersion` etc. (that will happen in another pass)
- Update the files that used "SdkVersion" to use equals for setting new
values. [Not yet landed documentation
change](https://github.com/flutter/flutter/pull/164195/files#diff-ee6ec18be8d752e2696c8ccc8bec2f202dfc29a43b3b4f9d8041aa6bc3e852a1)
- align sourceCompatibility and targetCompatibility across repo to use
JavaVersion.* and update android version documentation.

This pr updates `kotlinOptions jvmTarget` documentation but does not fix
all existing usages.

This pr is expected to cause no behavioral changes. 
This pr makes logical sense after
https://github.com/flutter/flutter/pull/164195 but can be landed in any
order.

## 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 `///`).
- [ ] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.
2025-02-27 22:00:49 +00:00
Gray Mackall
c9c3e74747
Add empty io.flutter.app.FlutterApplication to give deprecation notice, and un-break projects that have not migrated (#164233)
The removal of the v1 embedding missed that this class was not marked as
deprecated, and did not provide a notice in the breaking changes
section. V1 apps that needed the functionality of the old
`FlutterApplication` were all broken in the previous release, but some
V2 apps have been referencing the v1 `FlutterApplication`.

For these apps, this is the same as extending the base
`android.app.Application`. So we can provide an "empty extension" of
that base class, to provide these v2 apps a deprecation notice, and
avoid breaking them without warning (in 3.29.1).

Arbitrarily chose the `spell_checker` integration test to reference this
empty application, let me know if you think I should bring up an
entirely new devicelab test instead.

## 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].
- [ ] 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] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [ ] 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/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#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/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md

---------

Co-authored-by: Gray Mackall <mackall@google.com>
2025-02-27 21:47:12 +00:00
Reid Baker
72c2447307
android_host_app_v2_embedding update dependencies and documentation (#164195)
Related to #149836 

Last of the non api 35 references in flutter/flutter for targetSdk and
compileSdk.
`find . -type f -name "build.gradle" | xargs grep -e "targetSdk" | tr -d
'=' | tr -s ' ' | grep -v flutter\.targetSdkVersion | grep -v
engine/src/flutter/third_party/ | grep -v "targetSdk 35"`
`find . -type f -name "build.gradle" | xargs grep -e "compileSdk" | tr
-d '=' | tr -s ' ' | grep -v flutter\.compileSdkVersion | grep -v
engine/src/flutter/third_party/ | grep -v "compileSdk 35"`

rewrite of https://github.com/flutter/flutter/pull/163622 after this
test was updated to run against a newer version of gradle and agp in
https://github.com/flutter/flutter/pull/163849/files#diff-83b6ad7c016bffbb682664eb65c576a7ebf9c312fc60727c0e0e20f5641cbc2aR462

Android-API-And-Related-Versions.md was updated to reflect that after
further investigation that android is using "=" in their documentation
and that the space syntax is discouraged. Equals is setting a property
and space is the equivalent to a function call like `compileSdk(35)` and
assignment is prefered.

The use of equals for proprty assignment also aligns with
https://docs.gradle.org/current/userguide/migrating_from_groovy_to_kotlin_dsl.html#prepare_your_groovy_scripts

## 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] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.
2025-02-27 20:31:08 +00:00
flutter-pub-roller-bot
6a073ce605
Roll pub packages (#164316)
This PR was generated by `flutter update-packages --force-upgrade`.
2025-02-27 19:38:00 +00:00
flutter-pub-roller-bot
0e9190505a
Roll pub packages (#163567)
This PR was generated by `flutter update-packages --force-upgrade`.

---------

Co-authored-by: Michael Goderbauer <goderbauer@google.com>
2025-02-27 17:02:18 +00:00
Gray Mackall
b287365b21
Implement opacity FlutterMutator for hcpp (#164147)
This is essentially a reland of
https://github.com/flutter/engine/pull/30264/, except that it only
applies the opacity if the new alpha (alpha = 255*opacity, where
opacity∈[0,1]) is different from the current alpha.

Also adds a new opacity screenshot test. Need to figure out how to bring
up a new screenshot test... does the screenshot get uploaded
automatically? Do I need to manually upload somewhere?

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

## 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] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [ ] 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/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#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/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md

---------

Co-authored-by: Gray Mackall <mackall@google.com>
2025-02-26 23:12:19 +00:00
Reid Baker
1f257c4a85
pure_android_host_apps/android_host_app_v2_embedding multiple gradle and AGP versions (#163849)
Fixes #163750
Adds local.properties in any directory to the repo wide gitignore. 

Test changes to make the test easier to debug, specifically identifying
the difference between a debug and release failure.

## 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] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.
2025-02-25 20:06:02 +00:00