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

How to copy a folder from a dependent External Library's jar into the gradle project's jar?

$
0
0

I’ve a gradle project which has a dependency on an external library say “ext1.jar”. This external library has a folder “f1” which has some class files. When I build my gradle project I want to copy that folder “f1” from “ext1.jar” into my project’s jar.

I see that this works if I want to copy a single file in my src into jar:

jar {
    from "sampleFileInSrc.txt"
}

However I want to copy something from a dependent jar. Something like this:

jar {
    from library 'ext1.jar' and folder 'f1'
    into "src/main/resources"
}

Anyone knows how can this be done?


Viewing all articles
Browse latest Browse all 19850

Trending Articles