This message was deleted.
# community-support
s
This message was deleted.
m
For the repo side of this, I've found using
apply(from = repositories.gradle.kts)
is the easiest way to do this without going circular dependencies all the way down. One example here
v
Would that break configuration caching?
m
Maybe?
I have no idea, we've not enabled that yet
v
Is that for
pluginManagement { repositories { ... } }
or
dependendencyManagement { repositories { ... } }
?
Because for the former you will have a hard time as it is super-special-early-separate-evaluation
m
@Vampire we have a very long thread somewhere about this but I think it works with
pluginManagement
too in KTS (but maybe not in Groovy)
v
Want to configure some internal plugins and make them available as precompiled gradle scripts so will be declaring it as a dependency in my buildSrc using
dependendencyManagement
(assuming that will make these plugins available to all subprojects), and also as a repository in
dependencyManagement
for all my subprojects.
v
Then instead of a script plugin as Martin suggested if you don't want that or if it is not CC compatible, you should be able to add your new project that is just for that extension function either to the buildscript classpath of the settings plugin explicitly, or by having a dummy settings plugin that you apply to the settings script to get the classes with the extension on the buildscript classpath. The settings plugin does not need to do actions (or it could actually add those repositories already) and you will
includeBuild
that build within
pluginManagement { ... }
.
v
Hmm, i'm trying this but gradle complains that I can't add
project
dependencies to the buildscript classpath.
I guess i'm left with the dummy plugin method. Will try that thanks.
v
Not a project dependency. You cannot use something you build in the build that builds it. It should be in a separate included build via composite build.
v
Ah, if i includeBuild in
pluginManagement
, would it automatically get added to buildscript classpath?
Even after included via composite build, how would a dependency be added to the extension function?
v
No, you still need to add it by coordinates or dummy plugin
Maybe even just the dummy plugin works, did not try yet whether the other way works in that case