-
Notifications
You must be signed in to change notification settings - Fork 28.9k
[Android] remove obsolete gradle api in FGP #172085
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
ed8c552
to
d5251c2
Compare
d5251c2
to
05bc958
Compare
@Suppress("DEPRECATION") | ||
fileMode = 420 // corresponds to unix 0644 in base 8 | ||
filePermissions { | ||
user { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this actually needed?
"FILE: read &write for OWNER, read for GROUP, read for OTHER (0644, rw-r--r--)"
https://docs.gradle.org/current/kotlin-dsl/gradle/org.gradle.api.file/-file-permissions/index.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting question, because in Copy task docs:
"If the property has no value set, that means that existing permissions are preserved." https://docs.gradle.org/current/dsl/org.gradle.api.tasks.Copy.html
I don't know how exactly these 2 parts corresponds to each other, best guess is that your link describes behavior out of context of Copy task?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is Weird. LGTM Thank you for expanding test coverage.
flutter/flutter@cc3110c...c2739f0 2025-07-16 engine-flutter-autoroll@skia.org Roll Dart SDK from 2f2dd1780d45 to 766ee8029b11 (2 revisions) (flutter/flutter#172226) 2025-07-16 engine-flutter-autoroll@skia.org Roll Skia from af685eaf1b52 to 59be8479c637 (3 revisions) (flutter/flutter#172208) 2025-07-16 dkwingsmt@users.noreply.github.com Add dartpad example to `RoundedSuperellipseBorder` (flutter/flutter#172185) 2025-07-16 engine-flutter-autoroll@skia.org Roll Skia from ab79199bd0f3 to af685eaf1b52 (2 revisions) (flutter/flutter#172195) 2025-07-16 engine-flutter-autoroll@skia.org Roll Dart SDK from a4e60e5add75 to 2f2dd1780d45 (8 revisions) (flutter/flutter#172197) 2025-07-16 137456488+flutter-pub-roller-bot@users.noreply.github.com Roll pub packages (flutter/flutter#172193) 2025-07-15 30870216+gaaclarke@users.noreply.github.com Licenses_cpp: Parses NOTICES and DEPS (flutter/flutter#172044) 2025-07-15 engine-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from tQAtsLtpc0oBIqRwC... to JRFUXSNXExcfjVYvA... (flutter/flutter#172189) 2025-07-15 engine-flutter-autoroll@skia.org Roll Skia from fec78c0da2e6 to ab79199bd0f3 (4 revisions) (flutter/flutter#172186) 2025-07-15 matanlurey@users.noreply.github.com Allow a release without engine cherrypicks (adds fallback logic) (flutter/flutter#172184) 2025-07-15 kjlubick@users.noreply.github.com [skia] Add missing param to makeRasterImage calls (flutter/flutter#172122) 2025-07-15 51940183+Sameri11@users.noreply.github.com [Android] remove obsolete gradle api in FGP (flutter/flutter#172085) 2025-07-15 engine-flutter-autoroll@skia.org Roll Skia from 8ffff8c8e01b to fec78c0da2e6 (6 revisions) (flutter/flutter#172178) 2025-07-15 engine-flutter-autoroll@skia.org Roll Skia from 2f4ad5d83704 to 8ffff8c8e01b (7 revisions) (flutter/flutter#172169) 2025-07-15 ivan.inozemtsev@gmail.com Roll Dart SDK to 3.9.0-333.2.beta (flutter/flutter#172167) 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 bmparr@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
fixes #170791
This PR replaces the deprecated (and removed in 9.0) Gradle fileMode API in favor of filePermissions.
This change finally unlocks builds with gradle 9 (confirmed in smoke tests, 9.0.0-rc.2 is the latest prerelease version to the date).
Testing strategy
There's an attempt to add a Kotlin unit test that confirms that
filePermissions
were called during plugin application. I failed to find a more precise way to check if the new code works as intended (such as testing that permissions were really changed or something like that), but on the other hand, it should not be required since it will transform the test in a way that it will start to test Gradle APIs and their behavior, and I believe it's a bit out of scope: Gradle APIs are tested in Gradle tests :)Anyway, this new test is a bit cumbersome because it's required to mock all the behaviours related to variants configuration and capturing calls – If it is not desired im not hesitant to remove it.
Pre-launch Checklist
///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.