Skip to content

Commit

Permalink
Merge branch 'main' of github.com:flutter/packages into sp-allowlist
Browse files Browse the repository at this point in the history
  • Loading branch information
tarrinneal committed Jun 21, 2023
2 parents 60c8f40 + c996143 commit 1bce154
Show file tree
Hide file tree
Showing 396 changed files with 14,215 additions and 3,709 deletions.
96 changes: 94 additions & 2 deletions .ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,27 @@ platform_properties:
linux:
properties:
os: Linux
linux_desktop:
properties:
os: Ubuntu
cores: "8"
device_type: none
dependencies: >-
[
{"dependency": "clang", "version": "git_revision:5d5aba78dbbee75508f01bcaa69aedb2ab79065a"},
{"dependency": "cmake", "version": "build_id:8787856497187628321"},
{"dependency": "ninja", "version": "version:1.9.0"},
{"dependency": "curl", "version": "version:7.64.0"}
]
linux_web:
properties:
os: Ubuntu
cores: "8"
device_type: none
dependencies: >-
[
{"dependency": "chrome_and_driver", "version": "version:114.0"}
]
windows:
properties:
dependencies: >
Expand Down Expand Up @@ -48,7 +69,7 @@ platform_properties:
}
targets:
### Linux tasks ###
### Linux-host general tasks ###
- name: Linux repo_tools_tests
recipe: packages/packages
timeout: 30
Expand All @@ -58,6 +79,78 @@ targets:
channel: master
version_file: flutter_master.version

- name: Linux analyze master
bringup: true # New target
recipe: packages/packages
timeout: 30
properties:
target_file: analyze.yaml
channel: master
version_file: flutter_master.version

- name: Linux analyze stable
bringup: true # New target
recipe: packages/packages
timeout: 30
properties:
target_file: analyze.yaml
channel: stable
version_file: flutter_stable.version

- name: Linux analyze_downgraded master
bringup: true # New target
recipe: packages/packages
timeout: 30
properties:
target_file: analyze_downgraded.yaml
channel: master
version_file: flutter_master.version

- name: Linux analyze_downgraded stable
bringup: true # New target
recipe: packages/packages
timeout: 30
properties:
target_file: analyze_downgraded.yaml
channel: stable
version_file: flutter_stable.version

### Web tasks ###
- name: Linux_web web_build_all_packages master
recipe: packages/packages
timeout: 30
properties:
add_recipes_cq: "true"
version_file: flutter_master.version
target_file: web_build_all_packages.yaml
channel: master

- name: Linux_web web_build_all_packages stable
recipe: packages/packages
timeout: 30
properties:
version_file: flutter_stable.version
target_file: web_build_all_packages.yaml
channel: stable

### Linux desktop tasks
- name: Linux_desktop build_all_packages master
recipe: packages/packages
timeout: 30
properties:
add_recipes_cq: "true"
version_file: flutter_master.version
target_file: linux_build_all_packages.yaml
channel: master

- name: Linux_desktop build_all_packages stable
recipe: packages/packages
timeout: 30
properties:
version_file: flutter_stable.version
target_file: linux_build_all_packages.yaml
channel: stable

### iOS+macOS tasks ###
# TODO(stuartmorgan): Move this to ARM once google_maps_flutter has ARM
# support. `pod lint` makes a synthetic target that doesn't respect the
Expand Down Expand Up @@ -144,7 +237,6 @@ targets:
target_file: ios_build_all_packages.yaml

- name: Mac_x64 ios_build_all_packages stable
bringup: true # New target
recipe: packages/packages
timeout: 30
properties:
Expand Down
2 changes: 1 addition & 1 deletion .ci/flutter_master.version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8a5c22e282db5f45ffdef24752520894f18227b9
fc8856eb80d306ac40563582a1212a07141d9001
2 changes: 1 addition & 1 deletion .ci/flutter_stable.version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
682aa387cfe4fbd71ccd5418b2c2a075729a1c66
796c8ef79279f9c774545b3771238c3098dbefab
8 changes: 8 additions & 0 deletions .ci/scripts/analyze_repo_tools.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash
# Copyright 2013 The Flutter Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
set -e

cd script/tool
dart analyze --fatal-infos
2 changes: 1 addition & 1 deletion .ci/scripts/dart_unit_tests_win32.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
# found in the LICENSE file.
set -e

dart ./script/tool/bin/flutter_plugin_tools.dart test \
dart ./script/tool/bin/flutter_plugin_tools.dart dart-test \
--exclude=script/configs/windows_unit_tests_exceptions.yaml \
--packages-for-branch --log-timing
17 changes: 17 additions & 0 deletions .ci/scripts/pathified_analyze.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash
# Copyright 2013 The Flutter Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
set -e

# Pathify the dependencies on changed packages (excluding major version
# changes, which won't affect clients).
./script/tool_runner.sh make-deps-path-based --target-dependencies-with-non-breaking-updates
# This uses --run-on-dirty-packages rather than --packages-for-branch
# since only the packages changed by 'make-deps-path-based' need to be
# re-checked.
dart ./script/tool/bin/flutter_plugin_tools.dart analyze --run-on-dirty-packages \
--log-timing --custom-analysis=script/configs/custom_analysis.yaml
# Restore the tree to a clean state, to avoid accidental issues if
# other script steps are added to the enclosing task.
git checkout .
15 changes: 15 additions & 0 deletions .ci/targets/analyze.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
tasks:
- name: prepare tool
script: .ci/scripts/prepare_tool.sh
- name: analyze repo tools
script: .ci/scripts/analyze_repo_tools.sh
- name: analyze
script: script/tool_runner.sh
# DO NOT change the custom-analysis argument here without changing the Dart repo.
# See the comment in script/configs/custom_analysis.yaml for details.
args: ["analyze", "--custom-analysis=script/configs/custom_analysis.yaml"]
# Re-run analysis with path-based dependencies to ensure that publishing
# the changes won't break analysis of other packages in the respository
# that depend on it.
- name: analyze - pathified
script: .ci/scripts/pathified_analyze.sh
10 changes: 10 additions & 0 deletions .ci/targets/analyze_downgraded.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
tasks:
- name: prepare tool
script: .ci/scripts/prepare_tool.sh
# Does a sanity check that packages pass analysis with the lowest possible
# versions of all dependencies. This is to catch cases where we add use of
# new APIs but forget to update minimum versions of dependencies to where
# those APIs are introduced.
- name: analyze - downgraded
script: script/tool_runner.sh
args: ["analyze", "--downgrade", "--custom-analysis=script/configs/custom_analysis.yaml"]
11 changes: 11 additions & 0 deletions .ci/targets/linux_build_all_packages.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
tasks:
- name: prepare tool
script: .ci/scripts/prepare_tool.sh
- name: create all_packages app
script: .ci/scripts/create_all_packages_app.sh
- name: build all_packages for Linux debug
script: .ci/scripts/build_all_packages_app.sh
args: ["linux", "debug"]
- name: build all_packages for Linux release
script: .ci/scripts/build_all_packages_app.sh
args: ["linux", "release"]
10 changes: 10 additions & 0 deletions .ci/targets/web_build_all_packages.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
tasks:
- name: prepare tool
script: .ci/scripts/prepare_tool.sh
- name: create all_packages app
script: .ci/scripts/create_all_packages_app.sh
# No debug version, unlike the other platforms, since web does not support
# debug builds.
- name: build all_packages app for Web release
script: .ci/scripts/build_all_packages_app.sh
args: ["web", "release"]
47 changes: 2 additions & 45 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,6 @@ tool_setup_template: &TOOL_SETUP_TEMPLATE
tool_setup_script:
- .ci/scripts/prepare_tool.sh

macos_template: &MACOS_TEMPLATE
# Only one macOS task can run in parallel without credits, so use them for
# PRs on macOS.
use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true'
macos_instance:
image: ghcr.io/cirruslabs/macos-ventura-xcode:14.3

flutter_upgrade_template: &FLUTTER_UPGRADE_TEMPLATE
upgrade_flutter_script:
# Channels that are part of our normal test matrix use a pinned,
Expand Down Expand Up @@ -183,22 +176,7 @@ task:
env:
CIRRUS_CLONE_SUBMODULES: true
script: ./script/tool_runner.sh update-excerpts --fail-on-change
### Web tasks ###
- name: web-build_all_packages
env:
BUILD_ALL_ARGS: "web"
matrix:
CHANNEL: "master"
CHANNEL: "stable"
<< : *BUILD_ALL_PACKAGES_APP_TEMPLATE
### Linux desktop tasks ###
- name: linux-build_all_packages
env:
BUILD_ALL_ARGS: "linux"
matrix:
CHANNEL: "master"
CHANNEL: "stable"
<< : *BUILD_ALL_PACKAGES_APP_TEMPLATE
- name: linux-platform_tests
# Don't run full platform tests on both channels in pre-submit.
skip: $CIRRUS_PR != '' && $CHANNEL == 'stable'
Expand Down Expand Up @@ -238,13 +216,13 @@ task:
CHANNEL: "master"
CHANNEL: "stable"
unit_test_script:
- ./script/tool_runner.sh test --exclude=script/configs/dart_unit_tests_exceptions.yaml
- ./script/tool_runner.sh dart-test --exclude=script/configs/dart_unit_tests_exceptions.yaml
pathified_unit_test_script:
# Run tests with path-based dependencies to ensure that publishing
# the changes won't break tests of other packages in the repository
# that depend on it.
- ./script/tool_runner.sh make-deps-path-based --target-dependencies-with-non-breaking-updates
- $PLUGIN_TOOL_COMMAND test --run-on-dirty-packages --exclude=script/configs/dart_unit_tests_exceptions.yaml
- $PLUGIN_TOOL_COMMAND dart-test --run-on-dirty-packages --exclude=script/configs/dart_unit_tests_exceptions.yaml
- name: linux-custom_package_tests
env:
PATH: $PATH:/usr/local/bin
Expand Down Expand Up @@ -335,24 +313,3 @@ task:
- cd ../..
- flutter packages get
- dart testing/web_benchmarks_test.dart

# macOS tasks.
task:
<< : *FLUTTER_UPGRADE_TEMPLATE
<< : *MACOS_TEMPLATE
matrix:
- name: macos-custom_package_tests
env:
PATH: $PATH:/usr/local/bin
matrix:
CHANNEL: "master"
CHANNEL: "stable"
# Create an iPhone 13, to match what is available on LUCI, since Pigeon tests
# currently have a hard-coded device.
create_simulator_script:
- xcrun simctl list
- xcrun simctl create "iPhone 13" com.apple.CoreSimulator.SimDeviceType.iPhone-13 com.apple.CoreSimulator.SimRuntime.iOS-16-4
local_tests_script:
# script/configs/linux_only_custom_test.yaml
# Custom tests need Chrome for these packages. (They run in linux-custom_package_tests)
- ./script/tool_runner.sh custom-test --exclude=script/configs/linux_only_custom_test.yaml
2 changes: 1 addition & 1 deletion .github/workflows/pull_request_label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@ba790c862c380240c6d5e7427be5ace9a05c754b
- uses: actions/labeler@9fcb2c2f5584144ca754f8bfe8c6f81e77753375
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
sync-labels: true
2 changes: 2 additions & 0 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,14 @@ packages/webview_flutter/webview_flutter_wkwebview/** @cyanglaz

# - Linux
packages/file_selector/file_selector_linux/** @cbracken
packages/image_picker/image_picker_linux/** @cbracken
packages/path_provider/path_provider_linux/** @cbracken
packages/shared_preferences/shared_preferences_linux/** @cbracken
packages/url_launcher/url_launcher_linux/** @cbracken

# - macOS
packages/file_selector/file_selector_macos/** @cbracken
packages/image_picker/image_picker_macos/** @cbracken
packages/url_launcher/url_launcher_macos/** @cbracken

# - Windows
Expand Down
2 changes: 0 additions & 2 deletions packages/animations/example/ios/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,5 @@
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
</dict>
</plist>
2 changes: 0 additions & 2 deletions packages/camera/camera/example/ios/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
<key>UIApplicationSupportsIndirectInputEvents</key>
Expand Down
1 change: 1 addition & 0 deletions packages/camera/camera_android/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## NEXT

* Fixes unawaited_futures violations.
* Removes duplicate line in `MediaRecorderBuilder.java`.

## 0.10.8+2

Expand Down
3 changes: 2 additions & 1 deletion packages/camera/camera_android/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ android {
unitTests.includeAndroidResources = true
unitTests.returnDefaultValues = true
unitTests.all {
jvmArgs "-Xmx1g"
testLogging {
events "passed", "skipped", "failed", "standardOut", "standardError"
outputs.upToDateWhen {false}
Expand All @@ -65,5 +66,5 @@ dependencies {
testImplementation 'junit:junit:4.13.2'
testImplementation 'org.mockito:mockito-inline:5.0.0'
testImplementation 'androidx.test:core:1.4.0'
testImplementation 'org.robolectric:robolectric:4.5'
testImplementation 'org.robolectric:robolectric:4.10.3'
}
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ public MediaRecorder build() throws IOException, NullPointerException, IndexOutO
mediaRecorder.setVideoEncodingBitRate(videoProfile.getBitrate());
mediaRecorder.setVideoFrameRate(videoProfile.getFrameRate());
mediaRecorder.setVideoSize(videoProfile.getWidth(), videoProfile.getHeight());
mediaRecorder.setVideoSize(videoProfile.getWidth(), videoProfile.getHeight());
} else if (camcorderProfile != null) {
mediaRecorder.setOutputFormat(camcorderProfile.fileFormat);
if (enableAudio) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,9 @@ public void beforeLegacy() {
public void before() {
mockProfileLow = mock(EncoderProfiles.class);
EncoderProfiles mockProfile = mock(EncoderProfiles.class);
EncoderProfiles.VideoProfile mockVideoProfile = mock(EncoderProfiles.VideoProfile.class);
List<EncoderProfiles.VideoProfile> mockVideoProfilesList = List.of(mockVideoProfile);
List<EncoderProfiles.VideoProfile> mockVideoProfilesList =
new ArrayList<EncoderProfiles.VideoProfile>();
mockVideoProfilesList.add(null);

mockedStaticProfile
.when(() -> CamcorderProfile.getAll("1", CamcorderProfile.QUALITY_HIGH))
Expand All @@ -117,8 +118,6 @@ public void before() {
.thenReturn(mockProfileLow);

when(mockProfile.getVideoProfiles()).thenReturn(mockVideoProfilesList);
when(mockVideoProfile.getHeight()).thenReturn(100);
when(mockVideoProfile.getWidth()).thenReturn(100);
}

@After
Expand Down Expand Up @@ -386,7 +385,7 @@ public void computeBestPreviewSize_shouldUseLegacyBehaviorWhenEncoderProfilesNul
@Config(minSdk = 31)
@Test
public void resolutionFeatureShouldUseLegacyBehaviorWhenEncoderProfilesNull() {
beforeLegacy();
before();
try (MockedStatic<ResolutionFeature> mockedResolutionFeature =
mockStatic(ResolutionFeature.class)) {
mockedResolutionFeature
Expand Down
Loading

0 comments on commit 1bce154

Please sign in to comment.