Sorry, the reason we'll have to stick with the "apply from" script is that the buildscript block is just too much boiler plate for me. We have dozens of projects and many (95%) of them have 3 sub-modules that apply different plugins to each module. They would all require the same exact 5-10 lines of code at the top of all of their build scripts, and this just isn't acceptable to me.
The "apply from" scripts at least keep everything in a single line of code for each plugin the developer wants to use. Making it a lot more maintainable for me. On Thu, Apr 12, 2012 at 1:14 AM, Adam Murdoch <[email protected]>wrote: > > On 12/04/2012, at 9:18 AM, Eric Berry wrote: > > Hi Adam, and Peter, > Thank you both for the quick response. > > Adam, guess we'll have to stick with the "apply from" scripts that have > the extra code to check to see if the plugin is installed. > > > You shouldn't have to. Gradle will check this for you. You can just do: > > buildscript { > repositories { mavenRepo url: "…" } > dependencies { classpath "com.chegg.corp.gradle:chegg-plugin:12.2" } > } > apply plugin: 'chegg-corp' // or apply plugin: > com.chegg.corp.CheggCorpPlugin > > > -- > Adam Murdoch > Gradle Co-founder > http://www.gradle.org > VP of Engineering, Gradleware Inc. - Gradle Training, Support, Consulting > http://www.gradleware.com > > -- Learn from the past. Live in the present. Plan for the future. Blog: http://eric-berry.blogspot.com jEdit <http://www.jedit.org> - Programmer's Text Editor Bazaar <http://bazaar.canonical.com> - Version Control for Humans
