Java Code Examples for org.gradle.api.tasks.javadoc.Javadoc#setClasspath()

The following examples show how to use org.gradle.api.tasks.javadoc.Javadoc#setClasspath() . 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: DocletPlugin.java    From crnk-framework with Apache License 2.0 6 votes vote down vote up
@Override
public void apply(final Project project) {
	Configuration config = project.getConfigurations().create("crnkJavaDocToXml");

	project.getDependencies().add("crnkJavaDocToXml", "com.github.markusbernhardt:xml-doclet:1.0.5");

	Javadoc task = project.getTasks().create(TASK_NAME, Javadoc.class);
	task.setTitle(null);
	task.setDestinationDir(new File(project.getBuildDir(), "crnk-xml-docs"));

	MinimalJavadocOptions options = task.getOptions();
	options.setDoclet("com.github.markusbernhardt.xmldoclet.XmlDoclet");
	options.setMemberLevel(JavadocMemberLevel.PRIVATE);
	options.setDocletpath(new ArrayList<>(config.getFiles()));

	SourceSetContainer sourceSets = (SourceSetContainer) project.getProperties().get("sourceSets");
	SourceSet mainSourceSet = sourceSets.getByName("main");
	task.source(mainSourceSet.getAllJava());
	task.setClasspath(mainSourceSet.getCompileClasspath());
}
 
Example 2
Source File: JavaPlugin.java    From pushfish-android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
private void configureJavaDoc(final JavaPluginConvention pluginConvention) {
    Project project = pluginConvention.getProject();

    SourceSet mainSourceSet = pluginConvention.getSourceSets().getByName(SourceSet.MAIN_SOURCE_SET_NAME);
    Javadoc javadoc = project.getTasks().create(JAVADOC_TASK_NAME, Javadoc.class);
    javadoc.setDescription("Generates Javadoc API documentation for the main source code.");
    javadoc.setGroup(JavaBasePlugin.DOCUMENTATION_GROUP);
    javadoc.setClasspath(mainSourceSet.getOutput().plus(mainSourceSet.getCompileClasspath()));
    javadoc.setSource(mainSourceSet.getAllJava());
    addDependsOnTaskInOtherProjects(javadoc, true, JAVADOC_TASK_NAME, COMPILE_CONFIGURATION_NAME);
}
 
Example 3
Source File: JavaPlugin.java    From pushfish-android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
private void configureJavaDoc(final JavaPluginConvention pluginConvention) {
    Project project = pluginConvention.getProject();

    SourceSet mainSourceSet = pluginConvention.getSourceSets().getByName(SourceSet.MAIN_SOURCE_SET_NAME);
    Javadoc javadoc = project.getTasks().create(JAVADOC_TASK_NAME, Javadoc.class);
    javadoc.setDescription("Generates Javadoc API documentation for the main source code.");
    javadoc.setGroup(JavaBasePlugin.DOCUMENTATION_GROUP);
    javadoc.setClasspath(mainSourceSet.getOutput().plus(mainSourceSet.getCompileClasspath()));
    javadoc.setSource(mainSourceSet.getAllJava());
    addDependsOnTaskInOtherProjects(javadoc, true, JAVADOC_TASK_NAME, COMPILE_CONFIGURATION_NAME);
}
 
Example 4
Source File: JavaPlugin.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
private void configureJavaDoc(final JavaPluginConvention pluginConvention) {
    Project project = pluginConvention.getProject();

    SourceSet mainSourceSet = pluginConvention.getSourceSets().getByName(SourceSet.MAIN_SOURCE_SET_NAME);
    Javadoc javadoc = project.getTasks().create(JAVADOC_TASK_NAME, Javadoc.class);
    javadoc.setDescription("Generates Javadoc API documentation for the main source code.");
    javadoc.setGroup(JavaBasePlugin.DOCUMENTATION_GROUP);
    javadoc.setClasspath(mainSourceSet.getOutput().plus(mainSourceSet.getCompileClasspath()));
    javadoc.setSource(mainSourceSet.getAllJava());
    addDependsOnTaskInOtherProjects(javadoc, true, JAVADOC_TASK_NAME, COMPILE_CONFIGURATION_NAME);
}
 
Example 5
Source File: JavaPlugin.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
private void configureJavaDoc(final JavaPluginConvention pluginConvention) {
    Project project = pluginConvention.getProject();

    SourceSet mainSourceSet = pluginConvention.getSourceSets().getByName(SourceSet.MAIN_SOURCE_SET_NAME);
    Javadoc javadoc = project.getTasks().create(JAVADOC_TASK_NAME, Javadoc.class);
    javadoc.setDescription("Generates Javadoc API documentation for the main source code.");
    javadoc.setGroup(JavaBasePlugin.DOCUMENTATION_GROUP);
    javadoc.setClasspath(mainSourceSet.getOutput().plus(mainSourceSet.getCompileClasspath()));
    javadoc.setSource(mainSourceSet.getAllJava());
    addDependsOnTaskInOtherProjects(javadoc, true, JAVADOC_TASK_NAME, COMPILE_CONFIGURATION_NAME);
}