Skip to content

Support dependencies with inline variables #1

@johnjohndoe

Description

@johnjohndoe

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 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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions