Hello, is there a way I can make this `versionOf` ...
# getting-started
j
Hello, is there a way I can make this
versionOf
function available in all
build.gradle.kts
files across my project? Hello, is there a way I can make
j
I mean, there are ways, but you should really consider using the versions catalog instead of gradle properties for this
j
Thanks! I did not know about this! I'll take a further look
Just for the sake of interest, you mention it is possible, how?
j
(Also, this is not really a Kotlin question, you should probably post this on the Gradle slack if you want it on Slack)
👍 1
One way is to setup a
buildSrc
, and put the function there. It will be automatically available everywhere in your build. In general, having something that goes on the classpath of all build files is not that desirable, so for more complex things you might want to consider putting convention plugins in separate included builds