I have a simple build script that defines a single file dependency (in this case Apache Commons Lang) without a repository. It basically just sits in the subdirectory lib. This is how the build script looks like:
configurations {
mydep
}
dependencies {
mydep files('lib/commons-lang3-3.1.jar')
}
When I run the task gradle dependencies I would expect to see it displayed in the dependency report but it doesn’t show up.
$ gradle -q dependencies
------------------------------------------------------------
Root project
------------------------------------------------------------
mydep
No dependencies
Is there a specific reason to why a file dependency is not listed e.g. a required repository definition? As a side-note this works fine when declaring the lib subdirectory as flat directory repository, as shown in the following script:
configurations {
mydep
}
dependencies {
mydep ':commons-lang3:3.1@jar'
}
repositories {
flatDir {
dirs 'lib'
}
}
The output looks as follows:
$ gradle -q dependencies
------------------------------------------------------------
Root project
------------------------------------------------------------
mydep
\--- :commons-lang3:3.1
This behavior was created with Gradle 1.2.