Hey, we're trying to enable auto-reload in develop...
# ktor
c
Hey, we're trying to enable auto-reload in development. Our project is structured like this:
Copy code
project/
    app/
        build.gradle.kts
    utils/
        build.gradle.kts
The
:app
project has the
main
function and the Ktor Application instanciation. We run the project with:
Copy code
./gradlew :app:run & ./gradlew :app:jar --continuous
During debugging, we have a script that pings the
/ping
route of the server continuously to force auto-reload (since it otherwise only reloads on the next received request). We have noticed that: • source code changes in the
app
module triggers recompilation, and Ktor auto-reload • source code changes in the
utils
module triggers recompilation, but does not trigger Ktor auto-reload • using build scans, we checked that editing
utils
does trigger its own recompilation, as well as the recompilation of
àpp
Looking at the documentation, it seems Ktor is only looking at the classes for the current module, not the dependencies. How can I add the other modules as watch points? They are not in the
app/build
directory.
e
Hey, could you try specifying an absolute path in the classes section? https://ktor.io/docs/auto-reload.html
a
This issue may be relevant.
c
Indeed, it's the same issue. Doesn't seem to have a solution yet.
@e5l in the real project, there are dozens of dependencies, it's not feasible to list all of them. Anyway, an absolute path wouldn't be shareable via Git