Skip to content

Commit

Permalink
Add lib catalog (#20)
Browse files Browse the repository at this point in the history
* Create libs.versions.toml

* Update project build.gradle.kts

* Update core build.gradle.kts

* Update solana build.gradle.kts
  • Loading branch information
Funkatronics authored Jun 3, 2024
1 parent 80c5e50 commit e43c0fc
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 16 deletions.
4 changes: 2 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
kotlin("multiplatform") version "1.9.21" apply false
id("com.vanniktech.maven.publish") version "0.25.3" apply false
alias(libs.plugins.kotlin.multiplatform) apply false
alias(libs.plugins.publish) apply false
}

//tasks.register("clean", Delete::class) {
Expand Down
10 changes: 5 additions & 5 deletions core/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
kotlin("multiplatform")
kotlin("plugin.serialization") version "1.9.21"
id("com.vanniktech.maven.publish")
alias(libs.plugins.kotlin.multiplatform)
alias(libs.plugins.kotlin.serialization)
alias(libs.plugins.publish)
}

val artifactIdPrefix: String by project
Expand Down Expand Up @@ -29,12 +29,12 @@ kotlin {
sourceSets {
val commonMain by getting {
dependencies {
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.2")
implementation(libs.kotlinx.serialization.json)
}
}
val commonTest by getting {
dependencies {
implementation(kotlin("test"))
implementation(libs.kotlin.test)
}
}
}
Expand Down
23 changes: 23 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[versions]
kotlinxCoroutines= "1.7.3"

# Plugin versions
androidGradlePlugin = "8.0.2"
kotlin = "1.9.21"
kotlinSerialization = "1.6.2"
vanniktechMavenPublish = "0.25.3"

[libraries]
crypto = { group = "com.diglol.crypto", name = "crypto", version = "0.1.5" }
kotlin-test = { group = "org.jetbrains.kotlin", name = "kotlin-test" }
kotlinx-serialization-json = { group = "org.jetbrains.kotlinx", name = "kotlinx-serialization-json", version.ref = "kotlinSerialization" }
#kotlinx-coroutines-core = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-core", version.ref = "kotlinxCoroutines" }
kotlinx-coroutines-test = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-test", version.ref = "kotlinxCoroutines" }
multimult = { group = "io.github.funkatronics", name = "multimult", version = "0.2.1" }
rpc-core = { group = "com.solanamobile", name = "rpc-core", version = "0.2.5" }

[plugins]
android-library = { id = "com.android.library", version.ref = "androidGradlePlugin" }
kotlin-multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }
kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
publish = { id = "com.vanniktech.maven.publish", version.ref = "vanniktechMavenPublish" }
18 changes: 9 additions & 9 deletions solana/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
kotlin("multiplatform")
kotlin("plugin.serialization") version "1.9.21"
id("com.vanniktech.maven.publish")
alias(libs.plugins.kotlin.multiplatform)
alias(libs.plugins.kotlin.serialization)
alias(libs.plugins.publish)
}

val artifactIdPrefix: String by project
Expand Down Expand Up @@ -30,16 +30,16 @@ kotlin {
val commonMain by getting {
dependencies {
api(project(mapOf("path" to ":core")))
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.2")
implementation("io.github.funkatronics:multimult:0.2.1")
implementation(libs.kotlinx.serialization.json)
implementation(libs.multimult)
}
}
val commonTest by getting {
dependencies {
implementation(kotlin("test"))
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.7.3")
implementation("com.diglol.crypto:pkc:0.1.5")
implementation("com.solanamobile:rpc-core:0.2.4")
implementation(libs.kotlin.test)
implementation(libs.kotlinx.coroutines.test)
implementation(libs.crypto)
implementation(libs.rpc.core)
}
}
}
Expand Down

0 comments on commit e43c0fc

Please sign in to comment.