use of org.gradle.api.java.archives.internal.ManifestInternal in project gradle by gradle.
the class Jar method computeManifest.
private ManifestInternal computeManifest() {
Manifest manifest = getManifest();
if (manifest == null) {
manifest = new DefaultManifest(null);
}
ManifestInternal manifestInternal;
if (manifest instanceof ManifestInternal) {
manifestInternal = (ManifestInternal) manifest;
} else {
manifestInternal = new CustomManifestInternalWrapper(manifest);
}
manifestInternal.setContentCharset(manifestContentCharset);
return manifestInternal;
}
use of org.gradle.api.java.archives.internal.ManifestInternal in project gradle by gradle.
the class Jar method manifestFileTree.
private FileTreeInternal manifestFileTree() {
final Cached<ManifestInternal> manifest = Cached.of(this::computeManifest);
final OutputChangeListener outputChangeListener = outputChangeListener();
return fileCollectionFactory().generated(getTemporaryDirFactory(), "MANIFEST.MF", action(file -> outputChangeListener.beforeOutputChange(ImmutableList.of(file.getAbsolutePath()))), action(outputStream -> manifest.get().writeTo(outputStream)));
}
Aggregations