@@ -5,52 +5,60 @@ plugins {
55
66group ' com.microsoft.signalr.messagepack' 
77
8+ java
9+ {
10+     withJavadocJar()
11+     withSourcesJar()
12+ }
13+ 
814dependencies  {
915    implementation project(' :core'  )
10-     compile  ' org.msgpack:msgpack-core:0.8.20' 
11-     compile  ' org.msgpack:jackson-dataformat-msgpack:0.8.20' 
16+     implementation  ' org.msgpack:msgpack-core:0.8.20' 
17+     implementation  ' org.msgpack:jackson-dataformat-msgpack:0.8.20' 
1218}
1319
14- archivesBaseName =  ' signalr-messagepack' 
15- 
16- task sourceJar (type : Jar ) {
17-     archiveClassifier " sources" 
18-     from sourceSets. main. allJava
20+ base  {
21+     archivesName =  ' signalr-messagepack' 
1922}
2023
21- task  javadocJar ( type :  Jar ,  dependsOn : javadoc)  {
22-     archiveClassifier  " javadoc " 
23-     from javadoc . destinationDir 
24- } 
24+ publishing  {
25+     publications { 
26+         release( MavenPublication ) { 
27+             from components . java 
2528
26- task generatePOM  {
27-     pom {
28-         project {
2929            artifactId ' signalr-messagepack' 
30-             inceptionYear ' 2020' 
3130            description ' MessagePack protocol implementation for ASP.NET Core SignalR Client for Java applications' 
32-             url ' https://github.com/dotnet/aspnetcore' 
33-             name groupId +  ' :'   +  artifactId
34-             licenses {
35-                 license {
36-                     name ' MIT License' 
37-                     url ' https://opensource.org/licenses/MIT' 
38-                     distribution ' repo' 
31+ 
32+             pom {
33+                 packaging =  ' jar' 
34+                 inceptionYear =  ' 2020' 
35+                 url =  ' https://github.com/dotnet/aspnetcore' 
36+                 name =  groupId +  ' :'   +  artifactId
37+                 licenses {
38+                     license {
39+                         name =  ' MIT License' 
40+                         url =  ' https://opensource.org/licenses/MIT' 
41+                         distribution =  ' repo' 
42+                     }
3943                }
40-             } 
41-             scm { 
42-                 connection  ' scm:git:https://github.com/dotnet/aspnetcore.git' 
43-                 developerConnection  ' scm:git: https://github.com/dotnet/aspnetcore.git ' 
44-                 url  ' https://github.com/dotnet/aspnetcore/tree/main ' 
45-             } 
46-             developers  {
47-                 developer { 
48-                     id  ' microsoft ' 
49-                     name  ' Microsoft ' 
44+                 scm { 
45+                     connection  =   ' scm:git:https://github.com/dotnet/aspnetcore.git ' 
46+                     developerConnection  =  ' scm:git:https://github.com/dotnet/aspnetcore.git' 
47+                     url  =   ' https://github.com/dotnet/aspnetcore/tree/main ' 
48+                 } 
49+                 developers { 
50+                     developer  {
51+                         id  =   ' microsoft ' 
52+                         name  =   ' Microsoft ' 
53+                     } 
5054                }
5155            }
5256        }
53-     }. writeTo( " ${ buildDir } /libs/signalr-messagepack- ${ project.version } .pom " ) 
57+     }
5458}
5559
56- task createPackage (dependsOn : [jar,sourceJar,javadocJar,generatePOM])
60+ tasks. withType(GenerateMavenPom ). all  {
61+     def  matcher =  name =~  / generatePomFileFor(\w +)Publication/ 
62+     def  publicationName =  matcher[0 ][1 ]
63+     destination =  layout. buildDirectory. file(" libs/signalr-messagepack-${ project.version}  .pom"  ). get(). asFile
64+ }
0 commit comments