• Skip to main content
  • Skip to primary sidebar
  • Home
  • About
  • Subscribe BMA
  • Contact Us!

Be My Aficionado

Inspire Affection

You are here: Home / Technology / A brief Introduction about Gradle

A brief Introduction about Gradle5 min read

October 13, 2016 by Varun Shrivastava Leave a Comment

Hey guys, Have you seen black art, well, here’s the truth – Besides black art, there is only automation and?mechanisation. It’s this era, there is a new name for magic, its called Automation . Each and everything is being automated to save extra efforts and time and that too without the cost of accuracy. Isn’t it cool? This article is going to be short and interesting one. If you know about Gradle then maybe it won’t be that much interesting to you but hey! Who doesn’t like magic??

Topics Covered

  • What is Gradle?
      • What is Build Automation?
      • Why we need Build Automation?
      • Gradle Build Tool
  • Why Use Gradle?
  • Conclusion

What is Gradle?

Gradle Icon

If I have to explain Gradle in short and not in a fun way then I would say that – Gradle is a Build Automation Tool.

Now let’s slowly dig down the meaning of those words? Gradle is nothing but a very powerful tool to achieve Build Automation. It’s important that we understand Build Automation before getting into the ways to achieve it.

 

What is Build Automation?

Build automation is the process of automating the creation of a software build and the associated processes including: compiling computer source code into binary code, packaging binary code, and running automated tests.

If you want to know more in details about getting started with gradle then follow this article: org/current/userguide/userguide.html

Why we need Build Automation?

Maybe because of these reasons:

 

  1. People don’t know the process and that becomes a problem

    In large organization there is a miscommunication between people and teams that could take up loads of time. With Build Automation, a single person can sit and outline all the required steps to deploy the project. Create a nice document side-by-side and finally create a template and test it on database. Once everything is working fine, publish that document to your team so that they will follow the exact same thing required to deploy the project. This way there will be a process to follow…
  2. Time spent in fixing a fault is costly, so better avoid it

    I understand that fault is a part of a Software Development phase and it’s hard to avoid. But what if the time required for fault management stretches more than the project development time. Then it is not fruitful at all. How good it would be if there is a set of document for everything that people can follow and ?avoid the common bugs and pitfalls.

  3. A single admin to administer the build, hence, more control

    At times there are single admin with multiple developers working on the deployment process. The deployment experience should be same for all the developers. Therefore, a new documented outline will give admin more power over the entire deployment process.

  4. Manual is risky

    I don’t think this point needs explanation :p

So, now that we know what is Build Automation and why we need it, we can better understand the ways of achieving it.

 

Gradle Build Tool

From a long time the only requirement of a Build tool has been to compile the source files and package them. But as business requirements has evolved overtime the responsibility of a build tool has also increased. A build tool has to work with multiple projects and multiple languages together and has to apply broad spectrum of testing. Gradle comes into the picture.

Gradle is a JVM based build tool and it makes use of the lessons learned from the earlier build automation tools such as Ant and Maven and did not force the developer to write configurations in XML files. Following a build-by-convention approach, Gradle allows for declarative modelling your problem domain using a powerful and expressive domain-specific language (DSL) implemented in Groovy instead of XML. Because Gradle is a JVM native, it allows you to write custom logic in the language you’re most comfortable with, be it Java or Groovy.

Why Use Gradle?

Gradle will definitely help you in making tedious tasks easier without compromising with the flexibility, usability, extendability and performance. In any large size project with multiple dependencies managing these become difficult and cumbersome. Gradle makes it real easy to manage dependencies between multiple projects. Java projects normally depends on large number of dependencies and to manage such dependencies require advance tools which provides easy management with less configuration.

Maven is one such tool, it is also used to manage dependencies. It follows the paradigm of convention over configuration by introducing standardised project template and build life-cycle for Java projects. This approach is quite good but only if you want have a single convention. Imagine if you have a project with multiple conventions, then it becomes a problem. Maven has one such convention that there must be one JAR in every project structure. What if you want to produce 2 different JARs from the same project with different project structure, then it becomes quite difficult to achieve that with Maven. Sure you will get workarounds but then these workarounds doesn’t come that naturally to you.

Gradle has learned its lessons from these build tools and it makes it really easy to work with it or I can say that Gradle comes naturally to you. Below mentioned description will convince you to adopt Gradle and why should you use it now –

Gradle Less Code

How much less code does Gradle takes perform the exact same task done by Maven. On top of that it is more readable and uses the same language which you are used to.

 

Conclusion

If you are not using Gradle or haven’t used it before then I would recommend you to use it now. It is one of the best automation tool you will find out there. It’s very easy to use and more and more businesses are porting their projects to gradle. If you need help in convincing others about using it, then feel free to use the share buttons below. Please comment below for any discussion.

  • How to become a Good Web Developer
  • Simple Shopping Cart Application in Java using Collections
  • Thinking in OOPs

And as always

Be My Aficionado 🙂

Share this:

  • Click to share on Facebook (Opens in new window)
  • Click to share on LinkedIn (Opens in new window)
  • Click to share on Twitter (Opens in new window)
  • Click to share on Pinterest (Opens in new window)
  • Click to share on Reddit (Opens in new window)
  • More
  • Click to print (Opens in new window)
  • Click to share on Tumblr (Opens in new window)
  • Click to share on Pocket (Opens in new window)
  • Click to share on Telegram (Opens in new window)
  • Click to share on WhatsApp (Opens in new window)
  • Click to share on Skype (Opens in new window)
  • Click to email this to a friend (Opens in new window)

Filed Under: Technology Tagged With: automation, build tool, dependency manager, Gradle, introduction, java, tool

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Primary Sidebar

Featured Posts

Why Pune city is not a good place to Live

March 11, 2017 By Varun Shrivastava 3 Comments

Advent Of Code 2020 – Day 5 – Binary Boarding

December 16, 2020 By Varun Shrivastava Leave a Comment

Best Exam Tips for Every Student

June 5, 2016 By Varun Shrivastava Leave a Comment

Do You Have To Be Good At Mathematics to Become a Great Programmer?

October 6, 2018 By Varun Shrivastava Leave a Comment

Education System needs Improvement

February 14, 2017 By Varun Shrivastava 1 Comment

Latest Posts

  • 3 Best Laptops (Mid-Range) For Every Use Case In India
  • Distributed System Architectural Patterns
  • The Power of being in the Present
  • Basic Calculator Leetcode Problem Using Object-Oriented Programming In Java
  • Study Abroad Destinations : Research and Review

Categories

  • Blogging (103)
  • Cooking (11)
  • Fashion (7)
  • Finance & Money (12)
  • Programming (51)
  • Reviews (4)
  • Technology (22)
  • Travelling (4)
  • Tutorials (12)
  • Web Hosting (8)
  • Wordpress N SEO (19)

Follow us on facebook

Follow us on facebook

Grab the Deal Now!

Hostgator Starting @$3.95/mo

DigitalOcean Free Credits

Trending

Affordable Hosting amazon aoc-2020 bad luck believe in yourself best database earn money blogging education experience fashion finance Financial Freedom food friends goals google india indian cuisine indian education system java javascript life life changing love make money microservices motivation oops poor education system principles of microservices problem-solving programmer programming reality search engines seo SSD Hosting success technology tips top 5 web web developer wordpress

Copyright © 2021 · BeMyAficionado by Varun Shrivastava · WordPress

loading Cancel
Post was not sent - check your email addresses!
Email check failed, please try again
Sorry, your blog cannot share posts by email.