Package com.ljarocki.shadedjar
Class PackAction
java.lang.Object
com.ljarocki.shadedjar.PackAction
- All Implemented Interfaces:
org.gradle.workers.WorkAction<PackParams>
public abstract class PackAction
extends Object
implements org.gradle.workers.WorkAction<PackParams>
Thin Gradle Worker-API wrapper around
SourcePacker: one work item packs
one source (a dependency jar or a classes directory) into a part file. Gradle
runs these on its shared worker pool, so concurrency is bounded by
--max-workers / org.gradle.workers.max and coordinated with the
rest of the build.
For a jar source (never a directory — a project's own compiled output
changes on essentially every build in the scenario the cache targets, so
there's nothing to gain caching it), checks PackCache first: a hit
copies the previously-packed bytes straight to the part-file location instead
of re-running SourcePacker; a miss packs normally, then stores the
result for next time. Any cache read/write hiccup falls back to the always-
correct uncached path — caching is a pure optimization and must never be able
to fail or corrupt a build.
-
Constructor Details
-
PackAction
public PackAction()
-
-
Method Details
-
execute
public void execute()- Specified by:
executein interfaceorg.gradle.workers.WorkAction<PackParams>
-