Hello again Kotlin Kommunity. I would like to know...
# gradle
g
Hello again Kotlin Kommunity. I would like to know if there’s a smart way to read
gradle.properties
files between modules. For example if I have
Copy code
project/
    module1/
        gradle.properties
    module2/
        gradle.properties
...etc
and in
module2
i want to be able to pull a property from
module1
like say
appVersion
is there a way to do this? or is that just a bad idea?
j
I think it is a bad idea, if you want to share a property between those modules, just add it to a higher level
gradle.properties
file, for example in the root project
v
Actually according to https://docs.gradle.org/current/userguide/userguide_single.html#sec:gradle_configuration_properties those files should not have any effect actually except if you manually read them. According to docs only a
gradle.properties
in the root project directory should be taken into account (besides the one in the distribution and gradle user home)
g
ok. great. thanks for the help. i’m trying to share version numbers of modules between modules. the modules are their own apps and some have to be aware of versions in others (essentially version syncing) if you think there’s a smarter way to do this i’m all ears