Hi all! Maybe this is impossible, but I wanted to ...
# gradle
r
Hi all! Maybe this is impossible, but I wanted to ask: Is it possible to share code between
buildSrc/build.gradle.kts
file and the rest of buildSrc files? I have some configuration that I use in some of my plugins that I also would like to reuse in the build.gradle file. However, this file is used to build the buildSrc, so I cannot reference to any of my buildSrc helper classes. I don’t know if I’m missing something or this just is not achievable. Any help?
t
no, it is not possible
👍 1
probably you could create standalone gradle plugin that you could use both in
buildSrc/build.gradle.kts
and in files inside
buildSrc/src
folder
r
But where this plugin should be declared? I have created plugins inside the buildSrc, but of course they cannot be used here for the same reason…
t
feature request: buildSrc for buildSrc
😅 3
t
@rolgalan I mean you need to write your plugin in a separate repository, then publish it and then consume both in
buildSrc/build.gradle.kts
and your sources inside this module
👍 2
r
Ok, I imagine that.. thanks for the info. I wasn't 100% sure 👍