Skip to content

Commit

Permalink
Remove automatic publishing of builds data (#10170)
Browse files Browse the repository at this point in the history
To be more privacy-friendly by default, this PR removes the automatic publishing of build data to Gradle servers. The report is still published automatically when the build is run in a CI environment.

If developers want to publish build scans, they can use the `--scan` option:

```sh
./gradlew clean build --scan
````

or set the `publishing.onlyIf` parameter to `true` to always publish the report like this:

```
develocity {
    buildScan {
        publishing.onlyIf { true }
        termsOfUseUrl = "https://gradle.com/terms-of-service"
        termsOfUseAgree = "yes
        tag("CI")
    }
}
```

In this case, developers can use `--no-scan` to avoid selectively publishing the report:

```sh
./gradlew clean build --no-scan
````

---------

Signed-off-by: Giuseppe Bertone <[email protected]>
Co-authored-by: Steven Sheehy <[email protected]>
  • Loading branch information
Neurone and steven-sheehy authored Jan 24, 2025
1 parent c6ec75c commit 26fc5f1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ fun shortenProjectName(project: ProjectDescriptor) {

develocity {
buildScan {
publishing.onlyIf { System.getenv().containsKey("CI") }
termsOfUseUrl = "https://gradle.com/terms-of-service"
termsOfUseAgree = "yes"
tag("CI")
Expand Down

0 comments on commit 26fc5f1

Please sign in to comment.