Skip to content

Commit 9233b60

Browse files
authored
Merge branch 'main' into fix_168364
2 parents afe17a0 + c3c4c5a commit 9233b60

File tree

230 files changed

+5270
-1817
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

230 files changed

+5270
-1817
lines changed

.ci.yaml

Lines changed: 4 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ platform_properties:
9090
[
9191
{"dependency": "ruby", "version": "ruby_3.1-pod_1.13"}
9292
]
93-
os: Mac-14
93+
os: Mac-14|Mac-15.5
9494
device_type: none
9595
cpu: arm64
9696
$flutter/osx_sdk : >-
@@ -103,7 +103,7 @@ platform_properties:
103103
[
104104
{"dependency": "ruby", "version": "ruby_3.1-pod_1.13"}
105105
]
106-
os: Mac-14
106+
os: Mac-14|Mac-15.5
107107
device_type: none
108108
cpu: x86
109109
$flutter/osx_sdk : >-
@@ -395,69 +395,27 @@ targets:
395395
properties:
396396
version_file: flutter_master.version
397397
# This builds the all_packages app only in a current JDK.
398-
target_file: android_build_all_packages_jdk17.yaml
398+
target_file: android_build_all_packages.yaml
399399
channel: master
400400
env_variables: >-
401401
{
402402
"CHANNEL": "master"
403403
}
404404
405-
- name: Linux_android android_build_all_packages_legacy master
406-
recipe: packages/packages
407-
timeout: 30
408-
properties:
409-
version_file: flutter_master.version
410-
# TODO(stuartmorgan): Once stable requires JDK 17, and the
411-
# legacy project is updated accordingly, this entire target
412-
# can be merged back into android_build_all_packages.
413-
# This file only builds a *legacy* version of the project.
414-
target_file: android_build_all_packages_legacy.yaml
415-
channel: master
416-
# The legacy project build requires an older JDK.
417-
dependencies: >-
418-
[
419-
{"dependency": "open_jdk", "version": "version:11"}
420-
]
421-
env_variables: >-
422-
{
423-
"CHANNEL": "master"
424-
}
425-
426405
- name: Linux_android android_build_all_packages stable
427406
recipe: packages/packages
428407
timeout: 30
429408
properties:
430409
add_recipes_cq: "true"
431410
version_file: flutter_stable.version
432411
# This builds the all_packages app only in a current JDK.
433-
target_file: android_build_all_packages_jdk17.yaml
412+
target_file: android_build_all_packages.yaml
434413
channel: stable
435414
env_variables: >-
436415
{
437416
"CHANNEL": "stable"
438417
}
439418
440-
- name: Linux_android android_build_all_packages_legacy stable
441-
# Temporarily disabled to unblock roll to 3.32.
442-
# See https://github.com/flutter/flutter/issues/169290
443-
bringup: true
444-
recipe: packages/packages
445-
timeout: 30
446-
properties:
447-
version_file: flutter_stable.version
448-
# This file only builds a *legacy* version of the project.
449-
target_file: android_build_all_packages_legacy.yaml
450-
channel: stable
451-
# The legacy project build requires an older JDK.
452-
dependencies: >-
453-
[
454-
{"dependency": "open_jdk", "version": "version:11"}
455-
]
456-
env_variables: >-
457-
{
458-
"CHANNEL": "stable"
459-
}
460-
461419
- name: Linux_android android_platform_tests_shard_1 master
462420
recipe: packages/packages
463421
timeout: 60

.ci/flutter_master.version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
85564cbba9e7326072a7bbd1a7aa9b11bca1f2f0
1+
d8baa77b38461e7061e06e72c6bf50d64d302b8c

.ci/flutter_stable.version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
be698c48a6750c8cb8e61c740ca9991bb947aba2
1+
b25305a8832cfc6ba632a7f87ad455e319dccce8

.ci/legacy_project/README.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,17 @@ and then deleting everything but `android/` from it:
3737
- Added license boilerplate.
3838
- Replaced `jcenter` in build.gradle with `mavenCentral`, due to the
3939
jcenter.bintray.com shutdown.
40-
- Update `compileSdkVersion` from 30 to 33 to maintain compatibility
41-
with plugins that use API 34.
42-
- Updates `gradle-wrapper.properties` from `6.7` to `6.7.1`, to add
43-
support for the Kotlin gradle plugin. If a user runs into this
44-
error, the error message is clear on how to upgrade.
45-
- Modifies `build.gradle` to upgrade the Android Gradle Plugin (AGP)
46-
from version 4.1.0 to 7.0.0. If a user runs into an error with
47-
the AGP version, the warning is clear on how to upgrade
48-
the version to one that we support.
40+
- Update `compileSdkVersion` from 30 to `flutter.compileSdkVersion` in
41+
`build.gradle` to maintain compatibility with plugins that use
42+
Flutter's most recently supported API version.
4943
- Modifies `gradle-wrapper.properties` to upgrade the Gradle version
50-
from 6.7.1 to 7.0.2. If a user runs into an error with the Gradle
44+
from 6.7 to 8.4. If a user runs into an error with the Gradle
5145
version, the warning is clear on how to upgrade the version to
52-
one that we support.
46+
one that we support.
47+
- Modifies `settings.gradle` to upgrade the Android Gradle Plugin (AGP)
48+
from version 4.1.0 (originally set in `build.gradle`; see bullet below)
49+
to 8.3.0. If a user runs into an error with the AGP version, the warning
50+
is clear on how to upgrade the version to one that we support.
51+
- Refactor plugin to use declarative Gradle apply instead of the
52+
imperative apply (this includes moving where the Android Gradle
53+
Plugin (AGP) version is set from `build.gradle` to `settings.gradle`).

.ci/legacy_project/all_packages/android/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-all.zip

.ci/legacy_project/all_packages/android/settings.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ pluginManagement {
1919
// See https://github.com/flutter/flutter/blob/master/docs/ecosystem/Plugins-and-Packages-repository-structure.md#gradle-structure for more info.
2020
plugins {
2121
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
22-
id "com.android.application" version "7.0.0" apply false
22+
id "com.android.application" version "8.3.0" apply false
2323
id "org.jetbrains.kotlin.android" version "1.9.0" apply false
2424
}
2525

.ci/targets/android_build_all_packages_legacy.yaml renamed to .ci/targets/android_build_all_packages.yaml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,17 @@
1-
# This only builds the legacy all_packages app, which requires jdk11
1+
# This builds the modern all_packages app and the legacy all_packages app.
22
tasks:
33
- name: prepare tool
44
script: .ci/scripts/prepare_tool.sh
55
infra_step: true # Note infra steps failing prevents "always" from running.
6+
- name: create all_packages app
7+
script: .ci/scripts/create_all_packages_app.sh
8+
infra_step: true # Note infra steps failing prevents "always" from running.
9+
- name: build all_packages for Android debug
10+
script: .ci/scripts/build_all_packages_app.sh
11+
args: ["apk", "debug"]
12+
- name: build all_packages for Android release
13+
script: .ci/scripts/build_all_packages_app.sh
14+
args: ["apk", "release"]
615
- name: create all_packages app - legacy version
716
script: .ci/scripts/create_all_packages_app_legacy.sh
817
# Output dir; must match the final argument to build_all_packages_app_legacy

.ci/targets/android_build_all_packages_jdk17.yaml

Lines changed: 0 additions & 14 deletions
This file was deleted.

packages/camera/camera/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## NEXT
2+
3+
* Fixes overflowed toggles in the camera example.
4+
15
## 0.11.1
26

37
* Adds API support query for image streaming.

packages/camera/camera/example/lib/main.dart

Lines changed: 35 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -225,43 +225,33 @@ class _CameraExampleHomeState extends State<CameraExampleHome>
225225

226226
/// Display the thumbnail of the captured image or video.
227227
Widget _thumbnailWidget() {
228-
final VideoPlayerController? localVideoController = videoController;
229-
230-
return Expanded(
231-
child: Align(
232-
alignment: Alignment.centerRight,
233-
child: Row(
234-
mainAxisSize: MainAxisSize.min,
235-
children: <Widget>[
236-
if (localVideoController == null && imageFile == null)
237-
Container()
238-
else
239-
SizedBox(
240-
width: 64.0,
241-
height: 64.0,
242-
child: (localVideoController == null)
243-
? (
244-
// The captured image on the web contains a network-accessible URL
245-
// pointing to a location within the browser. It may be displayed
246-
// either with Image.network or Image.memory after loading the image
247-
// bytes to memory.
248-
kIsWeb
249-
? Image.network(imageFile!.path)
250-
: Image.file(File(imageFile!.path)))
251-
: Container(
252-
decoration: BoxDecoration(
253-
border: Border.all(color: Colors.pink)),
254-
child: Center(
255-
child: AspectRatio(
256-
aspectRatio:
257-
localVideoController.value.aspectRatio,
258-
child: VideoPlayer(localVideoController)),
259-
),
260-
),
228+
return Row(
229+
mainAxisSize: MainAxisSize.min,
230+
children: <Widget>[
231+
if (videoController case final VideoPlayerController controller?)
232+
Container(
233+
width: 64.0,
234+
height: 64.0,
235+
decoration: BoxDecoration(border: Border.all(color: Colors.pink)),
236+
child: Center(
237+
child: AspectRatio(
238+
aspectRatio: controller.value.aspectRatio,
239+
child: VideoPlayer(controller),
261240
),
262-
],
263-
),
264-
),
241+
),
242+
)
243+
else if (imageFile?.path case final String path)
244+
Container(
245+
width: 64.0,
246+
height: 64.0,
247+
decoration: BoxDecoration(border: Border.all(color: Colors.pink)),
248+
// The captured image on the web contains a network-accessible URL
249+
// pointing to a location within the browser. It may be displayed
250+
// either with Image.network or Image.memory after loading the image
251+
// bytes to memory.
252+
child: kIsWeb ? Image.network(path) : Image.file(File(path)),
253+
),
254+
],
265255
);
266256
}
267257

@@ -598,7 +588,12 @@ class _CameraExampleHomeState extends State<CameraExampleHome>
598588
}
599589
}
600590

601-
return Row(children: toggles);
591+
return Expanded(
592+
child: SizedBox(
593+
height: 56.0,
594+
child: ListView(scrollDirection: Axis.horizontal, children: toggles),
595+
),
596+
);
602597
}
603598

604599
String timestamp() => DateTime.now().millisecondsSinceEpoch.toString();
@@ -1048,6 +1043,9 @@ class CameraApp extends StatelessWidget {
10481043
}
10491044
}
10501045

1046+
/// Getting available cameras for testing.
1047+
@visibleForTesting
1048+
List<CameraDescription> get cameras => _cameras;
10511049
List<CameraDescription> _cameras = <CameraDescription>[];
10521050

10531051
Future<void> main() async {

0 commit comments

Comments
 (0)