forked from aminatadjer/Jenkins-GetStarted-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
86 lines (75 loc) · 2.01 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
plugins {
id 'java'
id 'jacoco'
// id "net.madeng.slack" version "0.0.22"
// id "info.solidsoft.pitest" version "1.4.5"
id "org.sonarqube" version "2.8"
}
version '1.0-SNAPSHOT'
sourceCompatibility = 1.8
repositories {
mavenCentral()
maven {
url 'https://mymavenrepo.com/repo/OjnybsVfucxxViJSfnb0/'
credentials {
username 'myMavenRepo'
password 'aminatadjer'
}
}
}
apply plugin: 'maven-publish'
group = 'com.my-project'
version = '0.1-SNAPSHOT'
publishing {
repositories {
maven {
url 'https://mymavenrepo.com/repo/OjnybsVfucxxViJSfnb0/'
credentials {
username 'myMavenRepo'
password 'aminatadjer'
}
}
}
publications {
maven(MavenPublication) {
from components.java
}
}
}
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.12'
}
/*
jacocoTestCoverageVerification {
violationRules {
rule {
limit {
minimum = 0.8
}
}
}
}
pitest {
targetClasses = ['com.example.service.*']
targetTests = ['com.test.*']
//by default "${project.group}.*"
pitestVersion = '1.4.1' //not needed when a default PIT version should be used
threads = 4
outputFormats = ['XML', 'HTML']
timestampedReports = false
}
check.finalizedBy "pitest","jacocoTestReport","jacocoTestCoverageVerification","sonarqube"
task generateMatrixAPI (type:Copy){
from 'build'
include 'reports\\','libs\\','docs\\'
into 'C:\\Users\\BOS\\Desktop\\sil2\\outils\\MatrixRelease\\Matrix_v_1.0'
}
generateMatrixAPI.finalizedBy "publish"
generateMatrixAPI.dependsOn "build" , "javadoc"
slack {
webhookUrl 'https://hooks.slack.com/services/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'
message {
text = "Project is built newly and deployed into "
channel = '#outils-gradle'
} }
publish.finalizedBy "publishToSlack" */