Brice Dutheil
09/10/2025, 12:41 PM--scan
condition, the following code fails
develocity {
buildScan {
termsOfUseUrl.set("<https://gradle.com/help/legal-terms-of-use>")
termsOfUseAgree.set("yes")
publishing {
onlyIf {
(System.getenv("CI") != null) or gradle.startParameter.isBuildScan
}
}
}
}
with a serialization issue
1 problem was found storing the configuration cache.
- Gradle runtime: cannot serialize object of type 'org.gradle.initialization.DefaultSettings', a subtype of 'org.gradle.api.initialization.Settings', as these are not supported with the configuration cache.
See <https://docs.gradle.org/9.0.0/userguide/configuration_cache_requirements.html#config_cache:requirements:disallowed_types>
Maybe you have more ideas on this ?Brice Dutheil
09/10/2025, 12:49 PMdevelocity
block, declaring startParameter
within develocity
seem to fix the serialization issue.Philip W
09/10/2025, 12:55 PMPhilip W
09/10/2025, 12:59 PM--scan
to upload a BuildScan:
val isCI = providers.environmentVariable("CI").isPresent
publishing {
onlyIf { isCI }
}
But it is basically our codeBrice Dutheil
09/10/2025, 2:08 PMVampire
09/10/2025, 2:10 PMBrice Dutheil
09/10/2025, 2:12 PMVampire
09/10/2025, 2:12 PMVampire
09/10/2025, 2:12 PMBrice Dutheil
09/10/2025, 2:14 PMBrice Dutheil
09/10/2025, 2:15 PMVampire
09/10/2025, 2:15 PMVampire
09/10/2025, 2:15 PMVampire
09/10/2025, 2:16 PMidea.sync.active
system property in the onlyIf
Vampire
09/10/2025, 2:17 PMonlyIf { true }
and also configuring the ToS agreeing in the build script which is a very bad idea. πBrice Dutheil
09/10/2025, 2:21 PMtermsOfUseAgree.set("yes")
Vampire
09/10/2025, 2:37 PMVampire
09/10/2025, 2:38 PMidea.sync.active
should not be checked in the onlyIf
for a FOSS project.
Otherwise I just open your project in my IDE and suddenly my personal data was uploaded to Gradle servers without my consent.Vampire
09/10/2025, 2:39 PMBrice Dutheil
09/10/2025, 2:40 PMVampire
09/10/2025, 3:10 PMVampire
09/10/2025, 3:26 PMimport com.gradle.develocity.agent.gradle.DevelocityConfiguration
initscript {
repositories {
gradlePluginPortal()
}
dependencies {
classpath("com.gradle.develocity:com.gradle.develocity.gradle.plugin:+")
}
}
settingsEvaluated {
pluginManager.withPlugin("com.gradle.develocity") {
configure<DevelocityConfiguration> {
buildScan {
termsOfUseAgree.convention(termsOfUseUrl.map { if (it == "<https://gradle.com/help/legal-terms-of-use>") "yes" else null })
}
}
}
}