Skip to content

Accreditation Tasks

Generate Plugins Meta File

This task generates a meta file listing metadata for all external plugins used in the repository.

How It Works

  1. The task extracts external plugins .aar files using the Extract All Dependencies task.
  2. It reads the plugin-policy.json file from each plugin to retrieve:
    • name
    • bundle id
    • version
  3. The metadata for each plugin is written to a single JSON file named plugins-dependencies-meta.json.

This meta file is used to validate the accreditation status of external libraries in the repository. Learn more about plugin accreditation here.

Output Location

The generated JSON files are located at build/plugins-dependencies under the app module.

Example Output

json
[
  {
    "pluginName": "MobileNetworkPlugin",
    "version": "0.0.3",
    "bundleId": "com.skyrin.mobilebanking.mobilenetworkplugin"
  },
  {
    "pluginName": "ExampleTwoPlugin",
    "version": "0.1",
    "bundleId": "com.skyrin.mobilebanking.exampletwoplugin"
  },
  {
    "pluginName": "ExampleOnePlugin",
    "version": "0.1",
    "bundleId": "com.skyrin.mobilebanking.exampleoneplugin"
  },
  {
    "pluginName": "HelloWorldPlugin",
    "version": "0.1",
    "bundleId": "com.skyrin.mobilebanking.helloworldplugin"
  }
]

Command to Run

Run the task locally using the following command:

shell
./gradlew <appVariantName>GeneratePluginsMetaFile

:::note

Before running this task, you need to run the List Variants task.

:::


Plugins Meta Generator Script

The recommended way to trigger the generation of the plugins meta file is by adding the plugins_meta_file_generator script to the project root -> bin directory.

Script Example

shell
#!/usr/bin/env bash

set -e

# the type variable contains either "debug" or "release" string
type=$1

echo "Generating plugins meta file for ${type}"
./gradlew listVariants && ./gradlew ${type}GeneratePluginsMetaFile

# Please, do not modify above code, append only below the dashes
# --------------------

How to Run the Script

Run the script using the following command:

shell
./bin/plugins_meta_file_generator <appVariantName>