正在显示
2 个修改的文件
包含
11 行增加
和
3 行删除
| @@ -51,6 +51,8 @@ signing.keyId= | @@ -51,6 +51,8 @@ signing.keyId= | ||
| 51 | signing.password= | 51 | signing.password= |
| 52 | signing.secretKeyRingFile= | 52 | signing.secretKeyRingFile= |
| 53 | 53 | ||
| 54 | +RELEASE_SIGNING_ENABLED=true | ||
| 55 | + | ||
| 54 | # For instrumented tests. | 56 | # For instrumented tests. |
| 55 | # WARNING: Do not edit this and potentially commit to repo. | 57 | # WARNING: Do not edit this and potentially commit to repo. |
| 56 | # Instead, override in ~/.gradle/gradle.properties | 58 | # Instead, override in ~/.gradle/gradle.properties |
| @@ -47,6 +47,10 @@ def getRepositoryPassword() { | @@ -47,6 +47,10 @@ def getRepositoryPassword() { | ||
| 47 | return hasProperty('nexusPassword') ? nexusPassword : "" | 47 | return hasProperty('nexusPassword') ? nexusPassword : "" |
| 48 | } | 48 | } |
| 49 | 49 | ||
| 50 | +boolean getReleaseSigningEnabled() { | ||
| 51 | + return hasProperty('RELEASE_SIGNING_ENABLED') ? RELEASE_SIGNING_ENABLED.toBoolean() : true | ||
| 52 | +} | ||
| 53 | + | ||
| 50 | def configurePom(pom) { | 54 | def configurePom(pom) { |
| 51 | pom.name = POM_NAME | 55 | pom.name = POM_NAME |
| 52 | pom.packaging = POM_PACKAGING | 56 | pom.packaging = POM_PACKAGING |
| @@ -151,9 +155,11 @@ afterEvaluate { project -> | @@ -151,9 +155,11 @@ afterEvaluate { project -> | ||
| 151 | configurePom(publication.pom) | 155 | configurePom(publication.pom) |
| 152 | } | 156 | } |
| 153 | 157 | ||
| 154 | - signing { | ||
| 155 | - publishing.publications.all { publication -> | ||
| 156 | - sign publication | 158 | + if (getReleaseSigningEnabled()) { |
| 159 | + signing { | ||
| 160 | + publishing.publications.all { publication -> | ||
| 161 | + sign publication | ||
| 162 | + } | ||
| 157 | } | 163 | } |
| 158 | } | 164 | } |
| 159 | } | 165 | } |
-
请 注册 或 登录 后发表评论