我在 Android Studio 中使用 Gradle。我想通过 org.ysb33r.gradle.doxygen.Doxygen 的 Doxygen 制作文档。
此时我在 build.gradle 文件中有这个:
import org.ysb33r.gradle.doxygen.Doxygen
// (...)
doxygen {
generate_html true
source new File(projectDir,'src/main/headers')
exclude 'build/'
template 'template'
outputDir new File(projectDir,'docs/dox')
html_header new File(projectDir,'templete/header.html')
html_footer new File(projectDir,'templete/footer.html')
html_stylesheet new File(projectDir,'templete/customdoxygen.css')
project_logo new File(projectDir, 'template/finanteq_logo_doc.png')
html_extra_files new File(projectDir, 'template/favicon.ico')
file_paterns '*.java', '*.class','*.md'
recursive true
exclude_paterns '**/R.java', 'androidTest', '**/Test*.java'
}
//(...)
task doxygenTask (type: Doxygen) {
generate_latex true
generate_html true
}
接下来我可以做什么?
示例build.gradle:
doxygen {
generate_latex true
generate_html true
source projectDir
include '*.java'
include '**/*.md'
use_mdfile_as_mainpage new File(projectDir, 'readme.md')
full_path_names false
//Project related configuration options
project_logo new File(projectDir,'logo.png')
project_name 'Android'
outputDir new File(projectDir, 'docs/')
optimize_output_java true
markdown_support true
autolink_support true
subgrouping true
//Configuration options related to the input files
input_encoding 'UTF-8'
file_paterns '*.java','*.md'
recursive true
//Configuration options related to source browsing
strip_code_comments true
references_link_source true
source_tooltips true
verbatim_headers true
//Configuration options related to the alphabetical class index
alphabetical_index true
cols_in_alpha_index 5
//Configuration options related to the HTML output
html_header new File(projectDir,'header.html')
html_footer new File(projectDir,'footer.html')
html_stylesheet new File(projectDir,'custom.css')
html_extra_files new File(projectDir,'favicon.ico')
generate_treeview true
就我而言:
doxygen {
option 'generate_html', true
option 'generate_latex', true
source projectDir
include '*.java'
include '**/*.md'
outputDir new File(buildDir,'docs')
option 'use_mdfile_as_mainpage', true
option 'optimize_output_java', true
option 'recursive', true
option 'extract_all', true
option 'generate_treeview', true
option 'generate_treeview', true
option 'strip_code_comments', true
option 'references_link_source', true
option 'source_tooltips', true
option 'verbatim_headers', true
option 'class_graph', true
option 'collaboration_graph', true
option 'full_path_names', false
option 'markdown_support', true
option 'autolink_support', true
option 'subgrouping', true
}
注意“选项”用于设置属性