Closed ColtonIdle closed 2 years ago
Also, if I try to disable it (it's not in the configuration docs, but I'm guessing the configuration name) it doesn't let me?
Here's the full error message actually
================ Gradle Doctor Prescriptions ================
| Adding dependencies to the clean task could cause unexpected build outcomes. |
| Please remove the dependency from task ':sharedComposables:clean' on the following tasks: [provider(task 'clea |
| nAllTests', interface org.gradle.api.Task)]. |
| See github.com/gradle/gradle/issues/2488 for more information. |
====================================================
Hi, thanks for reporting this. Does it work if you follow the Kotlin example in the documentation on how to set this property? https://runningcode.github.io/gradle-doctor/configuration/
Click the Kotlin
tab to see the documentation in kotlin.
Can you tell me more about the cleanAllTests
task? Is that a task that you have written and wired to clean
?
@runningcode thanks. I swear I looked for the config earlier and I didn't see it.
I added this
doctor {
disallowCleanTaskDependencies.set(false)
}
and I'm able to build now!
Can you tell me more about the cleanAllTests task? Is that a task that you have written and wired to clean?
This isn't anything that I added. Maybe it comes with KMM?
Okay. I found a project that you can repro with if you'd like
Checkout the jb compose multiplatform project
https://github.com/JetBrains/compose-jb/tree/master/templates/multiplatform-template
add this to the root
plugins { id("com.osacky.doctor") version "0.7.1" }
Hit run and you get
Caused by: org.gradle.api.internal.tasks.DefaultTaskContainer$TaskCreationException: Could not create task ':common:clean'.
Thanks for reporting and the repro case @ColtonIdle. I've found out where this is happening in KGP: https://github.com/JetBrains/kotlin/blob/3df45f9651c1b902f86b30a32f18b6d5d7d79520/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/testing/internal/KotlinTestsRegistry.kt#L107
This is not a good practice. I will discuss what to do about this.
Yay! We did it!
Closing since this was a bug in KGP.
After upgrading to latest I get a ton of messages that all have the same caused by message.
Caused by: org.gradle.api.internal.tasks.DefaultTaskContainer$TaskCreationException: Could not create task ':sharedComposables:clean'.
sharedComposables is a KMM module that houses my shared android and desktop code. Gradle in general is a place that I flounder. Not sure how best to move forward.