diff --git a/buildSrc/src/main/groovy/com/uber/okbuck/OkBuckGradlePlugin.groovy b/buildSrc/src/main/groovy/com/uber/okbuck/OkBuckGradlePlugin.groovy index e7d23f9ba..08e6d6843 100644 --- a/buildSrc/src/main/groovy/com/uber/okbuck/OkBuckGradlePlugin.groovy +++ b/buildSrc/src/main/groovy/com/uber/okbuck/OkBuckGradlePlugin.groovy @@ -125,6 +125,12 @@ class OkBuckGradlePlugin implements Plugin { [cacheName, project.configurations.maybeCreate("${cacheName}ExtraDepCache")] } + setupOkbuck.doFirst { + if (!System.getProperty("okbuck.wrapper", "false").toBoolean()) { + throw new IllegalArgumentException("Okbuck cannot be invoked without 'okbuck.wrapper' set to true. Use buckw instead") + } + } + // Configure setup task setupOkbuck.doLast { // Cleanup gen folder