forked from higanworks/rundeck-slack-incoming-webhook-plugin
-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathbuild.gradle
68 lines (57 loc) · 2.15 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
plugins {
id 'java'
id 'pl.allegro.tech.build.axion-release' version '1.18.16'
}
apply plugin: 'java'
apply plugin: 'pl.allegro.tech.build.axion-release'
java {
sourceCompatibility = JavaVersion.VERSION_11
}
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
}
}
scmVersion {
ignoreUncommittedChanges = true
tag {
prefix = 'v'
versionSeparator = ''
}
}
project.version = scmVersion.version
repositories {
mavenCentral()
}
dependencies {
pluginLibs group: 'org.freemarker', name: 'freemarker', version: '2.3.34'
implementation(group: 'org.rundeck', name: 'rundeck-core', version: '5.9.0-20250205')
}
// task to copy plugin libs to output/lib dir
tasks.register('copyToLib', Copy) {
into "$buildDir/output/lib"
from configurations.pluginLibs
}
jar {
//include contents of output dir
from "$buildDir/output"
manifest {
attributes 'Rundeck-Plugin-Name' : 'Slack Notification'
attributes 'Rundeck-Plugin-Description' : 'Sends Rundeck notification messages to a slack channel.'
attributes 'Rundeck-Plugin-Rundeck-Compatibility-Version': '2.8.2+'
attributes 'Rundeck-Plugin-Tags': 'java,notification,slack'
attributes 'Rundeck-Plugin-License': 'Apache 2.0'
attributes 'Rundeck-Plugin-Source-Link': 'https://github.com/rundeck-plugins/slack-incoming-webhook-plugin'
attributes 'Rundeck-Plugin-Target-Host-Compatibility': 'all'
attributes 'Rundeck-Plugin-Author': 'Rundeck, Inc.'
attributes 'Rundeck-Plugin-Version': '1.2', 'Rundeck-Plugin-Archive': 'true','Rundeck-Plugin-File-Version': "${project.version}"
//create space-separated list of pluginLibs
def libList = configurations.pluginLibs.collect{'lib/'+it.name}.join(' ')
attributes 'Rundeck-Plugin-Classnames': 'com.bitplaces.rundeck.plugins.slack.SlackNotificationPlugin', 'Rundeck-Plugin-Libs': "${libList}"
}
}
//set jar task to depend on copyToLib
jar.dependsOn(copyToLib)