Skip to content

Commit

Permalink
declare task output
Browse files Browse the repository at this point in the history
  • Loading branch information
paullatzelsperger committed Nov 19, 2024
1 parent c40e3f7 commit 13a02a9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
import org.gradle.api.DefaultTask;
import org.gradle.api.artifacts.Dependency;
import org.gradle.api.tasks.Internal;
import org.gradle.api.tasks.OutputDirectory;
import org.gradle.api.tasks.OutputFile;
import org.gradle.api.tasks.TaskAction;
import org.gradle.api.tasks.options.Option;

Expand Down Expand Up @@ -76,6 +78,11 @@ public void setOutput(String output) {
this.outputDirectoryOverride = new File(output);
}

@OutputDirectory
public File getOutputFile() {
return downloadDirectory.toFile();
}

/**
* Whether to consider a particular dependency for manifest resolution.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@
import org.gradle.api.artifacts.ProjectDependency;
import org.gradle.api.artifacts.repositories.MavenArtifactRepository;
import org.gradle.api.internal.artifacts.dependencies.DefaultProjectDependency;
import org.gradle.api.tasks.OutputFile;

import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.net.URI;
Expand Down Expand Up @@ -48,7 +50,6 @@ protected InputStream resolveManifest(DependencySource autodocManifest) {
getLogger().warn("Could not obtain {}", autodocManifest.dependency());
return null;
}

return inputStream;
}

Expand Down Expand Up @@ -122,6 +123,4 @@ private boolean isLocalFileValid(Dependency dep) {
throw new RuntimeException(e);
}
}


}

0 comments on commit 13a02a9

Please sign in to comment.