Gradle Software Components

From NovaOrdis Knowledge Base
Jump to navigation Jump to search

Internal

Overview

A software components may be added by a plugin. For example the Java plugin adds a "java" component, accessible via components.java. The artifact associated with the Java component is the generated JAR file, and the dependencies are those of the runtime configurations. The War plugin adds a "web" software component whose artifact is the generated WAR file, with no dependencies.

The available components can be displayed with:

task util {

    components.each { println it.name }
}