Gradle constant no-source on tar action

(Willie) #1

I have a task with this defined

class mytask {
  File getDocDir() {
    def typeString = type.toString().toLowerCase()
    return new File(project.buildDir, "docs/${typeString}/${}-sphinx-${typeString}")

Then, elsewhere in my code base, I have an action defined like this

static class PackageDocumentationAction implements Action<Tar> {

    private final mytask documentationTask

    PackageDocumentationAction(mytask documentationTask) {
      this.documentationTask = documentationTask

    void execute(Tar tar) {
      tar.compression = Compression.GZIP
      tar.baseName =
      tar.classifier = 'docs-' + documentationTask.type.builderName
      tar.extension = 'tar.gz'

Now, the mytask runs perfectly, no problems there. but, when i try to run the TAR, i get nothing but NO-SOURCEi have tried doing the tar.source to no avail. Whats wrong with this picture?

(Sterling Greene) #2

It’s not clear to me how you have those things wired together.

My suspicion would be that getDocDir isn’t returning the true location of where the output goes or you’re using PackageDocumentationAction as a doLast/doFirst action.