Inspired by the popular Maven Enforcer plugin I'm happy to announce that its Gradle counterpart has been released, say hello to the enforcer-gradle-plugin!
The behavior provided by Gradle Enforcer plugin is very similar to what the Maven Enforcer plugin provides, in the sense that rules will be executed during a particular phase of the build; any rule violations result in a build failure. Rules are typically setup to check for preconditions and requirements. The Maven Enforcer plugin provides a set of core rules and extra rules. In turn, the Gradle Enforcer plugin provides a similar set plus a few rules that are unique to Gradle. The following table shows rules available to both plugins:
Rule | Maven | Gradle |
---|---|---|
AlwaysFail | ||
AlwaysPass | ||
BanCircularDependencies | ||
BanDistributionManagement | ||
BanDuplicateClasses | ||
BanDuplicatePomDependencyVersions | ||
BannedDependencies | ||
BannedPlugins | ||
BannedRepositories | ||
BanTransitiveDependencies | ||
DependencyConvergence | ||
EnforceBytecodeVersion | ||
EvaluateBeanshell | ||
ExcludeDependencies | ||
ForceDependencies | ||
ReactorModuleConvergence | ||
RequireActiveProfile | ||
RequireContributorRoles | ||
RequireDeveloperRoles | ||
RequireEncoding | ||
RequireEnvironmentVariable | ||
RequireFileChecksum | ||
RequireFilesDontExist | ||
RequireFilesExist | ||
RequireFilesSize | ||
RequireGradleProperty | ||
RequireGradleVersion | ||
RequireJavaVersion | ||
RequireMavenVersion | ||
RequireNoRepositories | ||
RequireOS | ||
RequirePluginVersions | ||
RequirePrerequisite | ||
RequireProfileIdsExist | ||
RequireProperty | ||
RequirePropertyDiverges | ||
RequireReleaseDeps | ||
RequireReleaseVersion | ||
RequireSnapshotVersion | ||
RequireSameVersions | ||
RequireSystemProperty | ||
RequireUpperBoundDeps |
You can find more information in the plugin's guide.
Keep on coding!
Trackbacks/Pingbacks