mirror of
https://github.com/ysoftdevs/gradle-training.git
synced 2026-04-10 18:57:25 +02:00
16 - how to stop build execution
This commit is contained in:
15
16-stop-build/build.gradle
Normal file
15
16-stop-build/build.gradle
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
|
||||||
|
task workingTask {
|
||||||
|
description 'Task that works'
|
||||||
|
doLast {
|
||||||
|
println 'Everything is ok'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
task failingTask {
|
||||||
|
description 'Task that fails'
|
||||||
|
doLast {
|
||||||
|
throw new GradleException("Problem detected. Build failed")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Reference in New Issue
Block a user