-
Notifications
You must be signed in to change notification settings - Fork 9
/
build.gradle
executable file
·137 lines (114 loc) · 3.81 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
plugins {
id "io.spring.dependency-management" version "1.0.9.RELEASE"
id 'java'
id 'jacoco'
}
project.ext {
publishRepo = "https://maven.pkg.github.com/reportportal/plugin-bts-jira"
dependencyRepos = ["plugin-api", "commons-bom"]
releaseMode = project.hasProperty("releaseMode")
pluginID = "jira"
pluginsDir = "$buildDir/plugins"
}
def scriptsUrl = 'https://raw.githubusercontent.com/reportportal/gradle-scripts/' +
(releaseMode ? getProperty('scripts.version') : 'develop')
apply from: scriptsUrl + '/release-fat.gradle'
apply from: scriptsUrl + '/signing.gradle'
apply from: scriptsUrl + '/build-quality.gradle'
repositories {
maven { url "https://m2proxy.atlassian.com/repository/public" }
mavenCentral { url "https://repo1.maven.org/maven2" }
if (!releaseMode) {
maven { url 'https://jitpack.io' }
}
}
dependencyManagement {
imports {
mavenBom(releaseMode ? 'com.epam.reportportal:commons-bom:' + getProperty('bom.version') : 'com.epam.reportportal:commons-bom:5.11.2')
}
}
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
dependencies {
if (releaseMode) {
implementation 'com.epam.reportportal:commons-dao'
implementation 'com.epam.reportportal:plugin-api'
annotationProcessor 'com.epam.reportportal:plugin-api'
} else {
implementation 'com.github.reportportal:commons-dao:2834dd5'
implementation 'com.github.reportportal:plugin-api:6465099'
annotationProcessor 'com.github.reportportal:plugin-api:6465099'
}
implementation 'org.hibernate:hibernate-core:5.6.15.Final'
compile 'ch.qos.logback:logback-classic:1.2.3'
compile 'org.slf4j:slf4j-api:1.7.25'
compile 'io.atlassian.fugue:fugue:4.7.2'
compile 'com.atlassian.jira:jira-rest-java-client-core:5.2.4'
compile 'net.oauth.core:oauth:20090617'
compile 'net.oauth.core:oauth-httpclient4:20090913'
compile 'org.apache.tika:tika-core:1.14'
testCompile 'org.springframework:spring-test:5.2.1.RELEASE'
testCompile 'org.hamcrest:hamcrest-all:1.3'
testCompile 'junit:junit:4.12'
testCompile 'org.mockito:mockito-all:1.10.19'
}
artifacts {
archives shadowJar
}
test {
jacocoTestReport {
reports {
xml.enabled true
}
}
}
build.dependsOn jacocoTestReport
wrapper {
gradleVersion = '5.4.1'
}
generatePomFileForShadowPublication { pom.packaging = "jar" }
jar {
manifest {
attributes(
"Class-Path": configurations.compile.collect { it.getName() }.join(' '),
"Plugin-Id": "${pluginID}",
"Plugin-Version": "${project.version}",
"Plugin-Provider": "Andrei Varabyeu",
"Plugin-Class": "com.epam.reportportal.extension.bugtracking.jira.JiraStrategyPlugin",
"Plugin-Service": "api"
// "Plugin-Dependencies": ""
)
}
}
shadowJar {
archiveClassifier.set(null)
configurations = [project.configurations.compile]
zip64 true
dependencies {
exclude(dependency('com.github.reportportal:'))
exclude(dependency('com.epam.reportportal:'))
exclude(dependency('org.springframework:'))
exclude(dependency('org.springframework.security:'))
exclude(dependency('org.springframework.data:'))
exclude(dependency('org.springframework.boot:'))
exclude(dependency('ch.qos.logback:'))
exclude(dependency('org.slf4j:'))
}
}
task plugin(type: Jar) {
getArchiveBaseName().set("plugin-${pluginID}")
into('classes') {
with jar
}
into('lib') {
from configurations.compile
}
extension('zip')
}
task assemblePlugin(type: Copy) {
from plugin
into pluginsDir
}
task assemblePlugins(type: Copy) {
dependsOn subprojects.assemblePlugin
}