Introduce 'common-configuration' convention plugin

This plugin should do project common configuration in the Kotlin repo.
As a first thing I moved gson version constraint into it, because
current approach has Gradle bug:
https://github.com/gradle/gradle/issues/20548
This commit is contained in:
Yahor Berdnikau
2022-05-03 12:57:43 +02:00
committed by Space
parent 2476d1bbb6
commit 3e82661d80
3 changed files with 20 additions and 24 deletions
-22
View File
@@ -39,28 +39,6 @@ plugins {
id "com.gradle.common-custom-user-data-gradle-plugin" version "1.6.5" apply false
}
File versionPropertiesFile = new File(rootProject.projectDir, "gradle/versions.properties")
def versionProperties = new Properties()
versionPropertiesFile.withInputStream {
versionProperties.load(it)
}
dependencyResolutionManagement {
components {
withModule("com.google.code.gson:gson") {
allVariants {
withDependencies {
add("com.google.code.gson:gson") {
version {
it.require(versionProperties['versions.gson'])
}
because("Force using same gson version because of https://github.com/google/gson/pull/1991")
}
}
}
}
}
}
def buildProperties = BuildPropertiesKt.getKotlinBuildPropertiesForSettings(settings)
if (buildProperties.buildScanServer != null) {