Extract dependency versions to Versions object in buildSrc
This commit is contained in:
parent
a662ebc0a7
commit
41269f06d3
2
.github/workflows/ci.yaml
vendored
2
.github/workflows/ci.yaml
vendored
@ -19,7 +19,7 @@ jobs:
|
||||
- uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/.gradle/caches
|
||||
key: ${{ runner.os }}-gradle-caches-${{ hashFiles('**/*.gradle.kts') }} }}
|
||||
key: ${{ runner.os }}-gradle-caches-${{ hashFiles('**/*.gradle.kts') }}-${{ hashFiles('buildSrc/src/main/kotlin/Versions.kt') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-gradle-caches-
|
||||
|
||||
|
@ -10,13 +10,13 @@ description = "A Result monad for modelling success or failure operations."
|
||||
|
||||
plugins {
|
||||
base
|
||||
id("com.github.ben-manes.versions") version "0.29.0"
|
||||
id("com.github.ben-manes.versions") version Versions.versionsPlugin
|
||||
|
||||
kotlin("multiplatform") version "1.4.0" apply false
|
||||
id("kotlinx.benchmark") version "0.2.0-dev-20" apply false
|
||||
id("net.researchgate.release") version "2.8.1" apply false
|
||||
id("org.jetbrains.dokka") version "0.10.1" apply false
|
||||
id("org.jetbrains.kotlin.plugin.allopen") version "1.4.0" apply false
|
||||
kotlin("multiplatform") version Versions.kotlin apply false
|
||||
id("kotlinx.benchmark") version Versions.kotlinBenchmark apply false
|
||||
id("net.researchgate.release") version Versions.releasePlugin apply false
|
||||
id("org.jetbrains.dokka") version Versions.dokka apply false
|
||||
id("org.jetbrains.kotlin.plugin.allopen") version Versions.kotlin apply false
|
||||
}
|
||||
|
||||
tasks.withType<DependencyUpdatesTask> {
|
||||
|
7
buildSrc/build.gradle.kts
Normal file
7
buildSrc/build.gradle.kts
Normal file
@ -0,0 +1,7 @@
|
||||
plugins {
|
||||
`kotlin-dsl`
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
1
buildSrc/settings.gradle.kts
Normal file
1
buildSrc/settings.gradle.kts
Normal file
@ -0,0 +1 @@
|
||||
rootProject.name = "buildSrc"
|
10
buildSrc/src/main/kotlin/Versions.kt
Normal file
10
buildSrc/src/main/kotlin/Versions.kt
Normal file
@ -0,0 +1,10 @@
|
||||
object Versions {
|
||||
const val dokka = "0.10.1"
|
||||
const val kotlin = "1.4.0"
|
||||
const val kotlinBenchmark = "0.2.0-dev-20"
|
||||
const val kotlinCoroutines = "1.3.8"
|
||||
const val ktor = "1.4.0"
|
||||
const val logback = "1.2.3"
|
||||
const val releasePlugin = "2.8.1"
|
||||
const val versionsPlugin = "0.29.0"
|
||||
}
|
@ -15,14 +15,12 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
val ktorVersion = "1.4.0"
|
||||
|
||||
implementation(project(":kotlin-result"))
|
||||
implementation(kotlin("stdlib-jdk8"))
|
||||
implementation("ch.qos.logback:logback-classic:1.2.3")
|
||||
implementation("io.ktor:ktor-server-core:$ktorVersion")
|
||||
implementation("io.ktor:ktor-server-netty:$ktorVersion")
|
||||
implementation("io.ktor:ktor-gson:$ktorVersion")
|
||||
implementation("ch.qos.logback:logback-classic:${Versions.logback}")
|
||||
implementation("io.ktor:ktor-server-core:${Versions.ktor}")
|
||||
implementation("io.ktor:ktor-server-netty:${Versions.ktor}")
|
||||
implementation("io.ktor:ktor-gson:${Versions.ktor}")
|
||||
}
|
||||
|
||||
tasks.withType(KotlinCompile::class.java).all {
|
||||
|
@ -16,7 +16,7 @@ kotlin {
|
||||
val commonMain by getting {
|
||||
dependencies {
|
||||
implementation(kotlin("stdlib-common"))
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core-native:1.3.8")
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core-native:${Versions.kotlinCoroutines}")
|
||||
implementation(project(":kotlin-result"))
|
||||
}
|
||||
}
|
||||
@ -25,7 +25,7 @@ kotlin {
|
||||
dependencies {
|
||||
implementation(kotlin("test-common"))
|
||||
implementation(kotlin("test-annotations-common"))
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core-native:1.3.8")
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core-native:${Versions.kotlinCoroutines}")
|
||||
}
|
||||
}
|
||||
|
||||
@ -33,7 +33,7 @@ kotlin {
|
||||
dependencies {
|
||||
implementation(kotlin("test-junit"))
|
||||
implementation(kotlin("test"))
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.8")
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:${Versions.kotlinCoroutines}")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -67,7 +67,7 @@ kotlin {
|
||||
val jvmBenchmark by getting {
|
||||
dependsOn(jvmMain)
|
||||
dependencies {
|
||||
implementation("org.jetbrains.kotlinx:kotlinx.benchmark.runtime-jvm:0.2.0-dev-8")
|
||||
implementation("org.jetbrains.kotlinx:kotlinx.benchmark.runtime-jvm:${Versions.kotlinBenchmark}")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user