0

I am writing a gradle custom plugin and the requirement is to fail build conditionally based on a parameter.

To fail the build i am throwing GradleException. If the property is not set, i want to log the reason and stop executing the plugin. Is there anyway other than System.exit?

l a s
  • 3,836
  • 10
  • 42
  • 61
  • Possible duplicate of [Recommended way to stop a Gradle build](http://stackoverflow.com/questions/10312259/recommended-way-to-stop-a-gradle-build) – radistao Apr 28 '17 at 10:12
  • see http://stackoverflow.com/questions/10312259/recommended-way-to-stop-a-gradle-build – radistao Apr 28 '17 at 10:13

1 Answers1

0

I ended up throwing StopActionException when i need to stop action without failing the build.

l a s
  • 3,836
  • 10
  • 42
  • 61