This repository has been archived by the owner on Oct 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
120 lines (105 loc) · 3.29 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
plugins {
id 'java'
id "org.jetbrains.intellij" version "0.7.2"
id 'jacoco'
id 'com.github.kt3k.coveralls' version '2.6.3'
}
apply plugin: 'org.jetbrains.intellij'
group 'com.demisto'
version '0.9.8.6'
sourceCompatibility = 1.8
targetCompatibility = 10.0
repositories {
mavenCentral()
}
dependencies {
implementation group: 'commons-io', name: 'commons-io', version: '2.8.0'
implementation group: 'org.yaml', name: 'snakeyaml', version: '1.25'
implementation group: 'org.json', name: 'json', version: '20210307'
implementation 'com.vladsch.flexmark:flexmark-all:0.62.2'
testImplementation 'junit:junit:4.12'
testImplementation("org.assertj:assertj-core:2.9.1")
testImplementation group: 'org.assertj', name: 'assertj-swing-junit', version: '3.8.0'
testImplementation group: 'org.mockito', name: 'mockito-core', version: '3.9.0'
}
// If one needs to set a pycharm env - comment the coverage and the java plugins lines and uncomment the type 'PC' line.
intellij {
version '2020.2.3'
// type 'PC'
sandboxDirectory = "$project.buildDir/myCustom-sandbox"
pluginName 'Demisto PyCharm Plugin'
plugins 'coverage'
plugins 'java'
}
patchPluginXml {
changeNotes """
<ul>
<li>Add notes here</li>
</ul>
"""
sinceBuild "182.711"
untilBuild "202.*"
}
test {
useJUnit{
includeCategories 'com.demisto.plugin.ide.DemistoYML'
excludeCategories 'org.assertj.swing.annotation.GUITest'
}
testLogging {
events 'PASSED', 'FAILED', 'SKIPPED'
}
afterSuite { desc, result ->
if (!desc.parent) {
println "\nUnit Test result: ${result.resultType}"
println "Test summary: ${result.testCount} tests, " +
"${result.successfulTestCount} succeeded, " +
"${result.failedTestCount} failed, " +
"${result.skippedTestCount} skipped"
}
}
}
sourceSets {
intTest {
java.srcDir file('test/java/com.demisto.plugin.ide/integration')
resources.srcDir file('test/resources')
compileClasspath += sourceSets.main.output + configurations.testRuntime
runtimeClasspath += output + compileClasspath
}
}
dependencies {
intTestImplementation 'junit:junit:4.12'
}
task integrationTest(type: Test) {
description = 'Runs GUI tests.'
mustRunAfter test
useJUnit {
includeCategories 'org.assertj.swing.annotation.GUITest'
excludeCategories 'com.demisto.plugin.ide.DemistoYML'
}
testLogging {
events 'PASSED', 'FAILED', 'SKIPPED'
}
afterSuite { desc, result ->
if (!desc.parent) {
println "\nGUI Test result: ${result.resultType}"
println "Test summary: ${result.testCount} tests, " +
"${result.successfulTestCount} succeeded, " +
"${result.failedTestCount} failed, " +
"${result.skippedTestCount} skipped"
}
}
}
check.dependsOn integrationTest
jacoco {
toolVersion = "0.8.2"
reportsDir = file("$buildDir/customJacocoReportDir")
}
jacocoTestReport {
reports {
xml.enabled = true // coveralls plugin depends on xml format report
html.enabled = true
}
}
coveralls {
jacocoReportPath "$buildDir/customJacocoReportDir/test/jacocoTestReport.xml"
}