Gordon Dickens is an instructor, mentor & consultant. Gordon is currently architecting and teaching several official SpringSource courses and actively tweets about open source technology at http://twitter.com/gdickens. Gordon is active within the Spring Framework community focussed on: Spring training, Spring Roo, Spring Integration, Spring Batch and Eclipse Virgo OSGi projects. Gordon is a DZone MVB and is not an employee of DZone and has posted 39 posts at DZone. You can read more from them at their website. View Full User Profile

Gradle Deprecations

07.22.2013
| 5816 views |
  • submit to reddit

Gradle Deprecations – Common Mistakes

Maven Repository

OLD

mavenCentral()

NEW

repositories {
 maven {
 url “http://repo1.maven.org/maven2/”
 }
}


Intellij Idea Plugin

OLD

apply plugin:’idea’

NEW

Do not use, IntelliJ will import Maven, Gradle and Eclipse projects (unless you are using a dinosaur version of Idea).

The plugin generates a very very old IntelliJ IDEA project, which is exactly
the same out-of-date plugin provided by Maven (hmm… curious?).

Dependencies

OLD

groovy localGroovy()

or

groovy “org.codehaus.groovy:…”

NEW

compile “org.codehaus.groovy:groovy-all:2.1.6″

Example

        apply plugin:'groovy'
        apply plugin:'eclipse'

        repositories {
         maven {
         url "http://repo1.maven.org/maven2/"
         }

        task wrapper(type:Wrapper) { gradleVersion = '1.6' }

        dependencies {
         compile "org.codehaus.groovy:groovy-all:2.1.6"
         testCompile "org.spockframework:spock-core:0.7-groovy-2.0"
        }
    
Published at DZone with permission of Gordon Dickens, author and DZone MVB. (source)

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)