I hope this is the correct place to ask for Gradle...
# compiler
c
I hope this is the correct place to ask for Gradle issues. I am using the
kotlin("js")
plugin, 1.5.10, Kotlin DSL, and I want to change the default timeout.
Copy code
js {
	browser {
		testTask {
			useKarma {
				useChromiumHeadless()
				timeout.set(??)
			}
		}
	}
}
According to the Gradle documentation:
Copy code
task myTask {
	// java.time.Duration 
	timeout = Duration.ofMinutes(10)
}
However if I add write:
Copy code
timeout.set(java.time.Duration.ofMinutes(10))
Then IntelliJ & Gradle complain with
Unresolved reference: time
timeout
doesn't have any overloads that would accept
kotlin.Duration
or even
groovy.Duration
. Is it even possible currently to set the timeout with the Kotlin DSL?
r
Probably #gradle is better. I'm pretty sure you're getting that because gradle defines
java
as a property, for one of it's plugins, so it resolves to that instead of the package. Try importing
java.time.Duration
c
Thanks, that was the problem. I really dislike gradle, sometimes.