-
Notifications
You must be signed in to change notification settings - Fork 35
/
build.gradle
148 lines (127 loc) · 5.83 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
plugins {
id 'com.github.johnrengelman.shadow' version '7.1.0'
id 'java'
id "io.freefair.lombok" version "6.1.0-m3"
id 'groovy'
id 'eclipse'
id 'idea'
id 'jacoco'
id 'antlr'
id "org.sonarqube" version "3.3"
id 'com.github.kt3k.coveralls' version '2.12.0'
}
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
//Need for Windows
def defaultEncoding = 'UTF-8'
repositories {
mavenCentral()
maven { url 'https://repo.gradle.org/gradle/libs-releases'}
maven { url 'https://repo.gradle.org/gradle/libs-releases-local' }
}
generateGrammarSource {
mustRunAfter "checkLombokConfig"
arguments << "-lib" << "src/main/antlr/"
arguments << "-package" << "com.liferay.damascus.antlr.template"
outputDirectory = file('src/main/java/com/liferay/damascus/antlr/template')
}
jar {
manifest {
attributes(
"Bundle-SymbolicName": "com.liferay.damascus.cli",
"Bundle-Version": '1.2.3',
"Bundle-Description": "Liferay extension tool for scaffolding service builder portlet",
"Main-Class": "com.liferay.damascus.cli.Damascus",
"JPM-Command": "damascus"
)
}
}
dependencies {
implementation 'com.beust:jcommander:1.81'
implementation 'com.google.guava:guava:30.1.1-jre'
implementation 'commons-io:commons-io:2.11.+'
implementation 'org.apache.commons:commons-lang3:3.12.+'
implementation 'org.apache.commons:commons-configuration2:2.7'
implementation 'commons-beanutils:commons-beanutils:1.9.4'
implementation 'com.jayway.jsonpath:json-path:2.6.+'
implementation 'org.freemarker:freemarker:2.3.31'
implementation 'org.gradle:gradle-tooling-api:7.1.1'
implementation 'com.liferay:com.liferay.project.templates:5.0.157'
implementation 'org.slf4j:slf4j-api:1.7.+'
implementation 'org.slf4j:slf4j-log4j12:1.7.+'
implementation 'com.fasterxml.jackson.core:jackson-core:2.12.+'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.12.+'
implementation 'com.fasterxml.jackson.core:jackson-annotations:2.12.+'
implementation 'com.fasterxml.jackson.datatype:jackson-datatype-joda:2.12.+'
implementation 'joda-time:joda-time:2.10.+'
implementation 'org.codehaus.groovy:groovy-all:3.0.9'
implementation group: 'org.antlr', name: 'antlr4', version: '4.8-1'
implementation group: 'org.antlr', name: 'antlr4-runtime', version: '4.8-1'
implementation group: 'org.antlr', name: 'antlr4-annotations', version: '4.3'
antlr 'org.antlr:antlr4:4.8-1'
testImplementation group: 'org.antlr', name: 'antlr4-runtime-testsuite', version: '4.8-1'
testImplementation group: 'cglib', name: 'cglib-nodep', version:'3.3.0'
testImplementation group: 'org.mockito', name: 'mockito-core', version: '2.28.+'
testImplementation group: 'org.hamcrest', name: 'hamcrest-core', version:'2.2'
testImplementation group: 'org.objenesis', name: 'objenesis', version:'3.2'
testImplementation group: 'org.powermock', name: 'powermock-core', version: '2.0.9'
testImplementation group: 'org.powermock', name: 'powermock-classloading-xstream', version:'2.0.9'
testImplementation group: 'org.powermock', name: 'powermock-module-junit4', version:'2.0.9'
testImplementation group: 'org.powermock', name: 'powermock-module-junit4-common', version:'2.0.9'
testImplementation group: 'org.powermock', name: 'powermock-module-junit4-rule', version:'2.0.9'
testImplementation group: 'org.powermock', name: 'powermock-api-mockito2', version: '2.0.9'
testImplementation group: 'org.powermock', name: 'powermock-api-support', version: '2.0.9'
testImplementation('org.spockframework:spock-core:2.0-groovy-3.0')
testImplementation( 'com.athaydes:spock-reports:2.0-groovy-3.0' ) {
transitive = false // this avoids affecting your version of Groovy/Spock
}
testImplementation('org.junit.jupiter:junit-jupiter-api:5.7.2')
// you can use testRuntimeClasspath if you don't want to use spock-report-specific features in your Specs
}
test {
useJUnitPlatform()
testLogging.showStandardStreams = true
}
jacocoTestReport {
reports {
xml.required = true // coveralls plugin depends on xml format report
html.required = true
}
}
check.dependsOn jacocoTestReport
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import org.gradle.api.tasks.testing.logging.TestLogEvent
// Output each test title
tasks.withType(Test) {
testLogging {
// set options for log level LIFECYCLE
events TestLogEvent.FAILED,
TestLogEvent.PASSED,
TestLogEvent.SKIPPED,
TestLogEvent.STANDARD_OUT
exceptionFormat TestExceptionFormat.FULL
showExceptions true
showCauses true
showStackTraces true
// set options for log level DEBUG and INFO
debug {
events TestLogEvent.STARTED,
TestLogEvent.FAILED,
TestLogEvent.PASSED,
TestLogEvent.SKIPPED,
TestLogEvent.STANDARD_ERROR,
TestLogEvent.STANDARD_OUT
exceptionFormat TestExceptionFormat.FULL
}
info.events = debug.events
info.exceptionFormat = debug.exceptionFormat
afterSuite { desc, result ->
if (!desc.parent) { // will match the outermost suite
def output = "Results: ${result.resultType} (${result.testCount} tests, ${result.successfulTestCount} passed, ${result.failedTestCount} failed, ${result.skippedTestCount} skipped)"
def startItem = '| ', endItem = ' |'
def repeatLength = startItem.length() + output.length() + endItem.length()
println('\n' + ('-' * repeatLength) + '\n' + startItem + output + endItem + '\n' + ('-' * repeatLength))
}
}
}
}