tl;博士:
如何配置 gradle-vfs 插件使用的 https 代理?它似乎忽略了正常的 java/gradle 代理配置。
详细信息
基于这个gradle 文件,我尝试使用 gradle 从 asciidocs 创建reveal.js 幻灯片。
我已经使用 gradle.properties 文件配置了代理设置,其内容类似于:
systemProp.http.proxyHost=myproxy
systemProp.http.proxyPort=8080
systemProp.http.nonProxyHosts=localhost
systemProp.https.proxyHost=myproxy
systemProp.https.proxyPort=8080
systemProp.https.nonProxyHosts=localhost
虽然此配置适用于 gradle,但在执行 java 构建(它下载插件和依赖项)时,参考构建文件中使用的 vfs 失败:
:download FAILED
FAILURE: Build failed with an exception.
* Where:
Build file 'D:\workspaces\myproject\build.gradle' line: 47
* What went wrong:
Execution failed for task ':download'.
> Could not connect to HTTP server on "github.com".
cp
第 47 行是此块中的第一个开头:
task download << {
mkdir downloadDir
vfs {
cp "zip:https://github.com/asciidoctor/asciidoctor-reveal.js/archive/${asciidoctorBackendVersion}.zip!asciidoctor-reveal.js-${asciidoctorBackendVersion}",
templateDir, recursive:true, overwrite:true
cp "zip:https://github.com/hakimel/reveal.js/archive/${revealjsVersion}.zip!reveal.js-${revealjsVersion}",
revealjsDir, recursive:true, overwrite:true
}
}