Integration test task got no source after Gradle v9 upgrade

Hello

We were using Gradle 8.14.3 on Java and Kotlin projects, and a custom integration test like this:

tasks.test {
    filter {
        excludeTestsMatching("*IntegrationTest")
    }
}

val integrationTest = tasks.register<Test>("integrationTest") {
    group = "verification"
    description = "Runs integration tests."
    filter {
        includeTestsMatching("*IntegrationTest")
    }
    mustRunAfter(tasks.test)
}

tasks.check {
    dependsOn(integrationTest)
}

However, after upgrading to Gradle v9, no integration tests are executed. We now get in the output:

> Task :integrationTest NO-SOURCE

Accordingly to the documentation, nothing changed in test filtering: Testing in Java & JVM projects

Any suggestion?

Well, what do you expect when you ignore deprecation warnings and do a major version upgrade? :slight_smile:

You got a deprecation warning due to your setup since Gradle 8.1: Upgrading to Gradle 9.0.0

Oh, will review deprecations. Thanks a lot @Vampire !

For a smooth Gradle upgrade experience I usually recommend:

  • upgrade to the latest patch version within the same major version
  • upgrade all plugins as far as possible
  • fix all deprecation warnings
  • upgrade to the latest patch version in the directly following major version
  • go to second step and iterate until at target version

And during the whole process of course considering release notes and upgrade notes. :slight_smile: