-
Notifications
You must be signed in to change notification settings - Fork 28.9k
Use Gradle KTS in new Android app projects by default (2nd try) #157195
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
Use Gradle KTS in new Android app projects by default (2nd try) #157195
Conversation
@@ -467,7 +467,19 @@ class AndroidProject extends FlutterProjectPlatform { | |||
static final RegExp _androidNamespacePattern = RegExp('android {[\\S\\s]+namespace\\s*=?\\s*[\'"](.+)[\'"]'); | |||
static final RegExp _applicationIdPattern = RegExp('^\\s*applicationId\\s*=?\\s*[\'"](.*)[\'"]\\s*\$'); | |||
static final RegExp _imperativeKotlinPluginPattern = RegExp('^\\s*apply plugin\\:\\s+[\'"]kotlin-android[\'"]\\s*\$'); | |||
static final RegExp _declarativeKotlinPluginPattern = RegExp('^\\s*id\\s+[\'"]kotlin-android[\'"]\\s*\$'); | |||
|
|||
/// Examples of strings that this regex matches: |
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.
Thank you, I really appreciate when we give examples next to regex expressions.
Updated branch to include #157196, LGTM if tests pass. I checked post submits for the last merge, and it was just |
thanks @gmackall :) I'll take a look at the failing tests in a minute. |
auto label is removed for flutter/flutter/157195, due to - The status or check suite Linux android_java17_dependency_smoke_tests has failed. Please fix the issues identified (or deflake) before re-applying this label.
|
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.
Failures appear related to this pr.
To keep the default AGP version AGP version 8.1.0, download a compatible Java version
[2024-10-21 12:01:05.009001] [STDOUT] stderr: (Java 17 <= (Java 17 <= compatible Java version < Java 21) Java version < Java 21). Configure this Java version
@gmackall we dont have a java 21 version of these suite of tests yet, it looks like we will need to make one.
Yes, the latest android studio version vends Java 21 I believe, so it would be good to use that in CI |
@reidbaker @gmackall Should I create a new PR that adds CI for java 21, then get it merged to master, and then come back to this PR? |
Sorry for the confusion, my comment was independent of this PR - setting up java 21 tests in CI will probably require CIPD access anyways, which I believe is only available to Googlers, so we will take care of that (and I don't think it should block this PR). That log indicates a problem that I believe I missed though:
indicate that we aren't successfully setting the AGP version to |
Ah, I see - that is just the warning from So in summary, I think you just need to fix the failures in the following log section, namely the part starting
FYI you should be able to run these tests locally with
run from
(and you'll probably want to comment all but one of them out from
|
we are so back |
…ter#157195) This PR resolves flutter#151166 This PR relands flutter#154061
…radle.kts usage (#159299) update comments inside `flutter_build_preview_sdk_test.dart` to match the usage of `build.gradle.kts` instead of `build.gradle` those must've slipped from #157195 ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [ ] I listed at least one issue that this PR fixes in the description above. - [x] 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]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview [Tree Hygiene]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md [test-exempt]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests [Flutter Style Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md [Features we expect every widget to implement]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md [Data Driven Fixes]: https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
This PR resolves #151166
This PR relands #154061
Pre-launch Checklist
///
).