1

Using Scala's SBT, I can indicate that a dependency required for compilation will be "provided" in the runtime environment like so:

val catalina = "org.apache.tomcat" % "tomcat-catalina" % V.tomcat % "provided"

A dependency marked as provided in this way will automatically be ignored when building a fatjar using sbt-assembly.

What is the equivalent functionality for Gradle?

Alex Dean
  • 15,575
  • 13
  • 63
  • 74
  • 1
    Googling for "gradle provided" directly leads to http://forums.gradle.org/gradle/topics/how_do_i_best_define_dependencies_as_provided. – JB Nizet Jul 27 '14 at 08:33

1 Answers1

2

At the moment Gradle does not add a provided configuration out-of-the-box. However, there are a couple of plugins that add this functionality:

Alternatively, you can also model this configuration yourself. You will find many examples for this on the Gradle forum.

Benjamin Muschko
  • 32,442
  • 9
  • 61
  • 82