I don’t understand this particular issue, in my repos, errorprone “configurations” are added in my local environment, which I’d expect, but in every other environment they are removed. It seems like they’re only added to the locks locally, but I don’t have any init scripts in my ~/.gradle
and this doesn’t appear to be repository centric. Here’s one such repository GitHub - xenoterracide/gradle-semver
This is the relevant area of my convention plugin our.javacompile.gradle.kts
// © Copyright 2023-2024 Caleb Cushing
// SPDX-License-Identifier: MIT
import net.ltgt.gradle.errorprone.errorprone
import org.gradle.accessors.dm.LibrariesForLibs
plugins {
`java-library`
id("our.bom")
id("net.ltgt.errorprone")
}
val libs = the<LibrariesForLibs>()
dependencies {
errorprone(libs.bundles.ep)
compileOnly(libs.errorprone.annotations)
}
java {
withJavadocJar()
withSourcesJar()
toolchain {
languageVersion.set(JavaLanguageVersion.of(21))
}
}
I lock my deps in my buildSrc/build.gradle.kts
// © Copyright 2023-2024 Caleb Cushing
// SPDX-License-Identifier: MIT
buildscript {
dependencyLocking.lockAllConfigurations()
}
plugins {
`kotlin-dsl`
}
dependencyLocking.lockAllConfigurations()
dependencies {
implementation(files(libs.javaClass.superclass.protectionDomain.codeSource.location))
implementation(libs.plugin.spotless)
implementation(libs.plugin.spotbugs)
implementation(libs.plugin.errorprone)
}
and in my our.bom.gradle.kts
buildSrc plugin
plugins {
`java-library`
}
dependencyLocking {
lockAllConfigurations()
}
and plugins at the top of every build.gradle.kts
buildscript { dependencyLocking { lockAllConfigurations() } }
The problem of course is that this means in most places it’s getting a dynamic (unlocked) build, which is not cool
scans
remote: Build Scan® | Gradle Cloud Services
local: Build Scan® | Gradle Cloud Services
I don’t get it, why every other environment removes errorprone
from my locks when running ./gradlew classes --write-locks
(or any write-locks). Does anyone have any idea why that’s happening, and different locally? the configuration should still be there?