Gradle Software Components: Difference between revisions
Jump to navigation
Jump to search
Line 3: | Line 3: | ||
=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 components.java. 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. | 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: | The available components can be displayed with: |
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 }
}