[repo] Start using version catalog in the main build

This commit is contained in:
Yahor Berdnikau
2023-07-18 10:40:39 +02:00
committed by Space Team
parent 9294a74bf2
commit 63b0e900a9
3 changed files with 8 additions and 8 deletions
+2 -6
View File
@@ -14,15 +14,11 @@ buildscript {
classpath("org.jetbrains.kotlin:kotlin-build-gradle-plugin:${kotlinBuildProperties.buildGradlePluginVersion}")
}
val versionPropertiesFile = project.rootProject.projectDir.resolve("gradle/versions.properties")
val versionProperties = java.util.Properties()
versionPropertiesFile.inputStream().use { propInput ->
versionProperties.load(propInput)
}
val gsonVersion = libs.versions.gson.get()
configurations.all {
resolutionStrategy.eachDependency {
if (requested.group == "com.google.code.gson" && requested.name == "gson") {
useVersion(versionProperties["versions.gson"] as String)
useVersion(gsonVersion)
because("Force using same gson version because of https://github.com/google/gson/pull/1991")
}
}
+5
View File
@@ -14,6 +14,7 @@ ktor = "2.0.2" # should be in sync with versions.properties
kotlinx-metadataJvm = "0.6.2"
# Forcing gson version because of https://github.com/google/gson/pull/1991
gson = { strictly = "2.8.9" } # should be in sync with version.properties
jetbrains-ideaExt = "1.0.1"
[libraries]
dexMemberList = { module = "com.jakewharton.dex:dex-member-list", version.ref = "dexMemberList" }
@@ -30,3 +31,7 @@ proguard-gradlePlugin = { module = "net.sf.proguard:proguard-gradle", version.re
ktor-client-core = { module = "io.ktor:ktor-client-core", version.ref = "ktor" }
ktor-client-cio = { module = "io.ktor:ktor-client-cio", version.ref = "ktor" }
gson = { module = "com.google.code.gson:gson", version.ref = "gson" }
jetbrains-ideaExt-gradlePlugin = { module = "gradle.plugin.org.jetbrains.gradle.plugin.idea-ext:gradle-idea-ext", version.ref = "jetbrains-ideaExt" }
[plugins]
jetbrains-ideaExt = { id = "org.jetbrains.gradle.plugin.idea-ext", version.ref = "jetbrains-ideaExt" }
@@ -80,8 +80,7 @@ dependencies {
}
implementation(libs.proguard.gradlePlugin)
// Version should be in sync with <root>/build.gradle.kts
implementation("gradle.plugin.org.jetbrains.gradle.plugin.idea-ext:gradle-idea-ext:1.0.1")
implementation(libs.jetbrains.ideaExt.gradlePlugin)
implementation(libs.ktor.client.core)
implementation(libs.ktor.client.cio)