Skip to content

Commit

Permalink
Merge pull request #5384 from bjhargrave/ci-scan-update
Browse files Browse the repository at this point in the history
ci: Only accept gradle build scan TOS on CI builds
  • Loading branch information
bjhargrave committed Sep 29, 2022
2 parents a68260a + 5c121ad commit 26511a7
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 8 deletions.
19 changes: 17 additions & 2 deletions gradle-plugins/settings.gradle.kts
@@ -1,7 +1,22 @@
pluginManagement {
plugins {
id("com.gradle.plugin-publish") version "1.0.0"
id("dev.hargrave.addmavendescriptor") version "1.0.0"
id("com.gradle.plugin-publish") version("1.0.0")
id("dev.hargrave.addmavendescriptor") version("1.0.0")
id("com.gradle.enterprise") version("3.11.1")
}
}

plugins {
id("com.gradle.enterprise")
}

if (System.getenv("CI").toBoolean()) {
gradleEnterprise {
buildScan {
publishAlways()
termsOfServiceUrl = "https://gradle.com/terms-of-service"
termsOfServiceAgree = "yes"
}
}
}

Expand Down
20 changes: 14 additions & 6 deletions settings.gradle
Expand Up @@ -4,6 +4,12 @@

import aQute.bnd.osgi.Constants

pluginManagement {
plugins {
id "com.gradle.enterprise" version "3.11.1"
}
}

/* Add bnd gradle plugin as a script dependency */
buildscript {
repositories {
Expand Down Expand Up @@ -53,14 +59,16 @@ buildscript {
}

plugins {
id "com.gradle.enterprise" version "3.11.1"
id "com.gradle.enterprise"
}

gradleEnterprise {
buildScan {
publishAlwaysIf(Boolean.parseBoolean(System.getenv("CI")))
termsOfServiceUrl = "https://gradle.com/terms-of-service"
termsOfServiceAgree = "yes"
if (Boolean.parseBoolean(System.getenv("CI"))) {
gradleEnterprise {
buildScan {
publishAlways()
termsOfServiceUrl = "https://gradle.com/terms-of-service"
termsOfServiceAgree = "yes"
}
}
}

Expand Down

0 comments on commit 26511a7

Please sign in to comment.