Skip to content

Commit 45dc338

Browse files
authored
Merge pull request #156 from jsoizo/versions_toml
Use version catalog file
2 parents 5793042 + c42d82e commit 45dc338

File tree

3 files changed

+31
-11
lines changed

3 files changed

+31
-11
lines changed

.github/workflows/build_and_test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ jobs:
1414
- name: Checkout code
1515
uses: actions/checkout@v4
1616

17-
- name: Set up JDK 8
17+
- name: Set up JDK 11
1818
uses: actions/setup-java@v4
1919
with:
2020
distribution: 'temurin'
21-
java-version: '8'
21+
java-version: '11'
2222

2323
- name: Setup Gradle
2424
uses: gradle/actions/setup-gradle@v4
@@ -29,7 +29,7 @@ jobs:
2929
path: |
3030
~/.gradle/caches
3131
~/.gradle/wrapper
32-
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
32+
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties', '**/libs.versions.toml') }}
3333
restore-keys: |
3434
${{ runner.os }}-gradle-
3535

build.gradle.kts

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ import com.vanniktech.maven.publish.SonatypeHost
44
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
55

66
plugins {
7-
kotlin("multiplatform") version "2.1.0"
8-
id("org.jetbrains.dokka") version "2.0.0"
9-
id("org.jetbrains.kotlinx.kover") version "0.9.0"
10-
id("com.vanniktech.maven.publish") version "0.30.0"
7+
alias(libs.plugins.kotlinMultiplatform)
8+
alias(libs.plugins.dokka)
9+
alias(libs.plugins.kover)
10+
alias(libs.plugins.mavenPublish)
1111
}
1212

1313
group = "com.jsoizo"
@@ -47,14 +47,12 @@ kotlin {
4747

4848
jvm().compilations["main"].defaultSourceSet {
4949
dependencies {
50-
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.10.1")
50+
implementation(libs.kotlinx.coroutines.core)
5151
}
5252
}
5353
jvm().compilations["test"].defaultSourceSet {
5454
dependencies {
55-
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.10.1")
56-
implementation("io.kotest:kotest-runner-junit5:5.9.1")
57-
implementation("io.kotest:kotest-assertions-core:5.9.1")
55+
implementation(libs.bundles.kotest)
5856
}
5957
}
6058
js().compilations["main"].defaultSourceSet {

gradle/libs.versions.toml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
[versions]
2+
kotlin = "2.1.0"
3+
coroutines = "1.10.1"
4+
maven-publish = "0.30.0"
5+
kover = "0.8.2"
6+
dokka = "2.0.0"
7+
kotest = "5.9.1"
8+
9+
[libraries]
10+
#kotlin-test = { module = "org.jetbrains.kotlin:kotlin-test", version.ref = "kotlin" }
11+
kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "coroutines" }
12+
kotest-runner-junit5 = { module = "io.kotest:kotest-runner-junit5", version.ref = "kotest" }
13+
kotest-assertions-core = { module = "io.kotest:kotest-assertions-core", version.ref = "kotest" }
14+
15+
[bundles]
16+
kotest = ["kotest-runner-junit5", "kotest-assertions-core"]
17+
18+
[plugins]
19+
kotlinMultiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }
20+
kover = { id = "org.jetbrains.kotlinx.kover", version.ref = "kover" }
21+
dokka = { id = "org.jetbrains.dokka", version.ref = "dokka" }
22+
mavenPublish = { id = "com.vanniktech.maven.publish", version.ref = "maven-publish" }

0 commit comments

Comments
 (0)