Skip to content

Commit df71942

Browse files
committed
Merge remote-tracking branch 'origin/fix/issue-12936-manual-plugin-linking' into fix/issue-12936-manual-plugin-linking
2 parents 09229c9 + 650f3ae commit df71942

42 files changed

Lines changed: 2013 additions & 177 deletions

Some content is hidden

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

‎.github/workflows/codeql-analysis.yml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333

3434
# Initializes the CodeQL tools for scanning.
3535
- name: Initialize CodeQL
36-
uses: github/codeql-action/init@6bc82e05fd0ea64601dd4b465378bbcf57de0314
36+
uses: github/codeql-action/init@45cbd0c69e560cd9e7cd7f8c32362050c9b7ded2
3737
with:
3838
languages: ${{ matrix.language }}
3939
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -44,7 +44,7 @@ jobs:
4444
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
4545
# If this step fails, then you should remove it and run the build manually (see below)
4646
- name: Autobuild
47-
uses: github/codeql-action/autobuild@6bc82e05fd0ea64601dd4b465378bbcf57de0314
47+
uses: github/codeql-action/autobuild@45cbd0c69e560cd9e7cd7f8c32362050c9b7ded2
4848

4949
# ℹ️ Command-line programs to run using the OS shell.
5050
# 📚 https://git.io/JvXDl
@@ -58,4 +58,4 @@ jobs:
5858
# make release
5959

6060
- name: Perform CodeQL Analysis
61-
uses: github/codeql-action/analyze@6bc82e05fd0ea64601dd4b465378bbcf57de0314
61+
uses: github/codeql-action/analyze@45cbd0c69e560cd9e7cd7f8c32362050c9b7ded2

‎firebase.json‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -645,6 +645,7 @@
645645
{ "source": "/go/plugin-support-for-custom-embeddings", "destination": "https://docs.google.com/document/d/1AJTHdC20JhD3viR4JWTghagIztqL5jg_R9NFQmnwAMw/edit?usp=sharing&resourcekey=0-qAECjzHKB5tM47azrVnH1w", "type": 301 },
646646
{ "source": "/go/plugins-list-migration", "destination": "https://docs.google.com/document/d/1itYyHax0bzL3-hRtQd1zRPqJfOrLYih1fW0nPDJDytc/edit", "type": 301 },
647647
{ "source": "/go/plugins-team", "destination": "https://docs.google.com/forms/d/e/1FAIpQLSfpPqJYuL_RzLaTCjrWYw73Zrrei3YiU8B5eTrDBh4fuGhbXw/viewform?usp=sf_link", "type": 301 },
648+
{ "source": "/go/post-decoupling-breaking-changes", "destination": "https://docs.google.com/document/d/1SMxhPDWLgos9xGPj5NUzTVX7J6sPGtW9D8EDQNF30G4/edit?pli=1&tab=t.0", "type": 301 },
648649
{ "source": "/go/profile-and-release-mode-for-custom-devices", "destination": "https://docs.google.com/document/d/1jcMyJvsWLizYOIJAdyosLSW-Io0-E_MGsU_uL_Q4Wt8/edit?usp=sharing", "type": 301 },
649650
{ "source": "/go/programmatic-sheet", "destination": "https://docs.google.com/document/d/15A3q1QrcvEU82uG4heTCKV230depmaJZTIP5rEz7V8g/edit?usp=sharing&resourcekey=0-q-TH-9-LVmygnp6Ku4xKIg", "type": 301 },
650651
{ "source": "/go/pub-automated-publishing", "destination": "https://docs.google.com/document/d/1LSYVjDdgGNCc7p5Y2_hu8UA_Ms9MgZs3Jm974D1J344", "type": 301 },
@@ -730,6 +731,7 @@
730731
{ "source": "/go/towards-improved-performance-tooling", "destination": "https://docs.google.com/document/d/1wSDNcG0ww2V6JX1EE8avilCwnOiRVy83zSCWt916O0o", "type": 301 },
731732
{ "source": "/go/tracking-material-states", "destination": "https://docs.google.com/document/d/1PJdsOoXhWdhnpYKlW5Nm2Di3Di5XARoYyHerMwWovXE", "type": 301 },
732733
{ "source": "/go/trackpad-gestures", "destination": "https://docs.google.com/document/d/1oRvebwjpsC3KlxN1gOYnEdxtNpQDYpPtUFAkmTUe-K8/edit?usp=sharing&resourcekey=0-pt4_T7uggSTrsq2gWeGsYQ", "type": 301 },
734+
{ "source": "/go/transitions-everywhere", "destination": "https://docs.google.com/document/d/1qvznbZ-W0g90zkJ8h4k0aPgrpARo4CZUupVzq8la7Cw", "type": 301 },
733735
{ "source": "/go/triage-2022-rfp", "destination": "https://docs.google.com/document/d/1Kyrh1WijM04XqtUkVbL2uwDthlG9v3sljgl9HRlU4bU/edit", "type": 301 },
734736
{ "source": "/go/triage-2023-rfc", "destination": "https://docs.google.com/document/d/1RBvsolWL9nUkcEFhPZV4b-tstVUDHfHKzs-uQ3HiX-w/edit", "type": 301 },
735737
{ "source": "/go/try", "destination": "https://github.com/flutter/put-flutter-to-work", "type": 301 },

‎site/lib/src/loaders/data_processor.dart‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,5 +90,5 @@ final Map<String, DateTime> _lastModifiedPerPath = () {
9090
}();
9191

9292
extension on DateTime {
93-
String get formatted => '$year-$month-$day';
93+
String get formatted => toIso8601String().substring(0, 10);
9494
}

‎site/lib/src/style_hash.dart‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
// dart format off
33

44
/// The generated hash of the `main.css` file.
5-
const generatedStylesHash = '';
5+
const generatedStylesHash = 'D1OovaDfTpf7';

‎site/pubspec.yaml‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,18 @@ environment:
77
sdk: ^3.10.0
88

99
dependencies:
10-
build: ^4.0.2
10+
build: ^4.0.4
1111
collection: ^1.19.1
1212
crypto: ^3.0.7
1313
html: ^0.15.6
14-
http: ^1.5.0
15-
jaspr: ^0.22.1
14+
http: ^1.6.0
15+
jaspr: ^0.22.2
1616
jaspr_content: ^0.4.5
1717
# Used as our template engine.
1818
liquify: 1.3.1
1919
markdown: ^7.3.0
2020
markdown_description_list: ^0.1.1
21-
meta: ^1.17.0
21+
meta: ^1.18.1
2222
nanoid2: ^2.0.1
2323
# Used for syntax highlighting.
2424
opal: ^0.2.2
@@ -33,10 +33,10 @@ dev_dependencies:
3333
url: https://github.com/dart-lang/site-shared
3434
path: pkgs/analysis_defaults
3535
ref: f91ed8ecef6a0b31685804fe4102b25fda021460
36-
build_runner: ^2.10.2
37-
build_web_compilers: ^4.4.0
38-
jaspr_builder: ^0.22.1
39-
sass: ^1.97.2
36+
build_runner: ^2.11.0
37+
build_web_compilers: ^4.4.9
38+
jaspr_builder: ^0.22.2
39+
sass: ^1.97.3
4040
sass_builder: ^2.4.0
4141

4242
jaspr:

‎src/_includes/docs/swift-package-manager/migrate-swift-plugin.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,14 +176,14 @@ The example below uses `ios`, replace `ios` with `macos`/`darwin` as applicable.
176176

177177
```swift title="Package.swift"
178178
dependencies: [
179-
.package(name: "FlutterFramework", path: "../FlutterFramework")
179+
[!.package(name: "FlutterFramework", path: "../FlutterFramework")!]
180180
],
181181
targets: [
182182
.target(
183183
// TODO: Update your target name.
184184
name: "plugin_name",
185185
dependencies: [
186-
.product(name: "FlutterFramework", package: "FlutterFramework")
186+
[!.product(name: "FlutterFramework", package: "FlutterFramework")!]
187187
],
188188
```
189189

‎src/content/add-to-app/android/plugin-setup.md‎

Lines changed: 41 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,10 @@ does (transitively via a plugin).
7575

7676
For instance, your existing app's Gradle might already have:
7777

78-
```groovy title="ExistingApp/app/build.gradle"
78+
<Tabs key="existing-app-dependencies-1">
79+
<Tab name="Kotlin">
80+
81+
```kotlin title="ExistingApp/app/build.gradle.kts"
7982
…
8083
dependencies {
8184
…
@@ -85,6 +88,22 @@ dependencies {
8588
…
8689
```
8790

91+
</Tab>
92+
<Tab name="Groovy">
93+
94+
```groovy title="ExistingApp/app/build.gradle"
95+
…
96+
dependencies {
97+
…
98+
implementation "com.crashlytics.sdk.android:crashlytics:2.10.1"
99+
…
100+
}
101+
…
102+
```
103+
104+
</Tab>
105+
</Tabs>
106+
88107
And your Flutter module also depends on
89108
[firebase_crashlytics][] via `pubspec.yaml`:
90109

@@ -104,7 +123,7 @@ firebase_crashlytics v0.1.3's own [Gradle file][]:
104123
…
105124
dependencies {
106125
…
107-
implementation("com.crashlytics.sdk.android:crashlytics:2.9.9")
126+
implementation "com.crashlytics.sdk.android:crashlytics:2.9.9"
108127
…
109128
}
110129
…
@@ -124,16 +143,35 @@ or implementation breaking changes between the versions.
124143
For example, you might use the new Crashlytics library
125144
in your existing app as follows:
126145

146+
<Tabs key="existing-app-dependencies-2">
147+
<Tab name="Kotlin">
148+
149+
```kotlin title="ExistingApp/app/build.gradle.kts"
150+
…
151+
dependencies {
152+
…
153+
implementation("com.crashlytics.sdk.android:crashlytics:2.10.1")
154+
…
155+
}
156+
…
157+
```
158+
159+
</Tab>
160+
<Tab name="Groovy">
161+
127162
```groovy title="ExistingApp/app/build.gradle"
128163
…
129164
dependencies {
130165
…
131-
implementation("com.google.firebase:firebase-crashlytics:17.0.0-beta03")
166+
implementation "com.google.firebase:firebase-crashlytics:17.0.0-beta03"
132167
…
133168
}
134169
…
135170
```
136171

172+
</Tab>
173+
</Tabs>
174+
137175
This approach won't work since there are major API differences
138176
between the Crashlytics' Gradle library version
139177
v17.0.0-beta03 and v2.9.9.

‎src/content/add-to-app/android/project-setup.md‎

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ not be identical to your host app's package name.
164164

165165
#### Java version requirement
166166

167-
Flutter requires your project to declare compatibility with Java 11 or later.
167+
Flutter requires your project to declare compatibility with Java 17 or later.
168168

169169
Before attempting to connect your Flutter module project
170170
to your host Android app, ensure that your host Android
@@ -327,6 +327,7 @@ dependencyResolutionManagement {
327327
google()
328328
mavenCentral()
329329
maven("https://storage.googleapis.com/download.flutter.io")
330+
maven(url = "<some/path/flutter_module>/build/host/outputs/repo")
330331
}
331332
}
332333
```
@@ -401,19 +402,6 @@ configurations {
401402
}
402403
```
403404

404-
Then, add the following `dependencyResolutionManagement` block to the
405-
`settings.gradle` file:
406-
```kotlin title="MyApp/settings.gradle.kts"
407-
include(":app")
408-
409-
dependencyResolutionManagement {
410-
repositories {
411-
maven(url = "https://storage.googleapis.com/download.flutter.io")
412-
maven(url = "<some/path/flutter_module_project>/build/host/outputs/repo")
413-
}
414-
}
415-
```
416-
417405
:::important
418406
If you're located in China, use a mirror site rather than the
419407
`storage.googleapis.com` domain. To learn more about mirror sites,

‎src/content/add-to-app/ios/add-flutter-screen.md‎

Lines changed: 64 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -766,6 +766,66 @@ you're free to push data or prepare your Flutter environment
766766
in any way you'd like, before presenting the Flutter UI using a
767767
`FlutterViewController`.
768768
769+
## Content-sized views
770+
771+
On iOS, you can also set your embedded `FlutterView` to size itself based off its content.
772+
773+
<Tabs key="darwin-language">
774+
<Tab name="Swift">
775+
776+
```swift
777+
let flutterViewController = FlutterViewController(engine: engine, nibName: nil, bundle: nil)
778+
flutterViewController.isAutoResizable = true
779+
```
780+
781+
</Tab>
782+
<Tab name="Objective-C">
783+
784+
```objc
785+
_flutterViewController = [[FlutterViewController alloc] initWithEngine:engine nibName:nil bundle:nil];
786+
_flutterViewController.autoResizable = YES;
787+
```
788+
789+
</Tab>
790+
</Tabs>
791+
792+
### Restrictions
793+
794+
To use this, your root widget must support unbounded constraints. Avoid using widgets that require bounded constraints (like `ListView` or `LayoutBuilder`) at the top of your tree, as they can conflict with the dynamic sizing logic.
795+
796+
In practice, this means that quite a few common widgets are not supported,
797+
such as `ScaffoldBuilder`, `CupertinoTimerPicker`,
798+
or any widget that internally relies on a `LayoutBuilder`.
799+
When in doubt, you can use an `UnconstrainedBox` to test the usability of
800+
a widget for a content-sized view, as in the following example:
801+
802+
```dart
803+
import 'package:flutter/material.dart';
804+
805+
void main() => runApp(MyApp());
806+
807+
class MyApp extends StatelessWidget {
808+
@override
809+
Widget build(BuildContext context)
810+
=> MaterialApp(home: MyPage());
811+
}
812+
813+
class MyPage extends StatelessWidget {
814+
@override
815+
Widget build(BuildContext context) {
816+
return Scaffold(
817+
body: UnconstrainedBox(
818+
// TODO: Edit this line to check if a widget
819+
// can cause problems with content-sized views.
820+
child: Text('This works!'),
821+
// child: Column(children: [Column(children: [Expanded(child: Text('This blows up!'))])]),
822+
// child: ListView(children: [Text('This blows up!')]),
823+
)
824+
);
825+
}
826+
}
827+
```
828+
For a working example, refer to this [sample project][].
769829

770830
[`FlutterEngine`]: {{site.api}}/ios-embedder/interface_flutter_engine.html
771831
[`FlutterViewController`]: {{site.api}}/ios-embedder/interface_flutter_view_controller.html
@@ -785,6 +845,7 @@ in any way you'd like, before presenting the Flutter UI using a
785845
[`WidgetsApp`]: {{site.api}}/flutter/widgets/WidgetsApp-class.html
786846
[`PlatformDispatcher.defaultRouteName`]: {{site.api}}/flutter/dart-ui/PlatformDispatcher/defaultRouteName.html
787847
[Start a FlutterEngine and FlutterViewController section]:/add-to-app/ios/add-flutter-screen/#start-a-flutterengine-and-flutterviewcontroller
788-
[`Observable`]: https://developer.apple.com/documentation/observation/observable
789-
[`NavigationLink`]: https://developer.apple.com/documentation/swiftui/navigationlink
790-
[`Observable()`]: https://developer.apple.com/documentation/observation/observable()
848+
[`Observable`]: {{site.apple-dev}}/documentation/observation/observable
849+
[`NavigationLink`]: {{site.apple-dev}}/documentation/swiftui/navigationlink
850+
[`Observable()`]: {{site.apple-dev}}/documentation/observation/observable()
851+
[sample project]: {{site.repo.samples}}/tree/main/add_to_app/ios_content_resizing

‎src/content/deployment/flavors-ios.md‎

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,36 @@ Flutter CLI using the following steps:
239239
$ flutter run --flavor staging
240240
```
241241

242+
### Access the current flavor
243+
244+
1. **Import the services library:**
245+
To access the `appFlavor` constant, add the following import to your Dart file:
246+
```dart
247+
import 'package:flutter/services.dart';
248+
```
249+
250+
1. **Check the flavor value:**
251+
Use the `appFlavor` constant in your application logic (often in `main()`) to handle flavor-specific configurations:
252+
253+
```dart
254+
void main() {
255+
// appFlavor will match the name of the Xcode scheme
256+
if (appFlavor == 'production') {
257+
// Logic for production environment
258+
Config.apiUrl = 'https://api.flavors_example.com';
259+
} else if (appFlavor == 'staging') {
260+
// Logic for staging environment
261+
Config.apiUrl = 'https://staging.api.flavors_example.com';
262+
}
263+
264+
runApp(const MyApp());
265+
}
266+
```
267+
268+
:::note
269+
The value of `appFlavor` matches the name of the Xcode scheme you defined (for example, `staging` or `production`). If no flavor is specified during the build, `appFlavor` returns `null`.
270+
:::
271+
242272
### Use the run command (Xcode)
243273

244274
You can launch a specific scheme in Xcode using the

0 commit comments

Comments
 (0)