Repository navigation
Use Gradle KTS in new Android app projects by default (2nd try) - #157195
auto-submit[bot] merged 7 commits into
Conversation
| 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.
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.
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 , as they can take a bit and you'll probably have fixed all of them once you fix one of them). |
|
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 follows the upstream `flutter create` template's conversion: flutter/flutter#157195 including its dropping of `settings.ext.flutterSdkPath`, a no-op: flutter/flutter#141509 Kotlin has no counterpart to Groovy's dynamic lookup of `"$agpVersion"` in the `plugins` block, and nothing else uses these versions now. So write them there directly, as the template does, and drop them from gradle.properties. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
This now matches the upstream `flutter create` template, which in converting to Kotlin also moved off the deprecated `buildDir`: flutter/flutter#157195 flutter/flutter#157560 Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
This follows the upstream `flutter create` template's conversion: flutter/flutter#157195 Where the Groovy called the deprecated `compileSdkVersion`, `minSdkVersion`, and `targetSdkVersion` methods, set the `compileSdk`, `minSdk`, and `targetSdk` properties instead, as the template does. This also resolves Gradle's deprecation warnings on this file's space-assignment syntax, like `namespace "com.zulip.flutter"`. In Kotlin, lint's GradleDependency check can read our dependency declarations, and it fails the build because `androidx.test:orchestrator` has a newer release. Disable it, as 15f3f59 did AndroidGradlePluginVersion: we manage these upgrades deliberately, and an upgrade nag shouldn't fail CI. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
This PR resolves #151166
This PR relands #154061
Pre-launch Checklist
///).