标签: gradle groovy build.gradle intellij-14
答案 0 :(得分:2)
您需要使用专用脚本块http-builder使buildscript模块类可用于构建脚本类路径:
http-builder
buildscript
buildscript { repositories { jcenter() } dependencies { classpath ("org.codehaus.groovy.modules.http-builder:http-builder:0.7.1") } }
请参阅:
https://docs.gradle.org/current/userguide/tutorial_using_tasks.html#sec:build_script_external_dependencies
https://docs.gradle.org/current/dsl/org.gradle.api.Project.html#org.gradle.api.Project:buildscript(groovy.lang.Closure)