Skip to content

Conversation

@vashworth
Copy link
Contributor

@vashworth vashworth commented Apr 19, 2024

When Swift Package Manager feature is enabled, create app and create plugin will have Swift Package Manager integration already added and will not need to undergo a migration.

Fixes #146371.

flutter config --enable-swift-package-manager

flutter create --ios-language swift --platforms ios,macos swift_app_name

flutter create --ios-language objc --platforms ios objc_app_name

flutter create --template=plugin --ios-language swift --platforms ios,macos swift_plugin_name

flutter create --template=plugin --ios-language objc --platforms ios objc_plugin_name

Pre-launch Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@github-actions github-actions bot added the tool Affects the "flutter" command-line tool. See also t: labels. label Apr 19, 2024
@github-actions github-actions bot added the a: desktop Running on desktop label Apr 19, 2024
@vashworth vashworth marked this pull request as ready for review April 22, 2024 15:20
@vashworth vashworth requested a review from jmagman April 22, 2024 15:20
@vashworth
Copy link
Contributor Author

fyi @loic-sharma

{{#withSwiftPackageManager}}
// If your plugin has been explicitly set to "type: .dynamic" in the Package.swift,
// you will need to add your plugin as a dependency of RunnerTests within Xcode.
{{/withSwiftPackageManager}}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stuartmorgan This is where you were thinking I include the message, right?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, perfect!

<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
{{#withSwiftPackageManager}}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should always add the pre-actions? Does it hurt anything if it's not using SPM? I don't think it would add much time (because the next time it runs in the build phases it will be almost a no-op based on the target inputs and outputs). The less we can avoid fragmentation the better imo.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So it's not exactly a no-op, the pre-action unfortunately does not pass the EXPANDED_CODE_SIGN_IDENTITY build setting so the input is considered changed because the codesigning changes. So it does add a little bit of time (~4 seconds)

Copy link
Member

@jmagman jmagman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't have to be in this PR, but consider adding tests to:
https://github.com/flutter/flutter/blob/master/dev/devicelab/bin/tasks/plugin_test_ios.dart

LGTM!

Copy link
Contributor

@stuartmorgan-g stuartmorgan-g left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Template changes LGTM.

(I am slightly worried about people publishing things with this template and then us discovering we need to change something, but since the whole thing is behind a flag we can probably expect there won't be too much of that and we can follow up with individual plugin authors.)

{{#withSwiftPackageManager}}
// If your plugin has been explicitly set to "type: .dynamic" in the Package.swift,
// you will need to add your plugin as a dependency of RunnerTests within Xcode.
{{/withSwiftPackageManager}}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, perfect!

@vashworth vashworth added the autosubmit Merge PR when tree becomes green via auto submit App label Apr 24, 2024
@auto-submit auto-submit bot merged commit 5a63b1d into flutter:master Apr 24, 2024
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Apr 25, 2024
flutter/flutter@dba4f77...5d3bca4

2024-04-25 engine-flutter-autoroll@skia.org Roll Flutter Engine from 6b33890a4701 to 674890ce7141 (1 revision) (flutter/flutter#147365)
2024-04-25 dacoharkes@google.com [native_assets] Use kernel concatenation (flutter/flutter#147158)
2024-04-25 engine-flutter-autoroll@skia.org Roll Flutter Engine from ccd57f5a4bc4 to 6b33890a4701 (2 revisions) (flutter/flutter#147359)
2024-04-25 engine-flutter-autoroll@skia.org Roll Flutter Engine from 9de649ed2926 to ccd57f5a4bc4 (1 revision) (flutter/flutter#147356)
2024-04-25 engine-flutter-autoroll@skia.org Roll Flutter Engine from 2f48456a425a to 9de649ed2926 (2 revisions) (flutter/flutter#147354)
2024-04-25 engine-flutter-autoroll@skia.org Roll Flutter Engine from f48f3b6a0172 to 2f48456a425a (1 revision) (flutter/flutter#147351)
2024-04-25 engine-flutter-autoroll@skia.org Roll Flutter Engine from b30c0a765680 to f48f3b6a0172 (8 revisions) (flutter/flutter#147348)
2024-04-25 ian@hixie.ch Allow the SceneBuilder, PictureRecord, and Canvas constructor calls from the rendering layer to be hooked (flutter/flutter#147271)
2024-04-24 49699333+dependabot[bot]@users.noreply.github.com Bump actions/checkout from 4.1.3 to 4.1.4 (flutter/flutter#147334)
2024-04-24 leroux_bruno@yahoo.fr Fix filled color is wrong for a focused and hovered TextField (flutter/flutter#146976)
2024-04-24 engine-flutter-autoroll@skia.org Roll Flutter Engine from b5d5832f7144 to b30c0a765680 (14 revisions) (flutter/flutter#147336)
2024-04-24 zanderso@users.noreply.github.com Run new_gallery__transition_perf on mokey in staging (flutter/flutter#147339)
2024-04-24 ian@hixie.ch Remove hidden dependencies on the default goldenFileComparator. (flutter/flutter#146956)
2024-04-24 15619084+vashworth@users.noreply.github.com Add create app and plugin templates for Swift Package Manager (flutter/flutter#147082)
2024-04-24 43089218+chika3742@users.noreply.github.com Add support for overriding `reverseCurve` with `ExpansionTile.expansionAnimationStyle` (flutter/flutter#147103)
2024-04-24 54558023+keyonghan@users.noreply.github.com Mark firebase tests as `bringup: true` (flutter/flutter#147338)
2024-04-24 32538273+ValentinVignal@users.noreply.github.com Add Valentin Vignal to AUTHORS (flutter/flutter#147314)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC camillesimon@google.com,rmistry@google.com,stuartmorgan@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
TecHaxter pushed a commit to TecHaxter/flutter_packages that referenced this pull request May 22, 2024
flutter/flutter@dba4f77...5d3bca4

2024-04-25 engine-flutter-autoroll@skia.org Roll Flutter Engine from 6b33890a4701 to 674890ce7141 (1 revision) (flutter/flutter#147365)
2024-04-25 dacoharkes@google.com [native_assets] Use kernel concatenation (flutter/flutter#147158)
2024-04-25 engine-flutter-autoroll@skia.org Roll Flutter Engine from ccd57f5a4bc4 to 6b33890a4701 (2 revisions) (flutter/flutter#147359)
2024-04-25 engine-flutter-autoroll@skia.org Roll Flutter Engine from 9de649ed2926 to ccd57f5a4bc4 (1 revision) (flutter/flutter#147356)
2024-04-25 engine-flutter-autoroll@skia.org Roll Flutter Engine from 2f48456a425a to 9de649ed2926 (2 revisions) (flutter/flutter#147354)
2024-04-25 engine-flutter-autoroll@skia.org Roll Flutter Engine from f48f3b6a0172 to 2f48456a425a (1 revision) (flutter/flutter#147351)
2024-04-25 engine-flutter-autoroll@skia.org Roll Flutter Engine from b30c0a765680 to f48f3b6a0172 (8 revisions) (flutter/flutter#147348)
2024-04-25 ian@hixie.ch Allow the SceneBuilder, PictureRecord, and Canvas constructor calls from the rendering layer to be hooked (flutter/flutter#147271)
2024-04-24 49699333+dependabot[bot]@users.noreply.github.com Bump actions/checkout from 4.1.3 to 4.1.4 (flutter/flutter#147334)
2024-04-24 leroux_bruno@yahoo.fr Fix filled color is wrong for a focused and hovered TextField (flutter/flutter#146976)
2024-04-24 engine-flutter-autoroll@skia.org Roll Flutter Engine from b5d5832f7144 to b30c0a765680 (14 revisions) (flutter/flutter#147336)
2024-04-24 zanderso@users.noreply.github.com Run new_gallery__transition_perf on mokey in staging (flutter/flutter#147339)
2024-04-24 ian@hixie.ch Remove hidden dependencies on the default goldenFileComparator. (flutter/flutter#146956)
2024-04-24 15619084+vashworth@users.noreply.github.com Add create app and plugin templates for Swift Package Manager (flutter/flutter#147082)
2024-04-24 43089218+chika3742@users.noreply.github.com Add support for overriding `reverseCurve` with `ExpansionTile.expansionAnimationStyle` (flutter/flutter#147103)
2024-04-24 54558023+keyonghan@users.noreply.github.com Mark firebase tests as `bringup: true` (flutter/flutter#147338)
2024-04-24 32538273+ValentinVignal@users.noreply.github.com Add Valentin Vignal to AUTHORS (flutter/flutter#147314)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC camillesimon@google.com,rmistry@google.com,stuartmorgan@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a: desktop Running on desktop autosubmit Merge PR when tree becomes green via auto submit App tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add create app and plugin templates for Swift Package Manager

3 participants