Skip to content
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

Android templates: update default Kotlin from 1.8.22 to 2.1.0, update default Gradle from 8.9 to 8.12 #160974

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bartekpacia
Copy link
Member

No description provided.

@github-actions github-actions bot added the tool Affects the "flutter" command-line tool. See also t: labels. label Dec 30, 2024
@bkonyi bkonyi added the team-android Owned by Android platform team label Jan 9, 2025
@bkonyi bkonyi requested a review from a team January 9, 2025 21:23
@bartekpacia bartekpacia force-pushed the bartekpacia/chore/default_kotlin_version_bump branch from bdddcc4 to ef1c594 Compare January 9, 2025 23:26
@github-actions github-actions bot removed the team-android Owned by Android platform team label Jan 9, 2025
@@ -29,7 +29,7 @@ import 'android_sdk.dart';
const String templateDefaultGradleVersion = '8.10.2';
const String templateAndroidGradlePluginVersion = '8.7.0';
const String templateAndroidGradlePluginVersionForModule = '8.7.0';
const String templateKotlinGradlePluginVersion = '1.8.22';
const String templateKotlinGradlePluginVersion = '2.1.0';
Copy link
Contributor

Choose a reason for hiding this comment

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

I believe to do this we need to enforce that gradle is at least 8.3.
Also this is a new condition in our 4 (now 5 way) dependency graph.

https://kotlinlang.org/docs/whatsnew20.html#current-k2-compiler-limitations

The highest version I think you can use without running into gradle compatibility issues is kotlin 1.9.25

Copy link
Contributor

Choose a reason for hiding this comment

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

This template is technically ok since the AGP version is 8.7 but I think we need a new test in dev/devicelab/bin/tasks/android_java17_dependency_smoke_tests.dart

Copy link
Member Author

Choose a reason for hiding this comment

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

I believe to do this we need to enforce that gradle is at least 8.3.

Yes, but don't we already do this since (as you said) in new Android project template we already have Gradle/AGP/Kotlin versions that are compatible with each other?

I think we need a new test in dev/devicelab/bin/tasks android_java17_dependency_smoke_tests.dart

Done.

@bartekpacia bartekpacia force-pushed the bartekpacia/chore/default_kotlin_version_bump branch 2 times, most recently from b30aec3 to 3e68096 Compare January 10, 2025 17:11
@bartekpacia bartekpacia changed the title Bump default Kotlin version from 1.8.22 to 2.1.0 Android templatest: update default Kotlin from 1.8.22 to 2.1.0, update default Gradle from 8.9 to 8.12 Jan 10, 2025
@bartekpacia bartekpacia changed the title Android templatest: update default Kotlin from 1.8.22 to 2.1.0, update default Gradle from 8.9 to 8.12 Android templates: update default Kotlin from 1.8.22 to 2.1.0, update default Gradle from 8.9 to 8.12 Jan 10, 2025
@bartekpacia
Copy link
Member Author

I decided that while I'm already at it, it probably won't hurt to also upgrade to latest stable Gradle 8.12.

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.

want a second review from @gmackall

I think this is ok to land but we probably need to update our compatibility logic to look at gradle and kotlin support now that we know that kotlin 2 requires AGP 8.3 or higher.

@reidbaker
Copy link
Contributor

#161443

@bartekpacia bartekpacia force-pushed the bartekpacia/chore/default_kotlin_version_bump branch from 3e68096 to 2e6b0f3 Compare January 23, 2025 00:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tool Affects the "flutter" command-line tool. See also t: labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants