Appearance
PlatformHub Gradle Plugin
The PlatformHub Gradle plugin provides a set of tasks to automate processes such as extracting plugin policies for accreditation and validating payload schemas.
This Gradle plugin is intended for repositories utilizing PlatformHub. Any app designed to work with PlatformHub and its Plugins should apply this Gradle plugin.
Usage
To use the Gradle plugin, follow these steps:
Add the plugin dependency to your root project
build.gradlefile under classpath dependencies:groovydependencies { classpath "com.skyrin.mobilebanking:platformhub-gradle-plugin:<version>" }Apply the plugin to the app and all library modules that contain
plugin-policy.jsonfiles:groovyapply plugin: 'com.skyrin.mobilebanking.platformhub-gradle-plugin'Check the PlatformHub repository for the latest version of the plugin.
:::caution
To maintain a standard, projects must name their sample apps as "app" or "sample-app". Ensure your project adheres to this standard. If your sample app has a different name, rename it to "app" or "sample-app" immediately.
:::
Tasks
The plugin provides the following tasks:
:::note
The tasks in the Gradle plugin work with libraries added from Nexus using implementation "com.skyrin.mobilebanking:example-plugin:1.0.0".
Additionally, libraries added locally using implementation project(':example-plugin') will also work, provided the PlatformHub Gradle plugin is applied to the local modules.
:::
Important
Do not create empty Gradle tasks in your project to bypass missing task errors. This is a bad practice and can lead to unexpected behavior or broken functionality.
The tasks provided by this plugin are well documented and designed to work seamlessly when implemented correctly. If you encounter a missing task error, it is likely due to a misconfiguration or an outdated plugin version. Please refer to the documentation for the respective task and ensure your project setup adheres to the guidelines.
Take the time to read PlatformHub Gradle Plugin documentation, it is straightforward and provides all the necessary details for proper implementation. Avoid shortcuts or unreliable workarounds, as they will only cause more issues in the long run.
:::caution
Avoid using the org.gradle.configuration-cache=true flag in your gradle.properties file, as it may interfere with the proper functioning of the tasks provided by this plugin.
:::