Commit Graph

513 Commits

Author SHA1 Message Date
Jihun Cho 190ab88400
examples: update xds example readme (#7017) 2020-05-07 13:24:30 -07:00
DRayX a9250c1f99
stub: Add disableAutoRequestWithInitial that disables all automatic inbound flow-control requests
Add a new disableAutoRequest method that disables all automatic requests while disableAutoInboundFlowControl maintains existing behavior.

The default behavior of requesting initial messages is applied even if disableAutoInboundFlowControl is called. ServerCalls disables all automatic flow control which is much more useful in case the user can't handle incoming messages until some time after the call has started.  This change creates a new StartableListener that has an onStart method that is invoked when the call is started which makes initial requests if necessary.

See #6806
2020-05-06 10:19:41 -07:00
Eric Anderson 6a50a63ca8 Replace javax.annotation-api with Tomcat's annotations-api
javax.annotation-api is licensed CDDL, which was not noticed when it was
introduced. Tomcat provides an Apache 2 version of the same annotation. Note
that this annotation is only used when compiling with Java 9+.

Unfortunately this may cause classpath collisions since there are _many_ copies
of this annotation on Maven Central; we wanted one canonical source and
javax.annotation-api seemed like that source. We hope this won't impact many
users since we have always suggested using it only for compilation. But it will
probably impact some users. However, we didn't create this mess, this seems to
be "standard practice" for J2EE, which this annotation is now part of, so we're
just impacted by it.

Fixes #6833
2020-04-30 09:14:32 -07:00
Patrice Chalin d097cc0ee0
RouteGuideClient example: use E7 format for latitude & longitude
As indicated in the proto file, point coordinates are in degrees encoded in E7 format.
https://github.com/grpc/grpc-java/blob/master/examples/src/main/proto/route_guide.proto#L54
2020-04-23 13:21:45 -07:00
ZHANG Dapeng 4947774475
Update README etc to reference 1.29.0 2020-04-22 09:45:09 -07:00
Patrice Chalin da855f4164
Delete example-kotlin (#6936) 2020-04-16 13:55:05 -07:00
ZHANG Dapeng c91e127f93
Start 1.30.0 development cycle 2020-04-07 14:12:53 -07:00
Chengyuan Zhang a1815417de Update README etc to reference 1.28.1 2020-04-03 16:11:41 -07:00
Jihun Cho bf12157fc4
build: bump netty to 4.1.48.Final, bump tcnative to 2.0.30.Final (#6845) 2020-03-24 11:54:59 -07:00
Anar Sultanov b7859e73a0
examples: Add a JWT authentication example (#5915) 2020-03-17 17:43:31 -07:00
Jihun Cho 111e348def
Update README etc to reference 1.28.0 (#6815) 2020-03-10 16:10:04 -07: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
Jihun Cho df1b678698
Update readme to v1.27.2 (#6758) 2020-02-25 18:32:32 -08:00
Chengyuan Zhang 19de229b7f
Update readme to specify 1.27.1 (#6730) 2020-02-19 14:36:47 -08:00
Ziad Hatahet bb37524750
examples: Fix typo in comments (#6721) 2020-02-18 10:16:08 -08:00
ZhenLian 557da62305
netty: Upgrade Netty (4.1.45.Final) & tcnative (2.0.28.Final) 2020-02-06 10:03:14 -08:00
Eric Anderson 2e12b53f2f
examples: Add XDS client example 2020-01-31 11:13:44 -08:00
Elliotte Rusty Harold b3aea8193f
all: update google auth libraries (#6652) 2020-01-30 12:59:55 -08:00
Roman Leventov 589a645a38 stub,examples: Clarify CallStreamObserver's Javadoc (#6561)
* Clarify CallStreamObserver's Javadoc
* Remove unnecessary AtomicBoolean and clarify a comment in ManualFlowControlServer
2020-01-28 11:32:09 -08:00
Eric Anderson 5b7f5b8c3b examples: Allow passing target and simplify lifecycle
The target can be provided on the command line to avoid needing to recompile
the example just to change where the server is located. We use a target instead
of addresses as that is the approach we have wanted to encourage for a while
since it allows choosing alternative name resolvers.

We typically encourage injecting Channels, not ManagedChannels, which has the
added benefit of simplifying the example. Less indirection makes for a better
example.

Swapping to target string could be done to examples-tls and examples-gauth as
well, but it would be much more invasive to the tls example and the gauth
example would need proper testing after the change.
2020-01-23 13:13:54 -08:00
Eric Anderson e7d7c5bde4
examples: Add hostname example
This is placed in its own directory since it depends on grpc-services.
2020-01-17 15:50:49 -08:00
Eric Anderson cf89b4b53d examples: Bump Gradle to 5.6.2
The rest of the build went to Gradle 5.6.2 in 3c3a823a, but that commit
failed to update the examples. This brings the two back in sync.
2020-01-15 09:30:03 -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 Anderson c606519a5d bazel: Support maven_install
maven_install is strongly superior to previous forms of grabbing dependencies
from Maven as it computes the appropriate versions to use from the full
transitive dependencies of all libraries used by an application. It also has
much less boilerplate and includes dependencies with generated targets.

In the future we will drop the jvm_maven_import_external usages and require
maven_install, at which point we can swap to using the `@maven' repository and
no longer depend on compat_repositories.

Fixes #5359
2019-12-30 12:08:42 -08:00
Eric Anderson 6a5ee19695 examples: Suggest Bazel's http_repository instead of git_repository
http_repository is preferred by Bazel over git_repository.
2019-12-30 12:08:42 -08:00
Eric Anderson 4357f7f159 examples: Throw exception in test instead of printStackTrace
Throwing makes cleaner code and also is more helpful if the exception is ever
thrown, as the error will be more clear.
2019-12-16 08:11:51 -08:00
Dounan Shi 9e02cf089e Gracefully shutdown example servers (#6512) 2019-12-13 16:19:45 -08:00
Eric Gribkoff bfa085a1cf
Start 1.27.0 development cycle (#6480) 2019-12-03 17:27:55 -08:00
Eric Anderson 54b7847a7f Update protobuf to 3.11.0 and gson to 2.8.6
Updating Protobuf to bring in improvements for Android.

Protobuf pulls in the newer version of gson and we are happy to update
to it.
2019-12-02 16:43:06 -08:00
Eric Anderson 48929c4d50
Upgrade to protobuf lite 3.10
This finally brings lite into version number sync with full proto.

Well-known protos for javalite are now pre-generated.
2019-11-14 10:26:20 -08:00
Tomo Suzuki 3134df176a all: upgrade to Mockito 2.28.2 (#6355) 2019-10-30 11:07:50 -07:00
raozihao c22e04223b examples: add missing annotation 2019-10-30 09:59:36 -07:00
raozihao da1231abd8 examples:remove unused import statement 2019-10-29 09:59:48 -07:00
Kun Zhang 47d798bbec
Start 1.26.0 development cycle (#6329) 2019-10-23 15:27:22 -07:00
ZHANG Dapeng b009e92156
xds: Bump perfmark to 0.19.0
Resolves #6217
2019-10-22 16:55:39 -07:00
Steve Rao d1411b205c examples: adjust comment (#6314) 2019-10-22 15:45:42 -07:00
Eric Anderson 024a46bd11
bazel: Support --incompatible_load_proto_rules_from_bzl
This flag will be enabled by default in Bazel 1.0

Since I changed the grpc-proto repo version for Bazel, I also synced the
protos.
2019-10-09 14:46:17 -07:00
Elliotte Rusty Harold 079219bbc9 Update to GSON 2.8.5 and protobuf 3.10.0 2019-10-09 07:47:34 -07:00
cmagnuso244 f51336f0cc
examples: Modifies documentation (#6253) 2019-10-07 10:52:39 -07:00
Przemek Piotrowski 9668102f05 netty: bump to 4.1.42 (#6175)
netty: bump to 4.1.42
2019-10-01 13:41:06 -07:00
Jihun Cho 15295c75ae examples: add mavenCentral build.gradle without jcenter repo 2019-09-27 14:33:21 -07:00
ZHANG Dapeng a04ad90888
examples: clarify about potential mistake in unit test
Resolves #6161
2019-09-18 13:24:56 -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
ST-DDT d5b63e9c68 docs, examples: Update the maven plugins version (#6065) 2019-08-20 14:35:03 -07:00
ZHANG Dapeng e14f8de4ab
Start 1.24.0 development cycle 2019-07-31 11:03:13 -07:00
Carl Mastrangelo 57e7bd394e
all: update to proto 3.9.0 2019-07-26 13:53:05 -07:00
Darrien Glasser b4e964bd15 examples/kotlin-example: Fix typo (#5957) 2019-07-08 11:59:20 -07:00
ZHANG Dapeng 1e04dcf5c9
core, examples: allow empty nonfatalStatusCodes, and integer status codes 2019-06-25 15:29:52 -07:00
Jihun Cho 5edd726551
all: fix lint errors (#5919) 2019-06-21 15:16:31 -07:00
ZHANG Dapeng 40595de05a
examples: rename GOOGLE_AUTH_EXAMPLE.md to README.md
This will make the git webpage show the README content automatically in the browser, when you browse https://github.com/grpc/grpc-java/tree/master/examples/example-gauth.
2019-06-20 14:45:53 -07:00
ZHANG Dapeng b24263a023
examples: hedging example
See README change for details.
2019-06-19 11:53:54 -07:00
Jihun Cho e57d4c5a8e
Start 1.23.0 development cycle (#5899) 2019-06-18 15:54:16 -07:00
Eric Anderson 26bd76fa76
Upgrade to Gradle 5 2019-06-07 08:40:53 -07:00
Carl Mastrangelo 409afe5867
all: update to truth 0.45 2019-06-04 21:12:21 -07:00
Chengyuan Zhang f81201024e
upgrade netty version to 4.1.35 and netty-tcnative version to 2.0.25 (#5818) 2019-06-03 11:40:59 -07:00
Ryan Michela 9b4c958201 Explain why client stub mocking is discouraged (#5796) 2019-05-30 08:52:13 -07:00
Chengyuan Zhang e237ee12a0
examples: use test certs for running example-tls (#5763)
* examples: use test certs for running example-tls

* fixed a typo

* update usage printout for trustCertCollectionFilePath is not optional

* Revert "update usage printout for trustCertCollectionFilePath is not optional"

This reverts commit 2dd6d87f64.

* put back the usage of using system default CA and put notes for it

* fixed cmd-line argument options
2019-05-22 09:05:16 -07:00
Eric Anderson bacb741aaf
examples: Use encouraged APIs and avoid over-specifying configuration
Also fix tcnative for Maven. The version had only been updated for
gradle. The wrong version would cause a crash with NoSuchMethodError.
2019-05-16 16:28:55 -07:00
Ruben de Vries e6c8534f10 docs: add note about directExecutor in example tests. 2019-05-15 10:42:33 -07:00
Carl Mastrangelo af51e969da examples: make tls example easier to run (#5715)
* examples: make tls example easier to run

* Make the ca cert able to be verified by the server cert in openssl
* Make the port number consistent in each example (easy to copy paste wrong one)
* use correct netty-tcnative

* address comments
2019-05-10 08:03:30 +02:00
Eric Anderson 3aa3218fb2 Start 1.22.0 development cycle 2019-05-09 13:53:12 -07:00
Eric Anderson 1b6c131056 Revert "Examples: Add a JWT authentication example (#5154)"
This reverts commit ac52e27b2a.

See #5665. Right now it is not any more informative than the header
example, and it encourages some practices I'd rather avoid. It will get
re-added later with improvements.
2019-05-07 17:27:44 -07:00
Kislay Kishore bd2f3c5b62 examples: Fix comment in RouteGuideServer.java (#5670) 2019-05-06 14:23:49 -07:00
Carl Mastrangelo 04e07034f3
all: update to truth 0.44 2019-04-23 10:50:49 -07:00
Eric Anderson 80c3c992a6 core: Move io.grpc to grpc-api
io.grpc has fewer dependencies than io.grpc.internal. Moving it to a
separate artifact lets users use the API without bringing in the deps.
If the library has an optional dependency on grpc, that can be quite
convenient.

We now version-pin both grpc-api and grpc-core, since both contain
internal APIs.

I had to change a few tests in grpc-api to avoid FakeClock. Moving
FakeClock to grpc-api was difficult because it uses
io.grpc.internal.TimeProvider, which can't be moved since it is a
production class. Having grpc-api's tests depend on grpc-core's test
classes would be weird and cause a circular dependincy. Having
grpc-api's tests depend on grpc-core is likely possible, but weird and
fairly unnecessary at this point. So instead I rewrote the tests to
avoid FakeClock.

Fixes #1447
2019-04-16 21:45:40 -07:00
Eric Anderson 52dff83717 Update Protobuf to 3.7.1
This mainly avoids protoc from 3.7.0 which has a dependency on libatomic. Most
of our systems have libatomic, so it mostly works, but the interop docker
container does not, so building fails. Version 3.7.1 was rebuilt to avoid
needing the libatomic shared library.

This has the added benefit that Bazel is now on the same version as Gradle, as
3.7.1 included fixes for Bazel.
2019-04-05 10:55:14 -07:00
ZHANG Dapeng 3f3532ae7e
examples: update copyright year to 2019 2019-04-05 10:53:06 -07:00
Chengyuan Zhang f25fe1fe6a
examples/android: add example for grpc running under StrictMode (#5527)
* added android example running under strictmode to detect grpc clear text network transport

* renamed andriod strictmode example

* use OkHttpChannelBuilder's api to feed with user's own transport executor

* bump gradle and proto-plugin version to match that in master

* add README with a simple demo image

* Update README to use relative link to helloworld
2019-04-04 15:35:45 -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
Chengyuan Zhang 759e7a7fec
examples/kotlin: fix typo in HelloWorld example (#5505) 2019-03-26 14:37:36 -07:00
ZHANG Dapeng a2cda8d15d
all: fix lint 2019-03-20 09:01:25 -07:00
Tim van der Lippe d35fbd7eee all: Update to Mockito 2
This is the public port of cl/238445847

Fixes #5319
2019-03-19 14:17:52 -07:00
Dan Torrey f155d60e75 examples: Add a missing space in comment (#5472)
Add a missing space in the comment before requestStream.setOnReadyHandler()
2019-03-13 10:27:15 -07:00
Eric Anderson d7e53e871b
Merge pull request #5454 from ejona86/protobuf-3.7.0
Upgrade to Protobuf 3.7.0
2019-03-11 15:39:50 -06:00
AmiDavidW 128409000a examples: add an example of server side compression support 2019-03-06 12:25:57 -08:00
Eric Anderson 08aaf7a8b1 Upgrade to Mockito 1.10.19 2019-02-27 17:06:01 -07:00
sanjaypujare 5d87f8b8dd
add a missing critical whitespace (#5408) 2019-02-27 14:33:43 -08:00
Carl Mastrangelo 041cf2abd4
Start 1.20.0 development cycle 2019-02-12 14:46:28 -08:00
Eric Anderson eaca73473c
Upgrade to protobuf 3.6.1
For Bazel, we upgrade to protobuf 3.6.1.2 and javalite HEAD to fix
incompatibilities in newer Bazel releases.

compiler/Dockerfile is unused, so it was removed instead of being updated.

protoc no longer includes codegen for nano, so we remain on the older protoc
any time nano is used.

Protobuf now requires C++11 when compiling, so windows was swapped to
VC 14.
2019-02-07 13:40:53 -08:00
Carl Mastrangelo 3a39b81cf5
all: remove java6 type args 2019-02-04 10:03:50 -08:00
Jihun Cho ef6b6169f8
Adding Bom (#5209) 2019-02-01 14:00:05 -08:00
Jihun Cho 9c796ac23d examples: fix the logger name to match actual class. This PR was originally made by chengsluo (#5159) 2019-01-30 10:42:19 -08:00
ZHANG Dapeng 97218a6edd
examples: Not to promise a supported Bazel version
It's not maintainable.
2019-01-11 08:56:08 -08:00
ZHANG Dapeng 4337da6d7d
Start 1.19.0 development cycle 2019-01-02 15:31:01 -08:00
Carl Mastrangelo b6af40e510 examples,netty: fix lint errors 2019-01-02 15:30:31 -08:00
ZHANG Dapeng df21e40285
all: fix lint 2019-01-02 15:28:44 -08:00
Jihun Cho 40398479ae
examples: update url of project (#5198) 2019-01-02 09:56:22 -08:00
sanjaypujare 847eae8d37
Example: Google Auth example with PubSub API ListTopics for a project ID (#5162)
* Working Google Auth example with PubSub API ListTopics for a project ID
Added another MD file for GOOGLE_AUTH_EXAMPLE
2018-12-18 16:47:42 -08:00
ZHANG Dapeng 52c0789eb7
doc: fix bazel-bin pointer in example-tls README 2018-12-18 12:19:59 -08:00
sanjaypujare ac52e27b2a
Examples: Add a JWT authentication example (#5154) 2018-12-13 12:26:39 -08:00
ZHANG Dapeng b6da00d4f2
examples: alts transitively depends on netty-shaded etc 2018-12-12 12:34:33 -08:00
ZHANG Dapeng 94e7339748
all: remove copies of gradle wrapper 2018-12-11 16:23:28 -08:00
Carl Mastrangelo cf083239e7
all: update proto-google-common-proto to 1.12.0
See https://github.com/census-instrumentation/opencensus-java/issues/1635
2018-12-10 11:31:21 -08:00
ZHANG Dapeng 1b870d79d5
doc: Restructure examples/README.md
Try to make examples/README.md better organized.
2018-12-07 10:48:35 -08:00
ZHANG Dapeng 8ff92a4a7d
doc: emphasize building examples on master branch should follow COMPILING
Resolves #5115
2018-12-06 13:17:59 -08:00
ZHANG Dapeng 3202fcc7d9
examples: move TLS example to a separate project 2018-12-06 12:03:25 -08:00
Carl Mastrangelo edede01da6
netty: bump to 4.1.32 and tcnative 2.0.20 2018-12-05 14:41:30 -08:00
ZHANG Dapeng b8fac8a75e
doc: s/GrpcServerRule/GrpcCleanupRule in README 2018-12-05 12:43:02 -08:00
ZHANG Dapeng 00b4b8870b
examples: move alts bazel and rm alts from pom.xml 2018-12-03 17:12:30 -08:00
ZHANG Dapeng f5b63d703c
examples: make corrections to document of helloworld tls example 2018-12-03 15:08:59 -08:00
ZHANG Dapeng c31f4f1ddf
examples: move alts example to a separate directory 2018-12-03 14:59:07 -08:00
ZHANG Dapeng e9ba65a42e
all: sync tcnative version
The helloworld TLS example can not run properly with the outdated examples/build.gradle.
2018-12-03 13:19:17 -08:00
ZHANG Dapeng 8ecdec73fd
examples: prefer implementation to compile in build.gradle 2018-12-03 10:01:19 -08:00
ZHANG Dapeng 0c38d1877a
buildscripts: Add CI for kotlin non-android
- add CI for kotlin non-android
- bump kotlin version to fix kotlin compiler issue on jdk11
- add javax.annotation dep to fix kotlin build on jdk 9 & 11

Fixes #4725
2018-11-20 13:20:45 -08:00
Jihun Cho 1506135333 Start 1.18.0 development cycle 2018-11-19 14:49:35 -08:00
Rodrigo Queiro 8481943866 Add missing j2objc dependency to Bazel build
This avoids a warning when building artifacts that depend on Guava.

Fixes #5046.
2018-11-13 13:39:35 -08:00
Eric Anderson 959323be97
Add build support for Java 11
It appears everything was already working on Java 11, except
build-specific and testing issues. Updating to Netty 4.1.30 (#4940)
probably fixed the last true Java 11 incompatibility.

Fixes #4933
2018-10-17 11:49:30 -07:00
Eric Anderson 967cc64770 Start 1.17.0 development cycle 2018-10-11 09:29:23 -07:00
Carl Mastrangelo b0f423295b
all: use Java7 brackets 2018-09-14 13:52:29 -07:00
creamsoup 1b6adaff61
Revert "examples: Add google mirrored maven central to examples pom.xml to deflake kokoro." (#4821)
Revert "examples: Add google mirrored maven central to examples pom.xml to deflake kokoro. (#4813)"

This reverts commit 54f76dfeaf.
2018-09-04 19:23:46 -07:00
creamsoup 54f76dfeaf
examples: Add google mirrored maven central to examples pom.xml to deflake kokoro. (#4813)
Add google mirrored maven central to examples pom.xml to deflake kokoro.
2018-08-29 19:02:47 -07:00
Kun Zhang 28d44ae46d
Start 1.16.0 development cycle (#4803) 2018-08-27 17:21:46 -07:00
Eric Anderson 7b126b00a0 all: Swap to Java 7 source and bytecode
Core and OkHttp are left with Java 6 for the moment. Once we resolve
their issues they could be bumped as well.

Updates #3961
2018-08-27 15:29:03 -07:00
Eric Anderson b2f419c212 examples: Fix bad copy/paste for tests with Android Studio 2018-08-24 14:00:02 -07:00
Eric Anderson 3792242ae1
alts: Use grpc-netty-shaded instead of grpc-netty
There's no good way to provide users of ALTS a choice between grpc-netty
and grpc-netty-shaded. Since Netty is not exposed through the ALTS API
surface, we opt for the shaded version as it has fewer deployment
issues. However, this also means that we _can't_ expose any Netty API,
like EventLoopGroup.
2018-08-15 17:39:20 -07:00
Eric Anderson c42d5bbf2c Bump protobuf-gradle-plugin to 0.8.5
The version bump happened in some places already, but many references
were missed.

This fixes the following warning that shows up with newer versions of
Gradle:
> Using TaskInputs.file() with something that doesn't resolve to a File
> object has been deprecated and is scheduled to be removed in Gradle
> 5.0. Use TaskInputs.files() instead.
2018-08-03 11:41:38 -07:00
Eric Anderson b64cde1488 Encourage using grpc-netty-shaded instead of grpc-netty
grpc-netty is still really useful, but for most users who aren't doing
anything advanced using grpc-netty-shaded is much safer from a
dependency basis.

grpc-netty-shaded has seen more usage and has shown itself to be stable
and reduce the number of conflicts due to Netty versions.
2018-08-02 16:58:59 -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
zpencer 603d858186
buildscript: fix jdk-switcher bug always always setting jdk8 (#4652)
This fixes a bug that always hard codes jdk8.

Fixing this revealed an issue for jdk10, so let's remove jdk10
for now and revisit it in a separate PR.
2018-07-18 11:04:31 -07:00
zpencer 4335445d98
Start 1.15.0 development cycle (#4650) 2018-07-18 10:48:04 -07:00
Maxime Guerreiro 4df4d06f78 examples: Fix comment in HelloWorldClient
This client talks to HelloWorld server and not to the route guide one.
2018-06-20 08:58:53 -07:00
DmPanov 49d7e5fd0b examples: replace client certificate in trust store in 'Hello world example with TLS with mutual auth'
... with proper CA certificate to fix SSLV3_ALERT_HANDSHAKE_FAILURE in two host with different IPs setup, switch to required client auth to fail on incorrect configuration
2018-06-13 12:30:57 -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
ZHANG Dapeng 8a3e623be7
Start 1.14.0 development cycle 2018-06-04 16:08:31 -07:00
Kun Zhang 68a462e447
noop: resolve lint warnings found at import. (#4496) 2018-05-23 11:58:19 -07:00
Carl Mastrangelo e3f8891f57
protobuf,examples: move json encoding to examples 2018-05-17 15:48:45 -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
ZHANG Dapeng 701c127f4c
examples: use GrpcCleanupRule for test examples 2018-05-14 11:30:38 -07:00
Carl Mastrangelo 60a0b0c471
all: normalize copyright header 2018-05-03 14:55:21 -07:00
zpencer f8424f7b7b
examples: add kotlin and kotlin android examples (#4037)
Add kotlin version of HelloWorldClient and HelloWorldServer.
Add kotlin version of android example.
2018-05-01 14:54:34 -07:00
Jorg Heymans 48f103c1ed examples: remove deprecated usage of usePlainText(boolean) (#4396)
Update examples (including android) to use non deprecated version of method.
2018-04-30 16:12:41 -07:00
zpencer 62e6e2de78
Start 1.13.0 development cycle (#4383) 2018-04-23 15:24:24 -07:00
Eric Anderson ecab86fad9 examples: upgrade protobuf-maven-plugin to 0.5.1
This was missed in 2094bb4d8
2018-04-05 14:14:32 -07:00
Eric Anderson 4e82e62eaa
Fix compilation in Java 9 2018-03-28 17:13:39 -07:00
Jan Tattermusch 92f95de3cb routeguide: reimplement distance calculation 2018-03-23 08:25:26 -07:00
Eric Anderson 11c8bcde1b Start 1.12.0 development cycle 2018-03-13 09:04:25 -07:00
zpencer 066ad3ceac
buildscripts,travis: fetch from mvn with retries (#4140)
A band aid for #3284, to make its symptoms less noticeable.
2018-03-01 19:11:24 -08:00
Carmi Grushko 2db5e0dc35 all: rename Bazel workspace to io_grpc_grpc_java
Fixes #4095
2018-02-22 13:59:45 -08:00
Eric Gribkoff d4b11e5659
examples: include correct version in Android caching example (#4114) 2018-02-22 12:16:19 -08:00
Jiangtao Li e7f2f1dedd alts: add gRPC ALTS 2018-02-15 09:28:00 -08:00
Eric Gribkoff 79bf7de927
examples: match applicationId to AndroidManifest.xml package (#4075) 2018-02-14 14:43:16 -08:00
Nicholas DiPiazza 14ed692974 examples: Add a "hello-world" with TLS configured 2018-02-06 17:33:32 -08:00
Eric Gribkoff 512e55444e
cronet,examples: remove unused imports 2018-02-05 15:45:52 -08:00
Eric Gribkoff 2f05c23063
Start 1.11.0 development cycle 2018-01-30 15:13:55 -08:00
Eric Gribkoff 0373706b03
examples: update Android examples
Updates include:

* Build file and dependency updates
* Correcting the gradle wrapper for the clientcache example
* Lint fixes (including making AsyncTask subclasses static)
* Dropping the m-prefix from member variables
* Fixing the code indentation
* Fixing and enabling proguard for the routeguide example.
2018-01-30 12:16:30 -08:00
Eric Gribkoff 860df5177d
all: update gradle-wrapper.jar 2018-01-23 09:00:49 -08:00
Eric Anderson 71bad37402 Update protobuf-gradle-plugin to 0.8.3
This fixes support for newer Android Gradle Plugins.
2018-01-12 08:34:05 -08:00
Eric Anderson ba8063e7b0 all: Prefer mock+delegatesTo() over Mockito.spy()
Spies are really magical and easily produce unexpected results. Using them in
tests can easily yield tests that don't do what you think they do. Delegation
is much safer when possible.

Delegation doesn't work when methods `return true`, final methods, and with
restricted visibility, though. So CensusModulesTest and
MaxConnectionIdleManagerTest are left as-is.
2018-01-11 09:32:54 -08:00
Rodrigo Queiro 2fb5d53d1b bazel: Remove com_google_protobuf_java
This was deprecated with Bazel 0.8.0, which now uses
@com_google_protobuf instead.

This change will break users that use
grpc_java_repositories(omit_com_google_protobuf_java=True), so I've
added a custom error message to make the resolution clearer.
2018-01-09 11:02:03 -08:00
Kun Zhang 86d64122e5
Upgrade to Protobuf 3.5.1 and Protoc 3.5.1-1. (#3921)
protoc-3.5.0-linux-x86_64 introduced GLIBC_2.14 dependency and broke
gRPC release process (https://github.com/google/protobuf/issues/4138).
3.5.1-1 is the proper re-build.
2018-01-05 16:40:20 -08:00
Kun Zhang 04420dfdf7
Start 1.10.0 development cycle (#3877) 2017-12-18 10:28:02 -08:00
Eric Gribkoff 94bbe64e22
examples: add Android client side caching example app 2017-12-06 22:55:09 -08:00
Carl Mastrangelo c9b02db276
all: add Status messages to all statuses 2017-12-04 19:00:16 -08:00
Carl Mastrangelo aee5fc4176
all: update to proto 3.5.0 2017-11-30 11:50:19 -08:00
kenji yoshida 4db323c5c4 all: fix grammar typos in javadocs 2017-11-22 18:00:51 -08:00
Garrett Jones 69aeddae49 Bumping proto-google-common-protos to 1.0.0 2017-11-17 13:15:31 -08:00
Carl Mastrangelo ae37d21587
all: bump to 1.9.0-SNAPSHOT 2017-11-06 17:39:26 -08:00
Eric Gribkoff 213d2f5c71
android-interop-testing,examples: bump minSdkVersion to 14 2017-11-06 11:03:52 -08:00
Carl Mastrangelo 253a01461b
examples: remove deprecated stub field references 2017-11-01 14:57:24 -07: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
Michael Vorburger b5d93850e7 Replace IntelliJ IDEA specific sourceDirs with sourceSets
The sourceSets also works with Eclipse, and presumably other IDEs (OOB).

see also https://github.com/google/protobuf-gradle-plugin/issues/109
2017-10-26 13:35:14 -07:00
ZHANG Dapeng dba2323585 compiler: Remove enable_depreated option (#3541) 2017-10-05 14:14:57 -07:00
Carl Mastrangelo 5e36a8deb5 all: upgrade to JUnit 4.12 2017-10-05 11:24:15 -07:00
ZHANG Dapeng cbcab9b498 examples: fix Bazel build
Refactor the proto file `helloworld_streaming.proto` because Bazel and Gradle have incompatible base directory for proto imports. Bazel's proto import is relative to WORKSPACE, whereas Gradle proto plugin's is relative to `${sourceSet}/proto/`. In `helloworld_streaming.proto` file, `import helloworld.proto` does not work for Bazel. If `import src/main/proto/helloworld.proto`, that works for Bazel, but Gradle and Maven would fail. Some workarounds are very hacky, so use independent proto without imports instead to avoid this issue.
2017-09-29 13:14:19 -07:00
ZHANG Dapeng 7c97aa95a1 thrift: Delete thrift
Thrift support is moved to https://github.com/grpc-ecosystem/grift
2017-09-28 09:31:32 -07:00
Eric Anderson 55621a3e8c Start 1.8.0 development cycle 2017-09-27 12:37:50 -07:00
Ryan Michela 589da070f2 Manual flow-control and back-pressure demo 2017-09-26 10:01:42 -07:00
Carl Mastrangelo 24ff2748b7 all: update to proto 3.4.0 2017-08-25 11:25:36 -07:00
zpencer ab85c5ae76 Start 1.7.0 development cycle (#3357)
This bump changelist is applied a bit late with respect to the
1.6.0 branch cut. Look at the 1.6.0 to see the source of truth of
where it was cut. Do not assume it is the commit that precedes
this one.
2017-08-22 12:29:03 -07:00
Paul Gross 72b9ee22b8 all: Fix mismatch in naming Bazel Maven jars
This commit aligns the naming of the Bazel Maven jars with the names
used by Bazel's migration-tooling project:

https://github.com/bazelbuild/migration-tooling

Unfortunately, we can't fix @com_google_protobuf_java because it's
required by Bazel itself.

Fixes #3328
2017-08-11 16:39:43 -07:00
Eric Anderson d325919f62 core: Use Class.forName(String) in provider for Android
Class.forName(String) is understood by ProGuard, removing the need for
manual ProGuard configuration and allows ProGuard to rename the provider
classes. Previously the provider classes could not be renamed.

Fixes #2633
2017-07-19 10:15:03 -07:00
Carl Mastrangelo 2175004363 all: recommend latest os maven detector 2017-07-18 10:44:37 -07:00
Carl Mastrangelo 84fce477c2 all: fix minor lint warnings 2017-07-17 17:21:07 -07:00
Carl Mastrangelo 6ea2b8aacb examples: fix errorprone warning about charset 2017-07-17 15:35:08 -07:00
Carl Mastrangelo 193fd057a5 stub: clean up client calls to avoid synthetic class 2017-07-14 13:38:04 -07:00
Carl Mastrangelo e6ad90e43e examples: don't use deprecated MethodDescriptor API 2017-07-14 12:36:18 -07:00
Carl Mastrangelo d34260a814 all: update to proto gradle plugin 0.8.1 2017-07-14 12:35:14 -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
Mehrdad Afshari 8ce0bc25b6 Canonicalize URL prefixes to https://grpc.io 2017-07-10 16:30:09 -07:00
Carl Mastrangelo 424eeea8f5 all: begin 1.6 release cycle 2017-07-06 10:43:56 -07:00
Carl Mastrangelo cc5343a530 all: update to gradle 4.0 2017-07-05 18:32:35 -07:00
ZHANG Dapeng c2791496ca fix misuse of bazel repo @com_google_protobuf
resolves #3175
2017-07-05 16:15:33 -07:00
ZHANG Dapeng 4e31ccba4c examples: use the official error_details.proto
The `error_details.proto` file in `examples/src/main/proto/` was not originated from grpc-java. 
It was officially opensourced at https://github.com/googleapis/googleapis/blob/master/google/rpc/error_details.proto
2017-06-29 16:05:33 -07:00
Eric Anderson fe0f67337d examples: Enable maven enforcer requireUpperBoundDeps
Everyone using maven should really use the rule, in order to prevent
accidentally using an older version of a common library, like protobuf.
2017-06-29 15:29:30 -07:00
ZHANG Dapeng 36f7b34b6e examples: add bazel build example
## Bazel

If you prefer to use Bazel:
```
(With Bazel v0.4.5 or above.)
$ bazel build :hello-world-server :hello-world-client
$ # Run the server:
$ bazel-bin/hello-world-server
$ # In another terminal run the client
$ bazel-bin/hello-world-client
```
2017-06-29 12:25:54 -07:00
zpencer 532450996a core: detect invalid states on server side (eg zero responses for unary) (#3068)
The current check in ServerCallImpl is theoretically unsafe (#3059). Move that check into the stub, and expand the unit tests to cover other interesting edge cases on the server side:

client sends one, but zero requests received at onHalfClose
client sends one, but > 1 requests received at onHalfClose
server sends one, but zero responses sent at onComplete
server sends one, but > 1 responses sent via onNext
fixes #2243
fixes #3059
2017-06-15 09:33:01 -07:00
Carl Mastrangelo 1da1dba9fb all: update to gradle 3.5 2017-06-07 17:18:44 -07:00
ZHANG Dapeng 851065dd08 examples: migrate unittest examples to GrpcServerRule
migrated simple tests using `GrpcServerRule`.
Kept the low level in-process channel setup and tear down code for the RouteGuide example to show how users can use in-process directly to set more custom channel builder options when needed.

resolves #2490
2017-06-05 16:32:18 -07:00
Carl Mastrangelo 166108a943 all: fix licence whitespace 2017-06-01 14:28:37 -07:00
Carl Mastrangelo 3bfd630bff all: update to Apache 2 licence
Also, update the authors.
2017-05-31 13:29:01 -07:00
Carl Mastrangelo 4ce52d10f6 all: bump to 1.5.0-SNAPSHOT 2017-05-23 17:57:25 -07:00
Carl Mastrangelo 0fe2c5cca6 all: bump to proto 3.3.1 2017-05-23 17:04:51 -07:00
Eric Anderson 6418371df5 android-helloworld: Remove usage of ActionBarActivity
ActionBarActivity has been deprecated for 2+ years and has been
extending AppCompatActivity for all that time. This should be a no-op.
2017-05-02 11:30:24 -07:00
Eric Anderson e6804e2a45 android-helloworld: Ignore proguard warnings for javax.naming
I have no clue why this isn't needed for routeguide as well, but
routeguide is compiling fine without the dontwarn.
2017-05-02 11:30:01 -07:00
Carl Mastrangelo 17b90169d8 all: begin 1.4.x development cycle 2017-04-11 14:51:39 -07:00
Eric Anderson ebd2f2d2f7 android: Bump android build plugin version to 2.3.1
This cleans up some deprecation warnings from Gradle and cuts full build
time in half.
2017-04-06 15:36:47 -07:00