build scan
2017-03-17 本文已影响0人
firehole
1,在user目录下或者gradle目录下新建一个scanBuild.gradle文件,里面内容如下:
//获取build的详细信息,便于对build流程和错误监控
initscript {
repositories {
maven { url 'https://plugins.gradle.org/m2' }
}
dependencies {
classpath 'com.gradle:build-scan-plugin:1.6'
}
}
rootProject {
apply plugin: com.gradle.scan.plugin.BuildScanPlugin
}
2,在项目root下的build.gradle中的buildScript{}中加入如下内容:
buildScan{
licenseAgreementUrl='https://gradle.com/terms-of-service'
licenseAgree='yes'
// publishAlwaysIf(System.getenv('CI')
// publishAlways()
// publishOnFailure()
// publishOnFailureIf(boolean)
}