本文整理了Java中org.gradle.api.tasks.javadoc.Javadoc
类的一些代码示例,展示了Javadoc
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Javadoc
类的具体详情如下:
包路径:org.gradle.api.tasks.javadoc.Javadoc
类名称:Javadoc
暂无
代码示例来源:origin: gradle.plugin.rgoldberg/java-modules
private void configureJavadocTask(final Javadoc javadoc, final ImmutableSet<String> moduleNameIset) {
setModuleNamesInputProperty(javadoc, moduleNameIset);
javadoc.doFirst(task -> {
final FileCollection classpath = javadoc.getClasspath();
if (! classpath.isEmpty()) {
((CoreJavadocOptions) javadoc.getOptions()).addStringOption(JAVADOC_TASK_OPTION_MODULE_PATH, classpath.getAsPath());
javadoc.setClasspath(javadoc.getProject().files());
}
});
}
代码示例来源:origin: gradle.plugin.com.liferay/gradle-plugins-app-javadoc-builder
project, APP_JAVADOC_TASK_NAME, Javadoc.class);
javadoc.setDescription(
"Generates Javadoc API documentation for the app.");
javadoc.setGroup(JavaBasePlugin.DOCUMENTATION_GROUP);
ConventionMapping conventionMapping = javadoc.getConventionMapping();
(StandardJavadocDocletOptions)javadoc.getOptions();
代码示例来源:origin: gradle.plugin.me.seeber.gradle/gradle-project-config
/**
* Configure the javadoc task
*
* @param javadoc Javadoc task to configure
*/
@Mutate
public void configureJavadocTask(@Path("tasks.javadoc") Javadoc javadoc) {
javadoc.setFailOnError(false);
}
代码示例来源:origin: gradle.plugin.org.javamodularity/moduleplugin
public void configureJavaDoc(Project project) {
Javadoc javadoc = (Javadoc) project.getTasks().findByName(JavaPlugin.JAVADOC_TASK_NAME);
if (javadoc != null) {
javadoc.getExtensions().create("moduleOptions", ModuleOptions.class, project);
javadoc.doFirst(task -> {
ModuleOptions moduleOptions = javadoc.getExtensions().getByType(ModuleOptions.class);
CoreJavadocOptions options = (CoreJavadocOptions) javadoc.getOptions();
options.addStringOption("-module-path", javadoc.getClasspath().getAsPath());
if(!moduleOptions.getAddModules().isEmpty()) {
String addModules = String.join(",", moduleOptions.getAddModules());
options.addStringOption("-add-module", addModules);
}
javadoc.setClasspath(project.files());
});
}
}
}
代码示例来源:origin: io.freefair.gradle/android-gradle-plugins
javadoc.setDescription("Generate Javadoc for the " + variant.getName() + " variant");
javadoc.setGroup(JavaBasePlugin.DOCUMENTATION_GROUP);
javadoc.dependsOn(variant.getJavaCompiler());
javadoc.setSource(javacTask.getSource());
javadoc.setClasspath(project.files(javacTask.getDestinationDir()).plus(javacTask.getClasspath()));
javadoc.getOptions().setSource(javacTask.getSourceCompatibility());
javadoc.exclude("**/R.java");
javadoc.getOptions().encoding("UTF-8");
javadoc.getOptions().setBootClasspath(getAndroidExtension().getBootClasspath());
if (javadoc.getOptions() instanceof StandardJavadocDocletOptions) {
StandardJavadocDocletOptions realOptions = (StandardJavadocDocletOptions) javadoc.getOptions();
javadoc.setFailOnError(false);
javadoc.setDestinationDir(new File(javadocDir, variant.getDirName()));
});
代码示例来源:origin: gradle.plugin.com.liferay/gradle-plugins-app-javadoc-builder
Project subproject) {
Logger logger = javadoc.getLogger();
javadoc.dependsOn(subprojectJavadoc);
FileCollection classpath = javadoc.getClasspath();
javadoc.setClasspath(classpath.plus(subprojectJavadoc.getClasspath()));
FileTree subprojectSource = subprojectJavadoc.getSource();
javadoc.source(subprojectSource);
(StandardJavadocDocletOptions)javadoc.getOptions();
subprojectStandardJavadocDocletOptions =
(StandardJavadocDocletOptions)
subprojectJavadoc.getOptions();
代码示例来源:origin: gradle.plugin.com.digitalascent/digitalascent-gradle-project
private void configureJavaDoc(Project project) {
final Action<Javadoc> action = task -> {
task.setDescription("Generates project-level javadoc for use in -javadoc jar");
StandardJavadocDocletOptions options = (StandardJavadocDocletOptions) task.getOptions();
options.setMemberLevel(JavadocMemberLevel.PROTECTED);
options.setAuthor(false);
options.setHeader(project.getName());
options.links("http://docs.oracle.com/javase/8/docs/api/","http://docs.oracle.com/javaee/7/api/");
options.addStringOption("Xdoclint:none", "-quiet");
// Suppress warnings due to cross-module @see and @link references.
project.getLogging().captureStandardError(LogLevel.INFO);
project.getLogging().captureStandardOutput(LogLevel.INFO);
};
final TaskCollection<Javadoc> javadocTasks = project.getTasks().withType(Javadoc.class);
javadocTasks.all(action);
}
代码示例来源:origin: gradle.plugin.com.liferay/gradle-plugins-app-javadoc-builder
private void _configureTaskAppJavadoc(
Javadoc javadoc,
AppJavadocBuilderExtension appJavadocBuilderExtension) {
if (appJavadocBuilderExtension.isDoclintDisabled()) {
CoreJavadocOptions coreJavadocOptions =
(CoreJavadocOptions)javadoc.getOptions();
coreJavadocOptions.addStringOption("Xdoclint:none", "-quiet");
}
}
代码示例来源:origin: gradle.plugin.com.github.skazzyy.gradle.plugins/sources-gradle-plugin
protected void createSourcesJars(final Project project) {
final JavaPluginConvention javaPluginConvention = project.getConvention().getPlugin(JavaPluginConvention.class);
Task sourcesJar = project.getTasks().create("sourcesJar", Jar.class, jar -> {
jar.setDescription("Creates a jar with the sources");
jar.setClassifier("sources");
jar.from(javaPluginConvention.getSourceSets().getByName("main").getAllSource());
});
Task javadocJar = project.getTasks().create("javadocJar", Jar.class, jar -> {
jar.setDescription("Creates a javadoc jar");
jar.setClassifier("javadoc");
Javadoc javadoc = (Javadoc) project.getTasks().getByName(JavaPlugin.JAVADOC_TASK_NAME);
jar.from(javadoc.getDestinationDir());
jar.dependsOn(javadoc);
});
Task testsJar = project.getTasks().create("testsJar", Jar.class, jar -> {
jar.setDescription("Creates a jar containing all the source and classes for the tests");
jar.setClassifier("tests");
SourceSet test = javaPluginConvention.getSourceSets().getByName("test");
jar.from(test.getAllJava());
jar.from(test.getOutput());
});
project.getArtifacts().add(Dependency.ARCHIVES_CONFIGURATION, sourcesJar);
project.getArtifacts().add(Dependency.ARCHIVES_CONFIGURATION, javadocJar);
project.getArtifacts().add(Dependency.ARCHIVES_CONFIGURATION, testsJar);
}
代码示例来源:origin: MinecraftForge/ForgeGradle
javadoc.setClasspath(main.getOutput().plus(main.getCompileClasspath()));
代码示例来源:origin: gradle.plugin.com.liferay/gradle-plugins-app-javadoc-builder
@Override
public File call() throws Exception {
Project project = javadoc.getProject();
return new File(project.getBuildDir(), "docs/javadoc");
}
代码示例来源:origin: palantir/gradle-baseline
.configureEach(test -> test.setBootstrapClasspath(errorProneFiles));
project.getTasks().withType(Javadoc.class)
.configureEach(javadoc -> javadoc.getOptions()
.setBootClasspath(new LazyConfigurationList(errorProneFiles)));
});
代码示例来源:origin: io.freefair.gradle/android-gradle-plugins
@Override
protected void withAndroid(TestedExtension extension) {
super.withAndroid(extension);
getAndroidVariants().all(variant -> {
AndroidJavadocPlugin androidJavadocPlugin = getProject().getPlugins().findPlugin(AndroidJavadocPlugin.class);
Javadoc javadocTask = androidJavadocPlugin.getJavadocTask(getProject(), variant);
Jar javadocJarTask = getProject().getTasks().create("javadoc" + capitalize((CharSequence) variant.getName()) + "Jar", Jar.class, jar -> {
jar.dependsOn(javadocTask);
jar.setDescription("Generate the javadoc jar for the " + variant.getName() + " variant");
jar.setGroup("jar");
jar.setAppendix(variant.getName());
jar.setClassifier("javadoc");
jar.from(javadocTask.getDestinationDir());
});
allJavadocJarTask.dependsOn(javadocJarTask);
if (publishVariant(variant)) {
getProject().getArtifacts().add(Dependency.ARCHIVES_CONFIGURATION, javadocJarTask);
}
});
}
}
代码示例来源:origin: gradle.plugin.com.liferay/gradle-plugins-app-javadoc-builder
private Jar _addTaskJarAppJavadoc(Javadoc javadoc) {
Jar jar = GradleUtil.addTask(
javadoc.getProject(), JAR_APP_JAVADOC_TASK_NAME, Jar.class);
jar.from(javadoc);
jar.setClassifier("javadoc");
jar.setDescription(
"Assembles a jar archive containing the Javadoc files for this " +
"app.");
jar.setGroup(BasePlugin.BUILD_GROUP);
return jar;
}
代码示例来源:origin: me.seeber.gradle/gradle-project-config
/**
* Configure the javadoc task
*
* @param javadoc Javadoc task to configure
*/
@Mutate
public void configureJavadocTask(@Path("tasks.javadoc") Javadoc javadoc) {
javadoc.setFailOnError(false);
}
内容来源于网络,如有侵权,请联系作者删除!