Skip to content

Commit b85255e

Browse files
committed
enable autogeneration of docs using asciidoctor gradle plugin
1 parent 6bd0d6f commit b85255e

File tree

3 files changed

+27
-5
lines changed

3 files changed

+27
-5
lines changed

build.gradle

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ buildscript {
1313
plugins {
1414
id 'jacoco'
1515
id "org.sonarqube" version "3.0"
16+
id 'org.asciidoctor.jvm.convert' version '3.1.0'
1617
}
1718

1819
sonarqube {
@@ -23,5 +24,18 @@ sonarqube {
2324
}
2425
}
2526

27+
repositories {
28+
jcenter()
29+
}
30+
31+
asciidoctor {
32+
sourceDir file('docs/asciidoc')
33+
baseDir file('docs/asciidoc')
34+
sources {
35+
include 'index.asciidoc'
36+
}
37+
outputDir file('build/docs')
38+
}
39+
2640
apply from: './main.gradle'
2741
apply plugin: 'com.github.ben-manes.versions'

docs/asciidoc/api-guide.adoc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,10 @@ Where the EventHandler interface signature is:
219219
--------
220220
public interface EventHandler<T> extends GenericHandler<Void, DomainEvent<T>> {
221221
}
222+
223+
public interface GenericHandler<T, M> {
224+
Mono<T> handle(M message);
225+
}
222226
--------
223227

224228
[NOTE]
@@ -257,6 +261,10 @@ Where the CommandHandler interface signature is:
257261
--------
258262
public interface CommandHandler<T> extends GenericHandler<Void, Command<T>> {
259263
}
264+
265+
public interface GenericHandler<T, M> {
266+
Mono<T> handle(M message);
267+
}
260268
--------
261269
[NOTE]
262270
The return type of the CommandHandler is Void

docs/asciidoc/index.asciidoc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
= Reactive Commons Reference Guide
22
Daniel Bustamante Ospina
33
// version is automatically set in doc.gradle, no need to change it here
4-
:appversion: 0.6.2
4+
:appversion: 0.6.2-ignored-value
55
ifndef::host-github[:ext-relative: {outfilesuffix}]
6-
{appversion}
76
:doctype: book
8-
:toc:
7+
:toc: left
98
:toclevels: 4
109
:source-highlighter: prettify
1110
:numbered:
1211
:icons: font
1312
:hide-uri-scheme:
14-
:imagesdir: images
13+
:stylesheet: stylesheets/asciidoctor.css
14+
:linkcss:
1515

1616
:github-repo: reactive-commons
1717
:github-code: https://github.com/{github-repo}
@@ -26,4 +26,4 @@ include::api-guide.adoc[]
2626
// ======================================================================================
2727

2828
// Command to HTML export
29-
// asciidoctor -a linkcss -a stylesheet=asciidoctor.css -a toc2 -a stylesdir=./stylesheets index.asciidoc
29+
// asciidoctor -a linkcss -a stylesheet=asciidoctor.css -a toc2 -a stylesdir=./stylesheets index.asciidoc

0 commit comments

Comments
 (0)