-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
76 lines (62 loc) · 2.09 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
plugins {
id 'groovy'
id 'java'
}
version = '0.1.0'
defaultTasks 'clean','build'
apply plugin: 'java'
apply plugin: 'groovy'
apply plugin: 'idea'
sourceCompatibility = 1.8
ext.rundeckPluginVersion= '2.0'
ext.rundeckVersion= '3.0.x'
ext.pluginClassNames='com.plugin.example.JobLifeCycleApiExample'
repositories {
mavenLocal()
mavenCentral()
maven {
url "https://rundeck.bintray.com/rundeck-maven"
}
}
configurations{
//declare custom pluginLibs configuration to include only libs for this plugin
pluginLibs
//declare compile to extend from pluginLibs so it inherits the dependencies
compile{
extendsFrom pluginLibs
}
}
dependencies {
compile 'org.rundeck:rundeck-core:3.2.0-20191218'
pluginLibs "org.rundeck.api:rd-api-client:1.1.7"
testCompile 'junit:junit:4.12'
testCompile "org.codehaus.groovy:groovy-all:2.4.15"
testCompile "org.spockframework:spock-core:1.0-groovy-2.4"
}
// task to copy plugin libs to output/lib dir
task copyToLib(type: Copy) {
into "$buildDir/output/lib"
from configurations.pluginLibs
}
jar {
from "$buildDir/output"
manifest {
def libList = configurations.pluginLibs.collect{'lib/'+it.name}.join(' ')
attributes 'Rundeck-Plugin-Classnames': pluginClassNames
attributes 'Rundeck-Plugin-File-Version': version
attributes 'Rundeck-Plugin-Name': 'job-lifecycle-api-example'
attributes 'Rundeck-Plugin-Description': 'Provide a short description of your plugin here.'
attributes 'Rundeck-Plugin-Rundeck-Compatibility-Version': '3.x'
attributes 'Rundeck-Plugin-Tags': 'java,WorkflowStep'
attributes 'Rundeck-Plugin-License': 'Apache 2.0'
attributes 'Rundeck-Plugin-Source-Link': 'Please put the link to your source repo here'
attributes 'Rundeck-Plugin-Target-Host-Compatibility': 'all'
attributes 'Rundeck-Plugin-Version': rundeckPluginVersion
attributes 'Rundeck-Plugin-Archive': 'true'
attributes 'Rundeck-Plugin-Libs': "${libList}"
}
dependsOn(copyToLib)
}
wrapper {
gradleVersion = '4.4.1'
}