Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to libs.versions.toml #165

Merged
merged 1 commit into from
Jan 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ buildscript {
}

dependencies {
classpath(Dependencies.dokkaGradlePlugin)
classpath(Dependencies.junitGradlePlugin)
classpath(Dependencies.kotlinGradlePlugin)
classpath(Dependencies.mavenPublishGradlePlugin)
classpath(Dependencies.wireGradlePlugin)
classpath(libs.dokkaGradlePlugin)
classpath(libs.junitGradlePlugin)
classpath(libs.kotlinGradlePlugin)
classpath(libs.mavenPublishGradlePlugin)
classpath(libs.wireGradlePlugin)
}
}

Expand Down Expand Up @@ -56,7 +56,7 @@ subprojects {

dependencies {
// add("api", project(":tempest-bom"))
add("api", platform(Dependencies.nettyBom))
add("api", platform(libs.nettyBom))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, I'm kind of surprised this works. In subprojects blocks you usually need to reference libs via rootProject.libs due to a gradle bug (gradle/gradle#16634). Are you able to confirm this block is actually getting run?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, it must be - CI is passing and this would be a build-time error otherwise. Odd, not sure why it didn't work on other repos...

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like it works inside the plugins.withType block but not outside. Woo gradle!

}
}

Expand Down
30 changes: 0 additions & 30 deletions buildSrc/src/main/kotlin/Dependencies.kt

This file was deleted.

31 changes: 31 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
[versions]
ktlint = "0.40.0"

[libraries]
assertj = { module = "org.assertj:assertj-core", version = "3.23.1" }
aws2Dynamodb = { module = "software.amazon.awssdk:dynamodb", version = "2.17.134" }
aws2DynamodbEnhanced = { module = "software.amazon.awssdk:dynamodb-enhanced", version = "2.17.134" }
awsDynamodb = { module = "com.amazonaws:aws-java-sdk-dynamodb", version = "1.11.960" }
awsDynamodbLocal = { module = "com.amazonaws:DynamoDBLocal", version = "1.13.5" }
clikt = { module = "com.github.ajalt:clikt", version = "2.8.0" }
dokkaGradlePlugin = { module = "org.jetbrains.dokka:dokka-gradle-plugin", version = "1.7.0" }
dockerCore = { module = "com.github.docker-java:docker-java-core", version = "3.2.13" }
dockerTransport = { module = "com.github.docker-java:docker-java-transport-httpclient5", version = "3.2.13" }
findbugsJsr305 = { module = "com.google.code.findbugs:jsr305", version = "3.0.2" }
guava = { module = "com.google.guava:guava", version = "31.0.1-jre" }
junit4Api = { module = "junit:junit", version = "4.13.2" }
junitApi = { module = "org.junit.jupiter:junit-jupiter-api", version = "5.8.2" }
junitEngine = { module = "org.junit.jupiter:junit-jupiter-engine", version = "5.8.2" }
junitGradlePlugin = { module = "org.junit.platform:junit-platform-gradle-plugin", version = "1.2.0" }
kotlinGradlePlugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version = "1.7.10" }
kotlinReflection = { module = "org.jetbrains.kotlin:kotlin-reflect", version = "1.7.10" }
kotlinStdLib = { module = "org.jetbrains.kotlin:kotlin-stdlib", version = "1.7.10" }
kotlinxCoroutines = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version = "1.6.4" }
kotlinxCoroutinesJdk8 = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-jdk8", version = "1.6.4" }
kotlinxCoroutinesReactive = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-reactive", version = "1.6.4" }
log4jCore = { module = "org.apache.logging.log4j:log4j-core", version = "2.17.1" }
loggingApi = { module = "io.github.microutils:kotlin-logging", version = "2.0.10" }
mavenPublishGradlePlugin = { module = "com.vanniktech:gradle-maven-publish-plugin", version = "0.25.1" }
nettyBom = { module = "io.netty:netty-bom", version = "4.1.79.Final" }
okio = { module = "com.squareup.okio:okio", version = "3.2.0" }
wireGradlePlugin = { module = "com.squareup.wire:wire-gradle-plugin", version = "4.4.0" }
6 changes: 3 additions & 3 deletions samples/guides-junit4/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ dependencies {
implementation(project(":tempest"))
implementation(project(":samples:musiclibrary"))
implementation(project(":samples:urlshortener"))
implementation(Dependencies.kotlinStdLib)
implementation(libs.kotlinStdLib)

testImplementation(Dependencies.assertj)
testImplementation(Dependencies.junit4Api)
testImplementation(libs.assertj)
testImplementation(libs.junit4Api)
implementation(project(":tempest-testing-docker"))
implementation(project(":tempest-testing-jvm"))
implementation(project(":tempest-testing-junit4"))
Expand Down
8 changes: 4 additions & 4 deletions samples/guides-junit5/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ dependencies {
implementation(project(":tempest"))
implementation(project(":samples:musiclibrary"))
implementation(project(":samples:urlshortener"))
implementation(Dependencies.kotlinStdLib)
implementation(libs.kotlinStdLib)

testImplementation(Dependencies.assertj)
testImplementation(Dependencies.junitApi)
testImplementation(Dependencies.junitEngine)
testImplementation(libs.assertj)
testImplementation(libs.junitApi)
testImplementation(libs.junitEngine)
implementation(project(":tempest-testing-docker"))
implementation(project(":tempest-testing-jvm"))
implementation(project(":tempest-testing-junit5"))
Expand Down
4 changes: 2 additions & 2 deletions samples/guides/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ dependencies {
implementation(project(":tempest"))
implementation(project(":samples:musiclibrary"))
implementation(project(":samples:urlshortener"))
implementation(Dependencies.kotlinStdLib)
implementation(Dependencies.kotlinxCoroutines)
implementation(libs.kotlinStdLib)
implementation(libs.kotlinxCoroutines)
}

val compileKotlin by tasks.getting(KotlinCompile::class) {
Expand Down
6 changes: 3 additions & 3 deletions samples/guides2-junit4/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ dependencies {
implementation(project(":tempest2"))
implementation(project(":samples:musiclibrary2"))
implementation(project(":samples:urlshortener2"))
implementation(Dependencies.kotlinStdLib)
implementation(libs.kotlinStdLib)

testImplementation(Dependencies.assertj)
testImplementation(Dependencies.junit4Api)
testImplementation(libs.assertj)
testImplementation(libs.junit4Api)
implementation(project(":tempest2-testing-docker"))
implementation(project(":tempest2-testing-jvm"))
implementation(project(":tempest2-testing-junit4"))
Expand Down
8 changes: 4 additions & 4 deletions samples/guides2-junit5/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ dependencies {
implementation(project(":tempest2"))
implementation(project(":samples:musiclibrary2"))
implementation(project(":samples:urlshortener2"))
implementation(Dependencies.kotlinStdLib)
implementation(libs.kotlinStdLib)

testImplementation(Dependencies.assertj)
testImplementation(Dependencies.junitApi)
testImplementation(Dependencies.junitEngine)
testImplementation(libs.assertj)
testImplementation(libs.junitApi)
testImplementation(libs.junitEngine)
implementation(project(":tempest2-testing-docker"))
implementation(project(":tempest2-testing-jvm"))
implementation(project(":tempest2-testing-junit5"))
Expand Down
4 changes: 2 additions & 2 deletions samples/guides2/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ dependencies {
implementation(project(":tempest2"))
implementation(project(":samples:musiclibrary2"))
implementation(project(":samples:urlshortener2"))
implementation(Dependencies.kotlinStdLib)
implementation(Dependencies.kotlinxCoroutines)
implementation(libs.kotlinStdLib)
implementation(libs.kotlinxCoroutines)
}

val compileKotlin by tasks.getting(KotlinCompile::class) {
Expand Down
4 changes: 2 additions & 2 deletions samples/javarecord/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ dependencies {

testImplementation(project(":tempest-testing-jvm"))
testImplementation(project(":tempest-testing-junit5"))
testImplementation(Dependencies.assertj)
testImplementation(Dependencies.junitEngine)
testImplementation(libs.assertj)
testImplementation(libs.junitEngine)
}

val compileKotlin by tasks.getting(KotlinCompile::class) {
Expand Down
12 changes: 6 additions & 6 deletions samples/musiclibrary-testing/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ plugins {
}

dependencies {
api(Dependencies.findbugsJsr305)
implementation(Dependencies.kotlinReflection)
implementation(Dependencies.kotlinStdLib)
api(libs.findbugsJsr305)
implementation(libs.kotlinReflection)
implementation(libs.kotlinStdLib)

testImplementation(Dependencies.assertj)
testImplementation(Dependencies.junitApi)
testImplementation(Dependencies.junitEngine)
testImplementation(libs.assertj)
testImplementation(libs.junitApi)
testImplementation(libs.junitEngine)
}
8 changes: 4 additions & 4 deletions samples/musiclibrary/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ plugins {

dependencies {
implementation(project(":tempest"))
implementation(Dependencies.kotlinStdLib)
implementation(libs.kotlinStdLib)

testImplementation(Dependencies.assertj)
testImplementation(Dependencies.junitApi)
testImplementation(Dependencies.junitEngine)
testImplementation(libs.assertj)
testImplementation(libs.junitApi)
testImplementation(libs.junitEngine)
}
8 changes: 4 additions & 4 deletions samples/musiclibrary2/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ plugins {

dependencies {
implementation(project(":tempest2"))
implementation(Dependencies.kotlinStdLib)
implementation(libs.kotlinStdLib)

testImplementation(Dependencies.assertj)
testImplementation(Dependencies.junitApi)
testImplementation(Dependencies.junitEngine)
testImplementation(libs.assertj)
testImplementation(libs.junitApi)
testImplementation(libs.junitEngine)
}
10 changes: 5 additions & 5 deletions samples/urlshortener/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ plugins {

dependencies {
implementation(project(":tempest"))
implementation(Dependencies.kotlinStdLib)
implementation(Dependencies.clikt)
implementation(libs.kotlinStdLib)
implementation(libs.clikt)

testImplementation(Dependencies.assertj)
testImplementation(Dependencies.junitApi)
testImplementation(Dependencies.junitEngine)
testImplementation(libs.assertj)
testImplementation(libs.junitApi)
testImplementation(libs.junitEngine)
}
10 changes: 5 additions & 5 deletions samples/urlshortener2/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ plugins {

dependencies {
implementation(project(":tempest2"))
implementation(Dependencies.kotlinStdLib)
implementation(Dependencies.clikt)
implementation(libs.kotlinStdLib)
implementation(libs.clikt)

testImplementation(Dependencies.assertj)
testImplementation(Dependencies.junitApi)
testImplementation(Dependencies.junitEngine)
testImplementation(libs.assertj)
testImplementation(libs.junitApi)
testImplementation(libs.junitEngine)
}
12 changes: 6 additions & 6 deletions tempest-internal/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ plugins {
}

dependencies {
api(Dependencies.findbugsJsr305)
implementation(Dependencies.kotlinReflection)
implementation(Dependencies.kotlinStdLib)
api(libs.findbugsJsr305)
implementation(libs.kotlinReflection)
implementation(libs.kotlinStdLib)

testImplementation(Dependencies.assertj)
testImplementation(Dependencies.junitApi)
testImplementation(Dependencies.junitEngine)
testImplementation(libs.assertj)
testImplementation(libs.junitApi)
testImplementation(libs.junitEngine)
}


Expand Down
10 changes: 5 additions & 5 deletions tempest-testing-docker/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ plugins {
dependencies {
api(project(":tempest-testing"))
implementation(project(":tempest-testing-internal"))
implementation(Dependencies.kotlinStdLib)
implementation(Dependencies.dockerCore)
implementation(Dependencies.dockerTransport)
implementation(libs.kotlinStdLib)
implementation(libs.dockerCore)
implementation(libs.dockerTransport)

testImplementation(Dependencies.assertj)
testImplementation(Dependencies.junitEngine)
testImplementation(libs.assertj)
testImplementation(libs.junitEngine)
testImplementation(project(":samples:urlshortener"))
testImplementation(project(":tempest-testing-junit5"))
}
Expand Down
12 changes: 6 additions & 6 deletions tempest-testing-internal/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ plugins {

dependencies {
api(project(":tempest-testing"))
api(Dependencies.loggingApi)
implementation(Dependencies.log4jCore)
implementation(Dependencies.kotlinStdLib)
api(libs.loggingApi)
implementation(libs.log4jCore)
implementation(libs.kotlinStdLib)

testImplementation(Dependencies.assertj)
testImplementation(Dependencies.junitApi)
testImplementation(Dependencies.junitEngine)
testImplementation(libs.assertj)
testImplementation(libs.junitApi)
testImplementation(libs.junitEngine)
}


Expand Down
10 changes: 5 additions & 5 deletions tempest-testing-junit4/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ plugins {

dependencies {
api(project(":tempest-testing"))
api(Dependencies.junit4Api)
api(libs.junit4Api)
implementation(project(":tempest-testing-internal"))
implementation(Dependencies.kotlinStdLib)
implementation(Dependencies.guava)
implementation(Dependencies.kotlinReflection)
implementation(libs.kotlinStdLib)
implementation(libs.guava)
implementation(libs.kotlinReflection)

testImplementation(project(":samples:urlshortener"))
testImplementation(project(":tempest-testing-jvm"))
testImplementation(Dependencies.assertj)
testImplementation(libs.assertj)
}

tasks.withType<Test> {
Expand Down
12 changes: 6 additions & 6 deletions tempest-testing-junit5/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@ plugins {

dependencies {
api(project(":tempest-testing"))
api(Dependencies.junitApi)
api(libs.junitApi)
implementation(project(":tempest-testing-internal"))
implementation(Dependencies.kotlinStdLib)
implementation(Dependencies.guava)
implementation(Dependencies.kotlinReflection)
implementation(libs.kotlinStdLib)
implementation(libs.guava)
implementation(libs.kotlinReflection)

testImplementation(project(":samples:urlshortener"))
testImplementation(project(":tempest-testing-jvm"))
testImplementation(Dependencies.assertj)
testImplementation(Dependencies.junitEngine)
testImplementation(libs.assertj)
testImplementation(libs.junitEngine)
}


Expand Down
10 changes: 5 additions & 5 deletions tempest-testing-jvm/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@ plugins {
dependencies {
api(project(":tempest-testing"))
implementation(project(":tempest-testing-internal"))
implementation(Dependencies.awsDynamodbLocal)
implementation(Dependencies.kotlinStdLib)
implementation(libs.awsDynamodbLocal)
implementation(libs.kotlinStdLib)

if (org.apache.tools.ant.taskdefs.condition.Os.isArch("aarch64")) {
implementation("io.github.ganadist.sqlite4java:libsqlite4java-osx-aarch64:1.0.392")
}

testImplementation(Dependencies.assertj)
testImplementation(Dependencies.junitApi)
testImplementation(Dependencies.junitEngine)
testImplementation(libs.assertj)
testImplementation(libs.junitApi)
testImplementation(libs.junitEngine)
}


Expand Down
Loading