-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
56 lines (48 loc) · 1.67 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
defaultTasks 'clean', 'build'
ext.pluginName = 'rundeck-ui-mods'
ext.pluginAuthor = 'Trevor Highfill'
ext.pluginBuildDate = new Date().format("yyyy-MM-dd'T'HH:mm:ssX")
ext.pluginVersion = '1.0.0'
ext.pluginUrl = 'https://github.com/theque5t/rundeck-ui-mods'
ext.pluginBaseName = "$project.name"
ext.pluginFileName = ext.pluginBaseName + '-' + ext.pluginVersion + '-plugin'
ext.pluginZipName = ext.pluginFileName + '.zip'
task createPluginRootDir{
mkdir "${buildDir}/${project.ext.pluginFileName}"
}
task copyPlugin (dependsOn: 'createPluginRootDir', type: Copy){
from("${projectDir}") {
include 'plugin.yaml'
expand(pluginName: "${project.ext.pluginName}",
pluginAuthor: "${project.ext.pluginAuthor}",
pluginBuildDate: "${project.ext.pluginBuildDate}",
pluginVersion: "${project.ext.pluginVersion}",
pluginUrl: "${project.ext.pluginUrl}")
}
from (fileTree(dir: "${projectDir}")){
exclude('.settings')
exclude('.vscode')
exclude('.gitignore')
exclude('.project')
exclude('build')
exclude('docs')
exclude('plugin.yaml')
exclude('README.md')
exclude('**/*.gradle')
}
into "${buildDir}/${project.ext.pluginFileName}"
}
task zipPlugin(dependsOn: 'copyPlugin', type: Zip){
from fileTree(dir: "${buildDir}")
exclude('**/*.zip')
archiveName "${project.ext.pluginZipName}"
destinationDir(file("${buildDir}"))
}
task cleanBuildExcess(dependsOn: 'zipPlugin', type: Delete){
delete "${buildDir}/${project.ext.pluginFileName}"
}
task build(dependsOn: 'cleanBuildExcess'){
}
task clean(type: Delete){
delete "${buildDir}"
}