Hi, is there a way to use gradle’s `includeBuild` ...
# compiler
j
Hi, is there a way to use gradle’s
includeBuild
and
dependencySubstition
to avoid having the kotlin compilation process pull a compiler plugin from a remote repository (like
mavenLocal
) so that we don’t have to publish the
kotlin compiler plugin
before debuggin?
the subplugin is always fetched instead of using the substituted module from the included build
n
With included builds, AFAIK you just have to make sure that the maven coordinates match and there’s no need to use
dependencySubstitution
explicitly (though you could if needed). I don’t think there’s anything special about how compiler plugins are resolved, your scenario used to work fine for me.
j
ok, i’ll see if I can find out what might be causing the download then. thanks!
ya I can’t seem to make this work. the artifacts are all matched and I even tried setting the projects name in gradle but no luck. Any other thoughts would be appreciated but I am not blocked if you don’t have an idea. just kind of a pain.
n
For help, I’d ask in #gradle . To solve on my own, I guess I’d go through the
includeBuild
documentation in Gradle and check what’s wrong.
project.group
,
project.version
and the module name must match the Gradle dependency as added by your gradle plugin
j
ya they do, i’ll ask there, thanks!
v
Do an
gw outgoingVariants
on the producer to see what it producers
j
i ran
./gradlew outgoingVariants
on the build i am including. It says there are none. Did i run the command in the right place? @Vampire
v
Maybe not? Or maybe it is like dependencies and not runs on all projects in the build, I'm not sure, in the sauna right now. :-)
j
lol okay
v
We'll maybe see if you finished the MCVE. :-)
j
yup
ya reproduced, it doesn’t use the build artifact from the includedBuild but if i publish to maven local it works
IncludeBuildIssueExample.zip
v
Hea, as I suspected,
gw :buildLogic:plugin-gradle:outgoingVariants
and
gw :buildLogic:plugin-kotlin:outgoingVariants
show the respecting outgoing variants.
j
so i am ignorant of this, how do we use that information to include the sibling project?
v
It's just to see the capabilities that are published to see you used the right artifact coordinates. For the include problem I already told you how in the other thread before you even posted the MCVE, you just said it does not work which is not true, at least not in your MCVE 🙂