Question: Is there an accepted way to obtain an `I...
# plugin-development
k
Question: Is there an accepted way to obtain an
IncludedBuild
object from
gradle.buildPath
? It's mainly so that I can get the build's project directory, relative to the root build's project directory, for an internal plugin.
v
A build does but have a project directory unless it is a single-project build. What would you want to do with that information? Most cases where once would want to get that information, the appropriate answer is "you shouldn't". :-D
k
If I have a project structure where
root
is the root build's root, and
root/sub/included
is the root of the included build
included
, is there an accepted way to get
sub/included
, then?
v
Ah, so you need the settings directory of the included build. But again, what is the use-case, what do you intend to do with that information?
k
The Dokka/Dokkatoo plugins have a
sourceLink
setting that I wish to configure, and so the path would be important there.
v
I still don't understand why you need that directory. When Dokka is building the docs for the including build, why do you need the directory of the included build? Anyway, can't you just use
gradle.getIncludedBuild
to get what you need?
k
Building a convention plugin, I don't really know the identity of the build that the plugin is going to be used on, much less its root project relative to the root build's root project.