Understand Gradle In Half An Hour
Written by Nikos Vaggalis   
Tuesday, 14 September 2021

Gradle, the build automation tool for multi-language software development that is widely used for Android is notoriously difficult to use. To help, here's a YouTube playlist on "Understanding Gradle" that is straight to the point.

It could also be given the title "How to make Gradle less dreadful". In Love It or Hate It, Gradle Reaches Version 7.0 I put forward some reasons why Gradle is not the most user-friendly tool:

cryptic syntax, contradictory terms (see compile versus implementation) and peculiar blocks of elements.

Furthermore Gradle is a tool that:

always stirs arguments among developers

and according to Bruce Eckel, author of Thinking in Java, Thinking in C++ and Atomic Kotlin amongst others:

To do anything in Gradle you have to know everything

Fortunately we came across a resource that eases this requirement since it goes through the fundamental building blocks in a brief and succinct way.

Understanding Gradle currently comprises a series of 6 short videos (more are still being added) that collectively are about 30 minutes long:

  1. The Settings File
  2. The Build Files
  3. Plugins
  4. Tasks
  5. Lifecycle Tasks
  6. Configuring Task Inputs and Outputs

According to the author, Jendrik Johannes of onepiece.Software:

Each video only scratches the surfaces of the features shown. This is on purpose to give you a general understanding of how things work in Gradle. This understanding enables you to structure your project in a readable and maintainable way.

And that's exactly what Johannes does. Instead of going through the dense documentation to find your bearings, you get to that in watching a few short videos; setting up your project, extending it with Plugins and understanding the build process through its Tasks.

So what is the target group? Gradle was, and is, the prime build tool for Android; the move towards Kotlin DSL adoption is another testament to the tool's Android roots; as the platform evolved so has Gradle.

However, if you are doing pure Java you'd better of with Maven. Still even in that world, a lot of projects have been adopting Gradle lately because, despite being a difficult-to-use build system, it is considered superior to Maven. Therefore, even if you're not going to use it yourself, general knowledge of how things work would be useful when encountering it out in the wild.

The project also has a Github repository with the accompanying code, and, as the series is ongoing, make sure you subscribe to the channel to be notified of more material.

More Information

YouTube playlist

GitHub repo

Related Articles

Love It or Hate It, Gradle Reaches Version 7.0

 

To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.

Banner


Qt Creator 5 Released
03/09/2021

Qt has announced the release of Qt Creator 5, with improvements including experimental support for Clangd as the backend for the C/C++ code model, and some support for building and running application [ ... ]



EBPF Foundation Created
19/08/2021

Major IT companies including Facebook, Google, Isovalent, Microsoft, and Netflix are getting together to form the eBPF Foundation. eBPF, extended Berkeley Packet Filter, is a technology that can run s [ ... ]


More News

square

 



 

Comments




or email your comment to: comments@i-programmer.info

Last Updated ( Tuesday, 14 September 2021 )