Skip to content

Commit 74bb49d

Browse files
authored
Migrate to version catalogs (#561)
Signed-off-by: Matt Ramotar <mramotar@dropbox.com>
1 parent 2499d6e commit 74bb49d

File tree

11 files changed

+83
-167
lines changed

11 files changed

+83
-167
lines changed

build.gradle.kts

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,15 @@ buildscript {
1111
}
1212

1313
dependencies {
14-
classpath("com.android.tools.build:gradle:${Version.androidGradlePlugin}")
15-
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${Version.baseKotlin}")
16-
classpath("org.jetbrains.kotlin:kotlin-serialization:${Version.baseKotlin}")
17-
classpath("org.jetbrains.dokka:dokka-gradle-plugin:${Version.dokkaGradlePlugin}")
18-
classpath("org.jlleitschuh.gradle:ktlint-gradle:${Version.ktlintGradle}")
19-
classpath("com.diffplug.spotless:spotless-plugin-gradle:${Version.spotlessPluginGradle}")
20-
classpath("org.jacoco:org.jacoco.core:${Version.jacocoGradlePlugin}")
21-
classpath("com.vanniktech:gradle-maven-publish-plugin:${Version.mavenPublishPlugin}")
22-
classpath("org.jetbrains.kotlinx:kover:${Version.kover}")
23-
classpath("com.squareup.anvil:gradle-plugin:${Version.anvilGradlePlugin}")
24-
classpath("com.squareup.sqldelight:gradle-plugin:${Version.sqlDelightGradlePlugin}")
25-
classpath("org.jetbrains.kotlinx:atomicfu-gradle-plugin:${Version.atomicFu}")
14+
classpath(libs.android.gradle.plugin)
15+
classpath(libs.kotlin.gradle.plugin)
16+
classpath(libs.kotlin.serialization.plugin)
17+
classpath(libs.dokka.gradle.plugin)
18+
classpath(libs.ktlint.gradle.plugin)
19+
classpath(libs.jacoco.gradle.plugin)
20+
classpath(libs.maven.publish.plugin)
21+
classpath(libs.kover.plugin)
22+
classpath(libs.atomic.fu.gradle.plugin)
2623
}
2724
}
2825

buildSrc/build.gradle.kts

Lines changed: 0 additions & 7 deletions
This file was deleted.

buildSrc/src/main/kotlin/Deps.kt

Lines changed: 0 additions & 75 deletions
This file was deleted.

buildSrc/src/main/kotlin/Version.kt

Lines changed: 0 additions & 37 deletions
This file was deleted.

cache/build.gradle.kts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ kotlin {
3030
summary = "Cache5"
3131
homepage = "https://github.com/MobileNativeFoundation/Store"
3232
ios.deploymentTarget = "13"
33-
version = Version.store
33+
version = libs.versions.store.get()
3434
}
3535

3636
sourceSets {
@@ -43,9 +43,7 @@ kotlin {
4343

4444
val commonMain by getting {
4545
dependencies {
46-
with(Deps.Kotlinx) {
47-
api(atomicFu)
48-
}
46+
api(libs.kotlinx.atomic.fu)
4947
}
5048
}
5149
val jvmMain by getting

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ org.gradle.jvmargs=-XX:MaxMetaspaceSize=2G
88

99
# POM file
1010
GROUP=org.mobilenativefoundation.store
11-
VERSION_NAME=5.0.0-beta01
11+
VERSION_NAME=5.0.0-SNAPSHOT
1212
POM_PACKAGING=pom
1313
POM_DESCRIPTION = Store5 is a Kotlin Multiplatform network-resilient repository layer
1414

gradle/libs.versions.toml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
[versions]
2+
androidMinSdk = "24"
3+
androidCompileSdk = "33"
4+
androidGradlePlugin = "7.4.2"
5+
androidTargetSdk = "33"
6+
atomicFu = "0.20.2"
7+
baseKotlin = "1.8.21"
8+
dokkaGradlePlugin = "1.6.0"
9+
ktlintGradle = "10.2.1"
10+
jacocoGradlePlugin = "0.8.7"
11+
mavenPublishPlugin = "0.22.0"
12+
spotlessPluginGradle = "6.4.1"
13+
junit = "4.13.2"
14+
kotlinxCoroutines = "1.7.1"
15+
kotlinxSerialization = "1.5.1"
16+
kermit = "1.2.2"
17+
testCore = "1.5.0"
18+
kmmBridge = "0.3.2"
19+
ktlint = "0.39.0"
20+
kover = "0.6.0"
21+
store = "5.0.0-beta01"
22+
truth = "1.1.3"
23+
24+
[libraries]
25+
android-gradle-plugin = { group = "com.android.tools.build", name = "gradle", version.ref = "androidGradlePlugin" }
26+
kotlin-gradle-plugin = { group = "org.jetbrains.kotlin", name = "kotlin-gradle-plugin", version.ref = "baseKotlin" }
27+
kotlin-serialization-plugin = { group = "org.jetbrains.kotlin", name = "kotlin-serialization", version.ref = "baseKotlin" }
28+
dokka-gradle-plugin = { group = "org.jetbrains.dokka", name = "dokka-gradle-plugin", version.ref = "dokkaGradlePlugin" }
29+
ktlint-gradle-plugin = { group = "org.jlleitschuh.gradle", name = "ktlint-gradle", version.ref = "ktlintGradle" }
30+
jacoco-gradle-plugin = { group = "org.jacoco", name = "org.jacoco.core", version.ref = "jacocoGradlePlugin" }
31+
maven-publish-plugin = { group = "com.vanniktech", name = "gradle-maven-publish-plugin", version.ref = "mavenPublishPlugin" }
32+
kover-plugin = { group = "org.jetbrains.kotlinx", name = "kover", version.ref = "kover" }
33+
atomic-fu-gradle-plugin = { group = "org.jetbrains.kotlinx", name = "atomicfu-gradle-plugin", version.ref = "atomicFu" }
34+
35+
kotlinx-atomic-fu = { group = "org.jetbrains.kotlinx", name = "atomicfu", version.ref = "atomicFu" }
36+
kotlin-stdlib = { group = "org.jetbrains.kotlin", name = "kotlin-stdlib", version.ref = "baseKotlin" }
37+
kotlinx-serialization-core = { group = "org.jetbrains.kotlinx", name = "kotlinx-serialization-core", version.ref = "kotlinxSerialization" }
38+
kotlinx-serialization-json = { group = "org.jetbrains.kotlinx", name = "kotlinx-serialization-json", version.ref = "kotlinxSerialization" }
39+
kotlinx-coroutines-android = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-android", version.ref = "kotlinxCoroutines" }
40+
kotlinx-coroutines-core = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-core", version.ref = "kotlinxCoroutines" }
41+
kotlinx-coroutines-rx2 = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-rx2", version.ref = "kotlinxCoroutines" }
42+
kotlinx-datetime = { group = "org.jetbrains.kotlinx", name = "kotlinx-datetime", version = "0.4.0" }
43+
rxjava = { group = "io.reactivex.rxjava2", name = "rxjava", version = "2.2.21" }
44+
androidx-test-core = { group = "androidx.test", name = "core", version.ref = "testCore" }
45+
kotlinx-coroutines-test = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-test", version.ref = "kotlinxCoroutines" }
46+
junit = { group = "junit", name = "junit", version.ref = "junit" }
47+
google-truth = { group = "com.google.truth", name = "truth", version.ref = "truth" }
48+
touchlab-kermit = { group = "co.touchlab", name = "kermit", version.ref = "kermit" }
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
#Sat Jun 17 09:25:41 EDT 2023
12
distributionBase=GRADLE_USER_HOME
23
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.1-bin.zip
4+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
45
zipStoreBase=GRADLE_USER_HOME
56
zipStorePath=wrapper/dists

multicast/build.gradle.kts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ kotlin {
3030
summary = "Multicast5"
3131
homepage = "https://github.com/MobileNativeFoundation/Store"
3232
ios.deploymentTarget = "13"
33-
version = Version.store
33+
version = libs.versions.store.get()
3434
}
3535

3636
sourceSets {
@@ -43,10 +43,8 @@ kotlin {
4343

4444
val commonMain by getting {
4545
dependencies {
46-
with(Deps.Kotlinx) {
47-
api(atomicFu)
48-
implementation(coroutinesCore)
49-
}
46+
api(libs.kotlinx.atomic.fu)
47+
implementation(libs.kotlinx.coroutines.core)
5048
}
5149
}
5250
val jvmMain by getting

rx2/build.gradle.kts

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,17 @@ plugins {
1414
}
1515

1616
dependencies {
17-
implementation(Deps.Kotlinx.coroutinesRx2)
18-
implementation(Deps.Kotlinx.coroutinesCore)
19-
implementation(Deps.Kotlinx.coroutinesAndroid)
20-
implementation(Deps.Rx.rx2)
17+
implementation(libs.kotlinx.coroutines.rx2)
18+
implementation(libs.kotlinx.coroutines.core)
19+
implementation(libs.kotlinx.coroutines.android)
20+
implementation(libs.rxjava)
2121
implementation(project(":store"))
2222

2323
testImplementation(kotlin("test"))
24-
with(Deps.Test) {
25-
testImplementation(junit)
26-
testImplementation(core)
27-
testImplementation(coroutinesTest)
28-
testImplementation(truth)
29-
}
24+
testImplementation(libs.junit)
25+
testImplementation(libs.google.truth)
26+
testImplementation(libs.androidx.test.core)
27+
testImplementation(libs.kotlinx.coroutines.test)
3028
}
3129

3230
android {

0 commit comments

Comments
 (0)