Skip to content

Commit

Permalink
Add note on applying plugin in multi-project builds
Browse files Browse the repository at this point in the history
  • Loading branch information
bmuschko committed Nov 7, 2023
1 parent 7f2f5d9 commit e2d41cb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/docs/asciidoc/user-guide/02-getting-started.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

The plugin can be applied with the `buildscript` syntax or the plugin DSL.
Let's say you'd want to go with the plugin that provides the plain Docker operations for managing Docker images and containers.
See the https://docs.gradle.org/current/userguide/plugins.html[Gradle user guide] for more information on applying plugins.
See the {uri-gradle-docs}/userguide/plugins.html[Gradle user guide] for more information on applying plugins.

==== Applying the Plugin Using the buildscript Syntax

Expand Down Expand Up @@ -32,6 +32,9 @@ include::{samplesCodeDir}/remote-api-plugin/apply-plugin-dsl/groovy/build.gradle
include::{samplesCodeDir}/remote-api-plugin/apply-plugin-dsl/kotlin/build.gradle.kts[]
----

[IMPORTANT]
Using the `plugins {}` block to apply the plugin requires special handling in a multi-project build. For more information, see the Gradle documentation section named {uri-gradle-docs}/userguide/plugins.html#sec:subprojects_plugins_dsl["Applying external plugins with same version to subprojects"].

==== Applying the Plugin From a Script Plugin

Applying the plugin from a script plugin requires the use of the fully-qualified class name due to a https://github.com/gradle/gradle/issues/1262[bug in Gradle core]. Be aware that the plugin DSL cannot be used to apply a binary plugin from a script plugin.
Expand Down

0 comments on commit e2d41cb

Please sign in to comment.