11plugins {
2- id ' org.asciidoctor.jvm.convert' version ' 3.3.2 '
3- id ' org.asciidoctor.jvm.pdf' version ' 3.3.2 '
2+ id ' org.asciidoctor.jvm.convert' version ' 4.0.5 '
3+ id ' org.asciidoctor.jvm.pdf' version ' 4.0.5 '
44}
55
66// Read language settings from gradle.properties
77def languages = project. findProperty(' languages' )?. split(' ,' )?. collect { it. trim() } ?: [' DE' ]
88
99repositories {
1010 mavenCentral()
11+ gradlePluginPortal()
1112}
1213
1314tasks. withType(org.asciidoctor.gradle.jvm.AsciidoctorTask ) {
@@ -78,11 +79,11 @@ languages.each { language ->
7879
7980 // Define HTML conversion task for this language
8081 tasks. register(" asciidoctorHtml${ language} " , org.asciidoctor.gradle.jvm.AsciidoctorTask ) {
81- sourceDir file(" ${ language} /asciidoc" )
82+ sourceDir = file(" ${ language} /asciidoc" )
8283 sources {
8384 include ' arc42-template.adoc'
8485 }
85- outputDir file(" build/${ language} /html" )
86+ outputDir = file(" build/${ language} /html" )
8687 baseDirFollowsSourceDir()
8788
8889 attributes asciidocAttributes + [
@@ -101,11 +102,11 @@ languages.each { language ->
101102
102103 // Define PDF conversion task for this language
103104 tasks. register(" asciidoctorPdf${ language} " , org.asciidoctor.gradle.jvm.pdf.AsciidoctorPdfTask ) {
104- sourceDir file(" ${ language} /asciidoc" )
105+ sourceDir = file(" ${ language} /asciidoc" )
105106 sources {
106107 include ' arc42-template.adoc'
107108 }
108- outputDir file(" build/${ language} /pdf" )
109+ outputDir = file(" build/${ language} /pdf" )
109110 baseDirFollowsSourceDir()
110111
111112 attributes asciidocAttributes + [
@@ -126,8 +127,8 @@ languages.each { language ->
126127
127128// Create aggregate tasks for all languages
128129tasks. register(' asciidoctorHtmlAll' ) {
129- description ' Builds HTML for all configured languages'
130- group ' Documentation'
130+ description = ' Builds HTML for all configured languages'
131+ group = ' Documentation'
131132
132133 doFirst {
133134 println " \n Starting HTML generation for all languages"
@@ -143,8 +144,8 @@ tasks.register('asciidoctorHtmlAll') {
143144}
144145
145146tasks. register(' asciidoctorPdfAll' ) {
146- description ' Builds PDF for all configured languages'
147- group ' Documentation'
147+ description = ' Builds PDF for all configured languages'
148+ group = ' Documentation'
148149
149150 doFirst {
150151 println " \n Starting PDF generation for all languages"
@@ -160,8 +161,8 @@ tasks.register('asciidoctorPdfAll') {
160161}
161162
162163tasks. register(' asciidoctorAll' ) {
163- description ' Builds HTML and PDF for all configured languages'
164- group ' Documentation'
164+ description = ' Builds HTML and PDF for all configured languages'
165+ group = ' Documentation'
165166
166167 dependsOn tasks. named(' asciidoctorHtmlAll' )
167168 dependsOn tasks. named(' asciidoctorPdfAll' )
@@ -175,8 +176,8 @@ tasks.register('asciidoctorAll') {
175176}
176177
177178tasks. named(' clean' ) {
178- description ' Deletes the build directory'
179- group ' Build'
179+ description = ' Deletes the build directory'
180+ group = ' Build'
180181
181182 doLast {
182183 delete ' build'
0 commit comments