Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Gradle Deprecations

DZone's Guide to

Gradle Deprecations

· Java Zone
Free Resource

Bitbucket is for the code that takes us to Mars, decodes the human genome, or drives your next car. What will your code do? Get started with Bitbucket today, it's free.

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"
        }
    

Are you using Bitbucket to accomplish your company's mission? Share your company’s mission with #Forthecode for a chance to be featured on our homepage, our social media channels, or win a free t-shirt!

Topics:

Published at DZone with permission of Gordon Dickens, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}