I am trying to create my first Gradle plugin.
1. Add an extension for the properties: project.extensions.create("abc", AbcExtension)
2. Define the copy task. When I define a task as follows
project.task("abcTask", type: Copy) { from project.abc.fromPath into project.abc.intoPath }
project.abc.fromPath is equal to the value of AbcExtension.fromPath - it does not read the values ββfrom build.gradle .
When I define a task as follows
project.task("abcTask", type: Copy) << { from project.abc.fromPath into project.abc.intoPath }
it always prints UP-TO-DATE and does not run the task.
Pls explains this behavior and tells me what is the correct way to define tasks in Gradle plugins (with type and dependsOn functionallity)
source share