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

io.staticcdn.sdk.gradle.StaticCdnPlugin Maven / Gradle / Ivy

There is a newer version: 0.1.26
Show newest version
package io.staticcdn.sdk.gradle;

import org.gradle.api.Plugin;
import org.gradle.api.Project;
import org.gradle.api.UnknownTaskException;

public class StaticCdnPlugin implements Plugin {

    @Override
    public void apply(Project project) {
        project.getExtensions().create("staticcdn", StaticCdnPluginExtension.class);
        project.getExtensions().getExtraProperties().set("OptimizeTask", OptimizeTask.class);
        OptimizeTask optimizeTask = project.getTasks().create("staticcdnOptimize", OptimizeTask.class);
        optimizeTask.setDescription("Optimize static assets with StaticCDN.io");
        optimizeTask.setGroup("build");
        try {
            project.getTasks().getByName("classes").dependsOn(optimizeTask);
        } catch (UnknownTaskException ignore) {
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy