-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.gradle
82 lines (68 loc) · 2.09 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
plugins {
id 'com.enonic.defaults' version '2.0.1' apply false
id 'com.enonic.xp.app' version '3.2.0' apply false
id 'com.enonic.xp.base' version '3.2.0' apply false
id 'com.github.node-gradle.node' version '3.4.0' apply false
id 'org.asciidoctor.jvm.convert' version '3.3.2'
id 'org.aim42.htmlSanityCheck' version '1.1.6'
}
repositories {
mavenCentral()
}
subprojects {
apply plugin: 'java'
apply plugin: 'com.enonic.defaults'
apply plugin: 'com.enonic.xp.base'
apply from: "$rootDir/gradle/env.gradle"
apply from: "$rootDir/gradle/node.gradle"
apply from: "$rootDir/gradle/lib-admin.gradle"
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = sourceCompatibility
dependencies {
testImplementation "org.junit.jupiter:junit-jupiter-api:5.10.2"
testImplementation "org.junit.jupiter:junit-jupiter-params:5.9.1"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:5.9.1"
testImplementation "org.mockito:mockito-core:5.12.0"
testImplementation "org.mockito:mockito-junit-jupiter:5.12.0"
testImplementation "org.assertj:assertj-core:3.23.1"
}
repositories {
mavenLocal()
xp.enonicRepo('dev')
mavenCentral()
}
test {
useJUnitPlatform()
}
}
asciidoctor {
sourceDir = file('docs')
outputDir = file('build/docs')
attributes 'source-highlighter': 'coderay',
idseparator: '-'
resources {
from(sourceDir) {
include '**/images/**'
include '**/code/**'
include '**/*.*'
}
}
}
htmlSanityCheck {
dependsOn asciidoctor
sourceDir = tasks.asciidoctor.outputDir
sourceDocuments = fileTree(sourceDir) {
include "index.html"
}
// where to put results of sanityChecks...
checkingResultsDir = new File( "$buildDir/report/htmlchecks" )
//checkExternalLinks = false
// fail build on errors?
failOnErrors = true
}
build.enabled = false