Skip to content

Commit 732fc27

Browse files
authored
Merge pull request #79 from jk47/maven_publish
smartthings oss maven publish
2 parents 93e8849 + c3f363e commit 732fc27

File tree

2 files changed

+16
-42
lines changed

2 files changed

+16
-42
lines changed

.circleci/config.yml

+6-7
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ jobs:
8484
at: ~/repo
8585

8686
- run:
87-
name: Release to Bintray
88-
command: ./gradlew bintrayUpload
87+
name: Release to Maven
88+
command: ./gradlew publish -PsmartThingsOssUserName=$ARTIFACTORY_USERNAME -PsmartThingsOssPassword=$ARTIFACTORY_PASSWORD
8989

9090
workflows:
9191
version: 2
@@ -107,12 +107,11 @@ workflows:
107107
- 1.2.x-master
108108
- 1.0.x-master
109109
- release:
110+
context: smartthingsoss
110111
requires:
111112
- test
112113
filters:
113114
branches:
114-
only:
115-
- release
116-
- 1.3.x-release
117-
- 1.2.x-release
118-
- 1.0.x-release
115+
ignore: /.*/
116+
tags:
117+
only: /^\d+\.\d+\.\d+$/

gradle/publishing.gradle

+10-35
Original file line numberDiff line numberDiff line change
@@ -51,39 +51,14 @@ if (isSnapshot) {
5151
}
5252
}
5353
}
54+
repositories {
55+
maven {
56+
credentials {
57+
username smartThingsOssUserName
58+
password smartThingsOssPassword
59+
}
60+
url "https://smartthings.jfrog.io/artifactory/smartthingsoss"
61+
}
62+
}
5463
}
55-
}
56-
57-
bintrayUpload { task ->
58-
doFirst {
59-
if (isSnapshot) {
60-
throw new GradleException('Cannot publish SNAPSHOT versions to BinTray!')
61-
}
62-
}
63-
gradle.taskGraph.whenReady { taskGraph ->
64-
if (taskGraph.hasTask(task)) {
65-
task.user = System.getenv('BINTRAY_USER') ?: ''
66-
task.apiKey = System.getenv('BINTRAY_API_KEY') ?: ''
67-
}
68-
}
69-
}
70-
71-
bintray {
72-
publications = ['mavenJava']
73-
dryRun = false
74-
publish = true
75-
pkg {
76-
repo = 'maven'
77-
name = "smartthings.${project.name}"
78-
userOrg = 'smartthingsoss'
79-
licenses = ['Apache-2.0']
80-
labels = ['dropwizard']
81-
websiteUrl = 'https://github.com/SmartThingsOSS/dropwizard-common'
82-
issueTrackerUrl = 'https://github.com/SmartThingsOSS/dropwizard-common/issues'
83-
vcsUrl = 'https://github.com/SmartThingsOSS/dropwizard-common.git'
84-
version {
85-
name = project.version
86-
vcsTag = project.version
87-
}
88-
}
89-
}
64+
}

0 commit comments

Comments
 (0)