-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
148 lines (124 loc) · 2.61 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 'pmd'
id 'java'
id 'maven'
id 'jacoco'
id 'checkstyle'
id 'maven-publish'
id 'com.jfrog.bintray' version '1.8.4'
}
repositories {
mavenCentral()
}
apply plugin: 'pmd'
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'jacoco'
apply plugin: 'checkstyle'
apply plugin: 'maven-publish'
apply plugin: 'com.jfrog.bintray'
group 'com.github.onotoliy'
version "$version"
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
dependencies {
testCompile 'junit:junit:4.12'
}
publishing {
repositories {
maven {
url = 'https://dl.bintray.com/a-k-pohresniy/money2words'
}
}
publications {
MyPublication(MavenPublication) {
from components.java
groupId = project.group
artifactId = project.archivesBaseName
version = project.version
artifact sourcesJar
artifact javadocJar
}
}
}
bintray {
user = 'a-k-pohresniy'
key = '61891da6146e09d692266668fcf795d84824afa6'
publications = ['MyPublication']
publish = true
pkg {
repo = 'onotoliy'
name = 'money2words'
userOrg = 'a-k-pohresniy'
licenses = ['Apache-2.0']
vcsUrl = 'https://github.com/onotoliy/money2words.git'
}
version {
name = project.version
released = new Date()
vcsTag = project.version
gpg {
sign = true
passphrase = 'Lenovo14'
}
}
}
javadoc {
options.encoding = 'UTF-8'
}
checkstyle {
toolVersion '7.8.1'
configFile file('checkstyle.xml')
}
checkstyleMain {
source = sourceSets.main.allJava
}
checkstyleTest {
source = sourceSets.main.allJava
}
pmd {
rulePriority 1
ruleSetFiles file("pmd.xml")
}
pmdMain {
source = sourceSets.main.allJava
}
pmdTest {
source = sourceSets.main.allJava
}
jacoco {
toolVersion = "0.8.4"
}
jacocoTestReport {
reports {
xml.enabled false
csv.enabled false
html.enabled true
}
}
jacocoTestCoverageVerification {
violationRules {
rule {
element = 'BUNDLE'
limit {
counter = 'INSTRUCTION'
value = 'COVEREDRATIO'
minimum = 0.9
}
}
}
}
artifacts {
archives sourcesJar
archives javadocJar
}
check.dependsOn jacocoTestCoverageVerification