name.remal.gradle_plugins.merge_resources.CustomResourceMerger Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of merge-resources Show documentation
Show all versions of merge-resources Show documentation
Remal Gradle plugins: merge-resources
The newest version!
package name.remal.gradle_plugins.merge_resources;
import static java.util.Collections.unmodifiableCollection;
import static lombok.AccessLevel.PUBLIC;
import java.io.File;
import java.io.InputStream;
import java.util.Collection;
import javax.inject.Inject;
import lombok.RequiredArgsConstructor;
import org.gradle.api.file.RelativePath;
@RequiredArgsConstructor(access = PUBLIC, onConstructor_ = {@Inject})
abstract class CustomResourceMerger extends ResourceMerger {
private final Collection includes;
private final CustomResourceMergerFunction merger;
@Override
protected Collection getIncludes() {
return unmodifiableCollection(includes);
}
@Override
protected InputStream merge(RelativePath relativePath, Collection files) throws Throwable {
return merger.merge(relativePath, files);
}
}