version-catalog-update-plugin icon indicating copy to clipboard operation
version-catalog-update-plugin copied to clipboard

Junit Jupiter version is removed when used in JvmTestSuite

Open barbulescu opened this issue 1 year ago • 1 comments

Describe the issue Junit Jupiter version is removed from catalog despite being used:

testing {
    suites {
        val test by getting(JvmTestSuite::class) {
            useJUnitJupiter(libs.versions.jupiter)
        }
    }
}
[versions]
jupiter = "5.10.1"

Steps to reproduce Execute versionCatalogUpdate on my repo

Stacktrace none

barbulescu avatar Nov 30 '24 20:11 barbulescu

Most likely the versions plugin does not detect this as a dependency. The workaround is to to keep the entry using a @keep comment. However, it will also not be updated because the versions plugin doesn't see it as a dependency.

You can also try out the new resolver that will be the default in the next version and does not depend on the versions plugin. The new resolver looks at the toml file as the source of truth and will therefore also keep the entry up to date.

hvisser avatar Dec 02 '24 12:12 hvisser