This message was deleted.
# community-support
s
This message was deleted.
d
I managed to solve this by making the dependency
compileOnly
and then creating a task that copies the class files from the lib build directory to the app build directory. I then add
Copy code
build {
        finalizedBy(copyLib)
    }
so now when I run
gradle build -t
it will always copy all the compiled classes across which the ktor server then picks up
v
Be aware that this is quite problematic. I don't know what the better solution is, as I don't use ktor. But tasks should not share outputs / write files into output directories of other tasks. Otherwise you disturb some Gradle features like up-to-date checks, task output caches, and so on.
d
yeah it’s fine because it’s just a development server and is not packaged up or used anywhere, but thanks for saying. I haven’t found another way though?