@@ -6,7 +6,7 @@ ext.set('signing.password', findProperty('signing.password') ?: System.getenv('S
6
6
def javaComponent = components. named(' java' )
7
7
publishing {
8
8
publications {
9
- register(' grailsMailPlugin ' , MavenPublication ) {
9
+ register(' grailsPlugin ' , MavenPublication ) {
10
10
from javaComponent. get()
11
11
versionMapping {
12
12
usage(' java-api' ) { fromResolutionOf(' runtimeClasspath' ) }
@@ -89,16 +89,16 @@ publishing {
89
89
repositories {
90
90
maven {
91
91
credentials {
92
- username = findProperty( ' artifactoryPublishUsername ' ) ?: ' '
93
- password = findProperty( ' artifactoryPublishPassword ' ) ?: ' '
92
+ username = System . getenv( ' MAVEN_PUBLISH_USERNAME ' )
93
+ password = System . getenv( ' MAVEN_PUBLISH_PASSWORD ' )
94
94
}
95
- url = uri(' https://repo.grails.org/grails/plugins3-snapshots-local ' )
95
+ url = uri(System . getenv( ' MAVEN_PUBLISH_URL ' ) ?: ' ' )
96
96
}
97
97
}
98
98
}
99
99
}
100
100
101
- def mavenPublication = extensions. findByType(PublishingExtension ). publications. named(' grailsMailPlugin ' )
101
+ def mavenPublication = extensions. findByType(PublishingExtension ). publications. named(' grailsPlugin ' )
102
102
tasks. withType(Sign ). configureEach {
103
103
onlyIf { isReleaseVersion }
104
104
}
@@ -111,15 +111,12 @@ afterEvaluate {
111
111
112
112
if (isReleaseVersion) {
113
113
nexusPublishing {
114
- String sonatypeUsername = findProperty(' sonatypeUsername' ) ?: ' '
115
- String sonatypePassword = findProperty(' sonatypePassword' ) ?: ' '
116
- String sonatypeStagingProfileId = findProperty(' sonatypeStagingProfileId' ) ?: ' '
117
114
repositories {
118
115
sonatype {
119
- nexusUrl = uri(' https://s01.oss.sonatype.org/service/local/ ' )
120
- username = sonatypeUsername
121
- password = sonatypePassword
122
- stagingProfileId = sonatypeStagingProfileId
116
+ nexusUrl = uri(System . getenv( ' NEXUS_PUBLISH_URL ' ) )
117
+ username = System . getenv( ' NEXUS_PUBLISH_USERNAME ' )
118
+ password = System . getenv( ' NEXUS_PUBLISH_PASSWORD ' )
119
+ stagingProfileId = System . getenv( ' NEXUS_PUBLISH_STAGING_PROFILE_ID ' )
123
120
}
124
121
}
125
122
}
0 commit comments