Commit Graph

156 Commits

Author SHA1 Message Date
Eric Anderson f46793e82d Remove unneeded dependency excludes
Since 44847bf4e, when we upgraded our JUnit version, the JUnit
exclusions have probably not been necessary. e0ac97c4f upgraded
Robolectric to a version that had the auto.service problem fixed.
2023-06-23 11:18:10 -07:00
Kun Zhang 6fd93486cc
test: stop mocking Executor. (#10199)
It is forbidden internally. Error message:

Mocking types which have complex contracts or are easy to construct by
other means is forbidden:

'executor' is mocking 'interface java.util.concurrent.Executor'. Use a
real executor. Mocks of Executor don't execute submitted tasks at all,
which leads to suppressed errors, deadlocks, and brittle tests..
2023-05-17 16:40:32 -07:00
Eric Anderson e0ac97c4fd
Upgrade dependencies (#10178)
Required bumping android compile/targetSdkVersion to 33
2023-05-17 08:32:49 -07:00
Eric Anderson 847ea7cfc9 Upgrade Mockito to 3.12.4
MockitoAnnotations.initMocks() is deprecated.
2023-05-08 16:39:42 -07:00
Terry Wilson 0005029328
android,binder,cronet: .aar file when publishing (#10138) 2023-05-05 15:21:26 -07:00
Eric Anderson be2a2fc3b8 Avoid repeating grpc version in Android documentation
This removes some steps from the release process. These two locations
aren't special enough in way that deserves manually changing the version
each release.
2023-04-14 15:06:53 -07:00
Terry Wilson 3d37dc4e9e
Update README etc to reference 1.54.0 (#9990) 2023-03-24 15:23:33 -07:00
Terry Wilson b5b7cacba9
Upgrade Android Gradle plugin to 7.4.0 (#9933)
This is the latest version of the plugin supported by the Gradle version
in use at the moment (7.6).

Note that this also upgrades the R8 optimizer to a version (4.0.48) that
now uses "full mode" optimization by default.

This also splits off Android projects to run under Java 11 (Gradle
plugin requirement) while the other projects continue to run under Java
8.
2023-03-08 11:18:27 -08:00
yifeizhuang f1f40b0b23
Update README etc to reference 1.52.1 (#9849) 2023-01-19 10:26:16 -08:00
Larry Safran ed71b0a520
Update README etc to reference 1.52.0 (#9815) 2023-01-13 12:44:21 -08:00
Sergii Tkachenko 775d79b0eb Update README etc to reference 1.51.0 2022-11-17 13:22:25 -08:00
Sanjay Pujare 4cb090145b Update README etc to reference 1.50.2 2022-10-20 17:36:54 -07:00
Sergii Tkachenko 6f3c915267
Update README etc to reference 1.50.1 2022-10-19 11:20:08 -07:00
Eric Anderson 6904f88a7d Update README etc to reference 1.50.0 2022-10-13 07:50:08 -07:00
Terry Wilson df0a4bdc1b
Update README etc to reference 1.49.2 (#9588) 2022-10-04 15:16:09 -07:00
Terry Wilson bd33af2dde
Update README etc to reference 1.49.0 (#9487) 2022-08-24 12:11:08 -07:00
yifeizhuang 050cdb14fe Update README etc to reference 1.48.1 2022-08-02 15:47:29 -07:00
yifeizhuang 03abe8a088
Update README etc to reference 1.48.0 (#9401) 2022-07-20 15:36:22 -07:00
Eric Anderson b06942d63b Use Gradle's version catalog
This moves our depedencies into a plain file that can be read and
updated by tooling. While the current tooling is not particularly better
than just using gradle-versions-plugin, it should put us on better
footing. gradle-versions-plugin is actually pretty nice, but will be
incompatible with Gradle 8, so we need to wait a bit to see what the
future holds.

Left libraries as an alias for libs to reduce the commit size and make
it easier to revert if we don't end up liking this approach.

We're using Gradle 7.3.3 where it was an incubating fetaure. But in
Gradle 7.4 is became stable.
2022-06-14 14:04:10 -07:00
Sergii Tkachenko 1b620847ad Update README etc to reference 1.47.0, protobuf plugin 0.8.18 2022-06-02 12:02:16 -07:00
Eric Anderson 0c642581e6 Update README etc to reference 1.45.1 2022-03-30 10:01:09 -07:00
Terry Wilson 3fe2f8e4ff Update README etc to reference 1.45.0 2022-03-10 10:25:32 -08:00
sanjaypujare 80a2ca686f
Update README etc to reference 1.44.1 (#8932) 2022-02-18 16:30:42 -08:00
yifeizhuang 5635c6cb44 Update README etc to reference 1.44.0 2022-01-27 20:24:11 -08:00
ZHANG Dapeng d1e0be6919
all: fix various gradle build warnings 2022-01-18 10:18:16 -08:00
Penn (Dapeng) Zhang 3179bc3be0 Revert "use charset from StandardCharsets instead of 'Charset.forName' (#8779)"
This reverts commit a74a3ad834.
2022-01-18 10:14:50 -08:00
Jintao a74a3ad834
use charset from StandardCharsets instead of 'Charset.forName' (#8779)
Co-authored-by: Penn (Dapeng) Zhang <zdapeng@google.com>
2022-01-07 15:03:14 -08:00
ZHANG Dapeng 86ca55483b
Update README etc to reference 1.43.1 (#8775) 2021-12-21 15:18:52 -08:00
ZHANG Dapeng 282a62e418
Update README etc to reference 1.43.0 (#8760) 2021-12-15 10:27:01 -08:00
yifeizhuang 71c5eb07d3
Update README etc to reference 1.42.1 (#8694) 2021-11-12 16:54:35 -08:00
Sergii Tkachenko d548a35ab9 Update README etc to reference 1.42.0 2021-11-05 13:01:50 -04:00
ZHANG Dapeng 2e84b0f20a
android: bump min Android SDK version to 19 (#8583)
As Google Play Service [discontinued updates for Jelly Bean (API levels 16, 17 & 18)](https://android-developers.googleblog.com/2021/07/google-play-services-discontinuing-jelly-bean.html).
2021-10-06 10:02:32 -07:00
Eric Anderson e76efbb5da Update README etc to reference 1.41.0 2021-09-22 16:50:35 -07:00
ZHANG Dapeng 8a5694b7f8
Update README etc to reference 1.40.1 (#8448) 2021-08-25 10:58:42 -07:00
yifeizhuang 90606abdf1 Update README etc to reference 1.40.0 2021-08-17 15:03:54 -07:00
Eric Anderson 57bd087cdf buildscripts: Build android instrumentation tests in android CI
Binder's :build was missing. Cronet build failed without specifying
Java 8 because of the transitive Guava dependency.
2021-08-02 16:52:30 -07:00
ZHANG Dapeng 860e97d12a
all: API refactoring in preparation to support retry stats (#8355)
Rebased PR #8343 into the first commit of this PR, then (the 2nd commit) reverted the part for metric recording of retry attempts. The PR as a whole is mechanical refactoring. No behavior change (except that some of the old code path when tracer is created is moved into the new method `streamCreated()`).

The API change is documented in go/grpc-stats-api-change-for-retry-java
2021-07-31 18:33:02 -07:00
ZHANG Dapeng f86dc6c89f
Update README etc to reference 1.39.0 (#8298) 2021-06-30 09:23:15 -07:00
ZHANG Dapeng 4f09073e0f
all: remove 2-arg ClientStreamListener.closed()
We used to have two ClientStreamListener.closed() methods. One is simply calling the other with default arg. This doubles debugging (e.g. #7921) and sometimes unit testing work. Deleting the 2-arg method to cleanup.

This PR is purely refactoring.
2021-06-29 10:27:03 -07:00
Eric Anderson 5642e01243
Replace failOnVersionConflict() with custom requireUpperBoundDeps
failOnVersionConflict has never been good for us. It is equivalent to
Maven dependencyConvergence which we discourage our users to use because
it is too tempermental and _creates_ version skew issues over time.
However, we had no real alternative for determining if our deps would be
misinterpeted by Maven.

failOnVersionConflict has been a constant drain and makes it really hard
to do seemingly-trivial upgrades. As evidenced by protobuf/build.gradle
in this change, it also caused _us_ to introduce a version downgrade.

This introduces our own custom requireUpperBoundDeps implementation so
that we can get back to simple dependency upgrades _and_ increase our
confidence in a consistent dependency tree.
2021-06-11 14:01:18 -07:00
Eric Gribkoff 465c932b41
Update README etc to reference 1.38.0 (#8189) 2021-05-19 00:09:36 -07:00
Chengyuan Zhang fd8964f7d1
Update README etc to reference 1.37.1 (#8179) 2021-05-14 12:42:28 -07:00
Eric Anderson e08b9db208
Use @DoNotCall for static methods in Builders that throw
Since static methods are pseudo-inherited by Builder implementations but
are trivially accidentally used, we re-define static methods in each
builder to make them behave more like the caller would expect. However,
not all the methods actually work; some just throw because the caller
was certainly not getting what they would expect.

Annotating with `@DoNotCall` can expose the problems at compile time
instead of runtime. While `@Deprecated` would also be an option, it is a
bit harder to figure out the ramifications and whether we want to go
that route.

This change was suggested by a lint tool for XdsServerBuilder and it
seems appropriate so I applied it to the other similar cases I could
find.
2021-05-12 10:12:52 -07:00
Chengyuan Zhang f33658a6d7
Migrate away from Jcenter (#8111)
Replaces jcenter with mavenCentral.
2021-04-22 15:59:36 -07:00
Sergii Tkachenko 1b996b171b Update README etc to reference 1.37.0 2021-04-08 12:34:06 -04:00
Eric Anderson ae574434ee Update README etc to reference 1.36.0 2021-02-24 10:51:14 -08:00
ZHANG Dapeng 45a151810c
all: implement Helper.createResolvingOobChannelBuilder(target, creds)
- Add APIs to `ClientTransportFactory`:
```java
public interface ClientTransportFactory {
  /**
   * Swaps to a new ChannelCredentials with all other settings unchanged. Returns null if the
   * ChannelCredentials is not supported by the current ClientTransportFactory settings.
   */
  SwapChannelCredentialsResult swapChannelCredentials(ChannelCredentials channelCreds);

  final class SwapChannelCredentialsResult {
    final ClientTransportFactory transportFactory;
    @Nullable final CallCredentials callCredentials;
  }
}
```

- Add `ChannelCredentials` to constructor args of `ManagedChannelImplBuilder`:
 ```java
public ManagedChannelImplBuilder(
      String target, @Nullable ChannelCredentials channelCreds, @Nullable CallCredentials callCreds, ...)
  ```
2021-01-28 09:49:53 -08:00
Nick Hill 2072df9be6
Random acts of garbage reduction
I noticed some opportunities to reduce allocations on hot paths
2021-01-21 10:45:31 -08:00
Eric Gribkoff 3b03d317cd
Update README etc to reference 1.35.0 (#7804) 2021-01-13 19:34:33 -08:00
Chengyuan Zhang 64d2bf1256
android, cronet, android-interop-testing: bump Android versions (#7740)
Bumps target SDK version of grpc-android, grpc-cronet, grpc-android-interop-testing to API 29. Major related changes are:

- Migrated android.support to androidx, which is required for Android Q.
- android.net.NetworkInfo is deprecated in SDK 29, suppressed compiler warnings as it is needed for supporting old Android versions.
- Robolectric requires Java 9+ for Android 29, which causes unit tests in grpc-cronet fail. Added annotation to emulate Android 28 for grpc-cronet's test.
- Upgraded Android dependencies accordingly in android-interop-testing.
2020-12-29 18:05:09 -08:00