Slackbot
09/26/2023, 8:32 AMVampire
09/26/2023, 9:46 AMtasks.create
or val foo by tasks.creating
usages, either by you, or by some plugin you use.
The "created during configuration" are things like tasks.withType(...) { }
or tasks.all { }
by you or some plugin.
If you for example look at this build scan, you can see one task immediately that I created ith tasks.create
and 37 during configuration which is caused by a tasks.all { }
. You can also see where it happens in the build scan and also which tasks are affected.
If that still is not enough information, you might use in your gradle.properties
the line
systemProp.org.gradle.internal.tasks.stats
to output the task types and amount that were eagerly realized on stdout, or
systemProp.org.gradle.internal.tasks.stats=traces.txt
to also write stacktraces for each eagerly realized task to the file traces.txt
which might greatly help to find the culprit.Simon Marquis
09/26/2023, 9:50 AMSimon Marquis
01/31/2024, 9:23 AMgradlew help
(
Task counts: Old API 0, New API 41, total 41
Task counts: created 9, avoided 32, %-lazy 79
Task types that were registered with the new API but were created anyways
class org.gradle.api.tasks.compile.JavaCompile 2
class org.jetbrains.kotlin.gradle.tasks.KotlinCompile 1
class org.gradle.language.jvm.tasks.ProcessResources 1
class org.gradle.api.DefaultTask 1
class org.gradle.api.tasks.Delete 1
class org.jetbrains.kotlin.gradle.plugin.diagnostics.CheckKotlinGradlePluginConfigurationErrors 1
class org.gradle.api.tasks.bundling.Jar 1
class org.gradle.plugin.devel.tasks.GeneratePluginDescriptors 1
Task counts: Old API 2, New API 499639, total 499641
Task counts: created 15213, avoided 484428, %-lazy 97
Task types that were created with the old API
class org.gradle.api.tasks.Copy 2
Task types that were registered with the new API but were created anyways
class org.gradle.api.tasks.compile.JavaCompile 5251
class com.google.devtools.ksp.gradle.KspTaskJvm 3344
class org.jetbrains.kotlin.gradle.tasks.KotlinCompile 3344
class dagger.hilt.android.plugin.task.AggregateDepsTask 1680
class org.gradle.api.tasks.Delete 910
class com.android.build.gradle.internal.tasks.databinding.DataBindingGenBaseClassesTask 600
class androidx.navigation.safeargs.gradle.ArgumentsGenerationTask 40
class com.android.build.gradle.tasks.GenerateBuildConfig 32
class com.android.build.gradle.tasks.PackageApplication 9
class org.gradle.configuration.Help 1
Task types that were registered with the new API but were created anyways
there are plenty, but it's hard to say what is the root cause of it. Maybe androix.navigation
that is known to break configuration avoidance (not fixed yet) makes all these tasks necessary to create?Vampire
01/31/2024, 1:32 PMSimon Marquis
01/31/2024, 2:19 PMSimon Marquis
02/14/2024, 4:57 PM