Skip to content
This repository was archived by the owner on May 4, 2019. It is now read-only.

Commit 25e5d00

Browse files
committed
Merge branch 'release/0.8.8'
2 parents e5e4e1c + 2a24f06 commit 25e5d00

File tree

3 files changed

+139
-21
lines changed

3 files changed

+139
-21
lines changed

build.gradle

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
1+
buildscript {
2+
repositories {
3+
jcenter()
4+
}
5+
dependencies {
6+
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
7+
}
8+
}
9+
110
plugins {
211
id 'com.gradle.build-scan' version '1.15.1' // declare before any other plugin
3-
id 'com.jfrog.bintray' version '1.8.0'
412
id 'com.google.osdetector' version '1.4.0'
513
id 'com.github.sherter.google-java-format' version '0.6' apply false
614
id 'com.github.johnrengelman.shadow' version '2.0.1' apply false
@@ -19,7 +27,7 @@ project(':auth') {
1927

2028
project(':access-key-info-idl') {
2129
description = 'Netifi Access Key IDL'
22-
ext.artifactName = 'access-key-idl'
30+
ext.artifactName = 'access-key-info-idl'
2331

2432
apply from: file('../gradle/java.gradle')
2533
}
@@ -91,13 +99,12 @@ project(':protobuf-rpc') {
9199
description = 'Netifi Proteus RPC'
92100
ext.artifactName = 'protobuf-rpc'
93101

94-
apply from: file('../gradle/java.gradle')
102+
//apply from: file('../gradle/java.gradle')
95103
}
96104

97-
98105
project(':tracing-openzipkin') {
99106
description = 'Netifi Proteus Openzipkin Integration'
100-
ext.artifactName = 'tracing'
107+
ext.artifactName = 'tracing-openzipkin'
101108

102109
apply from: file('../gradle/java.gradle')
103110
}

gradle/java.gradle

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1+
apply plugin: 'com.jfrog.bintray'
12
apply plugin: 'java'
23
apply plugin: 'idea'
34
apply plugin: 'com.github.sherter.google-java-format'
45
apply plugin: 'maven'
56
apply plugin: 'maven-publish'
6-
apply plugin: 'com.jfrog.bintray'
77

88
task ciVersion {
99
description = "Creates a continuous-delivery friendly version number for the service"
@@ -14,19 +14,19 @@ task ciVersion {
1414
if (releaseType == 'release' || releaseType == 'r') {
1515
project.version = project.version
1616
} else if (releaseType == 'releaseCandidate' || releaseType == 'rc') {
17-
project.version = "${project.version}-RC"
17+
project.version = "${project.version}-RC".toString()
1818
} else if (releaseType == 'snapshot' || releaseType == 's') {
1919
if (commitHash) {
20-
project.version = "${project.version}-SNAPSHOT-${commitHash}"
20+
project.version = "${project.version}-SNAPSHOT-${commitHash}".toString()
2121
} else {
22-
project.version = "${project.version}-SNAPSHOT"
22+
project.version = "${project.version}-SNAPSHOT".toString()
2323
}
2424
} else {
2525
logger.info("Property 'releaseType' was not specified. Defaulting to 'snapshot'")
2626
if (commitHash) {
27-
project.version = "${project.version}-SNAPSHOT-${commitHash}"
27+
project.version = "${project.version}-SNAPSHOT-${commitHash}".toString()
2828
} else {
29-
project.version = "${project.version}-SNAPSHOT"
29+
project.version = "${project.version}-SNAPSHOT".toString()
3030
}
3131
}
3232

@@ -101,6 +101,7 @@ if ("$version".contains('SNAPSHOT')) {
101101
publishing {
102102
publications {
103103
mavenJava(MavenPublication) {
104+
from components.java
104105
artifact sourcesJar
105106
artifact javadocJar
106107
}
@@ -116,16 +117,29 @@ if ("$version".contains('SNAPSHOT')) {
116117
}
117118
}
118119
} else {
120+
publishing {
121+
publications {
122+
mavenJava(MavenPublication) {
123+
from components.java
124+
artifact sourcesJar
125+
artifact javadocJar
126+
}
127+
}
128+
}
129+
119130
bintray {
120131
user = project.hasProperty('bintrayUser') ? project.property('bintrayUser') : System.getenv('BINTRAY_USER')
121132
key = project.hasProperty('bintrayKey') ? project.property('bintrayKey') : System.getenv('f')
122-
publications = ['maven']
123133

134+
publications = ['mavenJava']
135+
136+
//dryRun = true
124137
publish = (osdetector.os == 'osx')
138+
override = true
125139

126140
pkg {
127141
repo = 'netifi-oss'
128-
name = "${artifactName}"
142+
name = "${artifactName}".toString()
129143
userOrg = 'netifi'
130144
desc = "${project.description}"
131145
websiteUrl = 'https://github.com/netifi-proteus/proteus-java'
@@ -136,7 +150,7 @@ if ("$version".contains('SNAPSHOT')) {
136150
githubReleaseNotesFile = 'CHANGELOG.md'
137151

138152
version {
139-
name = "${version}"
153+
name = "$project.version".toString()
140154
}
141155
}
142156
}

protobuf-rpc/build.gradle

Lines changed: 104 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,39 @@ plugins {
55
id 'idea'
66
}
77

8+
apply plugin: 'com.jfrog.bintray'
9+
apply plugin: 'maven'
10+
apply plugin: 'maven-publish'
11+
12+
task ciVersion {
13+
description = "Creates a continuous-delivery friendly version number for the service"
14+
15+
def releaseType = project.hasProperty('releaseType') ? project.property('releaseType') : System.getenv('RELEASE_TYPE')
16+
def commitHash = project.hasProperty('commitHash') ? project.property('commitHash') : System.getenv('COMMIT_HASH')
17+
18+
if (releaseType == 'release' || releaseType == 'r') {
19+
project.version = project.version
20+
} else if (releaseType == 'releaseCandidate' || releaseType == 'rc') {
21+
project.version = "${project.version}-RC".toString()
22+
} else if (releaseType == 'snapshot' || releaseType == 's') {
23+
if (commitHash) {
24+
project.version = "${project.version}-SNAPSHOT-${commitHash}".toString()
25+
} else {
26+
project.version = "${project.version}-SNAPSHOT".toString()
27+
}
28+
} else {
29+
logger.info("Property 'releaseType' was not specified. Defaulting to 'snapshot'")
30+
if (commitHash) {
31+
project.version = "${project.version}-SNAPSHOT-${commitHash}".toString()
32+
} else {
33+
project.version = "${project.version}-SNAPSHOT".toString()
34+
}
35+
}
36+
37+
println "Setting CI Version for '${project.name}': ${version}"
38+
}
39+
build.dependsOn ciVersion
40+
841
def proteusPrefix = "proteus-java-${osdetector.os}-${osdetector.arch}"
942
def proteusName = "${proteusPrefix}.exe"
1043
def artifactStagingPath = "$buildDir/artifacts" as File
@@ -185,13 +218,77 @@ artifacts {
185218
}
186219
}
187220

188-
publishing {
189-
publications {
190-
maven(MavenPublication) {
191-
artifactId "${project.ext.artifactName}"
192-
artifact(pathToPlugin) {
193-
classifier osdetector.os + "-" + osdetector.arch
194-
builtBy buildArtifacts
221+
//publishing {
222+
// publications {
223+
// maven(MavenPublication) {
224+
// artifactId "${project.ext.artifactName}"
225+
// artifact(pathToPlugin) {
226+
// classifier osdetector.os + "-" + osdetector.arch
227+
// builtBy buildArtifacts
228+
// }
229+
// }
230+
// }
231+
//}
232+
233+
234+
if ("$version".contains('SNAPSHOT')) {
235+
publishing {
236+
publications {
237+
maven(MavenPublication) {
238+
artifactId "${project.ext.artifactName}"
239+
artifact(pathToPlugin) {
240+
classifier osdetector.os + "-" + osdetector.arch
241+
builtBy buildArtifacts
242+
}
243+
}
244+
}
245+
repositories {
246+
maven {
247+
url = version.contains('SNAPSHOT') ? 'https://artifactory.netifiinc.com/artifactory/libs-snapshot-local' : 'https://artifactory.netifiinc.com/artifactory/libs-release-local'
248+
credentials {
249+
username = project.hasProperty('netifiArtifactoryUsername') ? project.property('netifiArtifactoryUsername') : System.getenv('NETIFI_ARTIFACTORY_USERNAME')
250+
password = project.hasProperty('netifiArtifactoryPassword') ? project.property('netifiArtifactoryPassword') : System.getenv('NETIFI_ARTIFACTORY_PASSWORD')
251+
}
252+
}
253+
}
254+
}
255+
} else {
256+
publishing {
257+
publications {
258+
maven(MavenPublication) {
259+
artifactId "${project.ext.artifactName}"
260+
artifact(pathToPlugin) {
261+
classifier osdetector.os + "-" + osdetector.arch
262+
builtBy buildArtifacts
263+
}
264+
}
265+
}
266+
}
267+
268+
bintray {
269+
user = project.hasProperty('bintrayUser') ? project.property('bintrayUser') : System.getenv('BINTRAY_USER')
270+
key = project.hasProperty('bintrayKey') ? project.property('bintrayKey') : System.getenv('f')
271+
272+
publications = ['maven']
273+
274+
//dryRun = true
275+
publish = (osdetector.os == 'osx')
276+
override = true
277+
278+
pkg {
279+
repo = 'netifi-oss'
280+
name = "${artifactName}".toString()
281+
userOrg = 'netifi'
282+
desc = "${project.description}"
283+
websiteUrl = 'https://github.com/netifi-proteus/proteus-java'
284+
issueTrackerUrl = 'https://github.com/netifi-proteus/proteus-java/issues'
285+
vcsUrl = 'https://github.com/netifi-proteus/proteus-java.git'
286+
licenses = ['Apache-2.0']
287+
githubRepo = 'netifi-proteus/proteus-java'
288+
githubReleaseNotesFile = 'CHANGELOG.md'
289+
290+
version {
291+
name = "$project.version".toString()
195292
}
196293
}
197294
}

0 commit comments

Comments
 (0)