Update docs build

- Fixes #926
This commit is contained in:
Janne Valkealahti
2021-03-13 13:02:45 +00:00
parent 8e613cc135
commit 439c854cac

View File

@@ -13,22 +13,25 @@ buildscript {
eclipseEmfEcoreVersion = '2.11.1-v20150805-0538'
eclipseUml2UmlVersion = '5.0.0-v20140602-0749'
curatorVersion = '2.11.1'
docResourcesVersion = '0.2.1.RELEASE'
docResourcesVersion = '0.2.5'
awaitilityVersion = '3.1.6'
reactorBlockHoundVersion = '1.0.4.RELEASE'
}
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'
@@ -80,7 +83,6 @@ configure(allprojects) {
repositories {
mavenCentral()
jcenter()
maven { url 'https://repo.springsource.org/libs-snapshot' }
maven { url 'https://repo.springsource.org/libs-release' }
maven { url 'https://repo.springsource.org/libs-milestone' }
@@ -573,8 +575,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'
@@ -588,10 +588,6 @@ configure(rootProject) {
tasks.findAll { it.name.startsWith('reference') }.each{ it.dependsOn.add('asciidoctor') }
}
asciidoctorj {
version = '1.5.8.1'
}
configurations {
docs
}
@@ -608,25 +604,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'
attributes 'icons': 'font',
'sectanchors': '',
'toc': '',
'source-highlighter' : 'coderay'
}
asciidoctor {
dependsOn 'prepareAsciidocBuild'
dependsOn 'copyDocsSamples'
backends 'html5'
baseDirFollowsSourceFile()
sourceDir "$buildDir/asciidoc/assemble"
sources {
include 'index.adoc'
@@ -637,25 +618,37 @@ configure(rootProject) {
}
}
options doctype: 'book', eruby: 'erubis'
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=github',
'idprefix': '',
'idseparator': '-',
'spring-statemachine-version' : project.version,
'spring-version' : getResolvedVersionOf("spring-core"),
'spring-boot-version' : getResolvedVersionOf("spring-boot"),
revnumber : project.version
'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
@@ -732,7 +725,7 @@ configure(rootProject) {
from (api) {
into 'api'
}
from (reference) {
from (asciidoctorPdf) {
into 'reference'
include 'index.pdf'
}