I’m new at gradle, and having a problem setting up a Copy task in my custom plugin. I’m using an extension object to configure the into location for my Copy task, and when I execute the script files are copied. However, the destination directory is named ‘null/modules/null’ instead of the value that was configured.
project.task('copySourceToBuild', type: Copy) {
from "src"
into "${project.jsConfig.buildWorkingDir}/modules/${project.jsConfig.libraryName}"
}
If I manually copy the exact same task into my build.gradle file, the value is correctly seen, and directory created. My plugin doesn’t seem to be able to see the value inside the configure section, but can inside of doLast{}.