Skip to content

Latest commit

 

History

History
27 lines (18 loc) · 1.09 KB

File metadata and controls

27 lines (18 loc) · 1.09 KB

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