This message was deleted.
# community-support
s
This message was deleted.
v
The "created immediately" should be
tasks.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
Copy code
systemProp.org.gradle.internal.tasks.stats
to output the task types and amount that were eagerly realized on stdout, or
Copy code
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.
s
Thanks, I'll try this system property, because right now the created tasks all comes from external plugins (screenshot).
👋 Hi, I finally found some time to test this, unfortunately, it does not seems to bring more valuable info than what the scan already does (like who is triggering what). Here for example, i've run
gradlew help
(
Copy code
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
Copy code
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?
v
If you used the second variant I showed, where you supplied a file name, you get stacktraces in that file for those occurrences that should hopefully help to find the root causes.
👀 1
s
Thanks Vampire! Now I have a 400MiB text file to read 😛
👌 1