Quantcast
Channel: Gradle Forums - Latest posts
Viewing all articles
Browse latest Browse all 19888

How do I specify the resources folder in a Jar?

$
0
0

A custom copy task as the one reported below is in fact able to solve the issue and I have obtained what I expected described in my previous post. Anyway, for the sake of completeness, I will be grateful if someone can explain:

  1. does Gradle in default config package resources at root level of the jar file or I can suppose that there is still something inusual in my setup?
  2. there is any philosophical reason to package all the resources at root level of a jar?

Can someone point to a relevant documentation, please?
Thank you

task copyResources(type: Copy) {
    from "${projectDir}/src/main/resources"
    into "${buildDir}/classes/java/main/resources"
}
processResources.dependsOn copyResources

Viewing all articles
Browse latest Browse all 19888

Trending Articles