File tree 1 file changed +38
-0
lines changed
1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change 5
5
apply plugin : ' java'
6
6
apply plugin : ' groovy'
7
7
apply plugin : ' maven'
8
+ apply plugin : ' maven-publish'
9
+ apply plugin : ' signing'
8
10
9
11
group = ' org.jmonkeyengine'
10
12
version = jmeFullVersion
@@ -144,3 +146,39 @@ artifacts {
144
146
archives writeFullPom. outputs. files[0 ]
145
147
}
146
148
149
+ publishing {
150
+ publications {
151
+ maven(MavenPublication ) {
152
+ artifact javadocJar
153
+ artifact sourcesJar
154
+ from components. java
155
+ version project. version
156
+ }
157
+ }
158
+ repositories {
159
+ maven {
160
+ name = ' Dist'
161
+ url = gradle. rootProject. projectDir. absolutePath + ' /dist/maven'
162
+ }
163
+ maven {
164
+ credentials {
165
+ username = gradle. rootProject. hasProperty(' ossrhUsername' ) ? ossrhUsername : ' Unknown user'
166
+ password = gradle. rootProject. hasProperty(' ossrhPassword' ) ? ossrhPassword : ' Unknown password'
167
+ }
168
+ name = ' OSSRH'
169
+ url = ' https://oss.sonatype.org/service/local/staging/deploy/maven2'
170
+ }
171
+ }
172
+ }
173
+
174
+ signing {
175
+ def signingKey = gradle. rootProject. findProperty(' signingKey' )
176
+ def signingPassword = gradle. rootProject. findProperty(' signingPassword' )
177
+ useInMemoryPgpKeys(signingKey, signingPassword)
178
+
179
+ sign configurations. archives
180
+ sign publishing. publications. maven
181
+ }
182
+ tasks. withType(Sign ) {
183
+ onlyIf { gradle. rootProject. hasProperty(' signingKey' ) }
184
+ }
You can’t perform that action at this time.
0 commit comments