Skip to content

Commit

Permalink
Merge branch 'main' into feature/fix
Browse files Browse the repository at this point in the history
* main: (590 commits)
  Bump github/codeql-action from 2.21.7 to 2.21.8 (flutter#4952)
  Manual roll Flutter from 8936504 to f92884c (48 revisions) (flutter#4985)
  [image_picker_android] check if data from result is empty when picking a single img or video (flutter#4836)
  [camera_android] Removes usage of `_ambiguate` method in tests (flutter#4948)
  [sign_in]: Bump com.google.android.gms:play-services-auth from 20.6.0 to 20.7.0 in /packages/google_sign_in/google_sign_in_android/android (flutter#4841)
  Manual roll Flutter (stable) from 367f9ea16bfa to 12fccda59847 (2 revisions) (flutter#4976)
  [go_router] Fixes the GoRouter.goBranch so that it doesn't reset extr… (flutter#4723)
  [webview_flutter_wkwebview] Adds WKWebView implementation to override console log (flutter#4703)
  [various] Update invalid NSURL tests (flutter#4959)
  [ios_platform_images] Convert to Pigeon (flutter#4945)
  [go_router_builder] Generate initialLocation with StatefulShellBranchConfig (flutter#4880)
  Roll Flutter from b7d0e8c to 8936504 (15 revisions) (flutter#4947)
  [go_router] Adds on exit (flutter#4699)
  [go_router] Fixes RouteInformationParser that does not restore full RouteMatchList if the optionURLReflectsImperativeAPIs is set (flutter#4713)
  [file_selector] Fix unknown extensions on macOS (flutter#4946)
  [camera_avfoundation] ignore audio samples until first video sample (flutter#4587)
  Roll Flutter from 1b18b13 to b7d0e8c (11 revisions) (flutter#4944)
  [video_player] isCompleted event. (flutter#4923)
  [go_router] Fix an issue in the documentation that used `state.queryParameters` instead of `state.uri.queryParameters` (flutter#4881)
  [google_sign_in] Convert iOS to Pigeon (flutter#4941)
  ...

# Conflicts:
#	packages/camera/camera/pubspec.yaml
  • Loading branch information
pro100andrey committed Sep 25, 2023
2 parents 1263b0f + e548ae1 commit 6787627
Show file tree
Hide file tree
Showing 2,617 changed files with 128,625 additions and 34,927 deletions.
680 changes: 654 additions & 26 deletions .ci.yaml

Large diffs are not rendered by default.

43 changes: 0 additions & 43 deletions .ci/Dockerfile

This file was deleted.

2 changes: 1 addition & 1 deletion .ci/flutter_master.version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
c9004ff822cf76848365f5dd8e034596fcbceba1
f92884c7b846d0fde13a8c332ac648977fc9b631
2 changes: 1 addition & 1 deletion .ci/flutter_stable.version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
f72efea43c3013323d1b95cff571f3c1caa37583
12fccda598477eddd19f93040a1dba24f915b9be
39 changes: 39 additions & 0 deletions .ci/legacy_project/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
This directory contains a partial snapshot of an old Flutter project; it is
intended to replace the corresponding parts of a newly Flutter-created project
to allow testing plugin builds with a legacy project.

It was originally created with Flutter 2.0.6. In general the guidelines are:
- Pieces here should be largely self-contained rather than portions of
major project components; for instance, it currently contains the entire
`android/` directory from a legacy project, rather than a subset of it
which would be combined with a subset of a new project's `android/`
directory. This is to avoid random breakage in the future due to
conflicts between those subsets. For instance, we could probably get
away with not including android/app/src/main/res for a while, and
instead layer in the versions from a new project, but then someday
if the resources were renamed, there would be dangling references to
the old resources in files that are included here.
- Updates over time should be minimal. We don't expect that an unchanged
project will keep working forever, but this directory should simulate
a developer who has done the bare minimum to keep their project working
as they have updated Flutter.
- Updates should be logged below.

The reason for the hybrid model, rather than checking in a full legacy
project, is to minimize unnecessary maintenance work. E.g., there's no
need to manually keep Dart code updated for Flutter changes just to
test legacy native Android build behaviors.

## Manual changes to files

The following are the changes relative to running:

```bash
flutter create -a java all_packages
```

and then deleting everything but `android/` from it:

- Added license boilerplate.
- Replaced `jcenter` in build.gradle with `mavenCentral`, due to the
jcenter.bintray.com shutdown.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# This file should be version controlled and should not be manually edited.

version:
revision: e6b697a9df5e9ce933024be3334e86b599c60e71
revision: 1d9032c7e1d867f071f2277eb1673e8f9b0274e3
channel: unknown

project_type: app
11 changes: 11 additions & 0 deletions .ci/legacy_project/all_packages/android/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
gradle-wrapper.jar
/.gradle
/captures/
/gradlew
/gradlew.bat
/local.properties
GeneratedPluginRegistrant.java

# Remember to never publicly share your keystore.
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
key.properties
47 changes: 47 additions & 0 deletions .ci/legacy_project/all_packages/android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}

def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}

def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
}

def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.0'
}

apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion 30

defaultConfig {
applicationId "com.example.all_packages"
minSdkVersion 16
targetSdkVersion 30
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}

buildTypes {
release {
signingConfig signingConfigs.debug
}
}
}

flutter {
source '../..'
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.all_packages">
<uses-permission android:name="android.permission.INTERNET"/>
</manifest>
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.all_packages">
<application
android:label="all_packages"
android:icon="@mipmap/ic_launcher">
<activity
android:name=".MainActivity"
android:launchMode="singleTop"
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize">
<!-- Specifies an Android theme to apply to this Activity as soon as
the Android process has started. This theme is visible to the user
while the Flutter UI initializes. After that, this theme continues
to determine the Window background behind the Flutter UI. -->
<meta-data
android:name="io.flutter.embedding.android.NormalTheme"
android:resource="@style/NormalTheme"
/>
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<!-- Don't delete the meta-data below.
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
<meta-data
android:name="flutterEmbedding"
android:value="2" />
</application>
</manifest>
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// 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.

package com.example.all_packages;

import io.flutter.embedding.android.FlutterActivity;

public class MainActivity extends FlutterActivity {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Modify this file to customize your launch splash screen -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="?android:colorBackground" />

<!-- You can insert your own image assets here -->
<!-- <item>
<bitmap
android:gravity="center"
android:src="@mipmap/launch_image" />
</item> -->
</layer-list>
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Modify this file to customize your launch splash screen -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@android:color/white" />

<!-- You can insert your own image assets here -->
<!-- <item>
<bitmap
android:gravity="center"
android:src="@mipmap/launch_image" />
</item> -->
</layer-list>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on -->
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
<!-- Show a splash screen on the activity. Automatically removed when
Flutter draws its first frame -->
<item name="android:windowBackground">@drawable/launch_background</item>
</style>
<!-- Theme applied to the Android Window as soon as the process has started.
This theme determines the color of the Android Window while your
Flutter UI initializes, as well as behind your Flutter UI while its
running.
This Theme is only used starting with V2 of Flutter's Android embedding. -->
<style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
<item name="android:windowBackground">?android:colorBackground</item>
</style>
</resources>
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off -->
<style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar">
<!-- Show a splash screen on the activity. Automatically removed when
Flutter draws its first frame -->
<item name="android:windowBackground">@drawable/launch_background</item>
</style>
<!-- Theme applied to the Android Window as soon as the process has started.
This theme determines the color of the Android Window while your
Flutter UI initializes, as well as behind your Flutter UI while its
running.
This Theme is only used starting with V2 of Flutter's Android embedding. -->
<style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">
<item name="android:windowBackground">?android:colorBackground</item>
</style>
</resources>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.all_packages">
<!-- Flutter needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
<uses-permission android:name="android.permission.INTERNET"/>
</manifest>
29 changes: 29 additions & 0 deletions .ci/legacy_project/all_packages/android/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
buildscript {
repositories {
google()
mavenCentral()
}

dependencies {
classpath 'com.android.tools.build:gradle:4.1.0'
}
}

allprojects {
repositories {
google()
mavenCentral()
}
}

rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}

task clean(type: Delete) {
delete rootProject.buildDir
}
3 changes: 3 additions & 0 deletions .ci/legacy_project/all_packages/android/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
org.gradle.jvmargs=-Xmx2G
android.useAndroidX=true
android.enableJetifier=true
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#Fri Jun 23 08:50:38 CEST 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip
11 changes: 11 additions & 0 deletions .ci/legacy_project/all_packages/android/settings.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
include ':app'

def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
def properties = new Properties()

assert localPropertiesFile.exists()
localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }

def flutterSdkPath = properties.getProperty("flutter.sdk")
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
23 changes: 23 additions & 0 deletions .ci/scripts/analyze_legacy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/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

# Allow analyzing packages that use a dev dependency with a higher minimum
# Flutter/Dart version than the package itself. Non-client code doesn't need to
# work in legacy versions.
#
# This requires the --lib-only flag below.
./script/tool_runner.sh remove-dev-dependencies

# 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.
./script/tool_runner.sh analyze --lib-only \
--skip-if-not-supporting-flutter-version="$CHANNEL" \
--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 .
23 changes: 23 additions & 0 deletions .ci/scripts/analyze_pathified.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/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.
# --skip-if-resolving-fails is used to avoid failing if there's a resolution
# conflict when using path-based dependencies, because that indicates that
# the failing packages won't pick up the new versions of the changed packages
# when they are published anyway, so publishing won't cause an out-of-band
# failure regardless.
dart ./script/tool/bin/flutter_plugin_tools.dart analyze --run-on-dirty-packages \
--skip-if-resolving-fails \
--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 .
Original file line number Diff line number Diff line change
@@ -1,5 +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

flutter pub run build_runner build --delete-conflicting-outputs
cd script/tool
dart analyze --fatal-infos
1 change: 1 addition & 0 deletions .ci/scripts/build_all_packages_app.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# 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

platform="$1"
build_mode="$2"
Expand Down
Loading

0 comments on commit 6787627

Please sign in to comment.