forked from ValFadeev/rundeck-vault-plugin
-
Notifications
You must be signed in to change notification settings - Fork 11
/
build.gradle
99 lines (82 loc) · 3.5 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
plugins {
id 'pl.allegro.tech.build.axion-release' version '1.14.2'
id 'groovy'
}
ext.rundeckVersion='3.0.2-20180803'
defaultTasks 'clean','build'
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'pl.allegro.tech.build.axion-release'
apply plugin: 'groovy'
sourceCompatibility = 1.8
ext.rundeckPluginVersion= '1.2'
/**
* Set this to a comma-separated list of full classnames of your implemented Rundeck
* plugins.
*/
ext.pluginClassNames='io.github.valfadeev.rundeck.plugin.vault.VaultStoragePlugin'
scmVersion {
ignoreUncommittedChanges = true
tag {
prefix = ''
versionSeparator = ''
}
}
project.version = scmVersion.version
repositories {
mavenCentral()
}
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
}
}
dependencies {
// add any third-party jar dependencies you wish to include in the plugin
// using the `pluginLibs` configuration as shown here:
pluginLibs group: 'com.bettercloud', name: 'vault-java-driver', version: '5.1.0', ext: 'jar'
//the compile dependency won't add the rundeck-core jar to the plugin contents
implementation group: 'org.rundeck', name: 'rundeck-core', version: rundeckVersion
testImplementation(
[group: 'junit', name: 'junit', version: '4.12', ext: 'jar'],
[group: 'org.hamcrest', name: 'hamcrest-core', version: '1.3', ext: 'jar'],
[group: 'org.hamcrest', name: 'hamcrest-library', version: '1.3', ext: 'jar'],
[group: 'org.mockito', name: 'mockito-core', version: '4.0.0', ext: 'jar'],
[group: 'net.bytebuddy', name: 'byte-buddy', version: '1.12.1'],
[group: 'net.bytebuddy', name: 'byte-buddy-agent', version: '1.12.1'],
[group: 'org.objenesis', name: 'objenesis', version: '3.2']
)
testImplementation "org.codehaus.groovy:groovy-all:2.4.15"
testImplementation "org.spockframework:spock-core:1.0-groovy-2.4"
testImplementation "cglib:cglib-nodep:2.2.2"
}
// 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-Name' : 'Vault Storage'
attributes 'Rundeck-Plugin-Description' : 'This is a Storage Backend plugin for storing Key Store data in Vault.'
attributes 'Rundeck-Plugin-Rundeck-Compatibility-Version': '3.0.2+'
attributes 'Rundeck-Plugin-Tags': 'java,storage,vault'
attributes 'Rundeck-Plugin-License': 'MIT'
attributes 'Rundeck-Plugin-Source-Link': 'https://github.com/rundeck-plugins/vault-storage'
attributes 'Rundeck-Plugin-Target-Host-Compatibility': 'all'
attributes 'Rundeck-Plugin-Author': 'Rundeck, Inc.'
attributes 'Rundeck-Plugin-Classnames': pluginClassNames
attributes 'Rundeck-Plugin-File-Version': version
attributes 'Rundeck-Plugin-Version': rundeckPluginVersion, 'Rundeck-Plugin-Archive': 'true'
attributes 'Rundeck-Plugin-Libs': "${libList}"
attributes 'Main-Class': "io.github.valfadeev.rundeck.plugin.vault.VaultStoragePlugin"
attributes 'Class-Path': "${libList} lib/rundeck-core-${rundeckVersion}.jar"
}
}
//set jar task to depend on copyToLib
jar.dependsOn(copyToLib)