Gradle Dependencies and Dependency Configurations: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 3: Line 3:
=TO DEPLETE=
=TO DEPLETE=
{{Internal|Gradle Dependencies and Dependency Configurations|Gradle Dependencies and Dependency Configurations}}
{{Internal|Gradle Dependencies and Dependency Configurations|Gradle Dependencies and Dependency Configurations}}
=Overview=
=Overview=
Dependencies for a project can be managed with [https://docs.gradle.org/current/javadoc/org/gradle/api/Project.html#dependencies-groovy.lang.Closure- Project.dependencies(Closure)], [https://docs.gradle.org/current/javadoc/org/gradle/api/Project.html#getDependencies-- Project.getDependencies()] and the [[Gradle Project#Dependencies|"dependencies" build.gradle DSL element]]:
Dependencies for a project can be managed with [https://docs.gradle.org/current/javadoc/org/gradle/api/Project.html#dependencies-groovy.lang.Closure- Project.dependencies(Closure)], [https://docs.gradle.org/current/javadoc/org/gradle/api/Project.html#getDependencies-- Project.getDependencies()] and the [[Gradle Project#Dependencies|"dependencies" build.gradle DSL element]]:

Revision as of 22:30, 4 October 2020

Internal

TO DEPLETE

Gradle Dependencies and Dependency Configurations

Overview

Dependencies for a project can be managed with Project.dependencies(Closure), Project.getDependencies() and the "dependencies" build.gradle DSL element:

dependencies {
  // configuration closure
}

Configurations for a project can be managed with Project.configurations(Closure), Project.getConfigurations() and the "configurations" build.gradle DSL element:

configurations {
  // configuration closure
}

Configuration, in this context, does not refer to a configuration file, as in a settings configuration or a build configuration. It refers to named set of dependencies or artifacts, and it can probably thought of as being a concept similar to a Maven scope.