Slackbot
10/01/2025, 9:28 AMSofia Louisy
10/01/2025, 10:09 AMKanstantsin Shautsou
10/01/2025, 11:28 AMJoseph Ottinger
10/01/2025, 5:58 PMAdam
10/02/2025, 4:01 PMNiels Doucet
10/03/2025, 10:51 AMio.qameta.allure
plugin:
org.gradle.api.internal.tasks.TaskDependencyResolveException: Could not determine the dependencies of task ':selenium-tests:check'.
... SNIP ...
Caused by: org.gradle.api.internal.tasks.DefaultTaskContainer$TaskCreationException: Could not create task ':selenium-tests:test'.
... SNIP ...
Caused by: org.gradle.api.InvalidUserCodeException: Cannot mutate the artifacts of configuration ':selenium-tests:allureRawResultElements' after the configuration was consumed as a variant. After a configuration has been observed, it should not be modified.
at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.validateMutation(DefaultConfiguration.java:1229)
at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.lambda$validateMutationType$0(DefaultConfiguration.java:319)
at org.gradle.internal.ImmutableActionSet$SingletonSet.execute(ImmutableActionSet.java:226)
at org.gradle.api.internal.DefaultDomainObjectCollection.assertCanMutate(DefaultDomainObjectCollection.java:453)
at org.gradle.api.internal.DefaultDomainObjectCollection.add(DefaultDomainObjectCollection.java:273)
at org.gradle.api.internal.DelegatingDomainObjectSet.add(DelegatingDomainObjectSet.java:115)
at org.gradle.api.internal.artifacts.configurations.DefaultConfigurationPublications.artifact(DefaultConfigurationPublications.java:137)
at io.qameta.allure.gradle.adapter.AllureAdapterExtension.exposeArtifact(AllureAdapterExtension.kt:167)
at io.qameta.allure.gradle.adapter.AllureAdapterExtension.access$exposeArtifact(AllureAdapterExtension.kt:31)
at io.qameta.allure.gradle.adapter.AllureAdapterExtension$gatherResultsFrom$1.execute(AllureAdapterExtension.kt:104)
at io.qameta.allure.gradle.adapter.AllureAdapterExtension$gatherResultsFrom$1.execute(AllureAdapterExtension.kt:102)
It seems to be a negative interaction with multiple other plugins. So far discovered the issue popping up with jacoco-report-aggregation
and com.autonomousapps.build-health
. It goes away when I make sure not to have the failing module be affected by those 2 plugins.
Unfortunately, it doesn't happen in a trivial setup, so I'm struggling to figure out the root cause.
For reference, the code that triggers the error in the allure plugin: https://github.com/allure-framework/allure-gradle/blob/main/allure-adapter-plugin/[…]otlin/io/qameta/allure/gradle/adapter/AllureAdapterExtension.kt
Is there an easy way to figure out what's causing a configuration to be consumed as a variant?
And is the allure plugin actually doing something wrong here or should I assume it's our configuration that's wrong?Eli Graber
10/03/2025, 4:12 PM.java-version
file it would be used to set the daemon toolchain?Nathan Kulzer
10/05/2025, 5:10 AMRahul pratap singh
10/06/2025, 4:54 PMnpx react-native run-android
info Launching emulator...
info Successfully launched emulator.
info Installing the app...
> A build operation failed.
Could not read workspace metadata from C:\Users\RAHUL PRATAP SINGH\.gradle\caches\8.14.3\transforms\c82eb49d1e40a7062eeb6dcb22a32921\metadata.bin
> Could not read workspace metadata from C:\Users\RAHUL PRATAP SINGH\.gradle\caches\8.14.3\transforms\c82eb49d1e40a7062eeb6dcb22a32921\metadata.bin
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at <https://help.gradle.org>.
BUILD FAILED in 2s
error Failed to install the app. Command failed with exit code 1: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081 FAILURE: Build failed with an exception. * Where: Settings file 'C:\Projects\React Native\reactNativeCLI3\android\settings.gradle' line: 2 * What went wrong: Error resolving plugin [id: 'com.facebook.react.settings'] > A build operation failed. Could not read workspace metadata from C:\Users\RAHUL PRATAP SINGH\.gradle\caches\8.14.3\transforms\c82eb49d1e40a7062eeb6dcb22a32921\metadata.bin > Could not read workspace metadata from C:\Users\RAHUL PRATAP SINGH\.gradle\caches\8.14.3\transforms\c82eb49d1e40a7062eeb6dcb22a32921\metadata.bin * Try: > Run with --stacktrace option to get the stack trace. > Run with --info or --debug option to get more log output. > Run with --scan to get full insights. > Get more help at <https://help.gradle.org>. BUILD FAILED in 2s.
info Run CLI with --verbose flag for more details.
Help pleaseMike Wacker
10/06/2025, 6:34 PMgradle
(not ./gradlew
), is it fairly standard to add this to .dockerignore
?
gradle*
!gradle/libs.versions.toml
Or could be there be complications here?Edwin Günthner
10/07/2025, 9:40 AMignoreFailures=true
to keep running unit tests, even after a failure in one of the sub projects.reporting {
reports {
val failureCheck = gradle.sharedServices.registerIfAbsent("testFailureCheck", TestFailureCheck::class) {}
@Suppress("UnstableApiUsage")
val testAggregateTestReport by creating(AggregateTestReport::class) {
testSuiteName = "unit-tests"
reportTask.configure {
doLast {
// print a short summary and fail build if any test failed
failureCheck.get().execute(destinationDirectory.get().asFile)
}
}
test.configure {
dependsOn(reportTask)
}
}
doLast
got called always, and then our check got executed.doLast
isn't invoked any more. (I think 8.13 slightly change the overall handling, as it introduced that testSuiteName
property for the aggregate code.testSuiteName = "unit-tests"
Previously, the test report used an enum, and now asked for a string, so I just wrote down "unit-tests".
Which is wrong - this needs to refer an existing test suite, and in our case, that would be the default ("test"). With that change, things work as expected.Maanrifa Bacar Ali
10/07/2025, 3:31 PMbuild.gradle.kts
— like how kotlin-dsl
generates accessors for extensions?Colton Idle
10/07/2025, 8:07 PMprintln()
and rebuild.
If I do this like 10 times in a row manually I get about a ~4 second build time. If I use gradle profiler with apply-non-abi-change-to
("Change the body of a public method in a Java or Kotlin source class.") the lowest time I'll see is a 7 second build time over the 10 default runs (with default 6 warm ups).
Anyone have a clue on how to debug why it seems like like build time is consistently close to twice of what "real world" testing shows?Jeroen Meijer
10/08/2025, 5:22 AMgroovy-gradle-plugin
and some are compiled with the kotlin-dsl
plugin. The problem is that both these plugins together seem to use ~200 MB on average on each subproject. This memory seems not to be freed when the subproject is done. On a simple hello world project (with 20 subproject) I built https://github.com/Meijuh/precompiled-mem-issue, one can see that close to 4GB is necessary. The easiest way I found to measure the used memory is by running the build in a docker container (e.g., docker run -it --memory=12g --cpus="8" -v .:/workspace -v eclipse-temurin:21.0.8_9-jdk-jammy bash
) and then running docker stats
. Running gradle-profiler
won't immediately work here because of all the process forking that is going on. Note that 4GB of memory on a hello world example is problematic, because our real world case attaches external dependencies to the plugins etc, causing 12GB to be used there, which causes scheduling issues on our Jenkins cluster.
I have also created a single project variant https://github.com/Meijuh/precompiled-mem-issue/tree/single-project, which does not cause the memory to blow up. And this looks like the intended approach as is hinted by the plural name of https://docs.gradle.org/current/javadoc/org/gradle/plugin/devel/tasks/ValidatePlugins.html. However, moving all the plugins to a single project won't work for our real world case because:
• Some convention plugins depend on other convention plugins, making it hard to generate a dependency graph of plugins (which is easy in a multi-project setup).
• Most convention plugins depend on external dependencies, such as Spotless. This means every plugin would require the same (unused) external dependencies, cluttering the classpath in the build environment of projects that apply the convention plugins.
• The code just gets messy.
I've tried disabling the ValidatePlugins
task (as it forks uncontrollably), limiting the number of Gradle workers, compiling the KTS scripts "in-process", but none seems to really help. Any ideas how to continue? I can imagine I am missing a helpful Gradle config, or that I have reached a Gradle limitation and I could create a feature request to improve the memory usage for this use case?Oliver Kopp
10/08/2025, 7:56 PMDaren Burke
10/09/2025, 11:28 AMClassLoader classLoader = FileUtil.class.getClassLoader();
try (InputStream inputStream = classLoader.getResourceAsStream(resourceFile)) {
Files.copy(inputStream, config.toPath(), StandardCopyOption.REPLACE_EXISTING);
}
The inputStream is null when running on windows, though the jar properly has the file in it, and the path to the resourceFile is correct.
Any ideas why Windows classloader would have different results?Adam
10/09/2025, 4:10 PMEdwin Günthner
10/09/2025, 7:09 PMDaren Burke
10/10/2025, 11:16 AMCaleb Cushing
10/10/2025, 7:07 PMMike Wacker
10/10/2025, 7:46 PMExecution failed for task ':app:test'.
> Cannot cast object 'org.gradle.internal.serialize.codecs.core.ClosureCodec$BrokenObject@46f481e2' with class 'org.gradle.internal.serialize.codecs.core.ClosureCodec$BrokenObject' to class 'com.avast.gradle.dockercompose.TasksConfigurator'
The issue includes a fairly simple MCVE.Suresh Vadlamudi
10/10/2025, 7:50 PMMatthew Von-Maszewski
10/10/2025, 9:25 PMColton Idle
10/10/2025, 9:27 PMbuildscript {
// this is all I have left to migrate
ext.kotlin_version = '1.9.24'
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.jetbrains.kotlin:kotlin-serialization:$kotlin_version"
classpath 'com.android.tools.build:gradle:8.10.1'
classpath 'com.jakewharton:butterknife-gradle-plugin:10.2.3'
classpath "org.jacoco:org.jacoco.core:0.8.13"
}
}
it seems like theres no way to just migrate to new plugins block directly... instead you have to lookup the documentation for each plugin. am i correct in my understanding? and what do i do if a plugin doesn't publish how to use the new plugins block (like butterknife)?Harry Jackson
10/11/2025, 12:05 AMHarry Jackson
10/11/2025, 12:06 AMAllan Kelly
10/11/2025, 7:53 AMMaksym Moroz
10/11/2025, 3:29 PMafterEvaluate
but since this discussion about just how much of a legacy approach afterEvaluate
is, I have been looking for a good solution for this.
Would BuildService
with FinishEventListener
that throws if plugins were not applied be an idiomatic approach?Adam
10/11/2025, 4:35 PMbuildInvocationId
, workspaceId
, or userId
- just getFailure()
.ScØtty Kauppinen
10/11/2025, 8:42 PMjava.io.IOException: Unable to delete directory 'C:\Users\scott\Documents\ClearEntry