Skip to content

Commit

Permalink
Migrate to version catalogs (#561)
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Ramotar <mramotar@dropbox.com>
  • Loading branch information
matt-ramotar authored Jul 5, 2023
1 parent 2499d6e commit 74bb49d
Show file tree
Hide file tree
Showing 11 changed files with 83 additions and 167 deletions.
21 changes: 9 additions & 12 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,15 @@ buildscript {
}

dependencies {
classpath("com.android.tools.build:gradle:${Version.androidGradlePlugin}")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${Version.baseKotlin}")
classpath("org.jetbrains.kotlin:kotlin-serialization:${Version.baseKotlin}")
classpath("org.jetbrains.dokka:dokka-gradle-plugin:${Version.dokkaGradlePlugin}")
classpath("org.jlleitschuh.gradle:ktlint-gradle:${Version.ktlintGradle}")
classpath("com.diffplug.spotless:spotless-plugin-gradle:${Version.spotlessPluginGradle}")
classpath("org.jacoco:org.jacoco.core:${Version.jacocoGradlePlugin}")
classpath("com.vanniktech:gradle-maven-publish-plugin:${Version.mavenPublishPlugin}")
classpath("org.jetbrains.kotlinx:kover:${Version.kover}")
classpath("com.squareup.anvil:gradle-plugin:${Version.anvilGradlePlugin}")
classpath("com.squareup.sqldelight:gradle-plugin:${Version.sqlDelightGradlePlugin}")
classpath("org.jetbrains.kotlinx:atomicfu-gradle-plugin:${Version.atomicFu}")
classpath(libs.android.gradle.plugin)
classpath(libs.kotlin.gradle.plugin)
classpath(libs.kotlin.serialization.plugin)
classpath(libs.dokka.gradle.plugin)
classpath(libs.ktlint.gradle.plugin)
classpath(libs.jacoco.gradle.plugin)
classpath(libs.maven.publish.plugin)
classpath(libs.kover.plugin)
classpath(libs.atomic.fu.gradle.plugin)
}
}

Expand Down
7 changes: 0 additions & 7 deletions buildSrc/build.gradle.kts

This file was deleted.

75 changes: 0 additions & 75 deletions buildSrc/src/main/kotlin/Deps.kt

This file was deleted.

37 changes: 0 additions & 37 deletions buildSrc/src/main/kotlin/Version.kt

This file was deleted.

6 changes: 2 additions & 4 deletions cache/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ kotlin {
summary = "Cache5"
homepage = "https://github.com/MobileNativeFoundation/Store"
ios.deploymentTarget = "13"
version = Version.store
version = libs.versions.store.get()
}

sourceSets {
Expand All @@ -43,9 +43,7 @@ kotlin {

val commonMain by getting {
dependencies {
with(Deps.Kotlinx) {
api(atomicFu)
}
api(libs.kotlinx.atomic.fu)
}
}
val jvmMain by getting
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ org.gradle.jvmargs=-XX:MaxMetaspaceSize=2G

# POM file
GROUP=org.mobilenativefoundation.store
VERSION_NAME=5.0.0-beta01
VERSION_NAME=5.0.0-SNAPSHOT
POM_PACKAGING=pom
POM_DESCRIPTION = Store5 is a Kotlin Multiplatform network-resilient repository layer

Expand Down
48 changes: 48 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
[versions]
androidMinSdk = "24"
androidCompileSdk = "33"
androidGradlePlugin = "7.4.2"
androidTargetSdk = "33"
atomicFu = "0.20.2"
baseKotlin = "1.8.21"
dokkaGradlePlugin = "1.6.0"
ktlintGradle = "10.2.1"
jacocoGradlePlugin = "0.8.7"
mavenPublishPlugin = "0.22.0"
spotlessPluginGradle = "6.4.1"
junit = "4.13.2"
kotlinxCoroutines = "1.7.1"
kotlinxSerialization = "1.5.1"
kermit = "1.2.2"
testCore = "1.5.0"
kmmBridge = "0.3.2"
ktlint = "0.39.0"
kover = "0.6.0"
store = "5.0.0-beta01"
truth = "1.1.3"

[libraries]
android-gradle-plugin = { group = "com.android.tools.build", name = "gradle", version.ref = "androidGradlePlugin" }
kotlin-gradle-plugin = { group = "org.jetbrains.kotlin", name = "kotlin-gradle-plugin", version.ref = "baseKotlin" }
kotlin-serialization-plugin = { group = "org.jetbrains.kotlin", name = "kotlin-serialization", version.ref = "baseKotlin" }
dokka-gradle-plugin = { group = "org.jetbrains.dokka", name = "dokka-gradle-plugin", version.ref = "dokkaGradlePlugin" }
ktlint-gradle-plugin = { group = "org.jlleitschuh.gradle", name = "ktlint-gradle", version.ref = "ktlintGradle" }
jacoco-gradle-plugin = { group = "org.jacoco", name = "org.jacoco.core", version.ref = "jacocoGradlePlugin" }
maven-publish-plugin = { group = "com.vanniktech", name = "gradle-maven-publish-plugin", version.ref = "mavenPublishPlugin" }
kover-plugin = { group = "org.jetbrains.kotlinx", name = "kover", version.ref = "kover" }
atomic-fu-gradle-plugin = { group = "org.jetbrains.kotlinx", name = "atomicfu-gradle-plugin", version.ref = "atomicFu" }

kotlinx-atomic-fu = { group = "org.jetbrains.kotlinx", name = "atomicfu", version.ref = "atomicFu" }
kotlin-stdlib = { group = "org.jetbrains.kotlin", name = "kotlin-stdlib", version.ref = "baseKotlin" }
kotlinx-serialization-core = { group = "org.jetbrains.kotlinx", name = "kotlinx-serialization-core", version.ref = "kotlinxSerialization" }
kotlinx-serialization-json = { group = "org.jetbrains.kotlinx", name = "kotlinx-serialization-json", version.ref = "kotlinxSerialization" }
kotlinx-coroutines-android = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-android", version.ref = "kotlinxCoroutines" }
kotlinx-coroutines-core = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-core", version.ref = "kotlinxCoroutines" }
kotlinx-coroutines-rx2 = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-rx2", version.ref = "kotlinxCoroutines" }
kotlinx-datetime = { group = "org.jetbrains.kotlinx", name = "kotlinx-datetime", version = "0.4.0" }
rxjava = { group = "io.reactivex.rxjava2", name = "rxjava", version = "2.2.21" }
androidx-test-core = { group = "androidx.test", name = "core", version.ref = "testCore" }
kotlinx-coroutines-test = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-test", version.ref = "kotlinxCoroutines" }
junit = { group = "junit", name = "junit", version.ref = "junit" }
google-truth = { group = "com.google.truth", name = "truth", version.ref = "truth" }
touchlab-kermit = { group = "co.touchlab", name = "kermit", version.ref = "kermit" }
3 changes: 2 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#Sat Jun 17 09:25:41 EDT 2023
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
8 changes: 3 additions & 5 deletions multicast/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ kotlin {
summary = "Multicast5"
homepage = "https://github.com/MobileNativeFoundation/Store"
ios.deploymentTarget = "13"
version = Version.store
version = libs.versions.store.get()
}

sourceSets {
Expand All @@ -43,10 +43,8 @@ kotlin {

val commonMain by getting {
dependencies {
with(Deps.Kotlinx) {
api(atomicFu)
implementation(coroutinesCore)
}
api(libs.kotlinx.atomic.fu)
implementation(libs.kotlinx.coroutines.core)
}
}
val jvmMain by getting
Expand Down
18 changes: 8 additions & 10 deletions rx2/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,17 @@ plugins {
}

dependencies {
implementation(Deps.Kotlinx.coroutinesRx2)
implementation(Deps.Kotlinx.coroutinesCore)
implementation(Deps.Kotlinx.coroutinesAndroid)
implementation(Deps.Rx.rx2)
implementation(libs.kotlinx.coroutines.rx2)
implementation(libs.kotlinx.coroutines.core)
implementation(libs.kotlinx.coroutines.android)
implementation(libs.rxjava)
implementation(project(":store"))

testImplementation(kotlin("test"))
with(Deps.Test) {
testImplementation(junit)
testImplementation(core)
testImplementation(coroutinesTest)
testImplementation(truth)
}
testImplementation(libs.junit)
testImplementation(libs.google.truth)
testImplementation(libs.androidx.test.core)
testImplementation(libs.kotlinx.coroutines.test)
}

android {
Expand Down
25 changes: 10 additions & 15 deletions store/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ plugins {
id("com.vanniktech.maven.publish")
id("org.jetbrains.dokka")
id("org.jetbrains.kotlinx.kover")
id("co.touchlab.faktory.kmmbridge") version Version.kmmBridge
id("co.touchlab.faktory.kmmbridge") version("0.3.2")
`maven-publish`
kotlin("native.cocoapods")
id("kotlinx-atomicfu")
Expand All @@ -35,7 +35,7 @@ kotlin {
summary = "Store5"
homepage = "https://github.com/MobileNativeFoundation/Store"
ios.deploymentTarget = "13"
version = Version.store
version = libs.versions.store.get()
}

sourceSets {
Expand All @@ -48,14 +48,12 @@ kotlin {

val commonMain by getting {
dependencies {
with(Deps.Kotlinx) {
implementation(stdLib)
implementation(coroutinesCore)
implementation(serializationCore)
implementation(dateTime)
api(atomicFu)
}
implementation(Deps.Touchlab.kermit)
implementation(libs.kotlin.stdlib)
implementation(libs.kotlinx.coroutines.core)
implementation(libs.kotlinx.serialization.core)
implementation(libs.kotlinx.datetime)
api(libs.kotlinx.atomic.fu)
implementation(libs.touchlab.kermit)
implementation(project(":multicast"))
implementation(project(":cache"))
}
Expand All @@ -65,11 +63,8 @@ kotlin {
dependsOn(commonMain)
dependencies {
implementation(kotlin("test"))
with(Deps.Test) {
implementation(junit)
implementation(core)
implementation(coroutinesTest)
}
implementation(libs.junit)
implementation(libs.kotlinx.coroutines.test)
}
}

Expand Down

0 comments on commit 74bb49d

Please sign in to comment.