Win a copy of JDBC Workbook this week in the JDBC and Relational Databases forum
or A Day in Code in the A Day in Code forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • salvin francis
  • fred rosenberger

from ant, maven to gradle

Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does mastering the technologies ant or maven help in learning gradle? Is it worth migrating existing applications build system to gradle, or is it better to use it for new projects?
Posts: 13
IntelliJ IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ashley,

Gradle takes ideas from Ant and Maven and presents a new build tool/language to create better builds. For example we can re-use Ant task and even complete Ant build files in a Gradle build. This way it is easy to migrate, because you start with importing the Ant build file and gradually change or enhance your build with Gradle tasks and plugins.
Gradle incorporates the convention-over-configuration project structure of Maven out of the box. So if you have defined a Java project in Maven using Maven's project layout you can immediately use Gradle. Gradle does add extra configuration options if needed, but if you stick to the conventions you don't have to do much. Gradle also can use Maven repositories for dependencies, so they can be reused.

So if you already know Maven or Ant it can help you to learn Gradle, because you already have seen some of the concepts that are used in Gradle. But you don't need to, you can learn and use Gradle without the extra "baggage" of Ant and Maven.

If you are now using Ant I would migrate to Gradle, because you will be able to write better maintainable build files.

If you use Maven on a project and the project is straightforward and doesn't change then migrating will not add much. But if you are stretching Maven's possibilities and have to rely on plugins to customize your build, you are better off on migrating to Gradle. There is even a third-party tool maven2gradle, which can help.
Today's lesson is that you can't wear a jetpack AND a cape. I should have read this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
    Bookmark Topic Watch Topic
  • New Topic