File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -67,6 +67,12 @@ def projectNamesToPublish = [
67
67
' objectbox-rxjava'
68
68
]
69
69
70
+ def hasSigningProperties () {
71
+ return (project. hasProperty(' signingKeyId' )
72
+ && project. hasProperty(' signingKeyFile' )
73
+ && project. hasProperty(' signingPassword' ))
74
+ }
75
+
70
76
configure(subprojects. findAll { projectNamesToPublish. contains(it. name) }) {
71
77
apply plugin : ' maven'
72
78
apply plugin : ' signing'
@@ -82,9 +88,7 @@ configure(subprojects.findAll { projectNamesToPublish.contains(it.name) }) {
82
88
}
83
89
84
90
signing {
85
- if (project. hasProperty(' signingKeyId' )
86
- && project. hasProperty(' signingKeyFile' )
87
- && project. hasProperty(' signingPassword' )) {
91
+ if (hasSigningProperties()) {
88
92
String signingKey = new File (signingKeyFile). text
89
93
useInMemoryPgpKeys(signingKeyId, signingKey, signingPassword)
90
94
sign configurations. archives
@@ -107,6 +111,10 @@ configure(subprojects.findAll { projectNamesToPublish.contains(it.name) }) {
107
111
} else if (preferredRepo != null
108
112
&& project. hasProperty(' preferredUsername' )
109
113
&& project. hasProperty(' preferredPassword' )) {
114
+ if (! hasSigningProperties()) {
115
+ throw new InvalidUserDataException (" To upload to repo signing is required." )
116
+ }
117
+
110
118
configuration = configurations. deployerJars
111
119
112
120
// replace placeholders
You can’t perform that action at this time.
0 commit comments