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

org.anarres.gradle.plugin.stdproject.StdProjectExtension Maven / Gradle / Ivy

package org.anarres.gradle.plugin.stdproject;

import groovy.lang.GroovyObjectSupport;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import javax.annotation.Nonnull;
import org.gradle.api.Project;

/**
 * The standard project plugin extension.
 *
 * This allows configuring the standard project plugin using a
 * stdproject { } block.
 *
 * @author shevek
 */
public class StdProjectExtension extends GroovyObjectSupport {

    public StdProjectExtension(@Nonnull Project project) {
    }

    public Map> javadocGroups = new LinkedHashMap>();

    public void javadocGroup(@Nonnull String title, @Nonnull String... patterns) {
        List group = javadocGroups.get(title);
        if (group == null) {
            group = new ArrayList();
            javadocGroups.put(title, group);
        }
        group.addAll(Arrays.asList(patterns));
    }

    // aggregateJavadoc requires this.
    public List javadocLinks = new ArrayList() {
        {
            addAll(Arrays.asList(
                    "http://docs.oracle.com/javase/7/docs/api/",
                    "http://docs.oracle.com/javaee/7/api/",
                    "http://gradle.org/docs/current/javadoc/",
                    "http://groovy.codehaus.org/api/",
                    "http://docs.guava-libraries.googlecode.com/git/javadoc/"));
        }
    };

    public void javadocLink(@Nonnull Object... uris) {
        for (Object uri : uris)
            javadocLinks.add(String.valueOf(uri));
    }
    public boolean javadocLinkSource = true;

    public void javadocLinkSource(boolean value) {
        this.javadocLinkSource = value;
    }

    public boolean javadocQuiet = false;

    public void javadocQuiet(boolean value) {
        this.javadocQuiet = value;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy