Update docs build

- Relates #926
This commit is contained in:
Janne Valkealahti
2021-03-14 14:43:06 +00:00
parent 0004874f4a
commit 3cd2880f00

View File

@@ -13,20 +13,23 @@ buildscript {
eclipseEmfEcoreVersion = '2.11.1-v20150805-0538'
eclipseUml2UmlVersion = '5.0.0-v20140602-0749'
curatorVersion = '2.11.1'
docResourcesVersion = '0.1.1.RELEASE'
docResourcesVersion = '0.2.5'
}
repositories {
gradlePluginPortal()
maven { url 'https://repo.springsource.org/plugins-release' }
maven { url 'https://repo.spring.io/plugins-release' }
}
dependencies {
classpath("io.spring.gradle:propdeps-plugin:0.0.8")
classpath('org.asciidoctor:asciidoctor-gradle-plugin:1.6.1')
classpath 'org.asciidoctor:asciidoctorj-pdf:1.5.3'
classpath("org.springframework.boot:spring-boot-gradle-plugin:$springBootVersion")
}
}
plugins {
id 'org.asciidoctor.jvm.convert' version '3.1.0'
id 'org.asciidoctor.jvm.pdf' version '3.1.0'
}
def recipeProjects() {
subprojects.findAll { project ->
project.name.contains('spring-statemachine-recipes') && project.name != 'spring-statemachine-recipes-common'
@@ -496,8 +499,6 @@ project('spring-statemachine-samples-common') {
configure(rootProject) {
description = 'Spring State Machine'
apply plugin: 'org.asciidoctor.gradle.asciidoctor'
dependencies {
// just used to get version into docs
compile "org.springframework:spring-core"
@@ -511,10 +512,6 @@ configure(rootProject) {
tasks.findAll { it.name.startsWith("reference") }.each{ it.dependsOn.add("asciidoctor") }
}
asciidoctorj {
version = '1.5.8.1'
}
configurations {
docs
}
@@ -531,26 +528,10 @@ configure(rootProject) {
into "$buildDir/asciidoc/assemble"
}
task('reference', type: org.asciidoctor.gradle.AsciidoctorTask){
dependsOn 'prepareAsciidocBuild'
dependsOn 'copyDocsSamples'
backends 'pdf'
sourceDir "$buildDir/asciidoc/assemble"
sources {
include 'index.adoc'
}
options doctype: 'book', eruby: 'erubis'
logDocuments = true
attributes 'icons': 'font',
'sectanchors': '',
'toc': '',
'source-highlighter' : 'coderay'
}
asciidoctor {
dependsOn 'prepareAsciidocBuild'
dependsOn 'copyDocsSamples'
backends 'html5'
baseDirFollowsSourceFile()
sourceDir "$buildDir/asciidoc/assemble"
sources {
include 'index.adoc'
@@ -561,22 +542,37 @@ configure(rootProject) {
}
}
options doctype: 'book', eruby: 'erubis'
logDocuments = true
attributes 'docinfo': 'shared',
toc: 'left',
attributes \
'docinfo': 'shared',
'toc': 'left',
'toc-levels': '4',
// use provided stylesheet
stylesdir: "css/",
stylesheet: 'spring.css',
'stylesdir': "css/",
'stylesheet': 'spring.css',
'linkcss': true,
'icons': 'font',
'sectanchors': '',
// use provided highlighter
'source-highlighter=highlight.js',
'highlightjsdir=js/highlight',
'highlightjs-theme=atom-one-dark-reasonable',
'sectanchors': '',
'idprefix': '',
'idseparator': '-'
'idseparator': '-',
'spring-statemachine-version' : project.version,
'spring-version' : getResolvedVersionOf("spring-core"),
'spring-boot-version' : getResolvedVersionOf("spring-boot"),
'revnumber' : project.version
}
asciidoctorPdf {
dependsOn 'prepareAsciidocBuild'
dependsOn 'copyDocsSamples'
baseDirFollowsSourceFile()
sourceDir "$buildDir/asciidoc/assemble"
sources {
include 'index.adoc'
}
options doctype: 'book', eruby: 'erubis'
attributes \
'spring-statemachine-version' : project.version,
'spring-version' : getResolvedVersionOf("spring-core"),
'spring-boot-version' : getResolvedVersionOf("spring-boot"),
'revnumber' : project.version
}
dependencies { // for integration tests
@@ -652,7 +648,7 @@ configure(rootProject) {
from (api) {
into 'api'
}
from (reference) {
from (asciidoctorPdf) {
into 'reference'
include 'index.pdf'
}