-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle
110 lines (91 loc) · 3 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
plugins {
id "io.spring.dependency-management" version "1.1.4"
id 'java'
}
project.ext {
publishRepo = "https://maven.pkg.github.com/reportportal/plugin-saucelabs"
dependencyRepos = ["plugin-api", "commons-bom"]
releaseMode = project.hasProperty("releaseMode")
pluginID = "saucelabs"
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'
java {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}
repositories {
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.13.0')
}
}
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:a98c172'
implementation 'com.github.reportportal:plugin-api:develop-SNAPSHOT'
annotationProcessor 'com.github.reportportal:plugin-api:develop-SNAPSHOT'
}
implementation 'org.hibernate:hibernate-core:5.6.15.Final'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.7.2'
testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.7.2'
// add lombok support
compileOnly "org.projectlombok:lombok:${lombokVersion}"
annotationProcessor "org.projectlombok:lombok:${lombokVersion}"
testCompileOnly "org.projectlombok:lombok:${lombokVersion}"
testAnnotationProcessor "org.projectlombok:lombok:${lombokVersion}"
}
test {
useJUnitPlatform()
}
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:.*'))
}
}
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 = '8.10.2'
}