When I run the building task in gradle, it copies all the java resources (from src/main/resources) into build/resources. Because I have too heavy files there my build process significantly slower that it could be.
Is there any way to disable copying them and force java to use them just from src/main/resources ?
It depends. If you don't need any resource filtering and don't need access to resources from tests in the same project, you can do:
sourceSets.main.resources.srcDirs = []
jar {
from "src/main/resources"
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With