Skip to content

Commit 83ec779

Browse files
committed
Restore publishing support.
1 parent 4ef88b8 commit 83ec779

File tree

3 files changed

+88
-2
lines changed

3 files changed

+88
-2
lines changed

gradle.properties

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,14 @@ servletAPIVersion = 6.0.0
22
connectorJVersion = 3.5.3
33
junitVersion = 5.13.4
44

5+
repositoryURL = https://ossrh-staging-api.central.sonatype.com/service/local/staging/deploy/maven2
6+
projectDescription = Lightweight REST for Java
7+
projectURL = https://github.com/HTTP-RPC/Kilo
8+
licenseName = The Apache License, Version 2.0
9+
licenseURL = https://www.apache.org/licenses/LICENSE-2.0.txt
10+
developerName = Greg Brown
11+
developerEmail = [email protected]
12+
scmConnection = scm:git:git://github.com/HTTP-RPC/Kilo.git
13+
scmURL = https://github.com/HTTP-RPC/Kilo
14+
515
org.gradle.configuration-cache = true

kilo-client/build.gradle

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
plugins {
1616
id 'java-library'
1717
id 'maven-publish'
18+
id 'signing'
1819
}
1920

2021
java {
@@ -33,11 +34,48 @@ dependencies {
3334
}
3435

3536
publishing {
37+
repositories {
38+
maven {
39+
url = "${repositoryURL}"
40+
41+
credentials {
42+
username = project.properties['centralPortalUsername'] ?: ''
43+
password = project.properties['centralPortalPassword'] ?: ''
44+
}
45+
}
46+
}
47+
3648
publications {
37-
mavenJava(MavenPublication) {
49+
maven(MavenPublication) {
3850
artifactId = project.name
3951

4052
from components.java
53+
54+
pom {
55+
name = project.name
56+
description = "${projectDescription}"
57+
url = "${projectURL}"
58+
licenses {
59+
license {
60+
name = "${licenseName}"
61+
url = "${licenseURL}"
62+
}
63+
}
64+
developers {
65+
developer {
66+
name = "${developerName}"
67+
email = "${developerEmail}"
68+
}
69+
}
70+
scm {
71+
connection = "${scmConnection}"
72+
url = "${scmURL}"
73+
}
74+
}
4175
}
4276
}
4377
}
78+
79+
signing {
80+
sign publishing.publications
81+
}

kilo-server/build.gradle

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
plugins {
1616
id 'java-library'
1717
id 'maven-publish'
18+
id 'signing'
1819
}
1920

2021
java {
@@ -32,11 +33,48 @@ dependencies {
3233
}
3334

3435
publishing {
36+
repositories {
37+
maven {
38+
url = "${repositoryURL}"
39+
40+
credentials {
41+
username = project.properties['centralPortalUsername'] ?: ''
42+
password = project.properties['centralPortalPassword'] ?: ''
43+
}
44+
}
45+
}
46+
3547
publications {
36-
mavenJava(MavenPublication) {
48+
maven(MavenPublication) {
3749
artifactId = project.name
3850

3951
from components.java
52+
53+
pom {
54+
name = project.name
55+
description = "${projectDescription}"
56+
url = "${projectURL}"
57+
licenses {
58+
license {
59+
name = "${licenseName}"
60+
url = "${licenseURL}"
61+
}
62+
}
63+
developers {
64+
developer {
65+
name = "${developerName}"
66+
email = "${developerEmail}"
67+
}
68+
}
69+
scm {
70+
connection = "${scmConnection}"
71+
url = "${scmURL}"
72+
}
73+
}
4074
}
4175
}
4276
}
77+
78+
signing {
79+
sign publishing.publications
80+
}

0 commit comments

Comments
 (0)