This message was deleted.
# community-support
s
This message was deleted.
a
Can you share the
gradlePlugin {}
configuration? And just double check that the ID of the registered plugin matches the ID that you're applying?
You might have to specify the test source sets:
Copy code
gradlePlugin {
  testSourceSets(...)
}
c
Here the
gradlePlugin {}
configure. If I move the test into the sourceSet
test
instead of
functionalTest
it works like a charm.
Copy code
gradlePlugin {
    plugins {
        register("helm") {
            id = "com.company.gradleplugin.id"
            implementationClass = "com.company.gradleplugin.helm.HelmPlugin"
        }
    }
}
I will try to setup hint with
testSourceSets(...)
v
withPluginClassPath()
requires that a specific file with the classpath is found in the classpath. This is usually generated by a task that is registered by the https://docs.gradle.org/current/userguide/java_gradle_plugin.html, do you use that?
c
Yes, but the file (
build/pluginUnderTestMetadata/plugin-under-test-metatadata.properties
) is not generated by the
functionalTest
task only for the
test
task.
v
For that @Adam already gave you the solution in his last message.
Copy code
gradlePlugin {
    testSourceSet(sourceSets["functionalTest"])
}
That configuration will add
gradleTestKit()
dependency for you to
...Implementation
and the
pluginUnderTestMetadata
to
...RuntimeOnly
Or with
testSourceSets(...)
instead,
test
is removed and thus will neither have test kit dependency nor the plugin under test metadata dependency
Which both should not really be necessary for unit tests
✅ 1
c
Sorry, I completely forgot to say that the proposed solution worked. thanks for the support.
👌 1