On 26/09/2011, at 7:11 PM, Carlton Brown wrote:
> Thanks Luke, that will get me started.
>
> Does everyone have to write these few lines of code in their Gradle build, or
> is there some other mechanism that implicitly causes a resolve/retrieve to
> happen?
It's a completely contrived example, you wouldn't write this kind of thing.
If you were building a java project that needed to compile against
commons-lang, all you would need to do is:
apply plugin: "java"
repositories {
mavenCentral()
}
dependencies {
compile 'commons-lang:commons-lang:2.6'
}
The “java” plugin wires the model together in such a way that the compile
classpath for the project ends up being the “compile” configuration (which is
like a collection of files). When the files are needed, e.g. at compile time,
Gradle will implicitly perform the resolve and make the files available to the
compiler. As far as the compile machinery is concerned, it's just receiving a
bunch of files and the resolution happens seamlessly.
> Also, I notice that Gradle does not accept a version string of
> 'latest.integration' which in Ivy would signify the latest revision published
> with a status of 'integration'. Is Gradle aware of Ivy statuses at all, or
> does it have some analogous function?
What kind of repository/resolver are you using?
--
Luke Daley
Principal Engineer, Gradleware
http://gradleware.com