How to accept Gradle ToS for `build --scan` automatically and still manage to run build without a scan?

后端 未结 2 1117
小鲜肉
小鲜肉 2021-01-18 04:25

I am using Gradle 4.6 which allows me to run build scans using the --scan option without having to explicitly apply or download extra plugins

2条回答
  •  伪装坚强ぢ
    2021-01-18 04:52

    Just test the existence of buildScan

    if (hasProperty('buildScan')) {
        buildScan {
            termsOfServiceUrl = 'https://gradle.com/terms-of-service'
            termsOfServiceAgree = 'yes'
        }
    }
    

提交回复
热议问题