Skip to content

Commit 21667d5

Browse files
author
Benoit Corne
committed
update build script
Adding deployment on central repo Setting the version to 0.3 Change-Id: Ib3fc110d2a198f4c8654a8c5efbee5581f7886fb
1 parent 1349868 commit 21667d5

File tree

1 file changed

+66
-0
lines changed

1 file changed

+66
-0
lines changed

build.gradle

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,75 @@ apply plugin: 'idea'
1616
apply plugin: 'maven'
1717
apply plugin: 'cobertura'
1818
apply plugin: 'eclipse'
19+
apply plugin: 'signing'
1920

2021
group = 'com.ullink.slack'
22+
archivesBaseName = 'simpleslackapi'
23+
version = '0.3
2124
25+
26+
task javadocJar(type: Jar) {
27+
classifier = 'javadoc'
28+
from javadoc
29+
}
30+
31+
task sourcesJar(type: Jar) {
32+
classifier = 'sources'
33+
from sourceSets.main.allSource
34+
}
35+
36+
artifacts {
37+
archives javadocJar, sourcesJar
38+
}
39+
40+
signing {
41+
sign configurations.archives
42+
}
43+
44+
uploadArchives {
45+
repositories {
46+
mavenDeployer {
47+
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
48+
49+
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
50+
authentication(userName: ossrhUsername, password: ossrhPassword)
51+
}
52+
53+
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
54+
authentication(userName: ossrhUsername, password: ossrhPassword)
55+
}
56+
57+
pom.project {
58+
name 'Simple Slack API'
59+
packaging 'jar'
60+
// optionally artifactId can be defined here
61+
description 'A application used as an example on how to set up pushing its components to the Central Repository.'
62+
url 'http://www.example.com/example-application'
63+
64+
scm {
65+
connection 'scm:git:[email protected]:Ullink/simple-slack-api.git'
66+
developerConnection 'scm:git:[email protected]:Ullink/simple-slack-api.git'
67+
url '[email protected]:Ullink/simple-slack-api.git'
68+
}
69+
70+
licenses {
71+
license {
72+
name 'CC0 1.0 Universal (CC0 1.0)'
73+
url 'http://creativecommons.org/publicdomain/zero/1.0/'
74+
}
75+
}
76+
77+
developers {
78+
developer {
79+
id 'bcorne'
80+
name 'Benoit Corne'
81+
82+
}
83+
}
84+
}
85+
}
86+
}
87+
}
2288
dependencies {
2389
compile 'org.glassfish.tyrus.bundles:tyrus-standalone-client:1.8.3'
2490
compile 'com.googlecode.json-simple:json-simple:1.1.1'

0 commit comments

Comments
 (0)