Gradle Java Library Plugin: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 6: Line 6:


=Overview=
=Overview=
The Java Library plugin expands the capabilities of the [[Gradle_Java_Plugin|Java plugin]] by providing specific knowledge about Java libraries. In particular, a Java library exposes an API to consumers, so the plugin introduces the "api" configuration. All the source sets, tasks and configurations exposed by the Java plugin are implicitly available when using this plugin.
The Java Library plugin expands the capabilities of the [[Gradle_Java_Plugin|Java plugin]] by providing specific knowledge about Java libraries. In particular, a Java library exposes an API to consumers, so the plugin introduces the "api" configuration. All the source sets, tasks and configurations exposed by the Java plugin are implicitly available when using this plugin. The Java Library plugin should be used by default with Java projects:
<syntaxhighlight lang='groovy'>
plugins {
  id 'java-library'
}
</syntaxhighlight>

Revision as of 23:03, 26 March 2021

External

Internal

Overview

The Java Library plugin expands the capabilities of the Java plugin by providing specific knowledge about Java libraries. In particular, a Java library exposes an API to consumers, so the plugin introduces the "api" configuration. All the source sets, tasks and configurations exposed by the Java plugin are implicitly available when using this plugin. The Java Library plugin should be used by default with Java projects:

plugins {
  id 'java-library'
}