-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
Current state
- Dependencies with the version specified as an inline text are picked up, e.g.
compile "com.squareup.okhttp3:okhttp:3.11.0"
(example) - Dependencies with the version specified as an inline variable are not picked up, e.g.
compile "com.squareup.okhttp3:okhttp:$okhttpVersion"
(example)
Target state
- Both, versions defined as inline text or an inline variable are picked up.
Background
- Groovy allows to use inline variables in double quoted strings. The variable is typically defined in the same
.gradle
file or in a separate file such asbuild.gradle
in the root of the project or inproperties.gradle
which can be stored in different locations and also gets read in by gradle. - Another common pattern is to store versions and dependencies strings in the special
buildSrc/
module. Here is an example implemented in Kotlin but used from within the Groovy build.gradle files.