This is an automated email from the ASF dual-hosted git repository.
holivier pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git
The following commit(s) were added to refs/heads/trunk by this push:
new a10d932 Improved: change asciidoc Image directory convention for
plugins (OFBIZ-12035)
a10d932 is described below
commit a10d93283640553147f98d11be3acdef1e60dcb8
Author: holivier <[email protected]>
AuthorDate: Thu Oct 1 15:51:11 2020 +0200
Improved: change asciidoc Image directory convention for plugins
(OFBIZ-12035)
* modification in gradle generateOfbizDocumentation task to copy the
image/${components.name} subdirectory in the general
docs/asciidoc/images/ directory before generation
and remove it after.
* correction in generateAllPluginsDocumentation to put copy of OFBiz-Logo
in doFirst to avoid it's run during gradle Configure project
---
build.gradle | 31 +++++++++++++++++++++++--------
1 file changed, 23 insertions(+), 8 deletions(-)
diff --git a/build.gradle b/build.gradle
index 830e000..3013b75 100644
--- a/build.gradle
+++ b/build.gradle
@@ -504,9 +504,9 @@ tasks.withType(AsciidoctorTask) { task ->
backends 'html5', 'pdf'
attributes \
'doctype': 'book',
- 'revnumber': 'Trunk',
+ 'revnumber': 'Trunk',
'experimental': '',
- 'allow-uri-read': true,
+ 'allow-uri-read': true,
'icons': 'font',
'sectnums': '',
'chapter-label': '',
@@ -541,15 +541,27 @@ task generateReadmeFiles(group: docsGroup, type:
AsciidoctorTask) {
sourceDir "${rootDir}"
sources {
include 'README.adoc', 'CHANGELOG.adoc', 'CONTRIBUTING.adoc'
- }
+ }
outputDir file("${buildDir}/asciidoc/readme/")
}
task generateOfbizDocumentation(group: docsGroup, type: AsciidoctorTask) {
dependsOn deleteOfbizDocumentation
description 'Generate OFBiz documentation manuals'
+ activeComponents().each { component ->
+ copy {
+ from "${component}/src/docs/asciidoc/images/${component.name}"
+ include '**/*.*'
+ into "${rootDir}/docs/asciidoc/images/${component.name}"
+ }
+ }
sourceDir "${rootDir}/docs/asciidoc"
outputDir file("${buildDir}/asciidoc/ofbiz")
+ doLast {
+ activeComponents().each { component ->
+ delete "${rootDir}/docs/asciidoc/images/${component.name}"
+ }
+ }
}
task generatePluginDocumentation(group: docsGroup) {
@@ -591,11 +603,15 @@ task generateAllPluginsDocumentation(group: docsGroup,
// the other inner task temporary created by the
generatePluginDocumentation task
def pluginAsciidoc = task
"${component.name}-Documentation" (type: AsciidoctorTask) {
def asciidocFolder = new
File("${component}/src/docs/asciidoc")
- if (asciidocFolder.exists()) {
- copy {
- from
"${rootDir}/docs/asciidoc/images/OFBiz-Logo.svg"
- into "${component}/src/docs/asciidoc/images"
+ doFirst {
+ if (asciidocFolder.exists()) {
+ copy {
+ from
"${rootDir}/docs/asciidoc/images/OFBiz-Logo.svg"
+ into
"${component}/src/docs/asciidoc/images"
+ }
}
+ }
+ if (asciidocFolder.exists()) {
sourceDir file("${component}/src/docs/asciidoc")
outputDir
file("${buildDir}/asciidoc/plugins/${component.name}")
doLast { println "Documentation generated for
plugin ${component.name}" }
@@ -605,7 +621,6 @@ task generateAllPluginsDocumentation(group: docsGroup,
}
dependsOn pluginAsciidoc
}
- doLast { delete
"${component}/src/docs/asciidoc/images/OFBiz-Logo.svg" }
}
}
}