Configure the Asciidoctor revnumber in a central location

See gh-20934
This commit is contained in:
Andy Wilkinson 2020-05-13 08:10:02 +01:00
parent 0607af870d
commit a03426af57
5 changed files with 1 additions and 36 deletions

View File

@ -152,6 +152,7 @@ class AsciidoctorConventions {
attributes.put("github-tag", determineGitHubTag(project)); attributes.put("github-tag", determineGitHubTag(project));
attributes.put("spring-boot-artifactory-repo", ArtifactoryRepository.forProject(project)); attributes.put("spring-boot-artifactory-repo", ArtifactoryRepository.forProject(project));
attributes.put("version", "{gradle-project-version}"); attributes.put("version", "{gradle-project-version}");
attributes.put("revnumber", null);
asciidoctorTask.attributes(attributes); asciidoctorTask.attributes(attributes);
} }

View File

@ -181,10 +181,6 @@ asciidoctor {
} }
} }
asciidoctor {
attributes "revnumber": null
}
asciidoctorPdf { asciidoctorPdf {
configurations "asciidoctorExtensions" configurations "asciidoctorExtensions"
dependsOn test dependsOn test
@ -193,10 +189,6 @@ asciidoctorPdf {
} }
} }
asciidoctorPdf {
attributes "revnumber": null
}
task zip(type: Zip) { task zip(type: Zip) {
dependsOn asciidoctor, asciidoctorPdf dependsOn asciidoctor, asciidoctorPdf
duplicatesStrategy "fail" duplicatesStrategy "fail"

View File

@ -155,10 +155,6 @@ tasks.withType(org.asciidoctor.gradle.jvm.AbstractAsciidoctorTask) {
} }
} }
asciidoctor {
attributes "revnumber": null
}
asciidoctor { asciidoctor {
sources { sources {
include "*.singleadoc" include "*.singleadoc"
@ -171,20 +167,12 @@ asciidoctorPdf {
} }
} }
asciidoctorPdf {
attributes "revnumber": null
}
task asciidoctorMultipage(type: org.asciidoctor.gradle.jvm.AsciidoctorTask) { task asciidoctorMultipage(type: org.asciidoctor.gradle.jvm.AsciidoctorTask) {
sources { sources {
include "*.adoc" include "*.adoc"
} }
} }
asciidoctorMultipage {
attributes "revnumber": null
}
syncDocumentationSourceForAsciidoctor { syncDocumentationSourceForAsciidoctor {
dependsOn documentTestSlices dependsOn documentTestSlices
dependsOn documentStarters dependsOn documentStarters

View File

@ -86,20 +86,12 @@ asciidoctor {
attributes "stylesheet": "css/style.css" attributes "stylesheet": "css/style.css"
} }
asciidoctor {
attributes "revnumber": null
}
asciidoctorPdf { asciidoctorPdf {
sources { sources {
include "index.adoc" include "index.adoc"
} }
} }
asciidoctorPdf {
attributes "revnumber": null
}
javadoc { javadoc {
options { options {
author = true author = true

View File

@ -63,10 +63,6 @@ asciidoctor {
} }
} }
asciidoctor {
attributes "revnumber": null
}
syncDocumentationSourceForAsciidoctorPdf { syncDocumentationSourceForAsciidoctorPdf {
from(documentPluginGoals) { from(documentPluginGoals) {
into "asciidoc/goals" into "asciidoc/goals"
@ -79,10 +75,6 @@ asciidoctorPdf {
} }
} }
asciidoctorPdf {
attributes "revnumber": null
}
javadoc { javadoc {
options { options {
author = true author = true