I followed this guide to create custom tasks with Gradle. http://www.ysofters.com/2015/02/26/how-to-create-gradle-project-with-custom-task-classes-in-groovy/ I also looked at the Gradle document. https://docs.gradle.org/current/userguide/custom_tasks.html
This is very clear, and I can get examples for compiling and using tasks, so that so far so good.
However, the examples only show the import of the Gradle API files, i.e.
import org.gradle.api.DefaultTask
import org.gradle.api.tasks.TaskAction
I want to add some more dependencies, i.e.
import org.springframework.beans.factory.config.YamlPropertiesFactoryBean
import org.springframework.core.io.FileSystemResource
but I can do it - Gradle will complain and say that "the class cannot solve .."
apache-commons buildscript-> build.gradle, , ..
buildscript {
dependencies {
classpath group: 'org.springframework', name: 'spring-core', version: springVersion
classpath group: 'org.apache.commons', name: 'commons-lang3', version: '3.4'
.....
, - ?