Skip to content

Commit 65600ee

Browse files
updated to version 1.35.0
update gradle to 6.8.2 change group id to "org.rationalityfrontline.workaround" migrate repository to maven central
1 parent a083697 commit 65600ee

7 files changed

+37
-55
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
**/.idea
22
**/.gradle
33
**/build/
4+
*.asc

README.md

+3-13
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# grpc-api
2-
[![JCenter Version](https://img.shields.io/bintray/v/rationalityfrontline/grpc/grpc-api?label=JCenter)](https://bintray.com/rationalityfrontline/grpc/grpc-api) [![Apache License 2.0](https://img.shields.io/github/license/rationalityfrontline/grpc-api)](https://github.com/RationalityFrontline/grpc-api/blob/master/LICENSE)
2+
[![Maven Central](https://img.shields.io/maven-central/v/org.rationalityfrontline.workaround/grpc-api.svg?label=Maven%20Central)](https://search.maven.org/search?q=g:%22org.rationalityfrontline.workaround%22%20AND%20a:%22grpc-api%22) [![Apache License 2.0](https://img.shields.io/github/license/rationalityfrontline/grpc-api)](https://github.com/RationalityFrontline/grpc-api/blob/master/LICENSE)
33

44
This library is a temporary workaround for the issue ["gRPC Java is not usable from Java 9 modules"](https://github.com/grpc/grpc-java/issues/3522).
55
It solves the split package problem mentioned in the issue by merging `grpc-api` and `grpc-context` into a single jar.
@@ -13,26 +13,16 @@ Just add the following code blocks to your build.gradle.kts file.
1313

1414
```kotlin
1515
repositories {
16-
jcenter()
16+
mavenCentral()
1717
}
1818

19-
val grpcVersion = "1.34.0"
20-
//val grpcKotlinVersion = "0.2.1"
21-
2219
dependencies {
23-
implementation("org.rationalityfrontline.grpc:grpc-api:$grpcVersion")
24-
//implementation("io.grpc:grpc-netty-shaded:$grpcVersion")
25-
//implementation("io.grpc:grpc-stub:$grpcVersion")
26-
//implementation("io.grpc:grpc-protobuf:$grpcVersion")
27-
//implementation("io.grpc:grpc-kotlin-stub:$grpcKotlinVersion")
28-
//implementation("javax.annotation:javax.annotation-api:1.3.2")
20+
implementation("org.rationalityfrontline.workaround:grpc-api:1.35.0")
2921
}
3022

3123
configurations.all {
3224
exclude(group = "io.grpc", module = "grpc-context")
3325
exclude(group = "io.grpc", module = "grpc-api")
34-
//uncomment the following line if you have "javax.annotation:javax.annotation-api" in your dependencies.
35-
//exclude(group = "com.google.code.findbugs", module = "jsr305")
3626
}
3727
```
3828

build.gradle.kts

+32-41
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,28 @@
1-
import com.jfrog.bintray.gradle.BintrayExtension.PackageConfig
2-
import com.jfrog.bintray.gradle.BintrayExtension.VersionConfig
3-
import java.util.Date
4-
51
plugins {
62
`maven-publish`
7-
id("com.jfrog.bintray") version "1.8.5"
3+
signing
84
}
95

10-
group = "org.rationalityfrontline.grpc"
11-
version = "1.34.0"
12-
6+
group = "org.rationalityfrontline.workaround"
7+
version = "1.35.0"
138
val NAME = project.name
149
val DESC = "Merged grpc-api and grpc-context into a single jar"
1510
val GITHUB_REPO = "RationalityFrontline/grpc-api"
1611

1712
publishing {
1813
publications {
19-
create<MavenPublication>("mavenPublish") {
14+
create<MavenPublication>("maven") {
2015
artifact(file("libs/grpc-api-$version-sources.jar")) {
2116
classifier = "sources"
2217
}
18+
artifact(file("libs/grpc-api-$version-javadoc.jar")) {
19+
classifier = "javadoc"
20+
}
2321
artifact(file("libs/grpc-api-$version.jar"))
2422
pom {
2523
name.set(NAME)
26-
description.set("$NAME $version - $DESC")
24+
description.set(DESC)
25+
packaging = "jar"
2726
url.set("https://github.com/$GITHUB_REPO")
2827
licenses {
2928
license {
@@ -35,44 +34,36 @@ publishing {
3534
developer {
3635
name.set("RationalityFrontline")
3736
email.set("[email protected]")
37+
organization.set("RationalityFrontline")
38+
organizationUrl.set("https://github.com/RationalityFrontline")
3839
}
3940
}
4041
scm {
41-
url.set("https://github.com/$GITHUB_REPO")
42+
connection.set("scm:git:git://github.com/$GITHUB_REPO.git")
43+
developerConnection.set("scm:git:ssh://github.com:$GITHUB_REPO.git")
44+
url.set("https://github.com/$GITHUB_REPO/tree/master")
4245
}
4346
}
4447
}
4548
}
46-
}
47-
48-
bintray {
49-
fun env(propertyName: String): String {
50-
return if (project.hasProperty(propertyName)) {
51-
project.property(propertyName) as String
52-
} else "Unknown"
49+
repositories {
50+
fun env(propertyName: String): String {
51+
return if (project.hasProperty(propertyName)) {
52+
project.property(propertyName) as String
53+
} else "Unknown"
54+
}
55+
maven {
56+
val releasesRepoUrl = uri("https://oss.sonatype.org/service/local/staging/deploy/maven2/")
57+
val snapshotsRepoUrl = uri("https://oss.sonatype.org/content/repositories/snapshots/")
58+
url = if (version.toString().endsWith("SNAPSHOT")) snapshotsRepoUrl else releasesRepoUrl
59+
credentials {
60+
username = env("ossrhUsername")
61+
password = env("ossrhPassword")
62+
}
63+
}
5364
}
65+
}
5466

55-
user = env("BINTRAY_USER")
56-
key = env("BINTRAY_KEY")
57-
publish = true
58-
override = true
59-
setPublications("mavenPublish")
60-
pkg(closureOf<PackageConfig>{
61-
repo = "grpc"
62-
name = NAME
63-
desc = DESC
64-
setLabels("grpc", "grpc-api", "grpc-context", "jpms")
65-
setLicenses("Apache-2.0")
66-
publicDownloadNumbers = true
67-
githubRepo = GITHUB_REPO
68-
vcsUrl = "https://github.com/$githubRepo"
69-
websiteUrl = vcsUrl
70-
issueTrackerUrl = "$vcsUrl/issues"
71-
version(closureOf<VersionConfig> {
72-
name = "${project.version}"
73-
desc = DESC
74-
released = "${Date()}"
75-
vcsTag = name
76-
})
77-
})
67+
signing {
68+
sign(publishing.publications["maven"])
7869
}
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.6.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.2-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

libs/grpc-api-1.35.0-javadoc.jar

172 Bytes
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)