|
1 | 1 | plugins { |
2 | 2 | id 'java' |
3 | | - id 'maven' |
| 3 | + id 'maven-publish' |
4 | 4 | } |
5 | 5 |
|
6 | 6 | group 'com.microsoft.signalr.messagepack' |
7 | 7 |
|
| 8 | +java |
| 9 | +{ |
| 10 | + withJavadocJar() |
| 11 | + withSourcesJar() |
| 12 | +} |
| 13 | + |
8 | 14 | dependencies { |
9 | 15 | 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' |
12 | 18 | } |
13 | 19 |
|
14 | | -archivesBaseName = 'signalr-messagepack' |
15 | | - |
16 | | -task sourceJar(type: Jar) { |
17 | | - classifier "sources" |
18 | | - from sourceSets.main.allJava |
| 20 | +base { |
| 21 | + archivesName = 'signalr-messagepack' |
19 | 22 | } |
20 | 23 |
|
21 | | -task javadocJar(type: Jar, dependsOn: javadoc) { |
22 | | - classifier "javadoc" |
23 | | - from javadoc.destinationDir |
24 | | -} |
| 24 | +publishing { |
| 25 | + publications { |
| 26 | + release(MavenPublication) { |
| 27 | + from components.java |
25 | 28 |
|
26 | | -task generatePOM { |
27 | | - pom { |
28 | | - project { |
29 | 29 | artifactId 'signalr-messagepack' |
30 | | - inceptionYear '2020' |
31 | 30 | 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 | + } |
39 | 43 | } |
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 | + } |
50 | 54 | } |
51 | 55 | } |
52 | 56 | } |
53 | | - }.writeTo("${buildDir}/libs/signalr-messagepack-${project.version}.pom") |
| 57 | + } |
54 | 58 | } |
55 | 59 |
|
56 | | -task createPackage(dependsOn: [jar,sourceJar,javadocJar,generatePOM]) |
| 60 | +tasks.withType(GenerateMavenPom).all { |
| 61 | + destination = layout.buildDirectory.file("libs/signalr-messagepack-${project.version}.pom").get().asFile |
| 62 | +} |
0 commit comments