-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
179 lines (150 loc) · 6.02 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
/*
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
project.version = '0.7-SNAPSHOT'
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'org.asciidoctor:asciidoctor-gradle-plugin:1.5.3'
classpath 'org.asciidoctor:asciidoctorj-pdf:1.5.0-alpha.9'
classpath 'net.saliman:gradle-cobertura-plugin:2.4.0'
}
}
apply plugin: 'java'
apply plugin: 'groovy'
apply plugin: 'org.asciidoctor.convert'
apply plugin: "net.saliman.cobertura"
repositories {
mavenCentral()
maven {
url 'http://nexus.osoco.es/repository/maven-public'
}
}
ext.targetJavaVersion = JavaVersion.VERSION_1_8
configurations {
checkerFrameworkAnnotatedJDK {
description = 'a copy of JDK classes with Checker Framework type qualifers inserted'
}
checkerFramework {
description = 'The Checker Framework: custom pluggable types for Java'
}
}
dependencies {
compile group: 'io.github.lukehutch', name: 'fast-classpath-scanner', version: '2.20.2'
compile group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.11.0'
compile group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.11.0'
compile group: 'com.amazonaws', name: 'aws-lambda-java-core', version: '1.1.0'
compile group: 'com.amazonaws', name: 'aws-lambda-java-events', version: '1.1.0'
compile group: 'org.projectlombok', name: 'lombok', version: '1.16.12'
compile group: 'org.elasticsearch.client', name: 'rest', version: '5.1.2'
compile group: 'org.apache.httpcomponents', name: 'httpcore', version: '4.4.5'
compile group: 'org.apache.httpcomponents', name: 'httpcore-nio', version: '4.4.5'
compile group: 'org.apache.httpcomponents', name: 'httpasyncclient', version: '4.1.2'
compile group: 'commons-validator', name: 'commons-validator', version: '1.6'
compile group: 'com.google.code.gson', name: 'gson', version: '2.8.0'
compile group: 'me.nallar.whocalled', name: 'WhoCalled', version: '1.1'
testCompile group: 'junit', name: 'junit', version: '4.12'
testCompile group: 'org.codehaus.groovy', name: 'groovy-all', version: '2.4.4'
testCompile group: 'org.spockframework', name: 'spock-core', version: '1.0-groovy-2.4'
testRuntime group: 'org.slf4j', name: 'slf4j-api', version: '1.7.10'
testCompile group: 'info.cukes', name: 'cucumber-groovy', version: '1.2.5'
testCompile group: 'info.cukes', name: 'cucumber-junit', version: '1.2.5'
testCompile group: 'info.cukes', name: 'cucumber-picocontainer', version: '1.2.5'
testCompile group: 'org.picocontainer', name: 'picocontainer', version: '2.14'
testCompile group: 'org.hamcrest', name: 'hamcrest-library', version: '1.3'
testCompile group: 'cglib', name: 'cglib-nodep', version: '3.2.4'
testCompile group: 'org.objenesis', name: 'objenesis', version: '2.4'
ext.checkerFrameworkVersion = '2.1.6'
ext.jdkVersion = 'jdk8'
checkerFrameworkAnnotatedJDK "org.checkerframework:${jdkVersion}:${checkerFrameworkVersion}"
// checkerFrameworkJavac "org.checkerframework:compiler:${checkerFrameworkVersion}"
checkerFramework "org.checkerframework:checker:${checkerFrameworkVersion}"
compile "org.checkerframework:checker-qual:${checkerFrameworkVersion}"
}
apply plugin: 'maven'
task buildZip(type: Zip) {
baseName = "bbva-ats-forms"
from compileJava
from processResources
into('lib') {
from configurations.runtime
}
}
build.dependsOn buildZip
task wrapper(type: Wrapper) {
gradleVersion = '4.7'
}
test {
testLogging {
showStandardStreams = true
exceptionFormat = 'full'
}
systemProperties System.getProperties()
outputs.upToDateWhen { false }
}
tasks.withType(Test) {
reports.html.destination = file("${reporting.baseDir}/${name}")
}
task generateCukesDoc(type: JavaExec) {
classpath buildscript.configurations.classpath
main = 'com.github.cukedoctor.CukedoctorMain'
args = ['-o', 'build/cucumber/living-specs.adoc',
'-p', 'build/reports/cucumber/cucumber.json',
'-toc', 'left',
'-t', '\"BBVA-ATS-Forms Living Specs\"']
}
asciidoctor {
dependsOn generateCukesDoc
sourceDir = file('src/docs')
outputDir = file("${buildDir}/docs")
separateOutputDirs = true
options doctype: 'book'
System.setProperty("cukedoctor.disable.filter", "true")
System.setProperty("cukedoctor.disable.theme", "true")
backends = ['html5']
attributes 'source-highlighter': 'coderay',
'coderay-linenums-mode': 'table',
icon: 'font',
linkattrs: true,
encoding: 'utf-8'
}
asciidoctor.doFirst {
copy {
from "${buildDir}/cucumber"
into "src/docs"
include 'living-specs.adoc'
}
}
if (project.hasProperty('doc')) {
test.finalizedBy asciidoctor
}
allprojects {
tasks.withType(JavaCompile).all { JavaCompile compile ->
compile.options.compilerArgs = [
'-processor', 'org.checkerframework.checker.nullness.NullnessChecker',
'-processorpath', "${configurations.checkerFramework.asPath}",
// uncomment to turn Checker Framework errors into warnings
'-Awarns',
'-AprintErrorStack',
"-Xbootclasspath/p:${configurations.checkerFrameworkAnnotatedJDK.asPath}"
]
}
}
test {
testLogging {
showStandardStreams = true
exceptionFormat = 'full'
}
outputs.upToDateWhen { false }
}