Using as your build tool? Read on.

# hacktoberfest

The thing you have to know about OktoberFest , is that in Germany, it takes place mostly in September. Don't ask me why.

So I already contributed a pull-request for # hacktoberfest

and a seconde one!

If you take a look, I did exactly the same thing. Let's unwrap it:

I updated Gradle:

Always a good idea. You get more features, less bugs, more speed.

$ ./gradlew wrapper --gradle-version 5.6.2

$ ./gradlew tasks

I added the

build-scan and buildSrcVersions Gradle plugins:

// build.gradle

plugins {
    // :refreshVersions see
    id ("").version("2.4.2") 

buildSrcVersions {
  // Documented at

buildScan {
    // ./gradlew --scan $TASKNAME 
    // see

    termsOfServiceUrl = ""
    termsOfServiceAgree = "yes"

I run

$ ./gradlew refreshVersions

This automatically extracts the versions from the project dependencies, and allows to find newer available versions.

# user settings go here

# Dependencies and Plugin versions with their available updates
# Generated by $ ./gradlew refreshVersions
# You can edit the rest of the file, it will be kept intact
# See
#                # available=2.1.0
#                # available=1.3.50
#     # available=1.1.0
#    # available=1.1.0
# ....

Curious about this feature?

Read the docs at gradle :refreshVersions" generates with versions and available updates

  • Note 1: I don't update the dependencies myself, that's the owner of the project who should do it!
  • Note 2: I have to copy/paste this boilerplate code to settings.gradle so that the plugins pick up the right version

I add the missing

./gradlew test and ./gradlew install

One of the meany ways Google messed up is that unlike basically every software projects on earth, Android project do not have by default the equivalent of $ npm install and $ npm test .

What makes it even dumber is that it's really trivial to add, a couple of lines to ./build.gradle

// build.gradle
tasks.create("install") {
    group = "custom"
    description = "Install the app"

tasks.create("test") {
    group = "custom"
    description = "Run the unit tests"
tasks.create("hello") {
    group = "custom"
    description = "Empty Hello World task, useful to debug build problems"

Bonus: you know you should maintain a README but you are too lazy to do it? This part can now be self-documented!

$ ./gradlew tasks --group=custom

> Task :tasks

Tasks runnable from root project

Custom tasks
install - Install the app
test - Run the unit tests
hello - Empty Hello World task, useful to debug build problems

To see all tasks and more detail, run gradlew tasks --all

To see more detail about a task, run gradlew help --task <task>

I inspect the build with the Build Scan plugin

See my previous article:

Using this information, I could improve the build performance by just adding a few lines to


# See

See my article on

You can do it too!

The best thing about my niche is that what I did is totally generic and empowers the developer to do what she knows best!

This post is also available on DEV.