forked from rundeck-plugins/git-plugin
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
90 lines (75 loc) · 2.76 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
plugins {
id 'pl.allegro.tech.build.axion-release' version '1.11.0'
}
group 'com.rundeck'
ext.rundeckPluginVersion = '1.2'
ext.pluginClassNames='com.rundeck.plugin.GitResourceModelFactory,com.rundeck.plugin.GitCloneWorkflowStep'
ext.pluginName = 'Git Plugin'
ext.pluginDescription = 'This is a git plugin (based on Jgit) which contain a Resource model and worflow steps'
scmVersion {
ignoreUncommittedChanges = true
tag {
prefix = ''
versionSeparator = ''
def origDeserialize=deserialize
//apend .0 to satisfy semver if the tag version is only X.Y
deserialize = { config, position, tagName ->
def orig = origDeserialize(config, position, tagName)
if (orig.split('\\.').length < 3) {
orig += ".0"
}
orig
}
}
}
project.version = scmVersion.version
apply plugin: 'groovy'
apply plugin: 'java'
repositories {
mavenCentral()
}
configurations {
pluginLibs
compile {
extendsFrom pluginLibs
}
}
dependencies {
compile 'org.codehaus.groovy:groovy-all:2.3.11'
testCompile group: 'junit', name: 'junit', version: '4.12'
compile group: 'org.rundeck', name: 'rundeck-core', version: '2.11.4'
compile 'org.slf4j:slf4j-api:1.7.30'
pluginLibs( 'org.eclipse.jgit:org.eclipse.jgit:4.4.0.201606070830-r') {
exclude module: 'slf4j-api'
exclude module: 'jsch'
exclude module: 'commons-logging'
}
testCompile "org.codehaus.groovy:groovy-all:2.3.7"
testCompile "org.spockframework:spock-core:0.7-groovy-2.0"
testCompile "cglib:cglib-nodep:2.2.2"
testCompile 'org.objenesis:objenesis:1.4'
}
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' : pluginName
attributes 'Rundeck-Plugin-Description' : pluginDescription
attributes 'Rundeck-Plugin-Rundeck-Compatibility-Version': '2.11.4+'
attributes 'Rundeck-Plugin-Tags': 'java,workflow steps,resource model'
attributes 'Rundeck-Plugin-License': 'Apache 2.0'
attributes 'Rundeck-Plugin-Source-Link': 'https://github.com/rundeck-plugins/git-plugin'
attributes 'Rundeck-Plugin-Target-Host-Compatibility': 'all'
attributes 'Rundeck-Plugin-Author': 'Rundeck, Inc.'
attributes 'Rundeck-Plugin-Classnames': pluginClassNames
attributes 'Rundeck-Plugin-File-Version': project.version
attributes 'Rundeck-Plugin-Version': rundeckPluginVersion
attributes 'Rundeck-Plugin-Archive': 'true'
attributes 'Rundeck-Plugin-Libs': "${libList}"
}
dependsOn(copyToLib)
}