本文整理汇总了Java中org.gradle.api.tasks.javadoc.Groovydoc类的典型用法代码示例。如果您正苦于以下问题:Java Groovydoc类的具体用法?Java Groovydoc怎么用?Java Groovydoc使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Groovydoc类属于org.gradle.api.tasks.javadoc包,在下文中一共展示了Groovydoc类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: configureGroovydoc
import org.gradle.api.tasks.javadoc.Groovydoc; //导入依赖的package包/类
private void configureGroovydoc() {
project.getTasks().withType(Groovydoc.class, new Action<Groovydoc>() {
public void execute(final Groovydoc groovydoc) {
groovydoc.getConventionMapping().map("groovyClasspath", new Callable<Object>() {
public Object call() throws Exception {
return groovyRuntime.inferGroovyClasspath(groovydoc.getClasspath());
}
});
groovydoc.getConventionMapping().map("destinationDir", new Callable<Object>() {
public Object call() throws Exception {
return new File(java(project.getConvention()).getDocsDir(), "groovydoc");
}
});
groovydoc.getConventionMapping().map("docTitle", new Callable<Object>() {
public Object call() throws Exception {
return project.getExtensions().getByType(ReportingExtension.class).getApiDocTitle();
}
});
groovydoc.getConventionMapping().map("windowTitle", new Callable<Object>() {
public Object call() throws Exception {
return project.getExtensions().getByType(ReportingExtension.class).getApiDocTitle();
}
});
}
});
}
开发者ID:Pushjet,项目名称:Pushjet-Android,代码行数:27,代码来源:GroovyBasePlugin.java
示例2: execute
import org.gradle.api.tasks.javadoc.Groovydoc; //导入依赖的package包/类
public void execute(final FileCollection source, File destDir, boolean use, boolean noTimestamp, boolean noVersionStamp,
String windowTitle, String docTitle, String header, String footer, String overview, boolean includePrivate,
final Set<Groovydoc.Link> links, final Iterable<File> groovyClasspath, Iterable<File> classpath, Project project) {
final File tmpDir = new File(project.getBuildDir(), "tmp/groovydoc");
FileOperations fileOperations = (ProjectInternal) project;
fileOperations.delete(tmpDir);
fileOperations.copy(new Action<CopySpec>() {
public void execute(CopySpec copySpec) {
copySpec.from(source).into(tmpDir);
}
});
List<File> combinedClasspath = ImmutableList.<File>builder()
.addAll(classpath)
.addAll(groovyClasspath)
.build();
VersionNumber version = VersionNumber.parse(getGroovyVersion(combinedClasspath));
final Map<String, Object> args = Maps.newLinkedHashMap();
args.put("sourcepath", tmpDir.toString());
args.put("destdir", destDir);
args.put("use", use);
if (isAtLeast(version, "2.4.6")) {
args.put("noTimestamp", noTimestamp);
args.put("noVersionStamp", noVersionStamp);
}
args.put("private", includePrivate);
putIfNotNull(args, "windowtitle", windowTitle);
putIfNotNull(args, "doctitle", docTitle);
putIfNotNull(args, "header", header);
putIfNotNull(args, "footer", footer);
if (overview != null) {
args.put("overview", overview);
}
invokeGroovydoc(links, combinedClasspath, args);
}
开发者ID:lxxlxx888,项目名称:Reer,代码行数:41,代码来源:AntGroovydoc.java
示例3: invokeGroovydoc
import org.gradle.api.tasks.javadoc.Groovydoc; //导入依赖的package包/类
private void invokeGroovydoc(final Set<Groovydoc.Link> links, List<File> combinedClasspath, final Map<String, Object> args) {
ant.withClasspath(combinedClasspath).execute(new Closure<Object>(this, this) {
@SuppressWarnings("UnusedDeclaration")
public Object doCall(Object it) {
final GroovyObjectSupport antBuilder = (GroovyObjectSupport) it;
antBuilder.invokeMethod("taskdef", ImmutableMap.of(
"name", "groovydoc",
"classname", "org.codehaus.groovy.ant.Groovydoc"
));
antBuilder.invokeMethod("groovydoc", new Object[]{args, new Closure<Object>(this, this) {
public Object doCall(Object ignore) {
for (Groovydoc.Link link : links) {
antBuilder.invokeMethod("link", new Object[]{
ImmutableMap.of(
"packages", Joiner.on(",").join(link.getPackages()),
"href", link.getUrl()
)
});
}
return null;
}
}});
return null;
}
});
}
开发者ID:lxxlxx888,项目名称:Reer,代码行数:31,代码来源:AntGroovydoc.java
示例4: configureGroovydoc
import org.gradle.api.tasks.javadoc.Groovydoc; //导入依赖的package包/类
private void configureGroovydoc(final Project project) {
Groovydoc groovyDoc = project.getTasks().create(GROOVYDOC_TASK_NAME, Groovydoc.class);
groovyDoc.setDescription("Generates Groovydoc API documentation for the main source code.");
groovyDoc.setGroup(JavaBasePlugin.DOCUMENTATION_GROUP);
JavaPluginConvention convention = project.getConvention().getPlugin(JavaPluginConvention.class);
SourceSet sourceSet = convention.getSourceSets().getByName(SourceSet.MAIN_SOURCE_SET_NAME);
groovyDoc.setClasspath(sourceSet.getOutput().plus(sourceSet.getCompileClasspath()));
GroovySourceSet groovySourceSet = new DslObject(sourceSet).getConvention().getPlugin(GroovySourceSet.class);
groovyDoc.setSource(groovySourceSet.getGroovy());
}
开发者ID:lxxlxx888,项目名称:Reer,代码行数:13,代码来源:GroovyPlugin.java
示例5: configureGroovydoc
import org.gradle.api.tasks.javadoc.Groovydoc; //导入依赖的package包/类
private void configureGroovydoc() {
project.getTasks().withType(Groovydoc.class, new Action<Groovydoc>() {
public void execute(final Groovydoc groovydoc) {
groovydoc.getConventionMapping().map("groovyClasspath", new Callable<Object>() {
public Object call() throws Exception {
FileCollection groovyClasspath = groovyRuntime.inferGroovyClasspath(groovydoc.getClasspath());
// Jansi is required to log errors when generating Groovydoc
ConfigurableFileCollection jansi = project.files(moduleRegistry.getExternalModule("jansi").getImplementationClasspath().getAsFiles());
return groovyClasspath.plus(jansi);
}
});
groovydoc.getConventionMapping().map("destinationDir", new Callable<Object>() {
public Object call() throws Exception {
return new File(java(project.getConvention()).getDocsDir(), "groovydoc");
}
});
groovydoc.getConventionMapping().map("docTitle", new Callable<Object>() {
public Object call() throws Exception {
return project.getExtensions().getByType(ReportingExtension.class).getApiDocTitle();
}
});
groovydoc.getConventionMapping().map("windowTitle", new Callable<Object>() {
public Object call() throws Exception {
return project.getExtensions().getByType(ReportingExtension.class).getApiDocTitle();
}
});
}
});
}
开发者ID:lxxlxx888,项目名称:Reer,代码行数:30,代码来源:GroovyBasePlugin.java
示例6: configureGroovydocJarTask
import org.gradle.api.tasks.javadoc.Groovydoc; //导入依赖的package包/类
/**
* Create task to create the GroovyDoc jar
*
* @param task Tasl to configure
* @param groovydocTask Groovydoc task
*/
@Mutate
public void configureGroovydocJarTask(@Path("tasks.groovydocJar") Jar task,
@Path("tasks.groovydoc") Groovydoc groovydocTask) {
task.setDescription("Assembles a jar archive containing the groovydoc documentation.");
task.setGroup("build");
task.setClassifier("groovydoc");
task.from(groovydocTask);
}
开发者ID:jochenseeber,项目名称:gradle-project-config,代码行数:15,代码来源:GroovyConfigPlugin.java
注:本文中的org.gradle.api.tasks.javadoc.Groovydoc类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论