Skip to content

Commit 694a811

Browse files
authored
Catalog build dependencies and plugins (#294)
1 parent 2fdbeba commit 694a811

2 files changed

Lines changed: 31 additions & 14 deletions

File tree

build.gradle.kts

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@
1616

1717
plugins {
1818
jacoco
19-
id("me.champeau.buildscan-recipes") version "0.2.3"
20-
id("org.nosphere.apache.rat") version "0.8.1"
21-
id("net.nemerosa.versioning") version "3.1.0"
22-
id("com.github.kt3k.coveralls") version "2.12.2"
19+
alias(libs.plugins.buildScanRecipes)
20+
alias(libs.plugins.apache.rat)
21+
alias(libs.plugins.versioning)
22+
alias(libs.plugins.coveralls)
2323
id("me.champeau.convention-test")
2424
id("me.champeau.convention-funcTest")
2525
id("me.champeau.plugin-configuration")
@@ -31,23 +31,22 @@ buildScanRecipes {
3131
}
3232

3333
dependencies {
34-
val jmhVersion = "1.37"
35-
implementation("org.openjdk.jmh:jmh-core:$jmhVersion")
34+
implementation(libs.jmh.core)
3635

37-
testImplementation("org.spockframework:spock-core:2.3-groovy-4.0") {
36+
testImplementation(libs.spock.core) {
3837
exclude(mapOf("group" to "org.apache.groovy"))
3938
}
4039
testImplementation(localGroovy())
4140
testImplementation(gradleTestKit())
4241

43-
pluginsUnderTest("org.gradle.toolchains:foojay-resolver:1.0.0")
44-
pluginsUnderTest("com.gradleup.shadow:shadow-gradle-plugin:8.3.0")
42+
pluginsUnderTest(libs.foojayResolver)
43+
pluginsUnderTest(libs.shadow.gradlePlugin)
4544

46-
testImplementation("org.openjdk.jmh:jmh-core:$jmhVersion")
47-
testImplementation("org.openjdk.jmh:jmh-generator-bytecode:$jmhVersion")
48-
testImplementation("commons-io:commons-io:2.21.0")
49-
testImplementation("com.gradleup.shadow:shadow-gradle-plugin:8.3.0")
50-
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
45+
testImplementation(libs.jmh.core)
46+
testImplementation(libs.jmh.generatorBytecode)
47+
testImplementation(libs.apache.commonsIo)
48+
testImplementation(libs.shadow.gradlePlugin)
49+
testRuntimeOnly(libs.junit.platformLauncher)
5150
}
5251

5352
java {

gradle/libs.versions.toml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
[versions]
2+
jmh = "1.37"
3+
shadow = "8.3.0"
4+
5+
[libraries]
6+
apache-commonsIo = "commons-io:commons-io:2.21.0"
7+
foojayResolver = "org.gradle.toolchains:foojay-resolver:1.0.0"
8+
jmh-core = { module = "org.openjdk.jmh:jmh-core", version.ref = "jmh" }
9+
jmh-generatorBytecode = { module = "org.openjdk.jmh:jmh-generator-bytecode", version.ref = "jmh" }
10+
junit-platformLauncher = { module = "org.junit.platform:junit-platform-launcher" }
11+
shadow-gradlePlugin = { module = "com.gradleup.shadow:shadow-gradle-plugin", version.ref = "shadow" }
12+
spock-core = "org.spockframework:spock-core:2.3-groovy-4.0"
13+
14+
[plugins]
15+
apache-rat = "org.nosphere.apache.rat:0.8.1"
16+
buildScanRecipes = "me.champeau.buildscan-recipes:0.2.3"
17+
coveralls = "com.github.kt3k.coveralls:2.12.2"
18+
versioning = "net.nemerosa.versioning:3.1.0"

0 commit comments

Comments
 (0)