Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@martinbonnin
Last active November 18, 2022 15:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save martinbonnin/e6a2af4a9e722e93b41ce31bf3ef19d0 to your computer and use it in GitHub Desktop.
Save martinbonnin/e6a2af4a9e722e93b41ce31bf3ef19d0 to your computer and use it in GitHub Desktop.
# 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