1- import org.gradle.api.tasks.testing.Test
2-
3- /*
4- * Copyright 2017 Rundeck, Inc. (http://rundeck.com)
5- *
6- * Licensed under the Apache License, Version 2.0 (the "License");
7- * you may not use this file except in compliance with the License.
8- * You may obtain a copy of the License at
9- *
10- * http://www.apache.org/licenses/LICENSE-2.0
11- *
12- * Unless required by applicable law or agreed to in writing, software
13- * distributed under the License is distributed on an "AS IS" BASIS,
14- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15- * See the License for the specific language governing permissions and
16- * limitations under the License.
17- */
18- plugins {
19- id ' pl.allegro.tech.build.axion-release' version ' 1.13.4'
1+ plugins {
2+ id ' java'
3+ id ' groovy'
4+ id ' idea'
5+ alias(libs. plugins. axionRelease)
6+ alias(libs. plugins. nexusPublish)
207}
218
22-
23- ext. rundeckPluginVersion = ' 1.2'
24- ext. pluginClassNames=
25- ' com.rundeck.plugins.aws.S3ResourceModelSource'
9+ group = ' org.rundeck.plugins'
10+ ext. pluginClassNames= ' com.rundeck.plugins.aws.S3ResourceModelSource'
2611ext. pluginName = ' S3 resource Model Source'
2712ext. pluginDescription = ' Use Amazon S3 to store resources model file.'
13+ ext. publishName = " S3 Resource Model Source ${ project.version} "
14+ ext. githubSlug = ' rundeck-plugins/aws-s3-model-source'
15+ ext. developers = [
16+ [
id :
' gschueler' ,
name :
' Greg Schueler' ,
email :
' [email protected] ' ]
17+ ]
2818
29- apply plugin : ' java'
30- apply plugin : ' groovy'
31-
32- sourceCompatibility = 1.8
33- targetCompatibility = 1.8
34-
35- repositories {
36- mavenCentral()
37- mavenLocal()
38- }
19+ ext. rundeckPluginVersion = ' 1.2'
3920
4021scmVersion {
4122 tag {
4223 prefix = ' v'
4324 versionSeparator = ' '
4425 }
26+ ignoreUncommittedChanges = true
4527}
46- version scmVersion. version
28+
29+ allprojects {
30+ project. version = scmVersion. version
31+ apply from : " ${ rootDir} /gradle/java.gradle"
32+ }
33+
4734configurations {
4835 pluginLibs
4936
@@ -52,22 +39,27 @@ configurations {
5239 }
5340}
5441
42+ repositories {
43+ mavenCentral()
44+ mavenLocal()
45+ }
46+
5547dependencies {
56- implementation group : ' org.rundeck' , name : ' rundeck-core' , version : ' 4.13.0-20230515'
57- implementation " org.slf4j:slf4j-api:1.7.30"
58- pluginLibs (' com.amazonaws:aws-java-sdk-s3:1.12.708' ) {
48+ implementation(libs. rundeckCore) {
49+ exclude group : " com.google.guava"
50+ }
51+ implementation libs. slf4jApi
52+
53+ pluginLibs(libs. awsSdkS3) {
5954 exclude group : " com.fasterxml.jackson.core"
6055 exclude group : " com.fasterxml.jackson.dataformat"
6156 }
62- pluginLibs ( ' com.amazonaws:aws-java-sdk-sts:1.11.743 ' ) {
57+ pluginLibs(libs . awsSdkSts ) {
6358 exclude group : " com.fasterxml.jackson.core"
6459 exclude group : " com.fasterxml.jackson.dataformat"
6560 }
6661
67- testImplementation " org.codehaus.groovy:groovy-all:3.0.9"
68- testImplementation " org.spockframework:spock-core:2.0-groovy-3.0"
69- testImplementation " cglib:cglib-nodep:2.2.2"
70- testImplementation ' org.objenesis:objenesis:1.4'
62+ testImplementation libs. bundles. testLibs
7163}
7264
7365task copyToLib (type : Copy ) {
@@ -88,14 +80,28 @@ jar {
8880 attributes ' Rundeck-Plugin-Target-Host-Compatibility' : ' all'
8981 attributes ' Rundeck-Plugin-Author' : ' Rundeck, Inc.'
9082 attributes ' Rundeck-Plugin-Classnames' : pluginClassNames
91- attributes ' Rundeck-Plugin-File-Version' : version
83+ attributes ' Rundeck-Plugin-File-Version' : project . version
9284 attributes ' Rundeck-Plugin-Version' : rundeckPluginVersion
9385 attributes ' Rundeck-Plugin-Archive' : ' true'
9486 attributes ' Rundeck-Plugin-Libs' : " ${ libList} "
9587 }
96- dependsOn(copyToLib)
9788}
9889
99- tasks. withType(Test ) {
90+ // set jar task to depend on copyToLib
91+ jar. dependsOn(copyToLib)
92+
93+ test {
10094 useJUnitPlatform()
101- }
95+ }
96+
97+ nexusPublishing {
98+ packageGroup = ' org.rundeck.plugins'
99+ repositories {
100+ sonatype {
101+ nexusUrl. set(uri(" https://ossrh-staging-api.central.sonatype.com/service/local/" ))
102+ snapshotRepositoryUrl. set(uri(" https://central.sonatype.com/repository/maven-snapshots/" ))
103+ }
104+ }
105+ }
106+
107+ apply from : " ${ rootDir} /gradle/publishing.gradle"
0 commit comments