Skip to content

Instantly share code, notes, and snippets.

@martinbonnin
Last active Nov 18, 2022
Embed
What would you like to do?
# gradle.properties
kotlinVersion=1.7.21
// build.gradle.kts
plugins {
    id("org.jetbrains.kotlin.jvm")
}

dependencies {
    val kotlinVersion: String by project
    implementation("org.jetbrains.kotlin:kotlin-stdlib:${kotlinVersion}")
}
// settings.gradle.kts
pluginManagement {
    val kotlinVersion: String by settings
    plugins {
        resolutionStrategy {
            eachPlugin {
                if (requested.id.id.startsWith("org.jetbrains.kotlin.")) useVersion(kotlinVersion)
            }
        }
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment