Skip to content

Commit

Permalink
build: Added PDF rendering to guide
Browse files Browse the repository at this point in the history
  • Loading branch information
jruaux committed Mar 17, 2024
1 parent 7009e7d commit f1c17e5
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ bin
.classpath
.settings
.DS_Store
hs_err_pid*.log
hs_err_pid*.log
*.bkp
9 changes: 9 additions & 0 deletions docs/guide/guide.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
plugins {
id 'org.kordamp.gradle.guide'
id 'org.ajoberstar.git-publish'
id 'org.asciidoctor.jvm.pdf'
}

configurations {
Expand All @@ -13,16 +14,24 @@ dependencies {

asciidoctor {
configurations 'asciidoctorExtensions'
outputOptions {
backends = ['pdf', 'html5']
}
forkOptions {
// Fix issue with JDK16+
jvmArgs("--add-opens", "java.base/sun.nio.ch=ALL-UNNAMED", "--add-opens", "java.base/java.io=ALL-UNNAMED")
}
attributes = [
numbered : false,
'source-highlighter' : 'coderay',
'imagesdir' : 'images/',
'coderay-linenums-mode' : 'table',
'testdir' : '../../../../../plugins/riot/src/test/resources'
]
doLast {
file("$outputDir/pdf/index.pdf").
renameTo("$outputDir/pdf/riot-${project.version}.pdf")
}
}

eclipse {
Expand Down
3 changes: 2 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ testSourceCompatibility = 17
testTargetCompatibility = 17
reproducibleBuild = true

asciidoctorPluginVersion = 3.3.2
bootPluginVersion = 3.2.3
dependencyPluginVersion = 1.1.4
gitPluginVersion = 3.0.0
Expand All @@ -37,7 +38,7 @@ latencyutilsVersion = 2.0.3
lettucemodVersion = 3.7.3
picocliVersion = 4.7.5
progressbarVersion = 0.10.0
springBatchRedisVersion = 4.0.4
springBatchRedisVersion = 4.0.5
testcontainersRedisVersion = 2.2.0

org.gradle.daemon = false
Expand Down
2 changes: 2 additions & 0 deletions jreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -262,3 +262,5 @@ files:
skipChecksum: 'true'
skipSigning: 'true'
skipSbom: 'true'
- path: docs/guide/build/guide/pdf/{{projectName}}-{{projectVersion}}.pdf
transform: '{{projectName}}-{{projectEffectiveVersion}}.pdf'
2 changes: 1 addition & 1 deletion plugins/riot/riot.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ plugins {

application {
applicationName = 'riot'
mainClass = 'com.redis.riot.cli.Main'
mainClass = 'com.redis.riot.cli.Main'
}

bootJar {
Expand Down
1 change: 1 addition & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ buildscript {
classpath "org.kordamp.gradle:kordamp-parentbuild:$kordampBuildVersion"
classpath "org.springframework.boot:spring-boot-gradle-plugin:$bootPluginVersion"
classpath "io.spring.gradle:dependency-management-plugin:$dependencyPluginVersion"
classpath "org.asciidoctor:asciidoctor-gradle-jvm-pdf:$asciidoctorPluginVersion"
}
}

Expand Down

0 comments on commit f1c17e5

Please sign in to comment.