Slackbot
02/23/2023, 10:56 AMThomas Broyer
02/23/2023, 12:25 PMThomas Broyer
02/23/2023, 12:27 PMIvan CLOVIS Canet
02/23/2023, 12:30 PMThomas Broyer
02/23/2023, 12:33 PMFwiw, Kotlin/JS does such a thing as a "long running task" though […]. Last time I checked, they were using an internal Gradle API for that.This is still the case: https://github.com/JetBrains/kotlin/blob/9324cf336090deb5292282a512c1c0618a8b0774/[…]org/jetbrains/kotlin/gradle/targets/js/webpack/KotlinWebpack.kt
Thomas Broyer
02/23/2023, 12:35 PMI'm worried this will make builds slower as each module will need its own daemon (since the daemon gets stuck executing the service)I'm really not sure this is the case. AFAIK, only the client is blocked, waiting for the run task to finish; the same daemon is used for everything though.
Ivan CLOVIS Canet
02/23/2023, 12:53 PMThomas Broyer
02/23/2023, 1:02 PM./gradlew --status
and/or jps
or ps
to tell how many daemons are being usedIvan CLOVIS Canet
02/23/2023, 1:23 PMrun
task, no new daemon is started (as long as you wait for the build to finish before starting a new task, of course)Thomas Broyer
02/23/2023, 1:43 PMIvan CLOVIS Canet
02/23/2023, 1:43 PMThomas Broyer
02/23/2023, 2:06 PM./gradlew :service-a:run
(an application that starts an embedded Jetty server)
• in another: ./gradlew :service-b:run
(same kind of app with an embedded Jetty server); Gradle prints that a new daemon is started as another one is busy
• in a third terminal: ./gradlew --status
shows 2 busy daemons
I did not “wait for the build to finish before starting a new task”; the two applications are running in parallel.
note: this is a project that's still using Gradle 7.1; things might possibly be different in newer versions.Ivan CLOVIS Canet
02/23/2023, 2:07 PMThomas Broyer
02/23/2023, 2:17 PM