Im working with Compose Multiplatform project for ...
# multiplatform
e
Im working with Compose Multiplatform project for Android and Desktop. I added Room following the doc, but Im getting the this error:
Copy code
Execution failed for task ':composeApp:mergeDebugAndroidTestAssets'.
> The value for task ':composeApp:copyRoomSchemasToAndroidTestAssetsDebugAndroidTest' property 'inputDirectory' is final and cannot be changed any further.
m
I get this error on android only when I try to generate debug apk The app runs on emulator and simulator without any problems
e
I did a workaround on this.
Copy code
tasks.withType<Test> {
    if (name == "mergeDebugAndroidTestAssets") {
        enabled = false
    }
}

tasks.withType<Test> {
    if (name == "copyRoomSchemasToAndroidTestAssetsDebugAndroidTest") {
        enabled = false
    }
}

tasks.whenTaskAdded {
    if (name.contains("copyRoomSchemasToAndroidTestAssetsDebugAndroidTest")) {
        enabled = false
    }
}

gradle.taskGraph.whenReady {
    allTasks.onEach { task ->
        if (task.name.contains("androidTest") || task.name.contains("connectedAndroidTest")) {
            task.enabled = false
        }
    }
}
📌 1
m
it didn't work for me, any updates please.
s
didn’t work for me either
i fixed it by putting the code in the module that was defining such tasks
g
same issue here 😞
550 Views