Skip to content

Commit 29ec957

Browse files
committed
Merge remote-tracking branch 'origin/master' into ext-proc
2 parents 9708c0b + d459338 commit 29ec957

File tree

65 files changed

+653
-468
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+653
-468
lines changed

MODULE.bazel

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module(
22
name = "grpc-java",
3-
version = "1.80.0-SNAPSHOT", # CURRENT_GRPC_VERSION
3+
version = "1.81.0-SNAPSHOT", # CURRENT_GRPC_VERSION
44
compatibility_level = 0,
55
repo_name = "io_grpc_grpc_java",
66
)
@@ -14,7 +14,7 @@ IO_GRPC_GRPC_JAVA_ARTIFACTS = [
1414
"com.google.auto.value:auto-value-annotations:1.11.0",
1515
"com.google.auto.value:auto-value:1.11.0",
1616
"com.google.code.findbugs:jsr305:3.0.2",
17-
"com.google.code.gson:gson:2.12.1",
17+
"com.google.code.gson:gson:2.13.2",
1818
"com.google.errorprone:error_prone_annotations:2.45.0",
1919
"com.google.guava:failureaccess:1.0.1",
2020
"com.google.guava:guava:33.5.0-android",

README.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ gRPC-Java - An RPC library and framework
2020
Supported Platforms
2121
-------------------
2222

23-
gRPC-Java supports Java 8 and later. Android minSdkVersion 21 (Lollipop) and
23+
gRPC-Java supports Java 8 and later. Android minSdkVersion 23 (Marshmallow) and
2424
later are supported with [Java 8 language desugaring][android-java-8].
2525

2626
TLS usage on Android typically requires Play Services Dynamic Security Provider.
@@ -44,8 +44,8 @@ For a guided tour, take a look at the [quick start
4444
guide](https://grpc.io/docs/languages/java/quickstart) or the more explanatory [gRPC
4545
basics](https://grpc.io/docs/languages/java/basics).
4646

47-
The [examples](https://github.com/grpc/grpc-java/tree/v1.79.0/examples) and the
48-
[Android example](https://github.com/grpc/grpc-java/tree/v1.79.0/examples/android)
47+
The [examples](https://github.com/grpc/grpc-java/tree/v1.80.0/examples) and the
48+
[Android example](https://github.com/grpc/grpc-java/tree/v1.80.0/examples/android)
4949
are standalone projects that showcase the usage of gRPC.
5050

5151
Download
@@ -56,42 +56,42 @@ Download [the JARs][]. Or for Maven with non-Android, add to your `pom.xml`:
5656
<dependency>
5757
<groupId>io.grpc</groupId>
5858
<artifactId>grpc-netty-shaded</artifactId>
59-
<version>1.79.0</version>
59+
<version>1.80.0</version>
6060
<scope>runtime</scope>
6161
</dependency>
6262
<dependency>
6363
<groupId>io.grpc</groupId>
6464
<artifactId>grpc-protobuf</artifactId>
65-
<version>1.79.0</version>
65+
<version>1.80.0</version>
6666
</dependency>
6767
<dependency>
6868
<groupId>io.grpc</groupId>
6969
<artifactId>grpc-stub</artifactId>
70-
<version>1.79.0</version>
70+
<version>1.80.0</version>
7171
</dependency>
7272
```
7373

7474
Or for Gradle with non-Android, add to your dependencies:
7575
```gradle
76-
runtimeOnly 'io.grpc:grpc-netty-shaded:1.79.0'
77-
implementation 'io.grpc:grpc-protobuf:1.79.0'
78-
implementation 'io.grpc:grpc-stub:1.79.0'
76+
runtimeOnly 'io.grpc:grpc-netty-shaded:1.80.0'
77+
implementation 'io.grpc:grpc-protobuf:1.80.0'
78+
implementation 'io.grpc:grpc-stub:1.80.0'
7979
```
8080

8181
For Android client, use `grpc-okhttp` instead of `grpc-netty-shaded` and
8282
`grpc-protobuf-lite` instead of `grpc-protobuf`:
8383
```gradle
84-
implementation 'io.grpc:grpc-okhttp:1.79.0'
85-
implementation 'io.grpc:grpc-protobuf-lite:1.79.0'
86-
implementation 'io.grpc:grpc-stub:1.79.0'
84+
implementation 'io.grpc:grpc-okhttp:1.80.0'
85+
implementation 'io.grpc:grpc-protobuf-lite:1.80.0'
86+
implementation 'io.grpc:grpc-stub:1.80.0'
8787
```
8888

8989
For [Bazel](https://bazel.build), you can either
9090
[use Maven](https://github.com/bazelbuild/rules_jvm_external)
9191
(with the GAVs from above), or use `@io_grpc_grpc_java//api` et al (see below).
9292

9393
[the JARs]:
94-
https://search.maven.org/search?q=g:io.grpc%20AND%20v:1.79.0
94+
https://search.maven.org/search?q=g:io.grpc%20AND%20v:1.80.0
9595

9696
Development snapshots are available in [Sonatypes's snapshot
9797
repository](https://central.sonatype.com/repository/maven-snapshots/).
@@ -123,7 +123,7 @@ For protobuf-based codegen integrated with the Maven build system, you can use
123123
<configuration>
124124
<protocArtifact>com.google.protobuf:protoc:3.25.8:exe:${os.detected.classifier}</protocArtifact>
125125
<pluginId>grpc-java</pluginId>
126-
<pluginArtifact>io.grpc:protoc-gen-grpc-java:1.79.0:exe:${os.detected.classifier}</pluginArtifact>
126+
<pluginArtifact>io.grpc:protoc-gen-grpc-java:1.80.0:exe:${os.detected.classifier}</pluginArtifact>
127127
</configuration>
128128
<executions>
129129
<execution>
@@ -153,7 +153,7 @@ protobuf {
153153
}
154154
plugins {
155155
grpc {
156-
artifact = 'io.grpc:protoc-gen-grpc-java:1.79.0'
156+
artifact = 'io.grpc:protoc-gen-grpc-java:1.80.0'
157157
}
158158
}
159159
generateProtoTasks {
@@ -186,7 +186,7 @@ protobuf {
186186
}
187187
plugins {
188188
grpc {
189-
artifact = 'io.grpc:protoc-gen-grpc-java:1.79.0'
189+
artifact = 'io.grpc:protoc-gen-grpc-java:1.80.0'
190190
}
191191
}
192192
generateProtoTasks {

android-interop-testing/build.gradle

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,11 @@ android {
3333

3434
defaultConfig {
3535
applicationId "io.grpc.android.integrationtest"
36-
// Held back to 20 as Gradle fails to build at the 21 level. This is
37-
// presumably a Gradle bug that can be revisited later.
38-
// Maybe this issue: https://github.com/gradle/gradle/issues/20778
39-
minSdkVersion 20
36+
minSdkVersion 23
4037
targetSdkVersion 33
4138
versionCode 1
4239
versionName "1.0"
4340
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
44-
multiDexEnabled = true
4541
}
4642
buildTypes {
4743
debug { minifyEnabled false }
@@ -62,11 +58,11 @@ android {
6258

6359
dependencies {
6460
implementation 'androidx.appcompat:appcompat:1.3.0'
65-
implementation 'androidx.multidex:multidex:2.0.0'
6661
implementation libraries.androidx.annotation
6762
implementation 'com.google.android.gms:play-services-base:18.0.1'
6863

6964
implementation project(':grpc-android'),
65+
project(':grpc-api'),
7066
project(':grpc-core'),
7167
project(':grpc-census'),
7268
project(':grpc-okhttp'),
@@ -76,15 +72,16 @@ dependencies {
7672
libraries.junit,
7773
libraries.truth,
7874
libraries.androidx.test.rules,
75+
libraries.androidx.test.core,
7976
libraries.opencensus.contrib.grpc.metrics
8077

8178
implementation (project(':grpc-services')) {
8279
exclude group: 'com.google.protobuf'
8380
exclude group: 'com.google.guava'
8481
}
8582

86-
androidTestImplementation 'androidx.test.ext:junit:1.1.3',
87-
'androidx.test:runner:1.4.0'
83+
androidTestImplementation libraries.androidx.test.ext.junit,
84+
libraries.androidx.test.runner
8885
}
8986

9087
// Checkstyle doesn't run automatically with android
@@ -115,6 +112,25 @@ tasks.withType(JavaCompile).configureEach {
115112
"|")
116113
}
117114

115+
// Workaround error seen with Gradle 8.14.3 and AGP 7.4.1 when building:
116+
// ./gradlew clean :grpc-android-interop-testing:build -PskipAndroid=false \
117+
// -Pandroid.useAndroidX=true --no-build-cache
118+
//
119+
// Error message:
120+
//
121+
// Execution failed for task ':grpc-android-interop-testing:mergeExtDexDebug'.
122+
// > Could not resolve all files for configuration ':grpc-android-interop-testing:debugRuntimeClasspath'.
123+
// > Failed to transform opencensus-contrib-grpc-metrics-0.31.1.jar (io.opencensus:opencensus-contrib-grpc-metrics:0.31.1) to match attributes {artifactType=android-dex, asm-transformed-variant=NONE, dexing-enable-desugaring=true, dexing-enable-jacoco-instrumentation=false, dexing-is-debuggable=true, dexing-min-sdk=23, org.gradle.category=library, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-runtime}.
124+
// > Could not resolve all files for configuration ':grpc-android-interop-testing:debugRuntimeClasspath'.
125+
// > Failed to transform grpc-api-1.81.0-SNAPSHOT.jar (project :grpc-api) to match attributes {artifactType=android-classes-jar, org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.jvm.version=8, org.gradle.libraryelements=jar, org.gradle.usage=java-runtime}.
126+
// > Execution failed for IdentityTransform: grpc-java/api/build/libs/grpc-api-1.81.0-SNAPSHOT.jar.
127+
// > File/directory does not exist: grpc-java/api/build/libs/grpc-api-1.81.0-SNAPSHOT.jar
128+
tasks.configureEach { task ->
129+
if (task.name.equals("mergeExtDexDebug")) {
130+
dependsOn(':grpc-api:jar')
131+
}
132+
}
133+
118134
afterEvaluate {
119135
// Hack to workaround "Task ':grpc-android-interop-testing:extractIncludeDebugProto' uses this
120136
// output of task ':grpc-context:jar' without declaring an explicit or implicit dependency." The

android-interop-testing/src/androidTest/AndroidManifest.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
android:name="androidx.test.runner.AndroidJUnitRunner"
66
android:targetPackage="io.grpc.android.integrationtest" />
77

8-
<application
9-
android:name="android.support.multidex.MultiDexApplication" >
8+
<application>
109
</application>
1110

1211
</manifest>

android-interop-testing/src/androidTest/java/io/grpc/android/integrationtest/UdsChannelInteropTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919
import static org.junit.Assert.assertEquals;
2020

2121
import android.net.LocalSocketAddress.Namespace;
22-
import androidx.test.InstrumentationRegistry;
22+
import androidx.test.ext.junit.rules.ActivityScenarioRule;
2323
import androidx.test.ext.junit.runners.AndroidJUnit4;
24-
import androidx.test.rule.ActivityTestRule;
24+
import androidx.test.platform.app.InstrumentationRegistry;
2525
import io.grpc.Grpc;
2626
import io.grpc.InsecureServerCredentials;
2727
import io.grpc.Server;
@@ -60,8 +60,8 @@ public class UdsChannelInteropTest {
6060
// Ensures Looper is initialized for tests running on API level 15. Otherwise instantiating an
6161
// AsyncTask throws an exception.
6262
@Rule
63-
public ActivityTestRule<TesterActivity> activityRule =
64-
new ActivityTestRule<TesterActivity>(TesterActivity.class);
63+
public ActivityScenarioRule<TesterActivity> activityRule =
64+
new ActivityScenarioRule<>(TesterActivity.class);
6565

6666
@Before
6767
public void setUp() throws IOException {

android-interop-testing/src/main/AndroidManifest.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@
1414
android:allowBackup="true"
1515
android:icon="@mipmap/ic_launcher"
1616
android:label="@string/app_name"
17-
android:theme="@style/Base.V7.Theme.AppCompat.Light"
18-
android:name="androidx.multidex.MultiDexApplication">
17+
android:theme="@style/Base.V7.Theme.AppCompat.Light">
1918
<activity
2019
android:name=".TesterActivity"
2120
android:exported="true">

android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ android {
1414
}
1515
compileSdkVersion 34
1616
defaultConfig {
17-
minSdkVersion 22
17+
minSdkVersion 23
1818
targetSdkVersion 33
1919
versionCode 1
2020
versionName "1.0"

binder/build.gradle

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,11 @@ android {
1313
targetCompatibility 1.8
1414
}
1515
defaultConfig {
16-
minSdkVersion 22
16+
minSdkVersion 23
1717
targetSdkVersion 33
1818
versionCode 1
1919
versionName "1.0"
2020
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
21-
multiDexEnabled = true
2221
}
2322
lintOptions { abortOnError = false }
2423
publishing {

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ subprojects {
2121
apply plugin: "net.ltgt.errorprone"
2222

2323
group = "io.grpc"
24-
version = "1.80.0-SNAPSHOT" // CURRENT_GRPC_VERSION
24+
version = "1.81.0-SNAPSHOT" // CURRENT_GRPC_VERSION
2525

2626
repositories {
2727
maven { // The google mirror is less flaky than mavenCentral()

buildscripts/kokoro/android.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,15 +132,18 @@ fi
132132

133133
# Update the statuses with the deltas
134134

135+
set +x
135136
gsutil cp gs://grpc-testing-secrets/github_credentials/oauth_token.txt ~/
136137

137138
desc="New DEX reference count: $(printf "%'d" "$new_dex_count") (delta: $(printf "%'d" "$dex_count_delta"))"
139+
echo "Setting status: $desc"
138140
curl -f -s -X POST -H "Content-Type: application/json" \
139141
-H "Authorization: token $(cat ~/oauth_token.txt | tr -d '\n')" \
140142
-d '{"state": "success", "context": "android/dex_diff", "description": "'"${desc}"'"}' \
141143
"https://api.github.com/repos/grpc/grpc-java/statuses/${KOKORO_GITHUB_PULL_REQUEST_COMMIT}"
142144

143145
desc="New APK size in bytes: $(printf "%'d" "$new_apk_size") (delta: $(printf "%'d" "$apk_size_delta"))"
146+
echo "Setting status: $desc"
144147
curl -f -s -X POST -H "Content-Type: application/json" \
145148
-H "Authorization: token $(cat ~/oauth_token.txt | tr -d '\n')" \
146149
-d '{"state": "success", "context": "android/apk_diff", "description": "'"${desc}"'"}' \

0 commit comments

Comments
 (0)