NOTE: You can open the samples inside an IDE using the https://www.jetbrains.com/help/idea/gradle.html#gradle_import_project_start[IntelliJ native importer] or https://projects.eclipse.org/projects/tools.buildship[Eclipse Buildship].

This sample shows how to create a plugin with tasks that have dependency resolution results as inputs.
The plugin is packaged via an included build and is demonstrated on a multi-project build for a Java application.

====
include::sample[dir="groovy",files="settings.gradle[tag=includes];list/build.gradle[];utilities/build.gradle[];build.gradle[]"]
include::sample[dir="kotlin",files="settings.gradle.kts[tag=includes];list/build.gradle.kts[];utilities/build.gradle.kts[];build.gradle.kts[]"]
====

To execute the sample tasks:

====
[.testable-sample,dir="groovy"]
=====
[.sample-command]
----
> ./gradlew -q listResolvedArtifacts
include::{samplesPath}/writing-tasks/tasks-with-dependency-resolution-result-inputs/tests/listResolvedArtifacts.out[]

BUILD SUCCESSFUL in 1s
1 actionable task: 1 executed
----
=====
=====
[.sample-command]
----
> ./gradlew -q graphResolvedComponents
include::{samplesPath}/writing-tasks/tasks-with-dependency-resolution-result-inputs/tests/graphResolvedComponents.out[]

BUILD SUCCESSFUL in 1s
1 actionable task: 1 executed
----
=====
=====
[.sample-command]
----
> ./gradlew -q graphResolvedComponentsAndFiles
include::{samplesPath}/writing-tasks/tasks-with-dependency-resolution-result-inputs/tests/graphResolvedComponentsAndFiles.out[]

BUILD SUCCESSFUL in 1s
1 actionable task: 1 executed
----
=====
====

For more information, see link:{userManualPath}/more_about_tasks.html[Authoring Tasks reference chapter].
More specifically, see the link:{userManualPath}/more_about_tasks.html#sec:up_to_date_checks[Incremental Build] section and its link:{userManualPath}/more_about_tasks.html#sec:task_input_using_classpath_annotations[Using dependency resolution results] subsection.
