Force using 2.8.9+ gson version as a dependency

Mitigate https://github.com/google/gson/pull/1991

^KT-51837 Fixed
This commit is contained in:
Nikolay Krasko
2022-04-12 00:30:57 +03:00
committed by Yahor Berdnikau
parent 315ff0beeb
commit f7a53a1b24
8 changed files with 94 additions and 55 deletions
+22
View File
@@ -39,6 +39,28 @@ 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) {