efemoney
04/16/2022, 9:17 AMtesting.suites
container not get accessors for kotlin dsl?Vampire
04/16/2022, 11:50 AMefemoney
04/16/2022, 11:54 AMtest
suite registered by default by the testing base plugin does not get accessors also so I don’t see the guarantee that my custom plugin will get them 🤔Vampire
04/16/2022, 11:57 AMsuites
is a named domain object container and I think for those no accessors are generated. Maybe good candidate for a feature request if there is none yet.efemoney
04/16/2022, 12:09 PMtesting
and the container is suites
Vampire
04/16/2022, 12:12 PMgrossws
04/16/2022, 12:54 PMNDOC
if they are created/registered in some plugin that you apply. At least it was a case for `TasksContainer`/`SourceSetsContainer`. I prefer to use explicit named/by existing/by getting though.
It's not just IDE shows red but it doesn't run/compile if you try to use just test { .. }
or test.configure { .. }
?efemoney
04/16/2022, 12:57 PMtest
suite is created by the test suite plugin. Still no accessors generated for it. I also used named
to access & configure it just belowgrossws
04/16/2022, 1:02 PMefemoney
04/16/2022, 1:08 PMgrossws
04/16/2022, 1:08 PMTaskContainer.test
and SourceSetContainer.test
were generated(
And I've found no issues on GitHub either about test suites accessors or polymorphic named domain object containers.efemoney
04/16/2022, 1:10 PMgrossws
04/16/2022, 1:50 PM*ConfigurationAccessors.kt
even have generated javadoc and generate extension methods for different receivers like `DependencyHandler`/`ArtifactHandler`/etc).
Doesn't looks like it's a bug more like just an absent feature ,)Vampire
04/16/2022, 1:55 PMextensions.add("testSuites", project.extensions.getByType<TestingExtension>().suites)
in a plugin, I get accessors for testSuites.test
and testSuites { test { } }
.
And if I have interface Foo : ExtensionAware
and extensions.create<Foo>("foo").extensions.add("testSuites", extensions.getByType<TestingExtension>().suites)
then I get accessors for foo.testSuites.test
and foo { testSuites { test { } } }
.
But suites
is a regular property on the testing
extension and for that no accessors are generated.
So as I said, if there is no feature request already, I guess a feature request to generate accessors for container properties on extensions would be necessary.