Skip to content

Simple Gradle Plugin to provide a task that can check the build system for any number of custom prerequisites that must be in place on the build system in order for a Gradle build to succeed.

License

Notifications You must be signed in to change notification settings

warlordofmars/gradle-prerequisites-check

Repository files navigation

gradle-prerequisites-check

latest jitpack release

Overview

Simple Gradle Plugin to provide a task that can check the build system for any number of custom prerequisites that must be in place on the build system in order for a Gradle build to succeed.

Setup

To use this plugin, the following buildscript repositories and dependencies must be configured:

buildscript {
  repositories {
    maven { url 'https://jitpack.io' }
  }
  dependencies {
    classpath 'com.github.warlordofmars:gradle-prerequisites-check:release-0.1.4'
  }
}

Then to apply the plugin:

apply plugin: 'com.github.warlordofmars.gradle.prerequisites'

To configure prerequisites to check for (this should be a mapping of command to check PATH for to a message to be displayed as part of error instructing user on how to obtain prerequisite):

ext.prerequisites << [
    'aws': "Install via 'brew install awscli'"
]

Then in your custom gradle task, depend on the task checkPrerequisites:

task('customAwsTask') {
    dependsOn checkPrerequisites
    exec {
        commandLine 'aws', 'ec2', 'describe-images'
    }
}

Versioning

Versioning on this project is applied automatically on all changes using the axion-release-plugin. Git tags are created for all released versions, and all available released versions can be viewed in the Releases section of this project.

Author

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Acknowledgements

About

Simple Gradle Plugin to provide a task that can check the build system for any number of custom prerequisites that must be in place on the build system in order for a Gradle build to succeed.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages