This repository has been archived by the owner on Jul 15, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.gradle
140 lines (122 loc) · 3.45 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
plugins {
id 'net.researchgate.release' version '2.6.0'
id "com.jfrog.bintray" version "1.7.3"
id 'jacoco'
id 'com.github.kt3k.coveralls' version '2.8.1'
}
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'maven-publish'
apply plugin: 'checkstyle'
repositories {
jcenter()
}
group = 'com.yahoo.viper'
description = 'Java library that monitors a list of hostnames and notifies availability changes'
def viperUrl = 'https://github.com/yahoo/viper'
def viperVcsUrl = 'https://github.com/yahoo/viper.git'
sourceCompatibility = 1.8
targetCompatibility = 1.8
dependencies {
compile group: 'org.slf4j', name: 'slf4j-api', version:'1.7.25'
testCompile group: 'org.slf4j', name: 'slf4j-log4j12', version:'1.7.10'
testCompile group: 'log4j', name: 'log4j', version:'1.2.17'
testCompile group: 'org.testng', name: 'testng', version:'6.8.21'
}
checkstyle {
checkstyleTest.enabled = false
configFile = file("${rootProject.rootDir}/conf/checkstyle.xml")
configProperties = [ "suppressionFile" : file("${rootProject.rootDir}/conf/checkstyle-suppressions.xml")]
}
jacocoTestReport {
reports {
xml.enabled = true // coveralls plugin depends on xml format report
html.enabled = true
}
}
release {
failOnUnversionedFiles = false
failOnCommitNeeded = true
tagTemplate = '$name-$version'
newVersionCommitMessage = '[Gradle Release Plugin] [skip ci] new version release:'
}
test {
useTestNG()
testLogging {
events "PASSED", "FAILED", "SKIPPED"
}
}
bintray {
user = System.getenv('BINTRAY_USER')
key = System.getenv('BINTRAY_API_KEY')
publications = ['mavenRelease']
publish = true
override = false
pkg {
repo = bintrayRepo
name = project.name
desc = project.description
websiteUrl = viperUrl
issueTrackerUrl = '${viperUrl}/issues'
userOrg = 'yahoo'
licenses = ['BSD 3-clause']
vcsUrl = viperVcsUrl
}
pkg.version {
name = version
gpg {
sign = true
}
// mavenCentralSync {
// sync = true
// user = ossrhUsername
// password = ossrhPassword
// }
}
}
task javadocJar(type: Jar) {
classifier = 'javadoc'
from javadoc
}
task sourcesJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allSource
}
def pomConfig = {
licenses {
license {
name 'BSD 3-clause "New" or "Revised" License'
url 'https://github.com/yahoo/viper/blob/master/LICENSE'
distribution "repo"
}
}
// developers {
// developer {
// id "ec-lightyear-dev"
// name "ec-lightyear-dev"
// email "[email protected]"
// }
// }
scm {
connection 'scm:git:https://github.com/yahoo/viper.git'
developerConnection 'scm:git:https://github.com/yahoo/viper.git'
url viperUrl
}
}
publishing {
publications {
mavenRelease(MavenPublication) {
from components.java
artifact javadocJar
artifact sourcesJar
pom.withXml {
def root = asNode()
root.appendNode('description', project.description)
root.appendNode('name', project.name)
root.appendNode('url', viperUrl)
root.children().last() + pomConfig
}
}
}
}
afterReleaseBuild.dependsOn bintrayUpload