File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -34,6 +34,8 @@ intellij {
3434}
3535version ' 1.0.0'
3636
37+ ext. isReleaseVersion = ! version. endsWith(" SNAPSHOT" )
38+
3739dependencies {
3840 compile group : ' org.freemarker' , name : ' freemarker' , version : ' 2.3.25-incubating'
3941 compile ' com.alibaba.p3c:p3c-pmd:1.3.0'
@@ -46,11 +48,11 @@ uploadArchives {
4648 beforeDeployment { MavenDeployment deployment -> signing. signPom(deployment) }
4749
4850 repository(url : " https://oss.sonatype.org/service/local/staging/deploy/maven2/" ) {
49- authentication(userName : ossrhUsername, password : ossrhPassword)
51+ authentication(userName : findProperty( ' ossrhUsername' ) , password : findProperty( ' ossrhPassword' ) )
5052 }
5153
5254 snapshotRepository(url : " https://oss.sonatype.org/content/repositories/snapshots/" ) {
53- authentication(userName : ossrhUsername, password : ossrhPassword)
55+ authentication(userName : findProperty( ' ossrhUsername' ) , password : findProperty( ' ossrhPassword' ) )
5456 }
5557
5658 pom. project {
@@ -90,5 +92,8 @@ uploadArchives {
9092}
9193
9294signing {
95+ required {
96+ isReleaseVersion && gradle. taskGraph. hasTask(" uploadArchives" )
97+ }
9398 sign configurations. archives
94- }
99+ }
You can’t perform that action at this time.
0 commit comments