Gradle Dependencies and Dependency Configurations: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 26: Line 26:
{{External|DSL Reference https://docs.gradle.org/current/dsl/org.gradle.api.artifacts.Configuration.html}}
{{External|DSL Reference https://docs.gradle.org/current/dsl/org.gradle.api.artifacts.Configuration.html}}
A configuration represents a named group of artifacts and their dependencies.  
A configuration represents a named group of artifacts and their dependencies.  
{{Note|Configuration, in this context, does not refer to a configuration file of any sort, as in a settings configuration [[settings.gradle]] or a build configuration [[build.gradle]]. It refers to named set of dependencies or artifacts, and it can probably thought of as being a concept similar to a Maven [[Maven_Concepts_-_Dependencies#Dependency_Scope|scope]].}}
{{Note|Configuration, in this context, does not refer to a configuration file of any sort, as in a settings configuration [[settings.gradle]] or a build configuration [[build.gradle]]. It refers to named set of artifacts, and it can probably thought of as being a concept similar to a Maven [[Maven_Concepts_-_Dependencies#Dependency_Scope|scope]].}}

Revision as of 16:49, 22 October 2020

External

Internal

TO DEPLETE

Gradle Dependencies and Dependency Configurations TODEPLETE

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
}

Dependency

Configuration

DSL Reference https://docs.gradle.org/current/dsl/org.gradle.api.artifacts.Configuration.html

A configuration represents a named group of artifacts and their dependencies.


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