I ran into this issue on a composite build using Gradle 8.14.4. In my case, the problem was caused by using subproject notation (:<subproject-name>) in the includeBuild() entry of the top-level settings.gradle.kts file.
For example, if I had the project structure:
| root
| a
| a0
| a1
| b
| b0
| b1
the correct syntax for including these builds in root/settings.gradle.kts is:
// correct, no : prefix
includeBuild("a")
includeBuild("b")
If you use subproject notation (shown below), Gradle will throw java.io.IOException every time you execute gradlew, regardless of what tasks you specify.