-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.gradle
47 lines (39 loc) · 1.31 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
apply plugin: 'java'
sourceCompatibility = 1.6
project.version = "0.7-proxy"
defaultTasks 'clean', 'build'
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 {
pluginLibs group: 'org.freemarker', name: 'freemarker', version: '2.3.20'
compile(group:'org.rundeck', name: 'rundeck-core', version: '2.10.6')
}
// task to copy plugin libs to output/lib dir
task copyToLib(type: Copy) {
into "$buildDir/output/lib"
from configurations.pluginLibs
}
jar {
//include contents of output dir
from "$buildDir/output"
manifest {
attributes 'Rundeck-Plugin-Version': '1.1', '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.team.TeamNotificationPlugin', 'Rundeck-Plugin-Libs': "${libList}"
}
}
//set jar task to depend on copyToLib
jar.dependsOn(copyToLib)
task wrapper(type: Wrapper) {
gradleVersion = '1.10'
}