File tree Expand file tree Collapse file tree 1 file changed +13
-11
lines changed
Expand file tree Collapse file tree 1 file changed +13
-11
lines changed Original file line number Diff line number Diff line change @@ -123,17 +123,19 @@ publishing {
123123 }
124124 }
125125
126- if (! project.version.toString().endsWith(" SNAPSHOT" )) {
127- maven {
128- name = " Local"
129- url = uri(project.layout.buildDirectory.dir(" staging-deploy" ))
130- }
131- } else {
132- maven {
133- url = uri(" https://central.sonatype.com/repository/maven-snapshots/" )
134- credentials {
135- username = System .getenv(" MAVEN_CENTRAL_USERNAME" )
136- password = System .getenv(" MAVEN_CENTRAL_PASSWORD" )
126+ beforeEvaluate {
127+ if (! project.version.toString().endsWith(" SNAPSHOT" )) {
128+ maven {
129+ name = " Local"
130+ url = uri(project.layout.buildDirectory.dir(" staging-deploy" ))
131+ }
132+ } else {
133+ maven {
134+ url = uri(" https://central.sonatype.com/repository/maven-snapshots/" )
135+ credentials {
136+ username = System .getenv(" MAVEN_CENTRAL_USERNAME" )
137+ password = System .getenv(" MAVEN_CENTRAL_PASSWORD" )
138+ }
137139 }
138140 }
139141 }
You can’t perform that action at this time.
0 commit comments