-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
129 lines (114 loc) · 3.84 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
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.bmuschko:gradle-nexus-plugin:2.3.1'
}
}
plugins {
id 'java'
id 'jacoco'
id "org.sonarqube" version "3.3"
id 'com.bmuschko.nexus' version '2.3.1'
}
archivesBaseName = 'apache-sseclient'
group = "dev.manpreet"
version = "1.0"
repositories {
mavenCentral()
}
dependencies {
compile group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.5.12'
compile group: 'org.apache.httpcomponents', name: 'httpclient-cache', version: '4.5.12'
compile group: 'org.apache.httpcomponents', name: 'httpasyncclient', version: '4.1.4'
testCompile group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: '2.10.2'
testCompile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.10.2'
testCompile group: 'com.fasterxml.jackson.datatype', name: 'jackson-datatype-jsr310', version: '2.10.2'
testCompile group: 'commons-io', name: 'commons-io', version: '2.8.0'
testCompile group: 'org.testng', name: 'testng', version: '7.1.0'
testCompile group: 'org.slf4j', name: 'slf4j-api', version: '1.7.30'
testCompile group: 'ch.qos.logback', name: 'logback-classic', version: '1.2.3'
testCompile group: 'org.projectlombok', name: 'lombok', version: '1.18.12'
testAnnotationProcessor group: 'org.projectlombok', name: 'lombok', version: '1.18.12'
}
jar {
manifest {
attributes 'Implementation-Title': 'Apache SSE client',
'Implementation-Version': '1.0'
}
}
task fatJar(type: Jar) {
version("1.0-uber")
manifest {
attributes 'Implementation-Title': 'Apache SSE client',
'Implementation-Version': '1.0'
}
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
with jar
}
test {
useTestNG() {
def builder = suiteXmlBuilder();
builder.suite(name: 'sse-tests') {
test(name: 'sse-tests') {
builder.packages { 'package'(name: 'dev.manpreet.apache.sseclient.*') {} }
}
}
}
finalizedBy jacocoTestReport
}
jacocoTestReport {
additionalSourceDirs.from = files(sourceSets.main.allSource.srcDirs)
sourceDirectories.from = files(sourceSets.main.allSource.srcDirs)
classDirectories.from = files(sourceSets.main.output)
reports {
html.enabled = false
xml.enabled = true
xml.destination = file("${buildDir}/jacoco/test.xml")
csv.enabled = false
}
}
sonarqube {
properties {
property "sonar.projectKey", "autopreet_apache-sseclient"
property "sonar.organization", "autopreet"
property "sonar.host.url", "https://sonarcloud.io"
property "sonar.language", "java"
}
}
modifyPom {
project {
name 'apache-sseclient'
description 'SSE client for apache HTTP client'
url 'https://github.com/autopreet/apache-sseclient'
inceptionYear '2020'
scm {
url 'https://github.com/autopreet/apache-sseclient'
connection 'scm:https://github.com/autopreet/apache-sseclient.git'
developerConnection 'scm:https://github.com/autopreet/apache-sseclient.git'
}
licenses {
license {
name 'The Apache Software License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
distribution 'repo'
}
}
developers {
developer {
id 'autopreet'
name 'Manpreet'
email 'manpreet.333@gmail.com'
}
}
}
}
extraArchive {
sources = true
}
nexus {
sign = true
repositoryUrl = 'https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/'
snapshotRepositoryUrl = 'https://s01.oss.sonatype.org/content/repositories/snapshots/'
}