-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
125 lines (108 loc) · 2.59 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
plugins {
id "io.spring.dependency-management" version "1.0.9.RELEASE"
id 'java'
id 'jacoco'
id 'com.github.johnrengelman.shadow' version '5.2.0'
id "com.github.spotbugs" version "3.0.0"
id "com.github.node-gradle.node" version "2.2.1"
}
node {
version = '20.11.0'
npmVersion = '10.2.4'
download = true
workDir = file("${project.buildDir}/ui")
nodeModulesDir = file("${project.rootDir}/ui")
}
npm_run_build {
inputs.files fileTree("ui/src")
inputs.file 'ui/package.json'
inputs.file 'ui/package-lock.json'
outputs.dir 'ui/build'
}
apply from: 'project-properties.gradle'
repositories {
mavenCentral()
if (!releaseMode) {
maven { url 'https://jitpack.io' }
}
}
dependencies {
if (releaseMode) {
implementation 'com.epam.reportportal:plugin-api'
annotationProcessor 'com.epam.reportportal:plugin-api'
} else {
implementation 'com.epam.reportportal:plugin-api:5.12.0'
annotationProcessor 'com.epam.reportportal:plugin-api:5.12.0'
}
}
test {
useJUnitPlatform()
maxParallelForks = 1
testLogging {
events = ['failed']
exceptionFormat = 'short'
}
reports {
junitXml.enabled = true
}
}
build.dependsOn jacocoTestReport
artifacts {
archives shadowJar
}
sourceSets {
main {
resources
{
exclude '**'
}
}
}
jar {
from("src/main/resources") {
into("/resources")
}
from("ui/build") {
into("/resources")
}
manifest {
attributes(
"Class-Path": configurations.runtimeClasspath.collect { it.getName() }.join(' '),
"Plugin-Id": "${pluginId}",
"Plugin-Version": "${project.version}",
"Plugin-Provider": "Report Portal",
"Plugin-Class": "com.epam.reportportal.extension.template.TemplatePlugin",
"Plugin-Service": "api"
)
}
}
shadowJar {
from("src/main/resources") {
into("/resources")
}
from("ui/build") {
into("/resources")
}
configurations = [project.configurations.runtimeClasspath]
zip64 true
dependencies {
}
}
task plugin(type: Jar) {
getArchiveBaseName().set("plugin-${pluginId}")
into('classes') {
with jar
}
into('lib') {
from configurations.runtimeClasspath
}
extension('zip')
}
task assemblePlugin(type: Copy) {
from plugin
into pluginsDir
}
task assemblePlugins(type: Copy) {
dependsOn subprojects.assemblePlugin
}
compileJava.dependsOn npm_run_build