forked from reportportal/client-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
148 lines (120 loc) · 4.04 KB
/
build.gradle
File metadata and controls
148 lines (120 loc) · 4.04 KB
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 'net.researchgate.release' version '2.4.1'
id "com.jfrog.bintray" version "1.7"
id 'com.github.johnrengelman.shadow' version '2.0.1'
}
apply plugin: 'java'
apply plugin: 'maven-publish'
sourceCompatibility = 1.6
targetCompatibility = 1.6
description = 'EPAM Report portal. Client'
repositories {
jcenter()
mavenLocal()
maven { url "http://dl.bintray.com/epam/reportportal" }
maven { url "https://jitpack.io" }
}
sourceSets {
main {
compileClasspath += configurations.shadow
runtimeClasspath += configurations.shadow
}
test {
compileClasspath += configurations.shadow
runtimeClasspath += configurations.shadow
}
}
//configurations.shadow.extendsFrom(configurations.runtime)
shadowJar {
// configurations = [project.configurations.runtime]
dependencies {
include(dependency('com.epam.reportportal:restendpoint'))
include(dependency('org.apache.httpcomponents:httpclient'))
include(dependency('org.apache.httpcomponents:httpmime'))
include(dependency('org.apache.httpcomponents:httpcore'))
include(dependency('commons-logging:commons-logging'))
include(dependency('com.google.guava:guava'))
}
classifier = null
relocate 'org.apache.http', 'rp.org.apache.http'
relocate 'com.google.common', 'rp.com.google.common'
relocate 'org.apache.commons.logging', 'rp.org.apache.commons.logging'
}
dependencies {
// compile 'com.epam.reportportal:commons-model:3.0.0'
compile 'com.epam.reportportal:commons-model:4.0.0'
compile 'com.google.guava:guava:20.0'
compile 'com.epam.reportportal:restendpoint:0.2.4'
shadow 'com.fasterxml.jackson.core:jackson-databind:2.8.10'
shadow 'com.fasterxml.jackson.core:jackson-annotations:2.8.10'
shadow 'io.reactivex.rxjava2:rxjava:2.1.6'
shadow 'org.apache.tika:tika-core:1.4'
shadow 'org.slf4j:slf4j-api:1.7.25'
testCompile 'junit:junit:4.12'
testCompile 'org.mockito:mockito-all:2.0.2-beta'
testCompile 'org.hamcrest:hamcrest-all:1.3'
}
test.useTestNG()
test.maxParallelForks = 1
task wrapper(type: Wrapper) {
gradleVersion = '3.1'
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
javadoc() {
failOnError = false
}
artifacts {
archives sourcesJar
archives javadocJar
archives shadowJar
}
publishing {
publications {
shadow(MavenPublication) { publication ->
project.shadow.component(publication)
//
//
// artifact project.tasks.shadowJar
artifact project.tasks.javadocJar
artifact project.tasks.sourcesJar
pom.withXml {
def root = asNode()
root.dependencies.'*'.findAll() {
it.scope.text() == 'runtime' && project.configurations.shadow.allDependencies.find { dep ->
dep.name == it.artifactId.text()
}
}.each() {
it.scope*.value = 'compile'
}
}
groupId 'com.epam.reportportal'
artifactId "$project.name"
}
}
}
bintray {
user = project.hasProperty('bintrayUser') ? project.property('bintrayUser') : System.getenv('BINTRAY_USER')
key = project.hasProperty('bintrayApiKey') ? project.property('bintrayApiKey') : System.getenv('BINTRAY_API_KEY')
publications = ['shadow']
publish = true
pkg {
repo = 'reportportal'
name = "$project.name"
desc = "$project.description"
websiteUrl = 'https://reportportal.github.io/'
issueTrackerUrl = "https://github.com/reportportal/$project.name/issues"
vcsUrl = "https://github.com/reportportal/$project.name"
githubRepo = "reportportal/$project.name"
githubReleaseNotesFile = 'CHANGELOG.md'
userOrg = 'epam'
licenses = ['GPL-3.0']
}
}
afterReleaseBuild.dependsOn bintrayUpload