-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
54 lines (40 loc) · 1.27 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
apply plugin: "groovy"
sourceCompatibility = 1.8
targetCompatibility = 1.8
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
}
}
repositories {
mavenCentral()
}
dependencies {
compile('org.rundeck:rundeck-core:2.6.11')
compile('org.codehaus.groovy:groovy-all:2.4.7')
pluginLibs 'org.influxdb:influxdb-java:2.5'
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"
def libList = configurations.pluginLibs.collect { "lib/" + it.name }.join(" ")
manifest {
attributes(
"Rundeck-Plugin-Version": "1.1",
"Rundeck-Plugin-File-Version": version,
"Rundeck-Plugin-Archive": "true",
"Rundeck-Plugin-Classnames": "com.grafjo.rundeck.plugin.influxdb.annotation.InfluxDBAnnotationStep",
"Rundeck-Plugin-Libs": "${libList}"
)
}
}
//set jar task to depend on copyToLib
jar.dependsOn(copyToLib)