You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 as build.gradle in the root of the project or in properties.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.
The text was updated successfully, but these errors were encountered:
Current state
compile "com.squareup.okhttp3:okhttp:3.11.0"
(example)compile "com.squareup.okhttp3:okhttp:$okhttpVersion"
(example)Target state
Background
.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.buildSrc/
module. Here is an example implemented in Kotlin but used from within the Groovy build.gradle files.The text was updated successfully, but these errors were encountered: