Skip to content

Conversation

@bartekpacia
Copy link
Member

@bartekpacia bartekpacia commented Mar 31, 2024

This PR is a follow-up of a previous PR of mine: #141417. It was unfinished, i.e. I only implemented it and used it in examples/hello_world. No "flutter create" templates were modified.

This change is theoretically breaking, but in practice, I am pretty sure nobody uses this. It was not accounced anywhere, the only app using it is examples/hello_world. I did not do that (that=update docs and templates) because I wanted a solution that is idiomatic in both Gradle and Kotlin, and only now I found time to do this.

Without this change

defaultConfig {
    applicationId = "io.flutter.examples.hello_world"
    minSdk = flutter.minSdkVersion
    targetSdk = flutter.targetSdkVersion
    versionCode = flutter.versionCode()
    versionName = flutter.versionName()
}

With this change

defaultConfig {
    applicationId = "io.flutter.examples.hello_world"
    minSdk = flutter.minSdkVersion
    targetSdk = flutter.targetSdkVersion
    versionCode = flutter.versionCode
    versionName = flutter.versionName
}

Idiomatic getter - yay! It's consistent between assignment of all four props.

Issue

fixes #146067

Pre-launch Checklist

  • I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
  • I read the [Tree Hygiene] wiki page, which explains my responsibilities.
  • I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement].
  • I signed the [CLA].
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is [test-exempt].
  • I followed the [breaking change policy] and added [Data Driven Fixes] where supported.
  • All existing and new tests are passing.

@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact "@test-exemption-reviewer" in the #hackers channel in Chat (don't just cc them here, they won't see it! Use Discord!).

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

@github-actions github-actions bot added tool Affects the "flutter" command-line tool. See also t: labels. d: examples Sample code and demos labels Mar 31, 2024
@bartekpacia bartekpacia requested a review from reidbaker March 31, 2024 01:02
Copy link
Contributor

@reidbaker reidbaker left a comment

Choose a reason for hiding this comment

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

looks good, I agree we can probably land this even though it is technically breaking. That said there are failing tests that need to be addressed first.

@bartekpacia
Copy link
Member Author

@reidbaker Tests fixed. Turns out I had also added versionName() and versionCode() to examples/layers so I had to fix it there as well.

@bartekpacia bartekpacia merged commit ec82f0d into flutter:master Apr 1, 2024
@bartekpacia
Copy link
Member Author

bartekpacia commented Apr 1, 2024

oh dang, I accidentally clicked "merge" instead of adding autosubmit label 🤦🏻

I will defer to you on what to do now. I'm sorry, I haven't been merging PRs to Flutter in quite some time.

engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 1, 2024
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Apr 2, 2024
Manual roll requested by [email protected]

flutter/flutter@9d32f07...7fa932b

2024-04-01 [email protected] Roll Flutter Engine from e6f19409b613 to ea93c5d91b12 (3 revisions) (flutter/flutter#146100)
2024-04-01 [email protected] Refactor realm_checker (flutter/flutter#145905)
2024-04-01 [email protected] Add info strings to code blocks. (flutter/flutter#146085)
2024-04-01 [email protected] Add test for animated_container.0.dart API example. (flutter/flutter#145995)
2024-04-01 [email protected] Roll Flutter Engine from 8dff6b833fe2 to e6f19409b613 (2 revisions) (flutter/flutter#146093)
2024-04-01 [email protected] Roll Flutter Engine from d33666d90916 to 8dff6b833fe2 (3 revisions) (flutter/flutter#146087)
2024-04-01 [email protected] Fix SliverMainAxisGroup layout in reverse (flutter/flutter#145572)
2024-04-01 [email protected] Roll Flutter Engine from dd4f5cd5c9d5 to d33666d90916 (3 revisions) (flutter/flutter#146083)
2024-04-01 [email protected] Roll Packages from 51faaa1 to d5aff19 (3 revisions) (flutter/flutter#146081)
2024-04-01 [email protected] Fixes some gesture recognizers are not disposed. (flutter/flutter#146072)
2024-04-01 [email protected] Flutter Gradle Plugin: add versionName and versionCode to FlutterExtension (flutter/flutter#146044)
2024-04-01 [email protected] Roll Flutter Engine from bf348cd73d49 to dd4f5cd5c9d5 (1 revision) (flutter/flutter#146071)
2024-04-01 [email protected] Roll Flutter Engine from 984a78b04671 to bf348cd73d49 (1 revision) (flutter/flutter#146065)
2024-04-01 [email protected] Deprecate `ButtonBar`, `ButtonBarThemeData`, and `ThemeData.buttonBarTheme` (flutter/flutter#145523)
2024-04-01 [email protected] Add `DataColumn.headingRowAlignment ` for `DataTable` (flutter/flutter#144006)
2024-04-01 [email protected] Roll Flutter Engine from e9d35f8bfbe2 to 984a78b04671 (2 revisions) (flutter/flutter#146062)
2024-04-01 [email protected] Roll Flutter Engine from 4f6b832c8e33 to e9d35f8bfbe2 (1 revision) (flutter/flutter#146060)
2024-03-31 [email protected] Roll Flutter Engine from 9689390986b7 to 4f6b832c8e33 (1 revision) (flutter/flutter#146055)
2024-03-31 [email protected] Roll Flutter Engine from 34081fea4d59 to 9689390986b7 (1 revision) (flutter/flutter#146053)

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 [email protected],[email protected],[email protected],[email protected] 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
@bartekpacia bartekpacia deleted the feature/gradle_flutterextension_getters branch April 2, 2024 18:16
auto-submit bot pushed a commit that referenced this pull request Apr 11, 2024
…ter.versionCode (#146604)

Follow up of #146044 and #141417

Minor change to make Gradle buildscripts shorter.
gilnobrega pushed a commit to gilnobrega/flutter that referenced this pull request Apr 22, 2024
…ter.versionCode (flutter#146604)

Follow up of flutter#146044 and flutter#141417

Minor change to make Gradle buildscripts shorter.
TecHaxter pushed a commit to TecHaxter/flutter_packages that referenced this pull request May 22, 2024
)

Manual roll requested by [email protected]

flutter/flutter@9d32f07...7fa932b

2024-04-01 [email protected] Roll Flutter Engine from e6f19409b613 to ea93c5d91b12 (3 revisions) (flutter/flutter#146100)
2024-04-01 [email protected] Refactor realm_checker (flutter/flutter#145905)
2024-04-01 [email protected] Add info strings to code blocks. (flutter/flutter#146085)
2024-04-01 [email protected] Add test for animated_container.0.dart API example. (flutter/flutter#145995)
2024-04-01 [email protected] Roll Flutter Engine from 8dff6b833fe2 to e6f19409b613 (2 revisions) (flutter/flutter#146093)
2024-04-01 [email protected] Roll Flutter Engine from d33666d90916 to 8dff6b833fe2 (3 revisions) (flutter/flutter#146087)
2024-04-01 [email protected] Fix SliverMainAxisGroup layout in reverse (flutter/flutter#145572)
2024-04-01 [email protected] Roll Flutter Engine from dd4f5cd5c9d5 to d33666d90916 (3 revisions) (flutter/flutter#146083)
2024-04-01 [email protected] Roll Packages from 51faaa1 to d5aff19 (3 revisions) (flutter/flutter#146081)
2024-04-01 [email protected] Fixes some gesture recognizers are not disposed. (flutter/flutter#146072)
2024-04-01 [email protected] Flutter Gradle Plugin: add versionName and versionCode to FlutterExtension (flutter/flutter#146044)
2024-04-01 [email protected] Roll Flutter Engine from bf348cd73d49 to dd4f5cd5c9d5 (1 revision) (flutter/flutter#146071)
2024-04-01 [email protected] Roll Flutter Engine from 984a78b04671 to bf348cd73d49 (1 revision) (flutter/flutter#146065)
2024-04-01 [email protected] Deprecate `ButtonBar`, `ButtonBarThemeData`, and `ThemeData.buttonBarTheme` (flutter/flutter#145523)
2024-04-01 [email protected] Add `DataColumn.headingRowAlignment ` for `DataTable` (flutter/flutter#144006)
2024-04-01 [email protected] Roll Flutter Engine from e9d35f8bfbe2 to 984a78b04671 (2 revisions) (flutter/flutter#146062)
2024-04-01 [email protected] Roll Flutter Engine from 4f6b832c8e33 to e9d35f8bfbe2 (1 revision) (flutter/flutter#146060)
2024-03-31 [email protected] Roll Flutter Engine from 9689390986b7 to 4f6b832c8e33 (1 revision) (flutter/flutter#146055)
2024-03-31 [email protected] Roll Flutter Engine from 34081fea4d59 to 9689390986b7 (1 revision) (flutter/flutter#146053)

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 [email protected],[email protected],[email protected],[email protected] 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

d: examples Sample code and demos tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Flutter Gradle plugin has a mix of direct acess and function parameter like values exposed

2 participants