Repository navigation
Expand file tree
/
Copy pathbuild.gradle
More file actions
103 lines (86 loc) · 2.81 KB
/
Copy pathbuild.gradle
File metadata and controls
103 lines (86 loc) · 2.81 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
plugins {
id "io.spring.dependency-management" version "1.1.7"
id 'java'
id 'com.gradleup.shadow' version '9.3.1'
id("io.freefair.lombok") version "9.5.0"
}
project.ext {
publishRepo = "https://maven.pkg.github.com/reportportal/plugin-saucelabs"
dependencyRepos = ["plugin-api", "commons-bom"]
releaseMode = project.hasProperty("releaseMode")
pluginID = "saucelabs"
pluginsDir = layout.buildDirectory.dir("plugins").get().asFile.path
}
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'
java {
sourceCompatibility = JavaVersion.VERSION_25
targetCompatibility = JavaVersion.VERSION_25
}
repositories {
mavenCentral()
maven { url = "https://build.shibboleth.net/nexus/content/repositories/releases/" }
if (!releaseMode) {
maven { url = 'https://jitpack.io' }
}
}
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:73c327819e'
annotationProcessor 'com.github.reportportal:service-api:73c327819e'
}
implementation "org.springframework.boot:spring-boot-starter-web:${springBootVersion}"
testImplementation 'org.junit.jupiter:junit-jupiter-api'
testImplementation 'org.junit.jupiter:junit-jupiter-engine'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
}
test {
useJUnitPlatform()
}
assemble.dependsOn shadowJar
generatePomFileForShadowPublication { pom.packaging = "jar" }
jar {
manifest {
attributes(
"Class-Path": configurations.compileClasspath.collect { it.getName() }.join(' '),
"Plugin-Id": "${pluginId}",
"Plugin-Version": "${project.version}",
"Plugin-Provider": "Pavel Bortnik",
"Plugin-Class": "com.epam.reportportal.saucelabs.SaucelabsPlugin",
// "Plugin-Dependencies": ""
)
}
}
shadowJar {
zip64 = true
dependencies {
include(dependency('com.epam.reportportal:saucelabs:.*'))
include(dependency('org.apache.httpcomponents.client5:httpclient5:5.4.2'))
}
}
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
}
wrapper {
gradleVersion = '9.3.1'
}