问题
I come from Grails background and there was a feature where our changes to CSS, HTML & JS files were instant and didn't needed rebuilding code again.
Now, while building a Micronaut project I would like to have something similar but I am unable to figure how to configure Gradle for same.
Till now, I found out if I make changes to copied resources inside build folder, changes are reflected on browser and don't require rebuilding code but this forces me to do changes to original file later.
Can I somehow make Gradle directly use src/main/resources from it's original location rather than Gradle copying it to build folder?
回答1:
You might be looking for ./gradlew run --continuous
but depending on what things you are changing in the resources/
folder, those changes may nor may not affect the running app without restart.
More information is available at https://docs.micronaut.io/1.1.2/guide/index.html#reloading.
I hope that helps.
来源:https://stackoverflow.com/questions/56443203/is-it-possible-prevent-copying-of-resources-to-build-directory-in-gradle-project