So im writing a gradle plugin but when im add a ex...
# gradle
r
So im writing a gradle plugin but when im add a extension function to be used in the build file like
Copy code
public fun KotlinDependencyHandler.slim(
    dependencyNotation: Any
): Dependency? = with(this as DefaultKotlinDependencyHandler) {
    project.dependencies.add((parent as KotlinSourceSet).slimConfigurationName, dependencyNotation)
}
once im able to use it in the build file its compiled down and i have to pass the receiver as the first parameter, is this just how it is or how do i fix this?
v
From what I understood, no. Can you maybe provide an MCVE?
r
while trying to create a minimal configuration now it works, guess im gonna have to figure out what makes it not work.
it seems to be related to shadowJar relocations, having the plugin present and using the output works but the second i relocate something it breaks
and i found it, that didn't take long, since i was the kotlin std lib and such in my plugin it seems that also messes up how gradle sees the file and therefor broke it all. welp problem solved