Disable gradle build scans


We’re not comfortable with uploading the build scans on scans.gradle.org. So we use gradle scans plugin to point the server to localhost, which would throw errors/exception when somebody trying to use build scans

plugins {
id “com.gradle.enterprise” version “3.2.1”

gradleEnterprise {
buildScan {
server = ‘http://localhost

Couple questions:

  1. would there be any problems with licensing issues when you pull in the plugin com.gradle.enterprise (I did peek into the build scans jar and there’s no license in it)?
  2. is there a different way to disable the build scans by default?


If you are worried that someone might publish to scans.gradle.org, I would recommend using the publishAlwaysIf() method on the buildScan extension (see https://docs.gradle.com/enterprise/gradle-plugin/api/com/gradle/scan/plugin/BuildScanExtension.html#publishAlwaysIf(boolean)). Then you could check to see if it’s publishing to scans.gradle.com (or if it’s publishing to something other than your company GE instance) and if so, then print some sort of warning and return false.

I would not worry about the license - we expect people to use the gradle enterprise plugin without restriction. I’m checking on exactly what license applies, though (if any). Stay tuned.

1 Like

The enterprise plugin is covered by https://gradle.com/legal/terms-of-service/ which speaks to both publishing scans to scans.gradle.org as well as publishing to an on-premise instance of Gradle Enterprise.

1 Like