1- import java.text.SimpleDateFormat
2-
31plugins {
4- id " java"
5- id " application"
62 id " groovy"
73}
84
9- def group = " org.isaqb"
10- def releaseVersion = System . getenv(" RELEASE_VERSION" )
11- def localVersion = " LocalBuild"
12- project. version = releaseVersion == null ? localVersion : releaseVersion
13- def curriculumFileName = " glossary"
14- def versionDate = new SimpleDateFormat (" yyyyMMdd" ). format(new Date ())
15- def languages = [" DE" , " EN" ]
5+ ext {
6+ curriculumFileName = " glossary"
7+
8+ // if you only have one single language, remove either DE or EN. If you want support for other
9+ // translations, make sure to add them here.
10+ languages = [" DE" , " EN" ]
11+
12+ // you can define several additional tags that will each be used to create a separate resulting
13+ // html and pdf file. The following example will build files without the REMARKS suffix (regular files)
14+ // and those with the REMARKS-suffix. It will then also render content which is enclosed in
15+ // ifeval::["{suffix}" == "REMARKS"] .... endif::[]
16+ //
17+ // suffixTags = ["REMARKS"]
18+ suffixTags = [" " ]
19+ }
1620
1721repositories {
1822 mavenCentral()
1923}
2024
2125dependencies {
22- implementation(" org.asciidoctor:asciidoctorj:2.5.10" )
23- implementation(" org.asciidoctor:asciidoctorj-pdf:2.3.9" )
2426 implementation platform(' org.apache.groovy:groovy-bom:4.0.24' )
2527 implementation ' org.apache.groovy:groovy'
26- implementation ' org.apache.groovy:groovy-json:3.0.23'
27- testImplementation platform(" org.spockframework:spock-bom:2.3-groovy-4.0" )
28- testImplementation " org.spockframework:spock-core"
29- testImplementation " org.apache.groovy:groovy-json:3.0.23"
30- }
31-
32- tasks. register(' createFiles' , JavaExec ) {
28+ implementation ' org.apache.groovy:groovy-json'
3329
34- mustRunAfter(" sortTermsAlphabetically" , " generateTranslationTables" )
35- classpath = sourceSets. main. runtimeClasspath
30+ testImplementation platform(' org.spockframework:spock-bom:2.3-groovy-4.0' )
31+ testImplementation ' org.spockframework:spock-core'
32+ }
3633
37- mainClass. set(" org.isaqb.asciidoc.Main" )
38- jvmArgs = [
39- """ -DprojectVersion=${ project.version} """ ,
40- """ -DcurriculumFileName=${ curriculumFileName} """ ,
41- """ -DversionDate=${ versionDate} """ ,
42- """ -Dlanguages=${ languages.join(',')} """ ,
43- """ --add-opens""" , """ java.base/sun.nio.ch=ALL-UNNAMED""" ,
44- """ --add-opens""" , """ java.base/java.io=ALL-UNNAMED""" ]
34+ // Ensure buildDocs runs AFTER the preparation tasks
35+ gradle. projectsEvaluated {
36+ project(' :gradle-tools' ). tasks. named(' buildDocs' ) {
37+ dependsOn ' :generateTranslationTables' , ' :sortTermsAlphabetically'
38+ }
4539}
4640
4741tasks. register(' generateTranslationTables' , JavaExec ) {
@@ -55,12 +49,3 @@ tasks.register('generateTranslationTables', JavaExec) {
5549
5650apply from : ' scripts/sortTermsAlphabetically.gradle'
5751apply from : ' scripts/generateTermTables.gradle'
58-
59-
60- tasks. register(' buildDocs' ) {
61- description = ' Grouping task for generating all languages in several formats'
62- group = ' documentation'
63- dependsOn " sortTermsAlphabetically" , " generateTranslationTables" , " createFiles"
64- }
65-
66- defaultTasks " buildDocs"
0 commit comments