Splitties / refreshVersions

Life is too short to google for dependencies and versions
https://splitties.github.io/refreshVersions/
MIT License
1.65k stars 107 forks source link

How to add agp 7.x as dependency? #650

Closed Piasy closed 1 year ago

Piasy commented 1 year ago

When creating Android project with latest Android Studio 2021/2022, the root project build.gradle.kts file has plugins block like:


plugins {
    //trick: for the same plugin versions in all sub-modules
    id("com.android.library").version("7.3.0").apply(false)
    id("com.android.application").version("7.3.0").apply(false)
}

How could I declare it with refreshVersions?

OKatrych commented 1 year ago

EDITED by @LouisCAD:

Here's how:

Inside versions.properties:

plugin.android=7.3.0

Inside app level build.gradle.kts:

plugins {
    id("com.android.application")
    id("org.jetbrains.kotlin.android")
}
Piasy commented 1 year ago

Thanks!

LouisCAD commented 1 year ago

@OKatrych version placeholders (underscores) are not supported in the plugin DSL FYI. I edited your message to show only the correct solution.