I launched our first <Gradle plugin>. We use an in...
# plugin-development
n
I launched our first Gradle plugin. We use an internal Gradle API (namely
ProjectDependencyInternal
) to emulate what typesafe project accessors. I understand this is risky but feel the risk is worth it in this case, but of course I'd prefer to not use the internal API. Is there any other way around this with today's API that doesn't require extra syntax?
What I mean by "extra syntax" is having to write
.dependency
or
projectDependency(...)
or something else that resolves get a
ProjectDependency
from the generated accessor.
o
I'm not sure I understand the benefit of making a new type for each project accessor, why not just have those be ProjectDependency?
n
Because I need to generate nested accessors, just like the standard gradle accessors:
Copy code
project.foo.bar.baz
So if
project.foo
returned a
ProjectDependency
I couldn't expose
bar