All Downloads are FREE. Search and download functionalities are using the official Maven repository.

name.remal.gradle_plugins.merge_resources.CustomResourceMerger Maven / Gradle / Ivy

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);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy