We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@dsvoronin commented on Tue Sep 25 2018
Following code in build.gradle.kts should fail build in the end of configuration phase:
gradle.taskGraph.whenReady { throw GradleException("!!!") }
Build successful with any type of exception thrown
same code in groovy fails build as expected
gradle.taskGraph.whenReady { throw new GradleException("!!!") }
I'm trying to configure fail fast properties validation for plugin
I'm using gradle 4.10.1 (also tried with .2 version) It's just a sample Android studio project with provided sample added into root build.gradle.kts
@bamboo commented on Tue Sep 25 2018
Thanks for the report, @dsvoronin.
Curiously enough the Closure overload fails the build as expected:
Closure
gradle.taskGraph.whenReady(closureOf<TaskExecutionGraph> { throw GradleException("!!!") })
Yep, closureOf variant works for me now (somehow failed when i tried)
closureOf
The text was updated successfully, but these errors were encountered:
I think can confirm this works on Gradle 4.9 and now fails on 4.10+. We have code that used to work with this.
For completeness, the Groovy example also fails when cast to use the Action method:
Action
gradle.taskGraph.whenReady({ throw new GradleException("!!!") } as Action)
Sorry, something went wrong.
This is the same problem as #7329.
Fixed via #7510. The fix will be in Gradle 5.0.
adammurdoch
No branches or pull requests
@dsvoronin commented on Tue Sep 25 2018
Expected Behavior
Following code in build.gradle.kts should fail build in the end of configuration phase:
Current Behavior
Build successful with any type of exception thrown
same code in groovy fails build as expected
Context
I'm trying to configure fail fast properties validation for plugin
Your Environment
I'm using gradle 4.10.1 (also tried with .2 version)
It's just a sample Android studio project with provided sample added into root build.gradle.kts
@bamboo commented on Tue Sep 25 2018
Thanks for the report, @dsvoronin.
Curiously enough the
Closure
overload fails the build as expected:@dsvoronin commented on Tue Sep 25 2018
Yep,
closureOf
variant works for me now (somehow failed when i tried)The text was updated successfully, but these errors were encountered: