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

io.freefair.gradle.plugins.maven.javadoc.JavadocUtf8Plugin Maven / Gradle / Ivy

There is a newer version: 8.11
Show newest version
package io.freefair.gradle.plugins.maven.javadoc;

import org.gradle.api.Plugin;
import org.gradle.api.Project;
import org.gradle.api.tasks.javadoc.Javadoc;
import org.gradle.external.javadoc.StandardJavadocDocletOptions;

/**
 * @author Lars Grefer
 */
public class JavadocUtf8Plugin implements Plugin {

    @Override
    public void apply(Project project) {
        project.getTasks().withType(Javadoc.class).configureEach(javadoc -> {

            StandardJavadocDocletOptions options = (StandardJavadocDocletOptions) javadoc.getOptions();

            options.charSet("UTF-8");
            options.docEncoding("UTF-8");
            options.setEncoding("UTF-8");
        });
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy