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

Commit 54c7dd5

Browse files
committed
Fix protobuf-rpc publication
1 parent 2079f03 commit 54c7dd5

File tree

5 files changed

+31
-59
lines changed

5 files changed

+31
-59
lines changed

build.gradle

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,47 +23,49 @@ project(':admin-client') {
2323
description = 'Netifi Proteus Admin Client'
2424
ext.artifactName = 'admin-client'
2525

26-
apply from: file('../gradle/java.gradle')
2726
apply from: file('../gradle/release.gradle')
27+
apply from: file('../gradle/java.gradle')
2828
}
2929

3030
project(':auth') {
3131
description = 'Netifi Proteus Authentication Utilities'
3232
ext.artifactName = 'auth'
3333

34-
apply from: file('../gradle/java.gradle')
3534
apply from: file('../gradle/release.gradle')
35+
apply from: file('../gradle/java.gradle')
3636
}
3737

3838
project(':client') {
3939

4040
description = 'Netifi Proteus Client'
4141
ext.artifactName = 'client'
4242

43-
apply from: file('../gradle/java.gradle')
4443
apply from: file('../gradle/release.gradle')
44+
apply from: file('../gradle/java.gradle')
4545
}
4646

4747
project(':core') {
4848
description = 'Netifi Core Library'
4949
ext.artifactName = 'core'
5050

51-
apply from: file('../gradle/java.gradle')
5251
apply from: file('../gradle/release.gradle')
52+
apply from: file('../gradle/java.gradle')
5353
}
5454

5555
project(':frames') {
5656

5757
description = 'Netifi Proteus Frames'
5858
ext.artifactName = 'frames'
5959

60-
apply from: file('../gradle/java.gradle')
6160
apply from: file('../gradle/release.gradle')
61+
apply from: file('../gradle/java.gradle')
6262
}
6363

6464
project(':protobuf-rpc') {
6565
description = 'Netifi Proteus RPC'
6666
ext.artifactName = 'protobuf-rpc'
67+
68+
apply from: file('../gradle/release.gradle')
6769
}
6870

6971
subprojects {

client/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ dependencies {
99
compile 'com.typesafe:config:1.3.2'
1010
}
1111

12-
String protocPluginBaseName = "proteus-java-${osdetector.os}-${osdetector.arch}"
13-
String javaPluginPath = "$rootDir/protobuf-rpc/build/exe/java_plugin/$protocPluginBaseName"
12+
def protocPluginBaseName = "proteus-java-${osdetector.os}-${osdetector.arch}"
13+
def javaPluginPath = "$rootDir/protobuf-rpc/build/exe/java_plugin/$protocPluginBaseName"
1414

1515
protobuf {
1616
generatedFilesBaseDir = "${projectDir}/src/generated"

gradle/java.gradle

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,23 @@ artifacts {
2626
archives sourcesJar, javadocJar
2727
}
2828

29+
jar {
30+
baseName = "${artifactName}"
31+
version = "${project.version}"
32+
}
33+
34+
publishing {
35+
publications {
36+
maven(MavenPublication) {
37+
from components.java
38+
39+
artifactId "${artifactName}"
40+
artifact sourcesJar
41+
artifact javadocJar
42+
}
43+
}
44+
}
45+
2946
dependencies {
3047
testCompile "junit:junit:4.12"
3148

gradle/release.gradle

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -24,23 +24,6 @@ task versionArchives {
2424
}
2525
build.dependsOn versionArchives
2626

27-
jar {
28-
baseName = "${artifactName}"
29-
version = "${project.version}"
30-
}
31-
32-
publishing {
33-
publications {
34-
maven(MavenPublication) {
35-
from components.java
36-
37-
artifactId "${artifactName}"
38-
artifact sourcesJar
39-
artifact javadocJar
40-
}
41-
}
42-
}
43-
4427
bintray {
4528
user = project.hasProperty('bintrayUser') ? project.property('bintrayUser') : System.getenv('BINTRAY_USER')
4629
key = project.hasProperty('bintrayKey') ? project.property('bintrayKey') : System.getenv('BINTRAY_KEY')

protobuf-rpc/build.gradle

Lines changed: 5 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
plugins {
22
id 'com.google.protobuf' version '0.8.3'
33
id 'cpp'
4-
id 'maven'
5-
id 'maven-publish'
6-
id 'com.jfrog.bintray'
74
}
85

9-
String proteusPrefix = "proteus-java-${osdetector.os}-${osdetector.arch}"
10-
String proteusName = "${proteusPrefix}.exe"
6+
def proteusPrefix = "proteus-java-${osdetector.os}-${osdetector.arch}"
7+
def proteusName = "${proteusPrefix}.exe"
118
def artifactStagingPath = "$buildDir/artifacts" as File
129
def pathToPlugin = "${artifactStagingPath.getPath()}/${proteusName}"
1310

@@ -26,7 +23,7 @@ protobuf {
2623
}
2724
plugins {
2825
proteus {
29-
path = "$pathToPlugin"
26+
path = pathToPlugin
3027
}
3128
}
3229
generateProtoTasks {
@@ -35,9 +32,7 @@ protobuf {
3532
task.inputs.file "$pathToPlugin"
3633
task.inputs.file "${rootProject.projectDir}/build.gradle"
3734
task.plugins {
38-
proteus {
39-
option 'noversion'
40-
}
35+
proteus {}
4136
}
4237
}
4338
}
@@ -180,39 +175,14 @@ publishing {
180175
publications {
181176
maven(MavenPublication) {
182177
artifactId "${project.ext.artifactName}"
183-
artifact("$pathToPlugin") {
178+
artifact(pathToPlugin) {
184179
classifier osdetector.os + "-" + osdetector.arch
185180
builtBy buildArtifacts
186181
}
187182
}
188183
}
189184
}
190185

191-
bintray {
192-
user = project.hasProperty('bintrayUser') ? project.property('bintrayUser') : System.getenv('BINTRAY_USER')
193-
key = project.hasProperty('bintrayKey') ? project.property('bintrayKey') : System.getenv('BINTRAY_KEY')
194-
publications = ['maven']
195-
196-
override = true
197-
198-
pkg {
199-
repo = 'netifi-oss'
200-
name = "${project.ext.artifactName}"
201-
userOrg = 'netifi'
202-
desc = "${project.description}"
203-
websiteUrl = 'https://github.com/netifi-proteus/proteus-java'
204-
issueTrackerUrl = 'https://github.com/netifi-proteus/proteus-java/issues'
205-
vcsUrl = 'https://github.com/netifi-proteus/proteus-java.git'
206-
licenses = ['Apache-2.0']
207-
githubRepo = 'netifi-proteus/proteus-java'
208-
githubReleaseNotesFile = 'CHANGELOG.md'
209-
210-
version {
211-
name = "$version"
212-
}
213-
}
214-
}
215-
216186
idea {
217187
module {
218188
testSourceDirs += file("src/test/proto")

0 commit comments

Comments
 (0)