@@ -28,7 +28,7 @@ apply plugin: 'com.github.johnrengelman.shadow'
2828defaultTasks ' clean' ' build' ' shadowJar' ' install' 
2929
3030group =  ' uk.co.real-logic' 
31- version =  ' 1.1-RC2-SNAPSHOT ' 
31+ version =  ' 1.1-RC2' 
3232ext. isReleaseVersion =  ! version. endsWith(" SNAPSHOT" 
3333
3434ext  {
@@ -177,11 +177,6 @@ jar {
177177 manifest. attributes(' Main-Class' ' uk.co.real_logic.sbe.SbeTool' 
178178}
179179
180- shadowJar  {
181-  baseName =  ' sbe-all' 
182-  classifier =  ' ' 
183- }
184- 
185180task sourcesJar (type : Jar ) {
186181 classifier =  ' sources' 
187182 from sourceSets. main. allSource
@@ -199,6 +194,58 @@ signing {
199194
200195artifacts  {
201196 archives sourcesJar, javadocJar
197+  shadow sourcesJar, javadocJar
198+ }
199+ 
200+ shadowJar  {
201+  baseName =  ' sbe-all' 
202+  classifier =  ' ' 
203+ }
204+ 
205+ def  projectPom =  {
206+  name =  ' sbe' 
207+  packaging =  ' jar' 
208+  //  optionally artifactId can be defined here
209+  description =  ' FIX/SBE - OSI layer 6 presentation for encoding and decoding application messages in binary format for low-latency applications' 
210+  url =  ' https://github.com/real-logic/simple-binary-encoding' 
211+ 
212+  scm {
213+  connection =  ' scm:git:github.com/real-logic/simple-binary-encoding.git' 
214+  developerConnection =  ' scm:git:github.com/real-logic/simple-binary-encoding.git' 
215+  url =  ' github.com/real-logic/simple-binary-encoding.git' 
216+  }
217+ 
218+  licenses {
219+  license {
220+  name =  ' The Apache License, Version 2.0' 
221+  url =  ' http://www.apache.org/licenses/LICENSE-2.0.txt' 
222+  }
223+  }
224+ 
225+  developers {
226+  developer {
227+  id =  ' tmontgomery' 
228+  name =  ' Todd L. Montgomery' 
229+  email =  ' tmont@nard.net' 
230+  url =  ' https://github.com/tmontgomery' 
231+  }
232+  developer {
233+  id =  ' mjpt777' 
234+  name =  ' Martin Thompson' 
235+  email =  ' mjpt777@gmail.com' 
236+  url =  ' https://github.com/mjpt777' 
237+  }
238+  developer {
239+  id =  ' odeheurles' 
240+  name =  ' Olivier Deheurles' 
241+  email =  ' olivier@weareadaptive.com' 
242+  url =  ' https://github.com/odeheurles' 
243+  }
244+  }
245+ }
246+ 
247+ install  {
248+  repositories. mavenInstaller. pom. project(projectPom)
202249}
203250
204251uploadArchives  {
@@ -214,47 +261,25 @@ uploadArchives {
214261 authentication(userName : ossrhUsername, password : ossrhPassword)
215262 }
216263
217-  pom. project {
218-  name =  ' sbe' 
219-  packaging =  ' jar' 
220-  //  optionally artifactId can be defined here
221-  description =  ' FIX/SBE - OSI layer 6 presentation for encoding and decoding application messages in binary format for low-latency applications' 
222-  url =  ' https://github.com/real-logic/simple-binary-encoding' 
223- 
224-  scm {
225-  connection =  ' scm:git:github.com/real-logic/simple-binary-encoding.git' 
226-  developerConnection =  ' scm:git:github.com/real-logic/simple-binary-encoding.git' 
227-  url =  ' github.com/real-logic/simple-binary-encoding.git' 
228-  }
229- 
230-  licenses {
231-  license {
232-  name =  ' The Apache License, Version 2.0' 
233-  url =  ' http://www.apache.org/licenses/LICENSE-2.0.txt' 
234-  }
235-  }
236- 
237-  developers {
238-  developer {
239-  id =  ' tmontgomery' 
240-  name =  ' Todd L. Montgomery' 
241-  email =  ' tmont@nard.net' 
242-  url =  ' https://github.com/tmontgomery' 
243-  }
244-  developer {
245-  id =  ' mjpt777' 
246-  name =  ' Martin Thompson' 
247-  email =  ' mjpt777@gmail.com' 
248-  url =  ' https://github.com/mjpt777' 
249-  }
250-  developer {
251-  id =  ' odeheurles' 
252-  name =  ' Olivier Deheurles' 
253-  email =  ' olivier@weareadaptive.com' 
254-  url =  ' https://github.com/odeheurles' 
255-  }
256-  }
264+  pom. project(projectPom)
265+  }
266+  }
267+ }
268+ 
269+ uploadShadow  {
270+  repositories {
271+  mavenDeployer {
272+  beforeDeployment { MavenDeployment  deployment  ->  signing. signPom(deployment) }
273+ 
274+  repository(url : " https://oss.sonatype.org/service/local/staging/deploy/maven2/" 
275+  authentication(userName : ossrhUsername, password : ossrhPassword)
257276 }
277+ 
278+  snapshotRepository(url : " https://oss.sonatype.org/content/repositories/snapshots/" 
279+  authentication(userName : ossrhUsername, password : ossrhPassword)
280+  }
281+ 
282+  pom. project(projectPom)
258283 }
259284 }
260285}
0 commit comments