Skip to content

Tag: build.gradle

How to exclude all files under a directory in Gradle?

For example, this one will exclude 1 file. But how to exclude all file under a directory? like: org/apache/commons/codec/language/bm/ folder? . does not work 🙂 Answer wild card can be used to enforce action to multiple file in directory. See this:- You can also exclude a file/directory with out specifying the…

Gradle – add directory to classpath

My application requires that a config directory be available on the classpath when it looks for configurations files under the directory. I currently have dependencies configured like so, though this is probably not the correct way to make a directory available to my application: I am using the application pl…

Add provided dependency to test classpath using Gradle

I’ve provided dependency scope configured like below. My problem is, the provided dependencies are not visible during runtime in tests. How can I configure this to keep the dependencies provided but available on the test classpath? One solution is to add the dependency like the joda-time library with te…