-
Notifications
You must be signed in to change notification settings - Fork 19
/
build.gradle
112 lines (96 loc) · 2.6 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
plugins {
id 'java'
id 'checkstyle'
id 'maven-publish'
id 'jacoco'
}
group 'twgc'
version '0.1.4'
sourceCompatibility = 1.8
targetCompatibility = 1.8
allprojects {
repositories {
maven {
url 'https://maven.aliyun.com/repository/public/'
}
mavenLocal()
mavenCentral()
}
}
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
}
tasks.withType(Test) {
systemProperty "file.encoding", "UTF-8"
}
checkstyle {
toolVersion '6.11.1'
showViolations true
}
check.dependsOn 'checkstyle'
jacoco {
toolVersion = "0.8.5"
reportsDir = file("$buildDir/customJacocoReportDir")
}
jacocoTestReport {
reports {
xml.enabled false
csv.enabled false
html.destination file("${buildDir}/jacocoHtml")
}
}
jacocoTestCoverageVerification {
violationRules {
rule {
limit {
minimum = 0.85
}
}
rule {
enabled = false
element = 'CLASS'
includes = ['twgc.gm.*']
limit {
counter = 'LINE'
value = 'TOTALCOUNT'
maximum = 0.90
}
}
}
}
task checkstyle(type: Checkstyle) {
//configFile file("${project.projectDir}/config/checkstyle/checkstyle.xml")
// Where my checkstyle config is...
//configProperties.checkstyleSuppressionsPath = file("${project.projectDirr}/config/quality/suppressions.xml").absolutePath // Where is my suppressions file for checkstyle is...
source 'src'
include '**/*.java'
exclude "**/test/**"
classpath = files()
}
jacocoTestCoverageVerification.dependsOn 'jacocoTestReport'
build.dependsOn 'jacocoTestCoverageVerification'
publishing {
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/Hyperledger-TWGC/java-gm")
credentials {
username = "davidkhala"
password = System.getProperty("GITHUB_TOKEN_DAVIDKHALA")
}
}
}
publications {
gpr(MavenPublication) {
artifactId = 'java-gm'
from(components.java)
}
}
}
dependencies {
implementation group: 'org.bouncycastle', name: 'bcpkix-jdk15on', version: '1.67'
implementation group: 'org.apache.commons', name: 'commons-pool2', version: '2.9.0'
implementation group: 'org.yaml', name: 'snakeyaml', version: '1.29'
testImplementation group: 'junit', name: 'junit', version: '4.12'
testImplementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.11'
}