From 2905609dbb0c4a6c80eac7dfc1cfeb570a33a952 Mon Sep 17 00:00:00 2001 From: Andre Kurait Date: Wed, 28 Feb 2024 12:23:03 -0600 Subject: [PATCH] Move gradle scan enabling from gradlew to settings.gradle Signed-off-by: Andre Kurait --- TrafficCapture/gradlew | 6 ------ TrafficCapture/settings.gradle | 7 ++++++- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/TrafficCapture/gradlew b/TrafficCapture/gradlew index b3829779e..3dbf1aa40 100755 --- a/TrafficCapture/gradlew +++ b/TrafficCapture/gradlew @@ -241,11 +241,5 @@ eval "set -- $( tr '\n' ' ' )" '"$@"' -# Check if OS_MIGRATIONS_GRADLE_SCAN_TOS_AGREE_AND_ENABLED exists, and if --scan is not in the arguments and --no-scan is not provided -if [ -n "${OS_MIGRATIONS_GRADLE_SCAN_TOS_AGREE_AND_ENABLED+set}" ] && ! printf '%s\n' "$@" | grep -q -- '--scan' && ! printf '%s\n' "$@" | grep -q -- '--no-scan'; then - echo "Enabling Gradle Scan based on environment variable OS_MIGRATIONS_GRADLE_SCAN_TOS_AGREE_AND_ENABLED" - set -- "$@" '--scan' # Append --scan to the arguments -fi - exec "$JAVACMD" "$@" diff --git a/TrafficCapture/settings.gradle b/TrafficCapture/settings.gradle index 53dd81395..a2cb4cc5a 100644 --- a/TrafficCapture/settings.gradle +++ b/TrafficCapture/settings.gradle @@ -7,6 +7,10 @@ * in the user manual at https://docs.gradle.org/8.0.2/userguide/multi_project_builds.html */ +plugins { + id("com.gradle.enterprise") version("3.16.2") +} + void addSubProjects(String path, File dir) { if (dir.isDirectory() == false) return; if (dir.name == 'buildSrc') return; @@ -38,9 +42,10 @@ include('captureKafkaOffloader', addSubProjects('', new File(rootProject.projectDir,'replayerPlugins')) -if (System.getenv().containsKey("OS_MIGRATIONS_GRADLE_SCAN_TOS_AGREE_AND_ENABLED") && hasProperty('gradleEnterprise')) { +if (System.getenv().containsKey("OS_MIGRATIONS_GRADLE_SCAN_TOS_AGREE_AND_ENABLED")) { gradleEnterprise { buildScan { + publishAlways() termsOfServiceUrl = "https://gradle.com/terms-of-service" termsOfServiceAgree = "yes" }