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

Gradle Deprecations

DZone's Guide to

Gradle Deprecations

· Java Zone ·
Free Resource

Java-based (JDBC) data connectivity to SaaS, NoSQL, and Big Data. Download Now.

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

Connect any Java based application to your SaaS data.  Over 100+ Java-based data source connectors.

Topics:

Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

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

{{ parent.tldr }}

{{ parent.urlSource.name }}