1
1
plugins {
2
- id ' pl.allegro.tech.build.axion-release' version ' 1.17.2'
3
- id ' maven-publish'
2
+ id ' java'
3
+ id ' groovy'
4
+ id ' idea'
5
+ alias(libs. plugins. axionRelease)
6
+ alias(libs. plugins. nexusPublish)
4
7
}
5
8
6
- group = ' com.github. rundeck- plugins'
9
+ group = ' org. rundeck. plugins'
7
10
11
+ ext. pluginName = ' Ansible Integration'
12
+ ext. publishDescription = ' This plugin brings basic Ansible support to Rundeck. It imports hosts from Ansible\' s inventory, including a bunch of facts, and can run modules and playbooks. There is also a node executor and file copier for your project.'
13
+ ext. publishName = " Ansible Plugin ${ project.version} "
14
+ ext. githubSlug = ' rundeck-plugins/ansible-plugin'
15
+ ext. developers = [
16
+ [id : ' gschueler' , name : ' Greg Schueler' , email : ' greg@rundeck.com' ],
17
+ [id : ' daisuke-yoshimoto' , name : ' Daisuke Yoshimoto' , email : ' yoshimoto@gmail.com' ]
18
+ ]
8
19
ext. rundeckPluginVersion = ' 1.2'
9
20
ext. pluginClassNames = [
10
- ' com.rundeck.plugins.ansible.plugin.AnsibleResourceModelSourceFactory' ,
11
- ' com.rundeck.plugins.ansible.plugin.AnsibleNodeExecutor' ,
12
- ' com.rundeck.plugins.ansible.plugin.AnsibleFileCopier' ,
13
- ' com.rundeck.plugins.ansible.plugin.AnsiblePlaybookWorkflowStep' ,
14
- ' com.rundeck.plugins.ansible.plugin.AnsiblePlaybookInlineWorkflowStep' ,
15
- ' com.rundeck.plugins.ansible.plugin.AnsibleModuleWorkflowStep' ,
16
- ' com.rundeck.plugins.ansible.plugin.AnsiblePlaybookWorflowNodeStep' ,
17
- ' com.rundeck.plugins.ansible.plugin.AnsiblePlaybookInlineWorkflowNodeStep' ,
18
- ' com.rundeck.plugins.ansible.logging.AnsibleSetStatsFilterPlugin' ,
19
- ' com.rundeck.plugins.ansible.plugin.AnsiblePluginGroup'
21
+ ' com.rundeck.plugins.ansible.plugin.AnsibleResourceModelSourceFactory' ,
22
+ ' com.rundeck.plugins.ansible.plugin.AnsibleNodeExecutor' ,
23
+ ' com.rundeck.plugins.ansible.plugin.AnsibleFileCopier' ,
24
+ ' com.rundeck.plugins.ansible.plugin.AnsiblePlaybookWorkflowStep' ,
25
+ ' com.rundeck.plugins.ansible.plugin.AnsiblePlaybookInlineWorkflowStep' ,
26
+ ' com.rundeck.plugins.ansible.plugin.AnsibleModuleWorkflowStep' ,
27
+ ' com.rundeck.plugins.ansible.plugin.AnsiblePlaybookWorflowNodeStep' ,
28
+ ' com.rundeck.plugins.ansible.plugin.AnsiblePlaybookInlineWorkflowNodeStep' ,
29
+ ' com.rundeck.plugins.ansible.logging.AnsibleSetStatsFilterPlugin' ,
30
+ ' com.rundeck.plugins.ansible.plugin.AnsiblePluginGroup'
20
31
]. join(' ,' )
21
32
22
- apply plugin : ' java'
23
- apply plugin : ' groovy'
24
- sourceCompatibility = 1.11
25
-
26
33
scmVersion {
27
- ignoreUncommittedChanges = false
28
34
tag {
29
35
prefix = ' v'
30
36
versionSeparator = ' '
31
37
}
38
+ ignoreUncommittedChanges = false
32
39
}
33
40
34
- version = scmVersion. version
41
+ allprojects {
42
+ project. version = scmVersion. version
43
+ apply from : " ${ rootDir} /gradle/java.gradle"
44
+ }
35
45
36
46
repositories {
37
- mavenCentral()
38
- mavenLocal()
47
+ mavenCentral()
39
48
}
40
49
41
50
configurations {
42
- pluginLibs
51
+ pluginLibs
43
52
44
- implementation {
45
- extendsFrom pluginLibs
46
- }
53
+ implementation {
54
+ extendsFrom pluginLibs
55
+ }
47
56
}
48
57
49
58
dependencies {
50
- pluginLibs ' com.google.code.gson:gson:2.10.1'
51
- implementation(' org.rundeck:rundeck-core:5.1.1-20240305' )
52
- implementation ' org.codehaus.groovy:groovy-all:3.0.15'
53
- pluginLibs group : ' com.fasterxml.jackson.core' , name : ' jackson-core' , version : ' 2.16.1'
54
- pluginLibs group : ' com.fasterxml.jackson.dataformat' , name : ' jackson-dataformat-yaml' , version : ' 2.16.1'
55
- implementation " org.yaml:snakeyaml:2.2"
59
+ pluginLibs libs. gson
60
+ implementation(libs. rundeckCore) {
61
+ exclude group : " com.google.guava"
62
+ }
63
+ implementation libs. groovyAll
64
+ pluginLibs libs. jacksonCore
65
+ pluginLibs libs. jacksonYaml
66
+ implementation libs. snakeyaml
56
67
57
- compileOnly ' org.projectlombok: lombok:1.18.30 '
58
- annotationProcessor ' org.projectlombok: lombok:1.18.30 '
68
+ compileOnly libs . lombok
69
+ annotationProcessor libs . lombok
59
70
60
- testCompileOnly ' org.projectlombok: lombok:1.18.30 '
61
- testAnnotationProcessor ' org.projectlombok: lombok:1.18.30 '
71
+ testCompileOnly libs . lombok
72
+ testAnnotationProcessor libs . lombok
62
73
63
- testImplementation " org.spockframework:spock-core:2.1-groovy-3.0"
74
+ testImplementation libs. bundles. testLibs
75
+ }
64
76
77
+ task copyToLib (type : Copy ) {
78
+ into " $buildDir /output/lib"
79
+ from configurations. pluginLibs
65
80
}
66
81
67
- tasks. withType(Test ). configureEach {
68
- useJUnitPlatform()
82
+ jar {
83
+ from " $buildDir /output"
84
+ manifest {
85
+ def libList = configurations. pluginLibs. collect{' lib/' + it. name}. join(' ' )
86
+ attributes ' Rundeck-Plugin-Version' : rundeckPluginVersion,
87
+ ' Rundeck-Plugin-Archive' : ' true' ,
88
+ ' Rundeck-Plugin-File-Version' : project. version,
89
+ ' Rundeck-Plugin-Name' : pluginName,
90
+ ' Rundeck-Plugin-Description' : publishDescription,
91
+ ' Rundeck-Plugin-Rundeck-Compatibility-Version' : ' 3.0.1+' ,
92
+ ' Rundeck-Plugin-Tags' : ' java,node executor,resource model,workflow step,ansible' ,
93
+ ' Rundeck-Plugin-License' : ' MIT' ,
94
+ ' Rundeck-Plugin-Source-Link' : ' https://github.com/rundeck-plugins/ansible-plugin' ,
95
+ ' Rundeck-Plugin-Target-Host-Compatibility' : ' all' ,
96
+ ' Rundeck-Plugin-Author' : ' David Kirstein' ,
97
+ ' Rundeck-Plugin-Classnames' : pluginClassNames,
98
+ ' Rundeck-Plugin-URL' : ' https://github.com/rundeck-plugins/ansible-plugin' ,
99
+ ' Rundeck-Plugin-Libs' : " ${ libList} " ,
100
+ ' Rundeck-Plugin-Date' : new Date (). format(" yyyy-MM-dd'T'HH:mm:ssX" )
101
+ }
102
+ dependsOn(copyToLib)
69
103
}
70
104
71
- task copyToLib (type : Copy ) {
72
- into " $buildDir /output/lib"
73
- from configurations. pluginLibs
105
+ test {
106
+ useJUnitPlatform()
74
107
}
75
108
76
- jar {
77
- from " $buildDir /output"
78
- manifest {
79
- def libList = configurations. pluginLibs. collect{' lib/' + it. name}. join(' ' )
80
- attributes ' Rundeck-Plugin-Name' : ' Ansible Integration'
81
- attributes ' Rundeck-Plugin-Description' : ' This plugin brings basic Ansible support to Rundeck. It imports hosts from Ansible\' s inventory, including a bunch of facts, and can run modules and playbooks. There is also a node executor and file copier for your project.'
82
- attributes ' Rundeck-Plugin-Rundeck-Compatibility-Version' : ' 3.0.1+'
83
- attributes ' Rundeck-Plugin-Tags' : ' java,node executor,resource model,workflow step,ansible'
84
- attributes ' Rundeck-Plugin-License' : ' MIT'
85
- attributes ' Rundeck-Plugin-Source-Link' : ' https://github.com/rundeck-plugins/ansible-plugin'
86
- attributes ' Rundeck-Plugin-Target-Host-Compatibility' : ' all'
87
- attributes ' Rundeck-Plugin-Author' : ' David Kirstein'
88
- attributes ' Rundeck-Plugin-Classnames' : pluginClassNames
89
- attributes ' Rundeck-Plugin-File-Version' : version
90
- attributes ' Rundeck-Plugin-Version' : rundeckPluginVersion
91
- attributes ' Rundeck-Plugin-Archive' : ' true'
92
- attributes ' Rundeck-Plugin-Libs' : " ${ libList} "
93
- attributes ' Rundeck-Plugin-URL' : ' https://github.com/rundeck-plugins/ansible-plugin'
94
- }
95
- dependsOn(copyToLib)
109
+ javadoc {
110
+ options. addStringOption(' Xdoclint:none' , ' -quiet' )
111
+ failOnError = false
96
112
}
97
113
98
- publishing {
99
- publications {
100
- maven(MavenPublication ) {
101
- artifactId = ' ansible-plugin'
102
- from components. java
114
+ nexusPublishing {
115
+ packageGroup = ' org.rundeck.plugins'
116
+ repositories {
117
+ sonatype()
103
118
}
104
- }
105
119
}
120
+
121
+ apply from : " ${ rootDir} /gradle/publishing.gradle"
0 commit comments