Maven’s “provided” dependencies are available for compilation and for test execution, but won’t be put on the runtime classpath and won’t be packaged. But unlike Maven, Gradle doesn’t support a “provided” dependency scope out-of-the-box.
Defining a “provided” scope in Gradle is pretty straight-forward, but it is not exactly a one-liner: You have to define a new configuration and add it to the various classpathes.
If you are using Gradle’s Eclipse or IDEA support, you must also add the configuration to the classpath of these modules:
comments powered by Disqus