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

Add support for jetpack compiler kotlinCompilerExtensionVersion #18354

Closed
igorwojda opened this issue Oct 16, 2022 · 9 comments · Fixed by #20796
Closed

Add support for jetpack compiler kotlinCompilerExtensionVersion #18354

igorwojda opened this issue Oct 16, 2022 · 9 comments · Fixed by #20796
Labels
manager:gradle Gradle package manager status:requirements Full requirements are not yet known, so implementation should not be started type:feature Feature (new functionality)

Comments

@igorwojda
Copy link

What would you like Renovate to be able to do?

Unlike any other dependency, the Android Jetpack compose compiler dependency is upgraded by setting kotlinCompilerExtensionVersion property in the Gradle file:

module\build.gradle file :

android {
   ...

    composeOptions {
        kotlinCompilerExtensionVersion = "1.3.2"
    }
}

More: https://developer.android.com/jetpack/androidx/releases/compose-kotlin

If you have any ideas on how this should be implemented, please tell us here.

Upgrade the value of the kotlinCompilerExtensionVersion property in all module\build.gradle files.

Keep in mind that kotlinCompilerExtensionVersion propertyty value can be retrieved directly from Gradle libs.versions.toml file:

android {
   ...

    composeOptions {
        kotlinCompilerExtensionVersion = libs.versions.kotlinCompilerExtensionVersion.get()
    }
}

BTW
Android Jetpack compiler version is tightly coupled with the Kotlin version, so they have to be upgraded together. See kotlin compatibility https://developer.android.com/jetpack/androidx/releases/compose-kotlin#pre-release_kotlin_compatibility

Is this a feature you are interested in implementing yourself?

No

@igorwojda igorwojda added priority-5-triage status:requirements Full requirements are not yet known, so implementation should not be started type:feature Feature (new functionality) labels Oct 16, 2022
@Churro
Copy link
Collaborator

Churro commented Oct 16, 2022

It's possible to integrate updates for kotlinCompilerExtensionVersion, as it can be mapped to https://maven.google.com/web/index.html#androidx.compose.compiler:compiler
In fact, it will be very similar to checkstyle, pmd, lombok, so that will work once done.

What won't work is to make renovate aware what kotlinCompilerExtensionVersion is compatible with which kotlin version. You could still define yourself one or multiple packageRules for that.

@Churro Churro added the manager:gradle Gradle package manager label Oct 16, 2022
@Churro Churro self-assigned this Oct 16, 2022
@ede-wolf-gls

This comment was marked as off-topic.

@viceice
Copy link
Member

viceice commented Nov 23, 2022

@ede-wolf-gls Please ask at a new discussion

@mustafaozhan
Copy link

Really interested in this

@Churro Churro removed their assignment Jan 4, 2023
@mustafaozhan
Copy link

Is renovate updates the unused dependencies too ? What about if we define below in TOML file

[versions]

composeCompiler = "1.4.0"

[libraries]

android-composeCompiler = {module="androidx.compose.compiler:compiler", version.ref ="composeCompiler"}

Will Renovate update composeCompiler = "1.4.0" to 1.4.1 when the new version available, even if we do not use android-composeCompiler anywhere in dependencies ?

@mustafaozhan
Copy link

Luckily, new version of composeCompiler is released yesterday and I had chance to test the workaround above, and it is working 🎉

@igorwojda you can use as workaound, you do not need to implement the dependency anywhere it is enough it to be existed in the toml file

@igorwojda
Copy link
Author

Yes, composeCompiler can be updated, but at some point, it will be misaligned with the Kotlin version.

@Churro can you elaborate on these packageRules? Perhaps drop rules that would work for this scenario?

@mustafaozhan
Copy link

I currently have this in my package rules in order to update kotlin related libraries together:

  "packageRules": [
    {
      "matchPackagePatterns": [
        "^org.jetbrains.kotlin",
        "^com.google.devtools.ksp",
        "^androidx.compose.compiler"
      ],
      "groupName": "kotlin"
    }
  ]

@mustafaozhan
Copy link

@Churro @rarkins is that mean I can get rid of the workaround now ?

The unused dependency in TOML file ?

[libraries]

android-composeCompiler = {module="androidx.compose.compiler:compiler", version.ref ="composeCompiler"}

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
manager:gradle Gradle package manager status:requirements Full requirements are not yet known, so implementation should not be started type:feature Feature (new functionality)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants