File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,8 @@ version '1.1.2'
11
11
sourceCompatibility = 1.8
12
12
targetCompatibility = 1.8
13
13
14
+ def snapshotVersion = version. endsWith(' -SNAPSHOT' ) || version. endsWith(' .SNAPSHOT' )
15
+
14
16
configurations {
15
17
compileOnly {
16
18
extendsFrom annotationProcessor
@@ -147,7 +149,7 @@ publishing {
147
149
repositories {
148
150
maven {
149
151
name = ' sonatype'
150
- if (version . endsWith( ' -SNAPSHOT ' ) || version . endsWith( ' .SNAPSHOT ' ) ) {
152
+ if (snapshotVersion ) {
151
153
url = ' https://oss.sonatype.org/content/repositories/snapshots'
152
154
} else {
153
155
url = ' https://oss.sonatype.org/service/local/staging/deploy/maven2'
@@ -171,3 +173,7 @@ publishing {
171
173
signing {
172
174
sign publishing. publications. maven
173
175
}
176
+
177
+ tasks. publishMavenPublicationToGithubRepository. configure {
178
+ onlyIf { ! snapshotVersion }
179
+ }
You can’t perform that action at this time.
0 commit comments