Sorry to be a nuisance, it's just that with libraries like Gradle where
a fair degree of "magic" is involved, I always feel pretty much stuck
if something's not working as suggested by the docs.
Trial and error also didn't get me anywhere in this case.
So, I have a multi-module build, with a test project next to the app
project, and both inherit from a parent project which is merely there
to configure and bundle stuff.
The sub-projects keep a few library dependencies in their libs/ directory.
The funny thing is: this works for the app project, but not for the test
project:
// application module
dependencies {
compile fileTree(dir: 'libs', includes: ['*.jar']) <-- flat directory
compile('com.github.droidfu:droid-fu:1.0-SNAPSHOT')
compile('oauth.signpost:signpost-core:1.2.1.2')
compile('oauth.signpost:signpost-commonshttp4:1.2.1.2')
}
$ls ./libs
680 apache-mime4j-0.6.jar 56 httpmime-4.0.1.jar
$gradle dependencies
compile - Classpath for compiling the sources.
+--- com.github.droidfu:droid-fu:1.0-SNAPSHOT [default]
+--- oauth.signpost:signpost-core:1.2.1.2 [default]
| \--- commons-codec:commons-codec:1.3 [compile,master,runtime]
\--- oauth.signpost:signpost-commonshttp4:1.2.1.2 [default]
\--- oauth.signpost:signpost-core:1.2.1.2 [compile,master,runtime]
\--- commons-codec:commons-codec:1.3 [compile,master,runtime]
that works -- so far so good. Now here is the same thing in the test
project that lives next to the app project (and depends on it):
// test module
dependsOn(':qype-app')
dependencies {
compile fileTree(dir: 'libs', includes: ['*.jar']) <-- flat directory
}
$ls ./libs
1264 javassist-3.14.0-GA.jar 464 junit-4.8.1.jar
2616 mockito-core-1.8.5.jar 72 objenesis-1.2.jar
960 powermock-mockito-1.4.6-full.jar 536 robolectric-0.9.4.jar
$gradle dependencies
compile - Classpath for compiling the sources.
No dependencies
Huh? I'm using the exact same dependency notation and the directory
structure is exactly the same, and all libraries I need are there,
but still Gradle does not seem to find those files. Interestingly though,
it works when adding e.g. the JUnit dependency as an Ivy dependency.
Just the fileTree thing does not work.
At a loss here, can anyone see what's wrong with my build scripts?
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email