Gradle: Error resolving inline version string defined in ext block

Issue #269 closed
Tobias Preuss created an issue

In my Android project I am using an ext block to a define version which is the same for multiple artifacts in a central location.

ext {
    supportLibVersion = "23.4.0"
}

dependencies {
    compile "com.android.support:appcompat-v7:${supportLibVersion}"
    testCompile "com.android.support:support-annotations:${supportLibVersion}"
}

VersionEye currently does not resolve the version as shown in the screenshot. It displays the $ sign instead.

versioneye.png

Please note, that Groovy allows different ways for inlining variables:

  • compile "com.android.support:appcompat-v7:${supportLibVersion}"
  • compile "com.android.support:appcompat-v7:$supportLibVersion"

Related issues

Comments (6)

  1. Robert Reiz

    Hey @tbsprs The link you posted seems to show a different content. In the file you linked here I can't see any variable definitions. Can you please update the link or just post the full content of the file here? Many Thanks.

  2. Log in to comment