I got a strange question. My coworker wants to put...
# gradle
a
I got a strange question. My coworker wants to put global properties, like, app version, in a global singleton placed at
buildSrc
. Basically something like this.
Copy code
object Application {
    lateinit var version: String
}
The version will be initialized after applying some script, like,
Application.version = "something"
. Is there anything that can go wrong in comparison with passing such values via
extra
, i. e.
extra["version"] = "something"
? I mean, singletons are bad, right? Right? ­čśČ