-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle
154 lines (133 loc) · 4.9 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
149
150
151
152
153
plugins {
id "io.spring.dependency-management" version "1.1.4"
id 'java'
id 'jacoco'
id "com.github.node-gradle.node" version "2.2.1"
}
apply from: 'project-properties.gradle'
def scriptsUrl = 'https://raw.githubusercontent.com/reportportal/gradle-scripts/' +
(releaseMode ? getProperty('scripts.version') : 'develop')
apply from: 'ui.gradle'
apply from: scriptsUrl + '/release-fat.gradle'
apply from: scriptsUrl + '/signing.gradle'
repositories {
maven { url "https://packages.atlassian.com/maven/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:5.12.1' : 'com.epam.reportportal:commons-bom:5.12.1')
}
}
dependencies {
// ALL new dependencies should be included in shadowJar plugin!
// transitive dependencies may be required as well. could be checked in runtime only!
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:8dcc514'
implementation 'com.github.reportportal:plugin-api:815c74a'
annotationProcessor 'com.github.reportportal:plugin-api:815c74a'
}
implementation 'org.hibernate:hibernate-core:5.6.15.Final'
implementation("com.atlassian.jira:jira-rest-java-client-core:6.0.1")
implementation "io.atlassian.fugue:fugue:6.0.1"
testImplementation('org.junit.jupiter:junit-jupiter:5.11.0')
}
test {
useJUnitPlatform()
jacocoTestReport {
reports {
xml.required = true
}
}
}
build.dependsOn jacocoTestReport
artifacts {
archives shadowJar
}
sourceSets {
main {
resources
{
exclude '**'
}
}
}
generatePomFileForShadowPublication { pom.packaging = "jar" }
jar {
from("src/main/resources") {
into("/resources")
}
from("ui/build") {
into("/resources")
}
manifest {
attributes(
"Class-Path": configurations.compileClasspath.collect { it.getName() }.join(' '),
"Plugin-Id": "${pluginId}",
"Plugin-Version": "${project.version}",
"Plugin-Provider": "Report Portal",
"Plugin-Class": "com.epam.reportportal.extension.jira.CloudJiraPlugin",
"Plugin-Service": "api"
)
}
}
shadowJar {
from("src/main/resources") {
into("/resources")
}
from("ui/build") {
into("/resources")
}
configurations = [project.configurations.compileClasspath]
zip64 true
dependencies {
include(dependency("com.atlassian.jira:jira-rest-java-client-api:.*"))
include(dependency("com.atlassian.jira:jira-rest-java-client-core:.*"))
include(dependency("com.atlassian.httpclient:atlassian-httpclient-api:.*"))
include(dependency("com.atlassian.httpclient:atlassian-httpclient-library:.*"))
include(dependency("com.atlassian.sal:sal-api:.*"))
include(dependency("com.atlassian.event:atlassian-event:.*"))
include(dependency("io.atlassian.util.concurrent:atlassian-util-concurrent:.*"))
include(dependency("io.atlassian.fugue:fugue:.*"))
include(dependency("org.apache.httpcomponents:httpasyncclient:.*"))
include(dependency("org.apache.httpcomponents:httpasyncclient-cache:.*"))
include(dependency("org.apache.httpcomponents:httpclient:.*"))
include(dependency("org.apache.httpcomponents:httpclient-cache:.*"))
include(dependency("org.apache.httpcomponents:httpcore:.*"))
include(dependency("org.apache.httpcomponents:httpcore-nio:.*"))
include(dependency("org.apache.httpcomponents:httpcore-mime:.*"))
include(dependency("org.glassfish.jersey.core:jersey-server:.*"))
include(dependency("org.glassfish.jersey.core:jersey-common:.*"))
include(dependency("jakarta.ws.rs:jakarta.ws.rs-api:.*"))
//include(dependency("jakarta.annotation:jakarta.annotation-api:.*"))
include(dependency("org.apache.tomcat:tomcat-annotations-api:.*"))
include(dependency("org.glassfish.hk2.external:jakarta.inject:.*"))
include(dependency("org.glassfish.hk2:osgi-resource-locator:.*"))
include(dependency("org.glassfish.jaxb:jaxb-runtime:.*"))
}
}
task plugin(type: Jar) {
getArchiveBaseName().set("plugin-${pluginId}")
into('classes') {
with jar
}
into('lib') {
from configurations.compileClasspath
}
archiveExtension.set('zip')
}
task assemblePlugin(type: Copy) {
from plugin
into pluginsDir
}
task assemblePlugins(type: Copy) {
dependsOn subprojects.assemblePlugin
}
compileJava.dependsOn npm_run_build