That works as long as there is a repository to get the cobertura jar from since the plugin will add that to the dependencies of the project. That script adds mavenCentral as well, and although that's a relatively simple thing to do, I just figured I'd make it even easier and incorporate it into the script.
On Feb 23, 2011, at 3:21 PM, Adam Murdoch wrote: > > On 24/02/2011, at 8:06 AM, Adam Murdoch wrote: > >> >> On 24/02/2011, at 12:46 AM, Kolovos, Val (Orbitz) wrote: >> >>> I'm a little confused about how the 'applyFrom' in the buildscript section >>> works, then, because when I use the coberturainit.gradle script from >>> github, the plugin is applied correctly, but it doesn't appear that it's >>> classes are made available to the rest of the build script. >> >> That's right. Classes from an applied script are not visible outside that >> script. This is probably something we will change before the Gradle 1.0 >> release. > > Actually, looking at your script, it really seems to contain just the boiler > plate you need at the moment to apply a plugin contained in a jar. So, a > better solution might be to get rid of the boiler plate, so you apply the jar > directly in the build script, and the other script just goes away. For > example, you might be able to do this: > > apply from: > 'https://github.com/...path..to.the..jar../gradle_cobertura-1.0-rc4.jar' > > > -- > Adam Murdoch > Gradle Developer > http://www.gradle.org > CTO, Gradleware Inc. - Gradle Training, Support, Consulting > http://www.gradleware.com >
