Java Code Examples for org.gradle.external.javadoc.StandardJavadocDocletOptions#setDocTitle()

The following examples show how to use org.gradle.external.javadoc.StandardJavadocDocletOptions#setDocTitle() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Javadoc.java    From pushfish-android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
@TaskAction
protected void generate() {
    final File destinationDir = getDestinationDir();

    if (options.getDestinationDirectory() == null) {
        options.destinationDirectory(destinationDir);
    }

    options.classpath(new ArrayList<File>(getClasspath().getFiles()));

    if (!GUtil.isTrue(options.getWindowTitle()) && GUtil.isTrue(getTitle())) {
        options.windowTitle(getTitle());
    }
    if (options instanceof StandardJavadocDocletOptions) {
        StandardJavadocDocletOptions docletOptions = (StandardJavadocDocletOptions) options;
        if (!GUtil.isTrue(docletOptions.getDocTitle()) && GUtil.isTrue(getTitle())) {
            docletOptions.setDocTitle(getTitle());
        }
    }

    if (maxMemory != null) {
        final List<String> jFlags = options.getJFlags();
        final Iterator<String> jFlagsIt = jFlags.iterator();
        boolean containsXmx = false;
        while (!containsXmx && jFlagsIt.hasNext()) {
            final String jFlag = jFlagsIt.next();
            if (jFlag.startsWith("-Xmx")) {
                containsXmx = true;
            }
        }
        if (!containsXmx) {
            options.jFlags("-Xmx" + maxMemory);
        }
    }

    List<String> sourceNames = new ArrayList<String>();
    for (File sourceFile : getSource()) {
        sourceNames.add(sourceFile.getAbsolutePath());
    }
    options.setSourceNames(sourceNames);

    executeExternalJavadoc();
}
 
Example 2
Source File: Javadoc.java    From pushfish-android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
@TaskAction
protected void generate() {
    final File destinationDir = getDestinationDir();

    if (options.getDestinationDirectory() == null) {
        options.destinationDirectory(destinationDir);
    }

    options.classpath(new ArrayList<File>(getClasspath().getFiles()));

    if (!GUtil.isTrue(options.getWindowTitle()) && GUtil.isTrue(getTitle())) {
        options.windowTitle(getTitle());
    }
    if (options instanceof StandardJavadocDocletOptions) {
        StandardJavadocDocletOptions docletOptions = (StandardJavadocDocletOptions) options;
        if (!GUtil.isTrue(docletOptions.getDocTitle()) && GUtil.isTrue(getTitle())) {
            docletOptions.setDocTitle(getTitle());
        }
    }

    if (maxMemory != null) {
        final List<String> jFlags = options.getJFlags();
        final Iterator<String> jFlagsIt = jFlags.iterator();
        boolean containsXmx = false;
        while (!containsXmx && jFlagsIt.hasNext()) {
            final String jFlag = jFlagsIt.next();
            if (jFlag.startsWith("-Xmx")) {
                containsXmx = true;
            }
        }
        if (!containsXmx) {
            options.jFlags("-Xmx" + maxMemory);
        }
    }

    List<String> sourceNames = new ArrayList<String>();
    for (File sourceFile : getSource()) {
        sourceNames.add(sourceFile.getAbsolutePath());
    }
    options.setSourceNames(sourceNames);

    executeExternalJavadoc();
}
 
Example 3
Source File: Javadoc.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
@TaskAction
protected void generate() {
    final File destinationDir = getDestinationDir();

    if (options.getDestinationDirectory() == null) {
        options.destinationDirectory(destinationDir);
    }

    options.classpath(new ArrayList<File>(getClasspath().getFiles()));

    if (!GUtil.isTrue(options.getWindowTitle()) && GUtil.isTrue(getTitle())) {
        options.windowTitle(getTitle());
    }
    if (options instanceof StandardJavadocDocletOptions) {
        StandardJavadocDocletOptions docletOptions = (StandardJavadocDocletOptions) options;
        if (!GUtil.isTrue(docletOptions.getDocTitle()) && GUtil.isTrue(getTitle())) {
            docletOptions.setDocTitle(getTitle());
        }
    }

    if (maxMemory != null) {
        final List<String> jFlags = options.getJFlags();
        final Iterator<String> jFlagsIt = jFlags.iterator();
        boolean containsXmx = false;
        while (!containsXmx && jFlagsIt.hasNext()) {
            final String jFlag = jFlagsIt.next();
            if (jFlag.startsWith("-Xmx")) {
                containsXmx = true;
            }
        }
        if (!containsXmx) {
            options.jFlags("-Xmx" + maxMemory);
        }
    }

    List<String> sourceNames = new ArrayList<String>();
    for (File sourceFile : getSource()) {
        sourceNames.add(sourceFile.getAbsolutePath());
    }
    options.setSourceNames(sourceNames);

    executeExternalJavadoc();
}
 
Example 4
Source File: Javadoc.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
@TaskAction
protected void generate() {
    final File destinationDir = getDestinationDir();

    if (options.getDestinationDirectory() == null) {
        options.destinationDirectory(destinationDir);
    }

    options.classpath(new ArrayList<File>(getClasspath().getFiles()));

    if (!GUtil.isTrue(options.getWindowTitle()) && GUtil.isTrue(getTitle())) {
        options.windowTitle(getTitle());
    }
    if (options instanceof StandardJavadocDocletOptions) {
        StandardJavadocDocletOptions docletOptions = (StandardJavadocDocletOptions) options;
        if (!GUtil.isTrue(docletOptions.getDocTitle()) && GUtil.isTrue(getTitle())) {
            docletOptions.setDocTitle(getTitle());
        }
    }

    if (maxMemory != null) {
        final List<String> jFlags = options.getJFlags();
        final Iterator<String> jFlagsIt = jFlags.iterator();
        boolean containsXmx = false;
        while (!containsXmx && jFlagsIt.hasNext()) {
            final String jFlag = jFlagsIt.next();
            if (jFlag.startsWith("-Xmx")) {
                containsXmx = true;
            }
        }
        if (!containsXmx) {
            options.jFlags("-Xmx" + maxMemory);
        }
    }

    List<String> sourceNames = new ArrayList<String>();
    for (File sourceFile : getSource()) {
        sourceNames.add(sourceFile.getAbsolutePath());
    }
    options.setSourceNames(sourceNames);

    executeExternalJavadoc();
}