-
Notifications
You must be signed in to change notification settings - Fork 16
/
build.gradle
59 lines (50 loc) · 1.9 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
import java.text.SimpleDateFormat
plugins {
id "java"
id "application"
id "groovy"
}
def group = "org.isaqb"
def releaseVersion = System.getenv("RELEASE_VERSION")
def localVersion = "LocalBuild"
project.version = releaseVersion == null ? localVersion : releaseVersion
def curriculumFileName = "glossary"
def versionDate = new SimpleDateFormat("yyyyMMdd").format(new Date())
def languages = ["DE", "EN"]
repositories {
mavenCentral()
}
dependencies {
implementation("org.asciidoctor:asciidoctorj:2.5.10")
implementation("org.asciidoctor:asciidoctorj-pdf:2.3.9")
implementation platform('org.apache.groovy:groovy-bom:4.0.24')
implementation 'org.apache.groovy:groovy'
implementation 'org.apache.groovy:groovy-json:3.0.23'
testImplementation platform("org.spockframework:spock-bom:2.3-groovy-4.0")
testImplementation "org.spockframework:spock-core"
testImplementation "org.apache.groovy:groovy-json:3.0.23"
}
application {
mainClass.set("org.isaqb.asciidoc.Main")
applicationDefaultJvmArgs = [
"""-DprojectVersion=${project.version}""",
"""-DcurriculumFileName=${curriculumFileName}""",
"""-DversionDate=${versionDate}""",
"""-Dlanguages=${languages.join(',')}""",
"""--add-opens""", """java.base/sun.nio.ch=ALL-UNNAMED""",
"""--add-opens""", """java.base/java.io=ALL-UNNAMED"""]
}
task generateTranslationTables (type: JavaExec) {
dependsOn tasks.compileGroovy
jvmArgs = ['--add-opens', 'java.base/java.lang=ALL-UNNAMED',
'--add-opens', 'java.base/java.io=ALL-UNNAMED',
'--add-opens', 'java.base/java.util=ALL-UNNAMED']
classpath = sourceSets.main.runtimeClasspath
mainClass = 'Translator'
}
tasks.register('buildDocs') {
description = 'Grouping task for generating all languages in several formats'
group = 'documentation'
dependsOn "generateTranslationTables", "run"
}
defaultTasks "buildDocs"