This message was deleted.
# plugin-development
s
This message was deleted.
c
No idea. Why would one even care? Just inject what you need and use it.
k
Mostly in case you define an inline function within
Foo
(hence why
objects
and
providers
would be deliberately public). The fear is that calling this inline function from
a
and from
b
might have small differences if
objects
and
providers
were different in each, all other things being equal.
c
while I wouldn’t rely on instance identity, they are shared services that provide the same operations. So long as everything is scoped to within a project they’ll be functionally equivalent.
I’ve worked around the inline function thing by having it delegate to another public (non-inline) method such that visibility doesn’t need to be relaxed.
Simple example where the inline function is used as a convenience for generic type:
Copy code
public inline fun <reified T : PreReleaseHook> hook(vararg parameters: Any) {
    hook(T::class, *parameters)
}

public fun <T : PreReleaseHook> hook(type: KClass<T>, vararg parameters: Any) {
   // do stuff here
}