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
Vampire
01/01/2023, 11:22 AM
From what I understood, no. Can you maybe provide an MCVE?
r
Racci
01/01/2023, 11:50 AM
while trying to create a minimal configuration now it works, guess im gonna have to figure out what makes it not work.
Racci
01/01/2023, 1:03 PM
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
Racci
01/01/2023, 1:29 PM
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