Gradle Software Components: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
(Created page with "=Internal= * Gradle Concepts =Overview=")
 
 
(2 intermediate revisions by the same user not shown)
Line 2: Line 2:
* [[Gradle_Concepts#Subjects|Gradle Concepts]]
* [[Gradle_Concepts#Subjects|Gradle Concepts]]
=Overview=
=Overview=
A software components may be added by a [[#Plugin|plugin]]. For example the [[Gradle_Java_Plugin#Overview|Java plugin]] adds a "java" component, accessible via <code>components.java</code>. The artifact associated with the Java component is the generated JAR file, and the dependencies are those of the [[Gradle_Java_Plugin#runtime|runtime]] configurations. The [[Gradle_War_Plugin|War plugin]] adds a "web" software component whose artifact is the generated WAR file, with no dependencies.
The available components can be displayed with:
<syntaxhighlight lang='groovy'>
task util {
    components.each { println it.name }
}
</syntaxhighlight>

Latest revision as of 19:02, 23 April 2021

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 }
}