Commit Graph

50 Commits

Author SHA1 Message Date
Eric Anderson ceadf6df6d Upgrade to Gradle 8.3
Examples are updated to use the new version as well, which wasn't done
last time in f3f4ed4ef. That noticed some things that were missed
before.
2023-08-18 09:59:57 -07:00
Eric Anderson f8baa9ca1d Upgrade protobuf-java and protoc to 3.24.0 2023-08-14 09:20:39 -07:00
Eric Anderson f3f4ed4ef3 Upgrade to Gradle 8.2.1 and upgrade plugins
Most changes are migrating from conventions to the equivalent
extensions. JMH, AppEngine, and Jib plugins trigger future compatibility
warnings with `--warning-mode all`.

The movement of configurations was to allow sourceSets to create the
configurations and then we just configure them. When configurations were
before sourceSets, we'd implicitly create the configuration.

The examples were _not_ updated to the newer Gradle, although the
non-Android examples work with the newer Gradle. The Android examples
use an older Android Gradle Plugin which will need to be upgraded first.
https://github.com/grpc/grpc-java/issues/10445
2023-08-02 13:29:44 -07:00
Eric Anderson a77e1a240a Downgrade Netty to 4.1.93-Final
Our benchmarks saw a serious performance decrease with the upgrade from
Netty 4.1.88 to 4.1.94. The problem was tracked down to a single PR in
4.1.94, so we avoid 4.1.94 for now.

Fixes #10401
2023-07-21 17:41:41 -07:00
Sergii Tkachenko 419767f968
Upgrade dependencies post v1.57.x branch cut (#10359)
### Dependency updates

#### Update successfully to the latest
- [x] `androidx.core:core 1.10.0 -> 1.10.1`
- [x] `com.google.api.grpc:proto-google-common-protos 2.17.0 -> 2.22.0`
- [x] `com.google.cloud:google-cloud-logging 3.14.5 -> 3.15.5`
- [x] `com.google.truth:truth 1.0.1 -> 1.1.5`
- [x] `com.puppycrawl.tools:checkstyle 8.28 -> 10.12.1`
- [x] `org.robolectric:robolectric 4.9.2 -> 4.10.3`
- [x] Auto-value
   - [x] `com.google.auto.value:auto-value 1.10.1 -> 1.10.2`
   - [x] `com.google.auto.value:auto-value-annotations 1.10.1 -> 1.10.2`
- [x] Protobuf
   - [x] `com.google.protobuf:protobuf-java 3.22.3 -> 3.23.4`
   - [x] `com.google.protobuf:protobuf-java-util 3.22.3 -> 3.23.4`
   - [x] `com.google.protobuf:protobuf-javalite 3.22.3 -> 3.23.4`
   - [x] `com.google.protobuf:protoc 3.22.3 -> 3.23.4`
- [x] Errorprone
   - [x] `com.google.errorprone:error_prone_annotations 2.18.0 -> 2.20.0`
   - [x] `com.google.errorprone:error_prone_core 2.18.0 -> 2.20.0`
   - ~`libs.checkstylejava8 = com.puppycrawl.tools:checkstyle 9.3 -> 10.12.1`~ -- pinned to last version supporting java8, update not needed

#### Updated to non-latest
- [x] `com.squareup.okio:okio 1.17.5 ->` ~`3.4.0`~ `2.10.0` -- updating to 3.x failed due to them [introducing gradle multiplatform artifacts](https://github.com/square/okio/blob/master/CHANGELOG.md#version-320). Error in [the comment below](https://github.com/grpc/grpc-java/pull/10359#issuecomment-1632853307.).
- [x] `org.checkerframework:checker-qual 3.33.0 ->` ~`3.36.0`~ -- removed, no longer needed
- [x] Mockito - updated to `4.11.0`. Versions 5.x break some tests. Errors in [the comment below](https://github.com/grpc/grpc-java/pull/10359#issuecomment-1632834435).
   - `org.mockito:mockito-android 3.12.4 ->` ~`5.4.0`~ `4.11.0`
   - `org.mockito:mockito-core 3.12.4 ->` ~`5.4.0`~ `4.11.0`

#### Not updated
- Cronet -- upgrade failed, created a blocker ticket https://github.com/grpc/grpc-java/issues/10396
   - ~`org.chromium.net:cronet-api 108.5359.79 -> 113.5672.61`~
   - ~`org.chromium.net:cronet-embedded 108.5359.79 -> 113.5672.61`~
- Google auth -- upgrade blocked by https://github.com/grpc/grpc-java/pull/9118
   - ~`com.google.auth:google-auth-library-credentials 1.4.0 -> 1.19.0`~
   - ~`com.google.auth:google-auth-library-oauth2-http 1.4.0 -> 1.19.0`~
- Guava -- not upgraded: 32.1.0 [broke gradle modules](https://github.com/google/guava/releases/tag/v32.1.0)
   - ~`libs.guava = com.google.guava:guava 32.0.1-android -> 32.1.1-jre`~
   - ~`libs.guava.jre = com.google.guava:guava 32.0.1-jre -> 32.1.1-jre`~
   - ~`libs.guava.testlib = com.google.guava:guava-testlib 32.0.1-android -> 32.1.1-jre`~


### checkForUpdates results
```
> Task :checkForUpdates
androidx.core:core 1.10.0 -> 1.10.1
com.google.auto.value:auto-value 1.10.1 -> 1.10.2
com.google.auto.value:auto-value-annotations 1.10.1 -> 1.10.2
org.checkerframework:checker-qual 3.33.0 -> 3.36.0
com.puppycrawl.tools:checkstyle 8.28 -> 10.12.1
org.chromium.net:cronet-api 108.5359.79 -> 113.5672.61
org.chromium.net:cronet-embedded 108.5359.79 -> 113.5672.61
com.google.errorprone:error_prone_annotations 2.18.0 -> 2.20.0
com.google.errorprone:error_prone_core 2.18.0 -> 2.20.0
com.google.errorprone:error_prone_core 2.10.0 -> 2.20.0
com.google.api.grpc:proto-google-common-protos 2.17.0 -> 2.22.0
com.google.auth:google-auth-library-credentials 1.4.0 -> 1.19.0
com.google.auth:google-auth-library-oauth2-http 1.4.0 -> 1.19.0
com.google.cloud:google-cloud-logging 3.14.5 -> 3.15.5
com.google.guava:guava 32.0.1-android -> 32.1.1-jre
com.google.guava:guava 32.0.1-jre -> 32.1.1-jre
com.google.guava:guava-testlib 32.0.1-android -> 32.1.1-jre
org.mockito:mockito-android 3.12.4 -> 5.4.0
org.mockito:mockito-core 3.12.4 -> 5.4.0
com.squareup.okio:okio 1.17.5 -> 3.4.0
com.google.protobuf:protobuf-java 3.22.3 -> 3.23.4
com.google.protobuf:protobuf-java-util 3.22.3 -> 3.23.4
com.google.protobuf:protobuf-javalite 3.22.3 -> 3.23.4
com.google.protobuf:protoc 3.22.3 -> 3.23.4
org.robolectric:robolectric 4.9.2 -> 4.10.3
com.google.truth:truth 1.0.1 -> 1.1.5
```
2023-07-21 10:15:05 -07:00
Eric Anderson 361616ae7c Upgrade Netty to 4.1.94-Final 2023-07-06 08:46:45 -07:00
Mark S. Lewis ae59afb5bf
Update guava dependency to address CVE-2023-2976 (#10249)
Explicit dependencies to keep versions in step with newer Guava
2023-06-12 12:43:35 -07:00
Eric Anderson 5754518914 Upgrade netty-tcnative to 2.0.61.Final
This updates the version of boringssl and removes the dependency on APR.
netty-tcnative 2.0.56.Final uses APR 1.7.0, so is in scope for
CVE-2021-35940, CVE-2022-28331, and CVE-2022-24963. netty-tcnative is
not actually vulnerable. The binary does not include apr_socket_sendv(),
apr_encode_*(), apr_pencode_*(), apr_decode_*(), apr_pdecode_*(). The
binary does include apr_time_exp_*() but it is unused code.
Unfortunately --gc-sections wasn't used during compilation.
apr_time_now() is used, but that just calls gettimeofday() and is not
vulnerable.

There's no panic here, but this updates netty-tcnative just a few weeks
before we would have ordinarily done so. Bumping the version makes life
easier for everyone.
2023-06-12 11:01:06 -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 cd7b81c6d2 gradle: Assocate an artifact to every version
This allows the checkForUpdates task to look for newer versions.
2023-05-15 14:01:41 -07:00
Eric Anderson 847ea7cfc9 Upgrade Mockito to 3.12.4
MockitoAnnotations.initMocks() is deprecated.
2023-05-08 16:39:42 -07:00
Eric Anderson 1551cc7403 Upgrade Protobuf Java to 3.22.3 (aka 22.3)
The version used by protoc-gen-grpc-java will be upgraded separately,
because of large C++ build changes necessary. But that won't impact
users at all. We are upgrading to protoc 22.3; only the grpc plugin is
not upgraded.

Bazel is upgraded for both Java and C++.
2023-04-17 13:16:20 -07:00
Benjamin Peterson 5be17e8b22 build: allow Java 11+ to use modern error prone 2023-03-02 17:31:50 -08:00
Larry Safran b8d23a3c2c
netty:Upgrade Netty from 4.1.79 to 4.1.87, tcnative from 2.0.54 to 2.0.56 (#9784)
* Upgrade Netty from 4.1.79 to 4.1.87 and tcnative from 2.0.54 to 2.0.56
2023-02-06 17:54:28 -08:00
Eric Anderson 44847bf4e9
Upgrade JUnit to 4.13.2
ExpectedException is deprecated, so I fixed the new warnings. However,
we are still using ExpectedException many places and had previously
supressed the warning. See
https://github.com/grpc/grpc-java/issues/7467 . I did not fix those
existing instances that had suppressed the warning, since it is
unrelated to the upgrade and we have been free to fix them at any time
since we dropped Java 7.
2023-01-20 09:33:11 -08:00
Eric Anderson eb391fd66c Bump to Gradle 7.6 and update plugins
As normal, Android versions weren't touched as it tends to be special to
upgrade.

The errorprone plugin handles errorproneJavac for us now, since it
hasn't changed in five years. VERSION_CATALOGS is already enabled by
default and graduated out of preview.

Fixes #9802
2023-01-11 08:17:17 -08:00
Eric Anderson d17a2db4bd Upgrade to Checkstyle 8.28
Trying to upgrade Gradle to 7.6 improved the checkstyle plugin such that
it appears to have been running in new occasions. That in turn exposed
us to https://github.com/checkstyle/checkstyle/issues/5088. That bug was
fixed in 8.28, which also fixed lots of other bugs. So now we have
better checking and some existing volations needed fixing. Since the
code style fixes generated a lot of noise, this is a pre-fix to reduce
the size of a Gradle upgrade.

I did not upgrade past 8.28 because at some point some other bugs were
introduced, in particular with the Indentation module. I chose the
oldest version that had the particular bug impacting me fixed. Upgrading
to this old-but-newer version still makes it easier to upgrade to a
newer version in the future.
2023-01-05 17:07:04 -08:00
Eric Anderson 85bdca45fa Bump Protobuf to 3.21.7 2022-09-30 14:02:45 -07:00
yifeizhuang 0a699ad694
netty: upgrade netty from 4.1.77.Final to 4.1.29.Final and tcnative from 2.0.53 to 2.0.54 (#9451) 2022-08-31 16:02:27 -07:00
Eric Anderson 61f19d707a
Swap Animalsniffer to Java 8 and Android 19
Also added missing signatures. Swapping to version catalog will make
this process easier in the future.
2022-08-10 12:41:57 -07:00
Eric Anderson fb314d3631
Bump versions for assorted dependencies
If I didn't upgrade X there is probably a reason, but worst-case the
reason was "I was lazy." I did the easy stuff, so if upgrading caused
problems of any real sort I skipped it and moved on. The main other
reason is there's some stuff we're more conservative about upgrading,
but you can't distinguish one from the other in this commit.
2022-06-30 15:25:43 -07:00
Eric Anderson c0790283ec
Bump protobuf to 3.21.1 (#9311)
Fixes #9264
2022-06-30 11:18:49 -07:00
Terry Wilson 7bd0797496
all: Update netty to 4.1.77.Final and netty_tcnative to 2.0.53.Final (#9027)
all: Update netty to 4.1.77.Final and netty_tcnative to 2.0.53.Final

Also switches to a non-release version of rules_jvm_external to allow Bazel build to work with artifact classifiers.
2022-06-24 10:47:27 -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
Eric Anderson e0dca93c6a
Bump to Gradle 7.3.3
Android Gradle plugin bumped to 4.2.0 in examples, for Gradle 7 compat
and to match main build.

Jib 3 changed default base image away from distroless, but we do want
to use distroless.
2022-01-10 10:28:42 -08:00
Eric Anderson d44de5069d
Bump to Gradle 6.9 and update plugins
These changes make the build compatible with Gradle 7, except for
Android which requires plugin updates.

I removed animalsniffer from binder because it did nothing (as there
were no signatures) and it was failing after setting toolVersion. It
failed because animalsniffer is only compatible with java plugin. After
this change I put the withId(animalsniffer) loading inside the
withId(java) to avoid a plugin ordering failure. That made it safe again
for binder to load animalsniffer, but it is still best to remove the
plugin from binder as it is misleading.

I did not upgrade Android plugin versions as newer versions (even 3.6)
require dealing with androidx (#8421).
2022-01-07 09:54:50 -08:00
Eric Anderson ec70b64610
Bump Gradle and plugin versions
Android plugins weren't touched, since they will need a lot more testing
when doing so.
2020-12-17 15:02:27 -08:00
Eric Gribkoff 784e6b62f4
Upgrade to Gradle 6.5.1 2020-07-06 15:40:45 -07:00
Eric Anderson 3c3a823a81 Swap to Gradle's Plugin DSL for much of build
Examples and android projects were left unchanged. They can be changed
later.

No plugin versions were changed, to make this as non-functional of a
change as possible. Upgrading Gradle to 5.6 was necessary for
pluginManagement in settings.gradle.
2019-09-13 09:42:17 -07:00
Eric Anderson 26bd76fa76
Upgrade to Gradle 5 2019-06-07 08:40:53 -07:00
ZHANG Dapeng 755a22790b
android/android-interop-testing/examples: upgrade android plugin
This resolves #5523

While bumping `com.android.tools.build:gradle:3.1.2` to `3.3.0`, some other plugins/artifacts/maven repo/buildscripts have to be updated:

- gradle (wrapper) need to upgrade to 4.10.x
- protobuf gradle plugin need to bump a version compatible with gradle version.
- need add `google()` and `jcenter()` repos for android (otherwise `com.android.tools.build:aapt2:3.3.0x` and `trove4j` will not be found resp.)
- need to accept license for Android "build-tools;28.0.3" in kokoro env.
2019-04-02 14:52:27 -07:00
Eric Anderson 94b2618a35 Upgrade Gradle to 4.9
This opens up the ability of dependency locking and the now-stable Maven
Publish Plugin. Also failOnVersionConflict no longer needs to be
commented out for the dependency insight report.
2018-07-26 13:43:50 -07:00
Eric Anderson e085a0eca0 Bump to Gradle 4.7
The new jmh plugin fixes a warning for the newer version of Gradle.
The new AppEngine plugin still produces a warning, but updating it
anyway so people know that upgrading the plugin doesn't fix the problem.
The new android-maven plugin fixes a build problem with the newer
Gradle.

The Visual Studio fixes were necessary starting ~4.4.
https://github.com/gradle/gradle-native/issues/34#issuecomment-335222096
describes the change in behavior.

There's nothing immediately being used as part of this update. It's just
to keep us current and to get us over that Visual Studio change hump.
2018-05-17 15:46:21 -07:00
Eric Gribkoff 860df5177d
all: update gradle-wrapper.jar 2018-01-23 09:00:49 -08:00
Eric Anderson 46b2ce1922 Upgrade to Gradle 4.3
While this fixes a Gradle-caused failure on Java 9, it is still failing
due to Generated annotations as seen in #3633.

Fixes #3632
2017-10-30 15:38:52 -07:00
Carl Mastrangelo 0b50095aa6 all: update to gradle 4.0.1
There is a deadlock in 4.0.0 with running tests in parallel
2017-07-12 10:07:14 -07:00
Carl Mastrangelo cc5343a530 all: update to gradle 4.0 2017-07-05 18:32:35 -07:00
Carl Mastrangelo 1da1dba9fb all: update to gradle 3.5 2017-06-07 17:18:44 -07:00
Eric Anderson 810b2d0b96 all: Update to gradle 3.4.1
Among build speed improvements and VS 2015 support, it also improves
quote handling in gradlew.
2017-04-06 15:36:47 -07:00
Carl Mastrangelo 18e628ab1d all: update to gradle 3.2
* all: update to gradle 3.2
2016-11-23 14:43:18 -08:00
Eric Anderson ab85d8751b Update to Gradle 2.14
Is faster and includes a security fix.
2016-08-04 10:03:57 -07:00
Eric Anderson 446f0cb85f Upgrade to Gradle 2.13
This improves our documentation for the gradle protobuf plugin, as its
version is dependent on the gradle version.

Gradle now has the --tests flag, performance improvements, and support
for OpenPGP subkeys.
2016-05-09 09:36:13 -07:00
Carl Mastrangelo 3a4b266b4f Bump gradle version to 2.11 2016-03-02 09:25:37 -08:00
Eric Anderson 46ce4098c5 Update gradle to 2.10
Gets us past some minor DSL changes and should get increased build
performance. Will make it easier to update to 2.11 and other future
versions.
2016-01-26 13:38:04 -08:00
Eric Anderson 209d3a3f38 Upgrade gradle to 2.8
This fixes a problem where gradle would try to use VC's amd64_x86 cl
(without the correct environment) and fail to compile with return code
-1073741515 (STATU_DLL_NOT_FOUND) because of missing mspdb120.dll.
2015-10-23 13:46:37 -07:00
Xudong Ma b121c46b42 Reduce OkHttp dependency, copy all the needed files into our repository. 2015-10-15 16:35:08 -07:00
Xudong Ma 6d296e84b6 Upgrade OkHttp to 2.5 2015-10-15 16:35:08 -07:00
nmittler 518b7dbf7c Slight performance improvment for MutableHandlerRegistryImpl 2015-05-12 09:56:45 -07:00
zhangkun83 da3c3f8ced Solution for GRPC codegen deployment. 2015-04-16 15:07:36 -07:00
Jake Wharton b5291c937d Add Gradle wrapper for building. 2015-01-27 16:30:48 -08:00