Hey!
I’m trying to apply the Compose Rules plugin to my project, but I’m having some issues.
Both my detekt and ktlint configurations are precompiled Gradle scripts in KTS.
How could I add a plugin here?
you shouldn’t use apply, instead use plugins block as usual. Then you get the same experience you would get in a normal build file
Javier
11/17/2022, 8:41 PM
if I remember correctly, the function was called
detektPlugin(“…”)
, you can get the same by using string extension function
Copy code
“detektPlugin”(“…”)
e
escodro
11/17/2022, 8:45 PM
Thanks a ton, it worked!
The last thing I imagined is that I could hardcode the function as a string. 😂
j
Javier
11/17/2022, 8:48 PM
that string ext work with all kinds of configurations, so if the plugin is not applied via plugins block and the configuration accessors are not generated you can use it,