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.
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 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.
- John Carter - warlordofmars
This project is licensed under the MIT License - see the LICENSE.md file for details
- Using the warlordofmars gradle plugin, gradle-release-helper, for automatic versioning, git tagging, and publishing of releases to GitHub
- Using the warlordofmars custom gradle distribution warlordofmars-gradle in order to define default repositories to avoid duplication across all projects
- Using the warlordofmars jenkins pipeline library jenkins-library for re-usable CI/CD pipeline components