Skip to content

Commit 8305762

Browse files
committed
Fix gradle
1 parent 4087a71 commit 8305762

File tree

8 files changed

+85
-71
lines changed

8 files changed

+85
-71
lines changed

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Framework/App.Ref/src/CompatibilitySuppressions.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<!-- https://learn.microsoft.com/dotnet/fundamentals/package-validation/diagnostic-ids -->
2+
<!-- https://learn.microsoft.com/en-us/dotnet/fundamentals/package-validation/diagnostic-ids -->
33
<Suppressions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
44
<Suppression>
55
<DiagnosticId>PKV004</DiagnosticId>

src/Framework/App.Runtime/src/CompatibilitySuppressions.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<!-- https://learn.microsoft.com/dotnet/fundamentals/package-validation/diagnostic-ids -->
2+
<!-- https://learn.microsoft.com/en-us/dotnet/fundamentals/package-validation/diagnostic-ids -->
33
<Suppressions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
44
<Suppression>
55
<DiagnosticId>PKV0001</DiagnosticId>

src/SignalR/clients/java/signalr/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ buildscript {
1212

1313
plugins {
1414
id 'java'
15-
id 'maven'
15+
id 'maven-publish'
1616
}
1717

1818
allprojects {
@@ -22,7 +22,7 @@ allprojects {
2222
// If we're run from outside MSBuild, just assign a bogus dev version.
2323
version project.findProperty('packageVersion') ?: "99.99.99-dev"
2424

25-
sourceCompatibility = 1.8
25+
sourceCompatibility = 9
2626

2727
repositories {
2828
mavenCentral()
Lines changed: 35 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
plugins {
22
id 'java'
3-
id 'maven'
3+
id 'maven-publish'
44
}
55

66
group 'com.microsoft.signalr'
@@ -15,46 +15,52 @@ dependencies {
1515
archivesBaseName = 'signalr'
1616

1717
task sourceJar(type: Jar) {
18-
classifier "sources"
18+
archiveClassifier = "sources"
1919
from sourceSets.main.allJava
2020
}
2121

2222
task javadocJar(type: Jar, dependsOn: javadoc) {
23-
classifier "javadoc"
23+
archiveClassifier = "javadoc"
2424
from javadoc.destinationDir
2525
}
2626

27-
task generatePOM {
28-
pom {
29-
project {
30-
artifactId 'signalr'
31-
inceptionYear '2018'
32-
description 'ASP.NET Core SignalR Client for Java applications'
33-
url 'https://github.com/dotnet/aspnetcore'
34-
name groupId + ':' + artifactId
35-
licenses {
36-
license {
37-
name 'MIT License'
38-
url 'https://opensource.org/licenses/MIT'
39-
distribution 'repo'
27+
publishing {
28+
publications {
29+
mavenJava(MavenPublication) {
30+
pom {
31+
artifactId = 'signalr'
32+
inceptionYear = '2018'
33+
description = 'ASP.NET Core SignalR Client for Java applications'
34+
url = 'https://github.com/dotnet/aspnetcore'
35+
name= groupId + ':' + artifactId
36+
licenses {
37+
license {
38+
name = 'MIT License'
39+
url = 'https://opensource.org/licenses/MIT'
40+
distribution = 'repo'
41+
}
4042
}
41-
}
42-
scm {
43-
connection 'scm:git:https://github.com/dotnet/aspnetcore.git'
44-
developerConnection 'scm:git:https://github.com/dotnet/aspnetcore.git'
45-
url 'https://github.com/dotnet/aspnetcore/tree/main'
46-
}
47-
developers {
48-
developer {
49-
id 'microsoft'
50-
name 'Microsoft'
43+
scm {
44+
connection = 'scm:git:https://github.com/dotnet/aspnetcore.git'
45+
developerConnection = 'scm:git:https://github.com/dotnet/aspnetcore.git'
46+
url = 'https://github.com/dotnet/aspnetcore/tree/main'
47+
}
48+
developers {
49+
developer {
50+
id = 'microsoft'
51+
name = 'Microsoft'
52+
}
5153
}
5254
}
5355
}
54-
}.writeTo("${buildDir}/libs/signalr-${project.version}.pom")
56+
}
57+
}
58+
59+
tasks.withType(GenerateMavenPom).all {
60+
destination = "${buildDir}/libs/signalr-${project.version}.pom"
5561
}
5662

57-
task createPackage(dependsOn: [jar,sourceJar,javadocJar,generatePOM])
63+
task createPackage(dependsOn: [jar,sourceJar,javadocJar])
5864

5965
task generateVersionClass {
6066
inputs.property "version", project.version
@@ -78,4 +84,5 @@ class Version {
7884
}
7985
}
8086

87+
createPackage.dependsOn 'generatePomFileForMavenJavaPublication'
8188
compileJava.dependsOn generateVersionClass
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionSha256Sum=23e7d37e9bb4f8dabb8a3ea7fdee9dd0428b9b1a71d298aefd65b11dccea220f
4-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip
3+
distributionSha256Sum=a4b4158601f8636cdeeab09bd76afb640030bb5b144aafe261a5e8af027dc612
4+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
55
zipStoreBase=GRADLE_USER_HOME
66
zipStorePath=wrapper/dists
Lines changed: 38 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,64 @@
11
plugins {
22
id 'java'
3-
id 'maven'
3+
id 'maven-publish'
44
}
55

66
group 'com.microsoft.signalr.messagepack'
77

88
dependencies {
99
implementation project(':core')
10-
compile 'org.msgpack:msgpack-core:0.8.20'
11-
compile 'org.msgpack:jackson-dataformat-msgpack:0.8.20'
10+
implementation 'org.msgpack:msgpack-core:0.8.20'
11+
implementation 'org.msgpack:jackson-dataformat-msgpack:0.8.20'
1212
}
1313

1414
archivesBaseName = 'signalr-messagepack'
1515

1616
task sourceJar(type: Jar) {
17-
classifier "sources"
17+
archiveClassifier = "sources"
1818
from sourceSets.main.allJava
1919
}
2020

2121
task javadocJar(type: Jar, dependsOn: javadoc) {
22-
classifier "javadoc"
22+
archiveClassifier = "javadoc"
2323
from javadoc.destinationDir
2424
}
2525

26-
task generatePOM {
27-
pom {
28-
project {
29-
artifactId 'signalr-messagepack'
30-
inceptionYear '2020'
31-
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'
26+
publishing {
27+
publications {
28+
mavenJava(MavenPublication) {
29+
pom {
30+
artifactId = 'signalr-messagepack'
31+
inceptionYear = '2020'
32+
description = 'MessagePack protocol implementation for ASP.NET Core SignalR Client for Java applications'
33+
url = 'https://github.com/dotnet/aspnetcore'
34+
name= groupId + ':' + artifactId
35+
licenses {
36+
license {
37+
name = 'MIT License'
38+
url = 'https://opensource.org/licenses/MIT'
39+
distribution = 'repo'
40+
}
3941
}
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'
42+
scm {
43+
connection = 'scm:git:https://github.com/dotnet/aspnetcore.git'
44+
developerConnection = 'scm:git:https://github.com/dotnet/aspnetcore.git'
45+
url = 'https://github.com/dotnet/aspnetcore/tree/main'
46+
}
47+
developers {
48+
developer {
49+
id = 'microsoft'
50+
name = 'Microsoft'
51+
}
5052
}
5153
}
5254
}
53-
}.writeTo("${buildDir}/libs/signalr-messagepack-${project.version}.pom")
55+
}
5456
}
5557

56-
task createPackage(dependsOn: [jar,sourceJar,javadocJar,generatePOM])
58+
tasks.withType(GenerateMavenPom).all {
59+
destination = "${buildDir}/libs/signalr-messagepack-${project.version}.pom"
60+
}
61+
62+
task createPackage(dependsOn: [jar,sourceJar,javadocJar])
63+
64+
createPackage.dependsOn 'generatePomFileForMavenJavaPublication'

src/SignalR/clients/java/signalr/test/build.gradle

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,12 @@ apply plugin: 'org.junit.platform.gradle.plugin'
22

33
dependencies {
44
implementation 'org.junit.jupiter:junit-jupiter-api:5.3.1'
5-
compile 'org.junit.jupiter:junit-jupiter-params:5.3.1'
6-
runtime 'org.junit.jupiter:junit-jupiter-engine:5.3.1'
5+
implementation 'org.junit.jupiter:junit-jupiter-params:5.3.1'
6+
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.3.1'
77
implementation 'com.google.code.gson:gson:2.8.5'
8-
compile 'ch.qos.logback:logback-classic:1.2.3'
8+
implementation 'ch.qos.logback:logback-classic:1.2.3'
99
implementation project(':core')
1010
implementation project(':messagepack')
11-
compile project(':messagepack')
1211
}
1312

1413
junitPlatform {

0 commit comments

Comments
 (0)