Christoph Hock
03/16/2021, 12:14 AMgradle installDist -t
for the server module in an extra task. Serverreloads work greate with this solution but I can't get the client js part to work propally. For the client part I added the following code to my build.gradle.kts inside my server module
tasks.withType<Copy>().named("processResources") {
dependsOn(":client:browserDistribution")
from(project(":client").tasks.named("browserDistribution"))
}
The first time I make changes to the client module while gradle installDist -t
is running the changes get compiled and copied over to the servermodule, but any changes after that don't get copied over, even thougth the build is reran. Am I doing something wrong? Any advice on how to fix this?Vampire
03/16/2021, 1:00 AMdependsOn
is just senseless if you have the task as input anyway, because then you have an implicit dependency on the task and that is better. But actually referencing tasks from other projects should be avoided as hell. Read here for more information: https://docs.gradle.org/current/userguide/cross_project_publications.htmltapchicoma
03/16/2021, 11:47 AMChristoph Hock
03/16/2021, 12:50 PMtasks.withType<Copy>().named("processResources") { from(project(":client").tasks.named("browserDistribution"))}
to copy those files over eventhougth it is considered a bad practice according to docs linked above. ^^Vampire
03/16/2021, 1:25 PMVampire
03/16/2021, 1:29 PMChristoph Hock
03/16/2021, 1:29 PMVampire
03/16/2021, 1:40 PM