I have a Copy task in my gradle build file- configurations.add(‘myArchives’) … task myCopy(type: Copy) {
from “.”
include ‘file.bin’
into buildDir
}
that I want to publish to the repo- artifacts {
myArchives myCopy }
which leads to an error (M6 build)- A problem occured evaluating project '… Cause: Notation is invalid for an artifact! Passed notation=task ':…
I’ve tried - task myCopy(type: Copy) {
from “.”
include ‘example.bin’
into buildDir
outputs.dir file("$buildDir") }
and - artifacts {
myArchives myCopy.outputs.dir }
replacing -
outputs.dir above with outputs.files, outputs.file, etc.does not help.
Would I need to use DefaultPublishArtifact or PublishArtifact() etc ? Is there any example in the case of a Copy task (or any Custom tasks that produce artifacts) that I could use? Thanks for your help.