Skip to content

bowserf/gradle-tasks-plugins-development

Repository files navigation

Gradle Android Gradle Plugin

Learn how to create your own Gradle Tasks and Plugins

Companion sample project of the Medium article Learn how to create your own Gradle Tasks and Plugins.

Objective

This project showcases how to develop a Plugin that registers a simple Task.

The Task developed in this sample does a basic work. It copies in a new directory:

  • the release APK
  • the release Bundle
  • the mapping file

It must be applied to an Android app module.

To do that, the Task needs 2 parameters:

  • The Android app version to name the output directory from it.
  • A File pointing where the generated directory will be put.

Test the Task

  1. Generate the 3 input files by executing: ./gradlew assembleRelease bundleRelease
  2. Execute ./gradlew bundleReleaseFiles
  3. Check that a new directory has been generated at path app/build/outputs/1.00.00

About

Sample project to showcase how to create our own Gradle Tasks and Plugins to fit our needs and make Gradle work for us.

Topics

Resources

Stars

Watchers

Forks

Languages