在應用 gradleEnterprise 的時候,提示錯誤:gradle
> Could not find method gradleEnterprise() for arguments [settings_5wv4b365n0pw4ey5aj1mu1468$_run_closure1@5b527bd] on settings 'covid-19' of type org.gradle.initialization.DefaultSettings.ui
這是由於你可能沒有應用插件,你須要在你的 settings.gradle 中添加下面的插件:插件
plugins {
id "com.gradle.enterprise" version "3.2"
}code
配置的內容以下:get
plugins {it
id "com.gradle.enterprise" version "3.2"
}io
gradleEnterprise {配置
buildScan { termsOfServiceUrl = 'https://gradle.com/terms-of-service' termsOfServiceAgree = 'yes' }
}plugin
須要先應用 com.gradle.enterprise 插件service