diff options
| author | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2021-05-07 16:26:10 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-05-07 16:26:10 +0200 |
| commit | 6779f62e6f54b783da348dc1aba248656f7956f7 (patch) | |
| tree | 068a38613d29bdbd4fe39aee90fde86343c656f3 /buildSrc/src/main/kotlin/benchmark-conventions.gradle.kts | |
| parent | d60e230c29beeeaa825987d5abf43c1e6f450dad (diff) | |
| parent | efea162372be99beb4de90929629c7ebccdb8d84 (diff) | |
build: Use Gradle version catalog
This pull request updates the Gradle build configuration to use the new version
catalog functionality, which allows us to store our dependency versions in a
centralized file located at `gradle/libs.versions.toml`.
Our previous approach stored the versions in `gradle.properties`.
The benefit of this approach however is that (1) it will be supported by
Gradle and (2) it allows us to access dependencies safely.
Diffstat (limited to 'buildSrc/src/main/kotlin/benchmark-conventions.gradle.kts')
| -rw-r--r-- | buildSrc/src/main/kotlin/benchmark-conventions.gradle.kts | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/buildSrc/src/main/kotlin/benchmark-conventions.gradle.kts b/buildSrc/src/main/kotlin/benchmark-conventions.gradle.kts index 8623e8da..4e73d4d3 100644 --- a/buildSrc/src/main/kotlin/benchmark-conventions.gradle.kts +++ b/buildSrc/src/main/kotlin/benchmark-conventions.gradle.kts @@ -55,13 +55,14 @@ benchmark { } } +dependencies { + val libs = Libs(project) + implementation(libs["kotlinx-benchmark-runtime-jvm"]) +} + // Workaround for https://github.com/Kotlin/kotlinx-benchmark/issues/39 afterEvaluate { tasks.named<org.gradle.jvm.tasks.Jar>("jmhBenchmarkJar") { duplicatesStrategy = DuplicatesStrategy.EXCLUDE } } - -dependencies { - implementation("org.jetbrains.kotlinx:kotlinx-benchmark-runtime-jvm:0.3.0") -} |
