Simon Vergauwen
09/12/2024, 8:09 AMToolingModelBuilder. Inside my buildAll method all instances I try to retrieve from extensions are _Decorated, and I cannot seem to find any by findByType nor can I unwrap or cast them to their actual types. Any ideas?
I am using https://github.com/melix/gradle-tapi-demo-artifacts as an example.Vampire
09/12/2024, 9:08 AM_Decorated is normal. Everything you let Gradle create for you is decorated, for example to implement all the boilerplate you can leave out like injected services and so on, or making all classes ExtensionAware whether they explicitly declare it or not.
But those classes are subclasses of the actual classes, so you would still be able to find by type of cast, unless you for example try to cast to a class instance coming from a different class loader as usual.Vampire
09/12/2024, 9:09 AMSimon Vergauwen
09/12/2024, 9:46 AMunless you for example try to case to a class instance coming from a different class loader as usual.Aha, yes I think this is the case.
Simon Vergauwen
09/12/2024, 12:03 PMSimon Vergauwen
09/12/2024, 12:26 PMmodel is requested from the GradleConnector using the Gradle Tooling API?
So, I cannot access extensions from the connected project? 🤔Vampire
09/12/2024, 12:42 PMSimon Vergauwen
09/12/2024, 1:14 PMkotlin-gradle-plugin, where I replace %%PLUGIN_JAR%% with the actual path. Without the kotlin-gradle-plugin classpath the JAR will not work.
What I understand from the Gradle Tooling APi is that it loads the projects, and then builds the models by running a task. So I guess I just have to add my plugin, with the classpath dependency to the rootProject. Seeing your issues, it seems there are some quirks surrounding that.Vampire
09/12/2024, 1:35 PMVampire
09/12/2024, 1:36 PM