Skip to content

Commit 9a2224a

Browse files
authored
fix build fail issue
1 parent 05e1ca9 commit 9a2224a

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

idea-plugin/p3c-common/build.gradle

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ intellij {
3434
}
3535
version '1.0.0'
3636

37+
ext.isReleaseVersion = !version.endsWith("SNAPSHOT")
38+
3739
dependencies {
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

9294
signing {
95+
required {
96+
isReleaseVersion && gradle.taskGraph.hasTask("uploadArchives")
97+
}
9398
sign configurations.archives
94-
}
99+
}

0 commit comments

Comments
 (0)