Closed zacharee closed 6 months ago
I think you're right. Does the following logic look correct?
val configNames = setOf("runtimeClasspath", "desktopRuntimeClasspath", "jvmRuntimeClasspath")
val runtimeClasspathConfiguration = try {
configNames.firstNotNullOf { project.configurations.findByName(it) }
} catch (e: NoSuchElementException) {
throw Exception("Could not locate the classpath configuration, tried $configNames")
}
The Gradle plugin has been extensively refactored on our dev branch to make it compatible with the configuration cache, so I won't apply this patch as-is immediately, but will try to release the new plugin ASAP.
I think that looks right. I worked around it for now by adding
project.configurations.create("desktopRuntimeClasspath") {
extendsFrom(project.configurations.findByName("jvmRuntimeClasspath"))
}
to my Gradle config.
Describe the bug In my Compose Multiplatform project, after doing some dependency upgrades, the
writeConveyorConfig
task fails withConfiguration with name 'desktopRuntimeClasspath' not found.
.To Reproduce Steps to reproduce the behavior:
./gradlew :desktop:writeConveyorConfig
.Expected behavior The task should complete successfully.
Desktop (please complete the following information):
Additional context Looking at the source, I think
project.configurations.getByName("desktopRuntimeClasspath")
should beproject.configurations.findByName("desktopRuntimeClasspath")
inConveyorConfigTask#importFromDependencyConfigurations()
.My project does have
jvmRuntimeClasspath
defined, so Conveyor should be able to use that, but since it callsgetByName()
, the task fails instead of returning null.