From 875497e4156a6caa1c702c493d09485d19865b03 Mon Sep 17 00:00:00 2001 From: Tobias Nett Date: Sun, 3 Sep 2023 19:49:23 +0200 Subject: [PATCH] programmically accept the Gradle Build Scan terms of service when running in CI --- .github/workflows/build.yml | 2 +- build.gradle | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4e7d1865881..151ecd5b35e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 \ No newline at end of file diff --git a/build.gradle b/build.gradle index 6c4da8f63fc..b3c9559602b 100644 --- a/build.gradle +++ b/build.gradle @@ -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" + } + } +}