This message was deleted.
# community-support
s
This message was deleted.
v
Why should it not fail? You only disable all tasks of type
SpotlessTask
but the failing one is of type
SpotlessCheck
which is not a subclass of
SpotlessTask
.
c
I tried disabling spotless check too in a different trial and still have the same problem
It also shouldn't fail because I've done spotless apply
v
I don't think that is relevant, as you check files that are generated during the build, so after you did
spotlessApply
they are overridden again.
Look at the path of the files it complains about
c
🤦‍♂️ well thanks for that I didn't see that. Why does it still fail though if I do the command above but with
Copy code
tasks.withType<SpotlessCheck>().configureEach {
  enabled = providers.environmentVariable("CI").isPresent
}
still running even with the change
and yet somehow this is doing what I need? (I mean ratcheting is the problem)
Copy code
if (!providers.environmentVariable("CI").isPresent) {
    ratchetFrom("origin/main")
  }
but why weren't the tasks disabling
v
With or without
CI
? What you showed last disabled the tasks on CI.
t
Fwiw, I use
Copy code
spotless {
    kotlinGradle {
        target("*.gradle.kts", "src/main/kotlin/**/*.gradle.kts")
        ktlint(libs.versions.ktlint.get())
    }
}
(in my "build-logic" included build that uses precompiled script plugins, otherwise I use the default target for kotlinGradle)
👍 1
c
What you showed last disabled the tasks on CI
it should have, but CI was still blowing up on ratcheting, so it didn't make sense...
v
Are you sure on your CI environment the CI environment variable is set? If you for example build on TeamCity and do not set this yourself manually, it is not set.
c
It's GitHub but I've also demonstrated it running locally. You've seen my scans right?
v
yep, but sytem properties are not visible in scans if not set as custom values
c
set as custom values?
c
can you use gradle enterprise if you're not a gradle enterprise customer?
v
Actually it's not called Gradle enterprise anymore, but Develocity. And
<http://scans.gradle.org|scans.gradle.org>
is a Develocity instance with restricted functionality. So when you use build scans, you already use it. :-) I'm not fully sure whether custom tags and values are supported there, but I mean to remember they are. Just try it.