-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathbuild.gradle
More file actions
134 lines (114 loc) · 4.09 KB
/
build.gradle
File metadata and controls
134 lines (114 loc) · 4.09 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
plugins {
alias(libs.plugins.axionRelease)
id 'groovy'
id 'java'
alias(libs.plugins.nexusPublish)
}
group 'org.rundeck.plugins'
ext.publishName = "Http Notification ${project.version}"
ext.githubSlug = 'rundeck-plugins/http-notification'
ext.developers = [
[id: 'gschueler', name: 'Greg Schueler', email: 'greg@rundeck.com']
]
scmVersion {
ignoreUncommittedChanges = false
// Maintain simple tag-based versioning without branch name suffixes (Axion 1.18+)
versionCreator 'simple'
tag {
prefix = '' // NO "v" prefix - see PLUGIN_TAGGING_ARCHITECTURE.md
versionSeparator = ''
}
}
version = scmVersion.version // Dynamic version from git tag
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
withSourcesJar()
withJavadocJar()
}
ext.rundeckPluginVersion = '1.2'
ext.pluginClassNames='com.rundeck.plugin.HttpNotificationPlugin'
ext.pluginName = 'Http Notification'
ext.pluginDescription = 'A notification plugin that makes HTTP requests'
configurations{
//declare custom pluginLibs configuration to include only libs for this plugin
pluginLibs
//declare compile to extend from pluginLibs so it inherits the dependencies
implementation{
extendsFrom pluginLibs
}
}
repositories {
mavenLocal()
maven {
name = 'Central Portal Snapshots'
url = 'https://central.sonatype.com/repository/maven-snapshots/'
content {
includeGroup('org.rundeck')
}
}
maven {
name = "PackageCloudTest"
url = uri("https://packagecloud.io/pagerduty/rundeckpro-test/maven2")
content {
includeGroup('org.rundeck.plugins')
}
}
mavenCentral()
}
dependencies {
implementation libs.groovyAll
compileOnly libs.rundeckCore
testImplementation libs.rundeckCore
// Apache HTTP client dependencies for compilation (http-step bundles these but doesn't expose them transitively)
implementation libs.httpclient
// Version 3.20.0 fixes CVE-2025-48924 (StackOverflowError in ClassUtils)
implementation libs.commonsLang3
// Bundle http-step plugin in lib/ directory for runtime
// Use transitive=false to avoid duplicating dependencies already bundled in http-step JAR
pluginLibs (libs.httpStep) {
transitive = false
}
testImplementation libs.bundles.testLibs
}
jar {
// Include plugin dependencies in lib/ directory
into('lib') {
from configurations.pluginLibs
}
manifest {
def libList = configurations.pluginLibs.collect{'lib/' + it.name}.join(' ')
attributes 'Rundeck-Plugin-Name' : pluginName
attributes 'Rundeck-Plugin-Description' : pluginDescription
attributes 'Rundeck-Plugin-Rundeck-Compatibility-Version': '6.0.0+'
attributes 'Rundeck-Plugin-Tags': 'java,notification'
attributes 'Rundeck-Plugin-License': 'Apache 2.0'
attributes 'Rundeck-Plugin-Source-Link': 'https://github.com/rundeck-plugins/http-notification'
attributes 'Rundeck-Plugin-Target-Host-Compatibility': 'all'
attributes 'Rundeck-Plugin-Classnames': pluginClassNames
attributes 'Rundeck-Plugin-File-Version': project.version
attributes 'Rundeck-Plugin-Version': rundeckPluginVersion
attributes 'Rundeck-Plugin-Archive': 'true'
attributes 'Rundeck-Plugin-Libs': "${libList}"
}
}
test {
useJUnit()
// Java 17+ module access for reflection/mocking
jvmArgs = [
'--add-opens=java.base/java.lang=ALL-UNNAMED',
'--add-opens=java.base/java.util=ALL-UNNAMED',
'--add-opens=java.base/java.lang.reflect=ALL-UNNAMED',
'--add-opens=java.base/java.net=ALL-UNNAMED'
]
}
nexusPublishing {
packageGroup = 'org.rundeck.plugins'
repositories {
sonatype {
nexusUrl.set(uri("https://ossrh-staging-api.central.sonatype.com/service/local/"))
snapshotRepositoryUrl.set(uri("https://central.sonatype.com/repository/maven-snapshots/"))
}
}
}
apply from: "${rootDir}/gradle/publishing.gradle"