-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
173 lines (142 loc) · 4.03 KB
/
build.gradle
File metadata and controls
173 lines (142 loc) · 4.03 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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
plugins {
id 'io.spring.dependency-management' version '1.1.7'
id 'java'
id 'jacoco'
id 'com.gradleup.shadow' version '9.3.1'
id "com.github.node-gradle.node" version "7.1.0"
id "com.apollographql.apollo" version "4.4.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 {
mavenCentral { url = "https://repo1.maven.org/maven2" }
maven { url = "https://build.shibboleth.net/nexus/content/repositories/releases/" }
if (!releaseMode) {
maven { url = 'https://jitpack.io' }
}
}
configurations {
implementation.extendsFrom hello
}
ext['spring-boot.version'] = "${springBootVersion}"
dependencies {
if (releaseMode) {
implementation 'com.epam.reportportal:service-api'
annotationProcessor 'com.epam.reportportal:service-api'
} else {
implementation 'com.github.reportportal:service-api:e81b4f6'
annotationProcessor 'com.github.reportportal:service-api:e81b4f6'
}
hello("com.apollographql.java:client:0.0.2")
hello("com.squareup.okhttp3:okhttp:5.3.2")
testImplementation('org.junit.jupiter:junit-jupiter')
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
}
test {
useJUnitPlatform()
jacocoTestReport {
reports {
xml.required = true
}
}
}
apollo {
service("service") {
generateKotlinModels.set(false)
packageName.set("com.epam.reportportal.extension.monday.model.graphql")
}
}
sourcesJar {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}
build.dependsOn jacocoTestReport
assemble.dependsOn 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.hello.collect { it.getName() }.join(' '),
"Plugin-Id": "${pluginId}",
"Plugin-Version": "${project.version}",
"Plugin-Provider": "Report Portal",
"Plugin-Class": "com.epam.reportportal.extension.monday.MondayPlugin",
"Plugin-Service": "api"
)
}
}
shadowJar {
from("src/main/resources") {
into("/resources")
}
from("ui/build") {
into("/resources")
}
configurations = [project.configurations.hello]
zip64 = true
dependencies {
exclude(dependency('com.github.reportportal:'))
}
}
tasks.register('uberJar', Jar) {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
archiveClassifier = 'uber'
from sourceSets.main.output
dependsOn configurations.hello
from {
configurations.hello.collect {
zipTree(it)
}
}
manifest {
attributes(
"Class-Path": configurations.hello.collect { it.getName() }.join(' '),
"Plugin-Id": "${pluginId}",
"Plugin-Version": "${project.version}",
"Plugin-Provider": "Report Portal",
"Plugin-Class": "com.epam.reportportal.extension.monday.MondayPlugin",
"Plugin-Service": "api"
)
}
from("src/main/resources") {
into("/resources")
}
from("ui/build") {
into("/resources")
}
}
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