Commit Graph

54 Commits

Author SHA1 Message Date
Chengyuan Zhang b3429ec2d9
android: make Channel always enterIdle upon network recover (#7611)
On Android, there is a race between making new RPCs and reconnecting after network comes back. If the former happens first, RPCs fail immediately. This is because resetConnectBackoff() does not update the picker before trying to reconnect and new RPCs are sent with the old picker, which fails RPCs immediately.

In this change, we move to use enterIdle(), which updates the channel picker to cause new RPCs being buffered (while subchannels are in reconnecting), at the moment network recovers. Hopefully, this can avoid RPCs being dropped prematurely in network recovery.
2020-11-17 15:27:25 -08:00
Chengyuan Zhang f444b7bcc0
android, cronet, android-interop-testing, example/drop support for android SDK versions older than 16 (#7253) 2020-07-28 12:40:55 -07:00
ZHANG Dapeng 0044f8ce56
all: migrate gradle build to java-library plugin
- Use gradle configuration `api` for dependencies that are part of grpc public api signatures.
- Replace deprecated gradle configurations `compile`, `testCompile`, `runtime` and `testRuntime`.
- With minimal change in dependencies: If we need dep X and Y to compile our code, and if X transitively depends on Y, then our build would still pass even if we only include X as `compile`/`implementation` dependency for our project. Ideally we should include both X and Y explicitly as `implementation` dependency for our project, but in this PR we don't add the missing Y if it is previously missing.
2020-05-04 16:44:30 -07:00
Chengyuan Zhang b06f888615
android: suppress warnings for deprecated constants in ConnectivityManager (#6835)
For Android version 28, some constants in ConnectivityManager have been deprecated such as ConnectivityManager. CONNECTIVITY_ACTION, ConnectivityManager. TYPE_WIFI, ConnectivityManager. TYPE_MOBILE, etc. In grpc-android, they are used for supporting legacy SDK connectivity state monitoring (and its unit tests). They work as intended for legacy SDK versions. So we suppress those warnings for the target SDK version 28.
2020-03-18 10:31:56 -07:00
Chengyuan Zhang 5ba663bcf6
android: add grpc-android into main build (#6793)
Add grpc-android into main build. grpc-android will be built if Gradle option skipAndroid is false. This change also migrates deprecated Robolectric methods to androidx.test methods.
2020-03-04 15:40:39 -08:00
Ran 3cd59c0b02
android: Annotate tests to use Robolectric's LEGACY LooperMode. bump roboletric to 4.3.1, truth to 1.0.1 and sdk to 28. (#6773) 2020-02-27 17:00:15 -08:00
Jihun Cho 3e9f3964c4 Start 1.29.0 development cycle 2020-02-26 09:37:27 -08:00
Eric Anderson ca56aa30d4 Start 1.28.0 development cycle 2020-01-14 15:10:05 -08:00
Tomo Suzuki 75f6fd8f10 Upgrade error_prone_annotations to 2.3.4 2020-01-03 14:50:34 -08:00
Eric Gribkoff bfa085a1cf
Start 1.27.0 development cycle (#6480) 2019-12-03 17:27:55 -08:00
Kun Zhang 47d798bbec
Start 1.26.0 development cycle (#6329) 2019-10-23 15:27:22 -07:00
Elliotte Rusty Harold e99672e03d all: Update to truth 1.0
* Update to truth 1.0
2019-09-11 08:53:18 -07:00
Chengyuan Zhang fa8f89a1a6
Start 1.25.0 development cycle (#6141) 2019-09-10 17:41:37 -07:00
Chengyuan Zhang 5fbe2ed8e8
android: final stabilization of AndroidChannelBuilder (#6097)
* Removed ExperimentalApi annotation for AndroidChannelBuilder

* Put ExperimentalApi annotation back to deprecated method.
2019-08-28 09:52:08 -07:00
Chengyuan Zhang 1e475be64d
android: deleted unused code leftover in AndroidChannelBuilder test. (#6098) 2019-08-28 09:51:44 -07:00
Chengyuan Zhang 493af030ab
android: delete deprecated API methods (#6088) 2019-08-21 16:31:36 -07:00
Chengyuan Zhang 3a9616fc25
android: clean up AndroidChannelBuilder APIs (#6083)
* Added missing Javadoc for public methods, deprecate fromBuilder and replace with usingBuilder.

* Removed unnecessary final keyword for static methods.

* call usingBuilder in deprecated fromBuilder

* Changed Javadoc description for usingBuilder method.
2019-08-19 17:21:43 -07:00
Chengyuan Zhang c521a31886
android: fix Javadoc symbol/class not found errors (#6063)
* android: fix Javadoc symbol/class not found errors

* Removed redundant join, files API can already handle list.

* Replace usage of javaCompile with javaCompileProvider

* Avoid afterEvaluate by filling javadocs.classpath in android configuration.

* Construct FileCollection via files(Closure), which delays the file resolution.
2019-08-15 12:47:14 -07:00
Eric Anderson 6c7258b05e Upgrade gradle-errorprone-plugin to 0.8.1
This fixes the following warning when building grpc-android:
WARNING: API 'variant.getJavaCompiler()' is obsolete and has been replaced with 'variant.getJavaCompileProvider()'.
It will be removed at the end of 2019.
For more information, see https://d.android.com/r/tools/task-configuration-avoidance.
To determine what is calling variant.getJavaCompiler(), use -Pandroid.debug.obsoleteApi=true on the command line to display a stack trace.
2019-08-14 16:22:59 -05:00
ZHANG Dapeng e14f8de4ab
Start 1.24.0 development cycle 2019-07-31 11:03:13 -07:00
Jihun Cho e57d4c5a8e
Start 1.23.0 development cycle (#5899) 2019-06-18 15:54:16 -07:00
Eric Anderson be819fa3fd
android: Convert to maven-publish
com.github.dcendents:android-maven-gradle-plugin is incompatible with
Gradle 5 and the project hasn't seen any activity in over a year, so it
seems unlikely to get fixed.

We want to use maven-publish anyway, since that's what we use elsewhere.
2019-06-06 14:53:27 -07:00
Carl Mastrangelo 7657523b28
all: update to error prone 2.3.3 2019-06-05 15:28:43 -07:00
Carl Mastrangelo 409afe5867
all: update to truth 0.45 2019-06-04 21:12:21 -07:00
Eric Anderson 3aa3218fb2 Start 1.22.0 development cycle 2019-05-09 13:53:12 -07:00
Carl Mastrangelo 04e07034f3
all: update to truth 0.44 2019-04-23 10:50:49 -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
Kun Zhang 026e4c53bd
Start 1.21.0 development cycle (#5515) 2019-03-28 13:27:45 -07:00
Carl Mastrangelo 041cf2abd4
Start 1.20.0 development cycle 2019-02-12 14:46:28 -08:00
Jihun Cho 1c3432c3fb
all: migrate gradle publish from maven to use maven-publish plugin (#5289) 2019-01-31 17:38:43 -08:00
ZHANG Dapeng 4337da6d7d
Start 1.19.0 development cycle 2019-01-02 15:31:01 -08:00
Thomas Broyer 2ffc46d6fa Update net.ltgt.errorprone to 0.6 and enable Error Prone on JDK 10+ 2018-12-13 10:17:06 -08:00
Jihun Cho 1506135333 Start 1.18.0 development cycle 2018-11-19 14:49:35 -08:00
Eric Anderson 967cc64770 Start 1.17.0 development cycle 2018-10-11 09:29:23 -07:00
Kun Zhang 28d44ae46d
Start 1.16.0 development cycle (#4803) 2018-08-27 17:21:46 -07:00
zpencer 366792f0b9
android: Robolectric shadows shouldn't be stored (#4746)
This is a lint discovered during import.
2018-08-16 15:05:03 -07:00
Spencer Fang 1c5fb5bcdc android: fix raw type lint 2018-08-09 13:31:23 -07:00
Eric Gribkoff f329d120d2
android: add AndroidChannelBuilder#fromBuilder (#4723) 2018-08-02 09:14:27 -07:00
Eric Gribkoff 7c83717490
android: include proguard config to keep method names (#4667)
Also deletes some an forwarding method
2018-07-23 15:51:19 -07:00
zpencer 4335445d98
Start 1.15.0 development cycle (#4650) 2018-07-18 10:48:04 -07:00
Eric Gribkoff 27a1c900a9
android: initialize listener with isConnected=false (#4606) 2018-06-30 09:24:47 -07:00
ZHANG Dapeng 5ce10f0146
all: add gradle format checker
This PR adds an automatic gradle format checker and reformats all the *.gradle files. After this, new changes to *.gradle files will fail to build if not in good format, just like checkStyle failure.
2018-06-11 18:35:18 -07:00
Eric Gribkoff 3e4c692075
android: forward OkHttpChannelBuilder-specific methods to delegate (#4534) 2018-06-07 08:39:42 -07:00
ZHANG Dapeng 8a3e623be7
Start 1.14.0 development cycle 2018-06-04 16:08:31 -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 59c2223d6e android: including signing configuration 2018-05-07 11:31:56 -07:00
Eric Gribkoff 275ebc4e90
android: add artifact build (#4433) 2018-05-03 16:38:54 -07:00
Carl Mastrangelo 60a0b0c471
all: normalize copyright header 2018-05-03 14:55:21 -07:00
Eric Gribkoff 1ad11c1008
android: avoid static init of robolectric shadows (#4402) 2018-04-28 07:22:59 -07:00
zpencer 62e6e2de78
Start 1.13.0 development cycle (#4383) 2018-04-23 15:24:24 -07:00