Skip to content

[FGP Kotlin conversion] Convert dependency_version_checker.gradle.kts #162102

Closed

Description

@gmackall

Convert packages/flutter_tools/gradle/src/main/kotlin_scripts/dependency_version_checker.gradle.kts from Kotlin script to Kotlin source, including renaming and moving to packages/flutter_tools/gradle/src/main/kotlin/DependencyVersionChecker.kt.

We do some fragile reflection in this script that will likely need to be removed as part of the conversion, because it depends on using Groovy's dynamic dispatch. From a brief look, it should now be possible to do something like

import com.android.build.api.AndroidPluginVersion

...

AndroidPluginVersion.getCurrent() // The AGP version
com.android.build.gradle.internal.utils.getKotlinAndroidPluginVersion(project) // The Kotlin version
project.gradle.gradleVersion // The Gradle version
JavaVersion.current() // The Java version

Though pointing at a method that has "internal" as part of its class path is suspicious! Weird that it is possible!

Then modify it's usage in flutter.groovy to no longer be applied as a script, just used as a class.

Activity

  1. added
    P1High-priority issues at the top of the work list
    team-androidOwned by Android platform team
    triaged-androidTriaged by Android platform team
    on Jan 23, 2025
  2. reidbaker commented on Feb 3, 2025

    @reidbaker
    Contributor

    Getting myself out of the critical path

  3. assigned and unassigned on Feb 5, 2025
  4. gmackall commented on Feb 11, 2025

    @gmackall
    MemberAuthor
  5. gmackall commented on Feb 12, 2025

    @gmackall
    MemberAuthor

    Fixed by #162771

  6. github-actions commented on Feb 26, 2025

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  7. locked as resolved and limited conversation to collaborators on Feb 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P1High-priority issues at the top of the work listteam-androidOwned by Android platform teamtriaged-androidTriaged by Android platform team

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions