Skip to content

Commit

Permalink
programmically accept the Gradle Build Scan terms of service when run…
Browse files Browse the repository at this point in the history
…ning in CI
  • Loading branch information
skaldarnar committed Sep 3, 2023
1 parent 94c12bc commit 875497e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,5 @@ jobs:
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Build With Gradlew
run: ./gradlew build --scan
run: ./gradlew -PacceptGradleBuildScanTermsOfService=yes distForLauncher --scan

12 changes: 12 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -282,3 +282,15 @@ idea {
cleanIdea.doLast {
new File('Terasology.iws').delete()
}

if (hasProperty('buildScan')
// allow to programmically accept the Gradle Build Scan terms of service when running in CI
&& project.hasProperty('acceptGradleBuildScanTermsOfService')
&& project.acceptGradleBuildScanTermsOfService == 'yes') {
gradleEnterprise {
buildScan {
termsOfServiceUrl = "https://gradle.com/terms-of-service"
termsOfServiceAgree = "yes"
}
}
}

0 comments on commit 875497e

Please sign in to comment.