I want to share a String between `buildSrc/build.g...
# gradle
s
I want to share a String between
buildSrc/build.gradle.kts
and the code inside
buildSrc/src
. What’s the best way to do that?
a
you could make an extra property of the project:
Copy code
ext["propertyName"] = propertyValue
readable as
project.extraProperties["propertyValue"]
iirc
and Istr you can delegate to extraProperties,
val propertyValue by project.extraProperties
s
inside of
buildSrc/src
I don’t think I have access to a
project
a
ahh.. the things inside buildSrc aren’t running from a plugin or similar?
s
not inside the src folder
l
Putting it into a file and reading it with
file.readText()
might be the simplest way.
☝️ 2