When using java-library-distribution plugin using includes filters the automatic lib directory which I need to reference


(Waffles) #1

I’m using the java-library-distribution plugin. When I add the include filter, it no longer copies the lib directory. I thought that part of the plugin was to have that feature. I almost posted this as an issue but it could be a lack of knowledge on how to reference the lib since its “filtering to just what I’ve listed”, intended functionality.

Question is simple, wow do I reference the lib it was copying in? Any help is appreciated.

//version information Gradle Version 1.8 Build time:

2013-09-24 07:32:33 UTC Build number: none Revision:

7970ec3503b4f5767ee1c1c69f8b4186c4763e3d

//code snippet http://pastebin.com/Ph1puLLe


(Peter Niederwieser) #2

Rather than adding a global include, you can target it to ‘scripts’:

...
contents {
    from(scripts) {
        include 'script.sh'
    }
}

Does this solve your problem?


(Waffles) #3

Yes, it does. Thank you very much. It makes perfect sense now that I see the solution.