Lex Manos
09/03/2026, 11:12 PMThomas Keller
09/04/2026, 11:15 AM$GRADLE_USER_HOME/.gradle/caches/<version>/transforms directory which is gathering multiple gigabytes worth of duplicated transformed libraries that get generated through my multi component build. Now I know Gradle is first about correctness and speed and secondly only cares about optimizing cache sizes and the like, but I really, really would love to have some option in Gradle to clear outdated / unused caches. Not only transforms, but in general also cache folders from older Gradle versions, old cached distributions and the like. I know I could write a script and do it myself in one go, but then Gradle daemons need to be stopped properly, no new Gradle daemons must be started (otherwise Gradle stumbles upon corrupted caches) and in general I think it's Gradle's task to deal with its caches, not only creating them, but also keeping them under control. Is anything planned in this direction / is there eventually a ticket that I could subscribe to that would deal with that?willbanders
09/04/2026, 8:12 PM./gradlew --version
...
Caused by: java.lang.ClassNotFoundException: org.apache.tools.ant.launch.AntMain
Reverting to Gradle 9.7.0 (manually updating gradle-wrapper.properties, since gradlew commands don't work) fixes this issue - output of ./gradlew --version in thread. I had a project working with Gradle 9.7.1 as of a week ago but it seems to be failing now - is there any chance this is some form of upstream dependency issue?Hamza GATTAL
09/05/2026, 11:18 PMversion-catalog plugin, using .withoutVersion() on most libraries and only versionRef on a BOM alias. Minimal repro:
// build.gradle.kts
plugins {
`version-catalog`
}
catalog {
versionCatalog {
val versionAlias = version("mylib", "1.0.0")
library("bom", "com.example", "mylib-bom").versionRef(versionAlias)
library("core", "com.example", "mylib-core").withoutVersion()
}
}
Generated TOML:
[versions]
mylib = "1.0.0"
[libraries]
bom = { group = "com.example", name = "mylib-bom", version.ref = "mylib" }
core = { group = "com.example", name = "mylib-core", version = "" }
If a consumer forgets to apply the BOM as a platform:
dependencies {
implementation(platform(libs.mylib.bom))
implementation(libs.mylib.core) // no platform applied
}
...resolution fails with Could not find com.example:mylib-core:. — which makes sense once you know the empty version is intentional, but the error message doesn't hint at the cause at all. A couple questions:
1. Is there a way to make Gradle emit a clearer error here — something that mentions the missing platform/BOM rather than just a blank version?
2. Is .withoutVersion() + BOM the recommended pattern for a multi-module library's catalog, or is there a more idiomatic way to enforce "must be used with platform X" at the catalog level?
Trying to figure out if I should adopt this for my own multi-module project's catalog or just keep versionRef on every library instead.rushikesh.jawali
09/14/2026, 4:33 PMEdwin Günthner
09/16/2026, 6:45 PM* What went wrong:
Plugin [id: 'org.gradle.kotlin.kotlin-dsl', version: '6.6.4'] was not found in any of the following sources:
- Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
- Included Builds (No included builds contain this plugin)
- Plugin Repositories (could not resolve plugin artifact 'org.gradle.kotlin.kotlin-dsl:org.gradle.kotlin.kotlin-dsl.gradle.plugin:6.6.4')
Searched in the following repositories:
maven(<https://eu.artifactory.whatever.com/artifactory/foobarblub>)
Token invalid , download not possible, but a "not found error"
In order to make our tooling more user friendly, we added a "ping" check to our toplevel settings.gradle file.
Artifactory servers have a "ping" endpoint, so do a GET request ... and if that fails with a 401 or 403, the token is not valid, and we can print a nice error message.
But: this means that any single gradle invocation sends such a "ping" to the Artifactory servers.
And now we regularly see failures on our CI build servers with Artifactory complaining about "too many requests".
Before we had this "ping" solution, we tried to somehow "catch" the actual "not found error" that I showed above, but I couldn't get that to work reliably.
Any idea if/how we can reliably give "good" error messages when Artifactory downloads fail (because of that bad token), without hammering the servers with every gradle invocation?N Murali
09/17/2026, 8:58 AMN Murali
09/17/2026, 9:00 AMRun with --info or --debug option to get more log output.
Get more help at help.gradle.org.CONFIGURE FAILED in 38s
roger.lee
09/19/2026, 10:27 AMysb33r
09/21/2026, 3:53 PMaddLater or addAllLater on a domain collection especially on a named collection?ysb33r
09/21/2026, 5:05 PMonlyIf {} within that class, it fails when configuration cache is active.
I have not spent enough time investigating it, but the couple of times I saw it was enough to irritate meAdam
09/24/2026, 9:45 AMsigning.setRequired { <project has tasks that publish to Maven Central> }), then dev-publish also triggers signing, which fails on machines/CI without signing keys. Afaict it's not possible to disable signing per repository.
The fix I'm looking at is skipping signing when only dev-publish tasks are in the task graph then disable the sign tasks (e.g. via Sign.onlyIf {}). But I'm not sure whether this should be a default opt-out behaviour, or an opt-in behaviour.
Should dev-publish...
1. Automatically disable signing when only dev-publish tasks are requested?
2. Or just detect that signing is enabled but not configured, and warn/fail with a hint like "conditionally disable signing for local testing"?Adam
09/24/2026, 9:51 AMMartin
09/24/2026, 1:19 PMRobert Elliot
09/29/2026, 6:08 PMfun Test.envVarInput(envVar: String) {
val value = providers.environmentVariable(envVar)
inputs.property(envVar, value).optional(true)
doFirst {
val dbTypeResolved = value.orNull
if (dbTypeResolved != null) {
environment(envVar, dbTypeResolved)
} else {
environment.remove(envVar)
}
}
}
tasks.test {
envVarInput("ENV_VAR_READ_BY_TESTS")
}Robert Elliot
09/30/2026, 8:33 AMdependencies {
runtimeOnly(libs.jersey.media.sse)
testImplementation(libs.jersey.media.sse)
}
I think that's a bug and this declaration is correct - the lib is a compile time dependency for test but only a runtime dependency for main.tony
09/30/2026, 9:09 PMAttributeDisambiguationRule. I'm getting an illegal argument exception:
Unable to determine constructor argument #1: missing parameter of type ObjectFactory, or no service of type ObjectFactory.
(note in case anyone wonders: this is the org.gradle.api.model.ObjectFactory)
Here's a simplified version that includes just the relevant details:
// plugin class
attribute(BuildTypeAttr.ATTRIBUTE).run {
disambiguationRules.add(AndroidBuildTypeDisambiguationRule::class.java)
}
// separate class
abstract class AndroidBuildTypeDisambiguationRule @Inject constructor(
private val objects: ObjectFactory,
) : AttributeDisambiguationRule<BuildTypeAttr> {
override fun execute(details: MultipleCandidatesDetails<BuildTy
val release = objects.named(BuildTypeAttr::class.java, "release")
}
}
When I run this, it fails with:
1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':platform:generateMetadataFileForPlatformPublication' (registered by plugin 'org.gradle.maven-publish').
> Could not resolve project ':producer-android'.
> Could not select value from candidates [debug, release] using AndroidBuildTypeDisambiguationRule.
> Could not create an instance of type com.autonomousapps.platformbuilder.internal.utils.attributes.AndroidBuildTypeDisambiguationRule.
> Unable to determine constructor argument #1: missing parameter of type ObjectFactory, or no service of type ObjectFactory.
My code looks like an exact replicate of the example in the Gradle docs here. What am I doing wrong?tony
10/03/2026, 8:55 PMconfigurations.named() instead of configurations.getByName(), and ran into an issue that ultimately looks like this:
- Task `:lib:findNativeLibsDebug` of type `com.autonomousapps.tasks.FindNativeLibsTask`: cannot serialize object of type 'org.gradle.api.internal.artifacts.result.DefaultResolvedArtifactResult', a subtype of 'org.gradle.api.artifacts.result.ArtifactResult', as these are not supported with the configuration cache.
See <https://docs.gradle.org/8.11.1/userguide/configuration_cache.html#config_cache:requirements:disallowed_types>
I experimented and I no longer get that issue from Gradle 9.5.0. I'm looking at the release notes for that release, and there's nothing obviously related to this issue. The nearest thing I can see is https://github.com/gradle/gradle/issues/35318. What am I missing? Is my code only working in newer releases by accident?
I think this is from this in my task:
@get:Internal
public abstract val androidJni: SetProperty<ResolvedArtifactResult>
@Optional // Only available on Android
@PathSensitive(PathSensitivity.RELATIVE)
@InputFiles
public fun getAndroidJniFiles(): Provider<List<File>>? {
if (!androidJni.isPresent) return null
return androidJni.map { artifactResults -> artifactResults.map { it.file } }
}
@Input
public fun getAndroidJniIdentifiers(): Provider<List<String>> = androidJni.identifiers()Brice Dutheil
10/12/2026, 2:31 PMTaskDependency this looks like a useful mechanism to provide tasks that can only be generated very late (with generated names).
In particular I found it instrumental to avoid afterEvaluate. However the javadoc is a tad misleading as it applies not only to dependsOn.calebb2048
10/12/2026, 3:53 PMorg.objectweb.asm
• :compiler-plugin
◦ dependsOn(:common)
◦ ASM location: <http://org.jetbrains.org|org.jetbrains.org>.objectweb.asm
How do I make :compiler-plugin compile against a version of my :common project with every ASM reference relocated to the new location? I've tried an artifact transform, but I can't even tell if it's being executed.
I know this is brittle, but it's ASM; the API is literally never going to change.Philip W
10/14/2026, 6:25 AMCalculating task graph as configuration cache cannot be reused because an input to task ':build-logic:jar' has changed.
> Task :build-logic:checkKotlinGradlePluginConfigurationErrors SKIPPED
> Task :build-logic:compileKotlin UP-TO-DATE
> Task :build-logic:compileJava NO-SOURCE
> Task :build-logic:pluginDescriptors UP-TO-DATE
> Task :build-logic:processResources UP-TO-DATE
> Task :build-logic:classes UP-TO-DATE
> Task :build-logic:jar UP-TO-DATEBrice Dutheil
10/14/2026, 12:25 PMGionata Legrottaglie
10/16/2026, 3:59 PMBrice Dutheil
10/17/2026, 10:38 AM-Pxxx to the cli, this is quite flexible, this is ok for CI pipelines, workflows, but it's discoverability is not great locally. And clearly don't handle well the idea of running a matrix.
2. Using tasks, (eventually with an aggregating task) it requires to registering each task (this can always be done programmatically, e.g. via plugin)
3. Using test suites, which also leads to test tasks.
The challenge is balancing discoverability, local execution speed (because some runs might be too long for feedback loop), local availability of the required dependencies (some can be only available in CI env), ability to run/exclude a single "matrix config" locally.
Things I've had to deal with in regard of matrix, different dependency versions, different toolchain, different "properties" that could affect the exercised code (e.g. via a file on disk, a system property, jvm arg etc.)Vlastimil Brecka
10/18/2026, 12:30 AMVlastimil Brecka
10/19/2026, 11:46 PMSergej Koščejev
10/20/2026, 5:40 PMgradlew properties and the credentials got into the tool output.Vlastimil Brecka
10/20/2026, 7:06 PMisolated projects working in a 550 project build - and config time droped to 4-6 seconds (from around 10-14). So -+ 50%, which is in line with this one blog post I read which I cannot remember where 😄
NiceVlastimil Brecka
10/20/2026, 11:28 PMPhilip W
10/22/2026, 8:36 AMval foo: Property<String> = objects.property()
foo.set("foo")
val toAdd: Provider<String> = provider { "toAdd" }
foo.set(foo.zip(toAdd) { foo, toAdd -> foo + toAdd })
println(foo.get()) // I want to get "fooToAdd"