forked from mikeb01/Aeron
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
32 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,29 @@ | ||
def acceptFile = new File(gradle.gradleUserHomeDir, "build-scans/aeron/gradle-scans-license-agree.txt") | ||
def env = System.getenv() | ||
boolean isCI = env.CI || env.TRAVIS | ||
boolean hasAccepted = isCI || env.AERON_GRADLE_SCANS_ACCEPT=='yes' || acceptFile.exists() && acceptFile.text.trim() == 'yes' | ||
boolean hasRefused = env.AERON_GRADLE_SCANS_ACCEPT=='no' || acceptFile.exists() && acceptFile.text.trim() == 'no' | ||
|
||
buildScan { | ||
termsOfServiceUrl = 'https://gradle.com/terms-of-service' | ||
termsOfServiceAgree = 'yes' | ||
if (hasAccepted) { | ||
termsOfServiceAgree = 'yes' | ||
} else if (!hasRefused) { | ||
gradle.buildFinished { | ||
println """ | ||
This build uses Gradle Build Scans to gather statistics, share information about | ||
failures, environmental issues, dependencies resolved during the build and more. | ||
Build scans will be published after each build, if you accept the terms of | ||
service, and in particular the privacy policy. | ||
Please read | ||
https://gradle.com/terms-of-service | ||
https://gradle.com/legal/privacy | ||
and then: | ||
- set the `AERON_GRADLE_SCANS_ACCEPT` to `yes`/`no` if you agree with/refuse the TOS | ||
- or create the ${acceptFile} file with `yes`/`no` in it if you agree with/refuse | ||
And we'll not bother you again. Note that build scans are only made public if | ||
you share the URL at the end of the build. | ||
""" | ||
} | ||
} | ||
} |