-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle
110 lines (100 loc) · 3.75 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
100
101
102
103
104
105
106
107
108
109
110
plugins {
id 'groovy'
}
ext.rundeckPluginVersion = '1.2'
ext.pluginClassNames='org.rundeck.plugin.objectstore.ObjectStorePlugin'
ext.pluginName = 'Object Store Plugin'
ext.pluginDescription = 'Stores data in an Amazon S3 compliant object store'
project.version = '3.0.15'
configurations{
pluginLibs
//declare compile to extend from pluginLibs so it inherits the dependencies
compile {
extendsFrom pluginLibs
}
}
dependencies {
// Use the latest Groovy version for building this library
compile "org.codehaus.groovy:groovy-all:${groovyVersion}"
compile "org.rundeck:rundeck-core:3.0.10-20181220"
pluginLibs("io.minio:minio:5.0.1")
// Use the awesome Spock testing and specification framework
testCompile 'org.spockframework:spock-core:1.0-groovy-2.4'
}
repositories {
// Use jcenter for resolving your dependencies.
// You can declare any Maven/Ivy/file repository here.
jcenter()
mavenLocal()
}
task copyToLib(type: Copy) {
into "$buildDir/output/lib"
from configurations.pluginLibs
}
jar {
from "$buildDir/output"
manifest {
attributes 'Rundeck-Plugin-Classnames': pluginClassNames
attributes 'Rundeck-Plugin-Name': pluginName
attributes 'Rundeck-Plugin-Description': pluginDescription
attributes 'Rundeck-Plugin-Rundeck-Compatibility-Version': '3.0.10+'
attributes 'Rundeck-Plugin-Tags': 'java,storage,s3'
attributes 'Rundeck-Plugin-License': 'Apache 2.0'
attributes 'Rundeck-Plugin-Source-Link': 'https://github.com/rundeck-plugins/object-store-plugin'
attributes 'Rundeck-Plugin-Target-Host-Compatibility': 'all'
attributes 'Rundeck-Plugin-Author': 'Rundeck, Inc.'
attributes 'Rundeck-Plugin-File-Version': project.version
attributes 'Rundeck-Plugin-Version': rundeckPluginVersion
def libList = configurations.pluginLibs.collect { 'lib/' + it.name }.join(' ')
attributes 'Rundeck-Plugin-Libs': "${libList}"
}
}
//set jar task to depend on copyToLib
jar.dependsOn(copyToLib)
apply plugin: 'maven'
task('createPom').doLast {
pom {
project {
artifactId 'rundeck-object-store-plugin'
groupId "org.rundeck.plugins"
inceptionYear '2018'
packaging 'jar'
version version
name( 'Rundeck '+pluginName)
url 'http://rundeck.org'
licenses {
license {
name 'The Apache Software License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
distribution 'repo'
}
}
parent{
groupId 'com.dtolabs.rundeck'
artifactId "rundeck-bundled-plugins"
version(version)
}
build{
plugins{
plugin{
groupId 'org.apache.maven.plugins'
artifactId 'maven-jar-plugin'
version '2.3.2'
configuration{
archive{
manifestEntries{
'Rundeck-Plugin-Classnames'(pluginClassNames)
'Rundeck-Plugin-File-Version' version
'Rundeck-Plugin-Version' rundeckPluginVersion
'Rundeck-Plugin-Archive' 'true'
'Rundeck-Plugin-Name' pluginName
'Rundeck-Plugin-Description' pluginDescription
}
}
}
}
}
}
}
}.writeTo("pom.xml")
}