[Android Tips] 23. How to fail/stop Gradle task immediately if some conditions are not met throw new GradleException("conditions are not met") 参考 How to fail/stop task immediately if some conditions are not met