Skip to content

Commit 0591545

Browse files
author
dglogik
authored
Merge pull request #44 from iot-dsa-v2/maven-deploy
Set up push and release to maven central
2 parents 4d75242 + 444fcc8 commit 0591545

File tree

4 files changed

+130
-3
lines changed

4 files changed

+130
-3
lines changed

build.gradle

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,31 @@
1+
buildscript {
2+
repositories {
3+
mavenCentral()
4+
}
5+
dependencies {
6+
classpath 'com.adaptc.gradle:nexus-workflow:0.6'
7+
}
8+
}
9+
10+
apply plugin: 'nexus-workflow'
111
apply plugin: 'java'
212
apply plugin: 'maven'
13+
apply plugin: 'signing'
314

4-
group 'org.iot.dsa'
15+
group 'org.iot-dsa'
516
version '0.26.0'
617

718
sourceCompatibility = 1.6
819
targetCompatibility = 1.6
920

21+
install {
22+
repositories.mavenInstaller {
23+
pom.project {
24+
artifactId 'dslink-v2'
25+
}
26+
}
27+
}
28+
1029
repositories {
1130
mavenLocal()
1231
mavenCentral()
@@ -16,14 +35,20 @@ repositories {
1635
}
1736

1837
dependencies {
19-
testCompile 'junit:junit:+'
38+
testCompile 'junit:junit:[4.12,)'
2039
}
2140

2241
task sourcesJar(group: 'build', type: Jar, dependsOn: classes) {
2342
classifier = 'sources'
2443
from sourceSets.main.allJava
2544
}
2645

46+
task javadocJar(type: Jar, dependsOn: javadoc) {
47+
classifier = 'javadoc'
48+
from javadoc.destinationDir
49+
}
50+
2751
artifacts {
2852
archives sourcesJar
53+
archives javadocJar
2954
}

ci/secring.gpg.enc

4.86 KB
Binary file not shown.

dslink-core/build.gradle

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,54 @@ apply from: '../build.gradle'
33
javadoc {
44
exclude("**/com/**")
55
}
6+
7+
signing {
8+
required { gradle.taskGraph.hasTask("uploadArchives") }
9+
sign configurations.archives
10+
}
11+
12+
uploadArchives {
13+
repositories {
14+
mavenDeployer {
15+
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
16+
17+
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2") {
18+
authentication(userName: ossrhUsername, password: ossrhPassword)
19+
}
20+
21+
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots") {
22+
authentication(userName: ossrhUsername, password: ossrhPassword)
23+
}
24+
25+
pom.project {
26+
name = 'DSLink SDK V2'
27+
artifactId = 'dslink-core-v2'
28+
description = 'V2 Java SDK for the IoT DSA protocol'
29+
30+
packaging = 'jar'
31+
url = 'http://iot-dsa.org'
32+
33+
scm {
34+
connection = 'scm:git:https://github.com/iot-dsa-v2/sdk-dslink-java-v2.git'
35+
developerConnection = 'scm:git:git@github.com:iot-dsa-v2/sdk-dslink-java-v2.git'
36+
url = 'https://github.com/iot-dsa-v2/sdk-dslink-java-v2'
37+
}
38+
39+
licenses {
40+
license {
41+
name = 'The Apache License, Version 2.0'
42+
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
43+
}
44+
}
45+
46+
developers {
47+
developer {
48+
id = 'samrg472'
49+
name = 'Samuel Grenier'
50+
email = 'samrg472@gmail.com'
51+
}
52+
}
53+
}
54+
}
55+
}
56+
}

dslink-websocket-standalone/build.gradle

Lines changed: 52 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,56 @@ apply from: '../build.gradle'
22

33
dependencies {
44
compile project(':dslink-core')
5-
compile 'org.glassfish.tyrus.bundles:tyrus-standalone-client:+'
5+
compile 'org.glassfish.tyrus.bundles:tyrus-standalone-client:[1.12,)'
6+
}
7+
8+
signing {
9+
required { gradle.taskGraph.hasTask("uploadArchives") }
10+
sign configurations.archives
11+
}
12+
13+
uploadArchives {
14+
repositories {
15+
mavenDeployer {
16+
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
17+
18+
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2") {
19+
authentication(userName: ossrhUsername, password: ossrhPassword)
20+
}
21+
22+
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots") {
23+
authentication(userName: ossrhUsername, password: ossrhPassword)
24+
}
25+
26+
pom.project {
27+
name = 'DSLink SDK V2 Websocket Implementation'
28+
artifactId = 'dslink-websocket-standalone-v2'
29+
description = 'V2 Implementation of Websockets for IoT DSA protocol'
30+
31+
packaging = 'jar'
32+
url = 'http://iot-dsa.org'
33+
34+
scm {
35+
connection = 'scm:git:https://github.com/iot-dsa-v2/sdk-dslink-java-v2.git'
36+
developerConnection = 'scm:git:git@github.com:iot-dsa-v2/sdk-dslink-java-v2.git'
37+
url = 'https://github.com/iot-dsa-v2/sdk-dslink-java-v2'
38+
}
39+
40+
licenses {
41+
license {
42+
name = 'The Apache License, Version 2.0'
43+
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
44+
}
45+
}
46+
47+
developers {
48+
developer {
49+
id = 'samrg472'
50+
name = 'Samuel Grenier'
51+
email = 'samrg472@gmail.com'
52+
}
53+
}
54+
}
55+
}
56+
}
657
}

0 commit comments

Comments
 (0)