Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
2 changes: 1 addition & 1 deletion .evergreen/run-kotlin-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ fi
echo "Running Kotlin tests"

./gradlew -version
./gradlew kotlinCheck -Dorg.mongodb.test.uri=${MONGODB_URI} ${MULTI_MONGOS_URI_SYSTEM_PROPERTY}
Copy link
Member

Choose a reason for hiding this comment

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

Ah!this is probably why kotlinCheck was added as a task. Here nothing will run as there is no task passed to gradlew.

A couple of options could be:

  1. Keep kotlinCheck and only depend on test tasks
  2. List all the kotlin projects and the tasks you want to run:
./gradlew bson-kotlin:test bson-kotlinx:test driver-kotlin-sync:test driver-kotlin-sync:integrationTest ...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think 2 is more explicit/readable about what we want to test 👍

./gradlew -Dorg.mongodb.test.uri=${MONGODB_URI} ${MULTI_MONGOS_URI_SYSTEM_PROPERTY}
2 changes: 1 addition & 1 deletion .evergreen/static-checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ RELATIVE_DIR_PATH="$(dirname "${BASH_SOURCE[0]:-$0}")"
echo "Compiling JVM drivers"

./gradlew -version
./gradlew -PxmlReports.enabled=true --info -x test -x integrationTest -x spotlessApply clean check scalaCheck kotlinCheck jar testClasses docs
./gradlew -PxmlReports.enabled=true --info -x test -x integrationTest -x spotlessApply clean check scalaCheck jar testClasses docs
7 changes: 3 additions & 4 deletions bson-kotlin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,11 @@ spotbugs { showProgress.set(true) }
// ===========================
// Test Configuration
// ===========================
tasks.create("kotlinCheck") {
description = "Runs all the kotlin checks"
tasks.findByName("check")?.run {
description = "Runs static checks and unit test"
group = "verification"

dependsOn("clean", "check")
tasks.findByName("check")?.mustRunAfter("clean")
dependsOn("spotlessCheck", "spotbugsMain", "spotbugsMain", "detekt")
}

tasks.test { useJUnitPlatform() }
Expand Down
7 changes: 3 additions & 4 deletions bson-kotlinx/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -128,12 +128,11 @@ spotbugs { showProgress.set(true) }
// ===========================
// Test Configuration
// ===========================
tasks.create("kotlinCheck") {
description = "Runs all the kotlin checks"
tasks.findByName("check")?.run {
description = "Runs static checks and unit test"
group = "verification"

dependsOn("clean", "check")
tasks.findByName("check")?.mustRunAfter("clean")
dependsOn("spotlessCheck", "spotbugsMain", "spotbugsMain", "detekt")
}

tasks.test { useJUnitPlatform() }
Expand Down
8 changes: 3 additions & 5 deletions driver-kotlin-coroutine/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -156,13 +156,11 @@ val integrationTest =
classpath = sourceSets["integrationTest"].runtimeClasspath
}

tasks.create("kotlinCheck") {
description = "Runs all the kotlin checks"
tasks.findByName("check")?.run {
description = "Runs static checks and unit test"
group = "verification"

dependsOn("clean", "check", integrationTest)
tasks.findByName("check")?.mustRunAfter("clean")
tasks.findByName("integrationTest")?.mustRunAfter("check")
dependsOn("spotlessCheck", "spotbugsMain", "spotbugsMain", "detekt")
}

tasks.test { useJUnitPlatform() }
Expand Down
7 changes: 3 additions & 4 deletions driver-kotlin-extensions/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,11 @@ tasks.spotbugsMain {
// Test Configuration
// ===========================

tasks.create("kotlinCheck") {
description = "Runs all the kotlin checks"
tasks.findByName("check")?.run {
description = "Runs static checks and unit test"
group = "verification"

dependsOn("clean", "check")
tasks.findByName("check")?.mustRunAfter("clean")
dependsOn("spotlessCheck", "spotbugsMain", "spotbugsMain", "detekt")
}

tasks.test { useJUnitPlatform() }
Expand Down
8 changes: 3 additions & 5 deletions driver-kotlin-sync/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -150,13 +150,11 @@ val integrationTest =
classpath = sourceSets["integrationTest"].runtimeClasspath
}

tasks.create("kotlinCheck") {
description = "Runs all the kotlin checks"
tasks.findByName("check")?.run {
description = "Runs static checks and unit test"
group = "verification"

dependsOn("clean", "check", integrationTest)
tasks.findByName("check")?.mustRunAfter("clean")
tasks.findByName("integrationTest")?.mustRunAfter("check")
dependsOn("spotlessCheck", "spotbugsMain", "spotbugsMain", "detekt")
}

tasks.test { useJUnitPlatform() }
Expand Down