Commit Graph

441 Commits

Author SHA1 Message Date
Kun Zhang c5b94c7525 Use protoc from Maven Central. 2015-05-07 11:18:43 -07:00
Kun Zhang 693a7d2846 Fix the filesets to be checked by checkstyle. 2015-05-06 11:35:08 -07:00
Kun Zhang 111f6dd81e Allow people to skip codegen compilation.
Resolves #357

- Add project property ``grpc.skip.codegen``, which is false by default.
  People who don't change the codegen nor the proto files can set it to
  true so that they don't need to set up C++ compilation.
- Check in all generated files under ``src/generated``.
2015-05-06 09:56:40 -07:00
Eric Anderson 041cdb11ed Add Jacoco code coverage
After running tests, you can run jacocoTestReport. The jacocoTestReport
task does not depend on the tests, so they should be run separately.

There is still a lot of noise in the jacoco output since we aren't yet
filtering generated code.
2015-05-05 14:36:00 -07:00
Eric Anderson 10fb20650d Produce combined JavaDoc, add links, exclude internals 2015-05-05 11:32:15 -07:00
Eric Anderson ad44f0aa62 Make checkstyle fail build by default
It seems almost every developer has caused Travis CI to break due to
checkstyle failures. To prevent further breakages, checkstyle will now
fail the build by default.

Specifying checkstyle.ignoreFailures=true in ~/.gradle/gradle.properties
will turn the failures into warnings, which was the old behavior.
2015-05-05 11:09:45 -07:00
Kun Zhang 221c534f11 Fix build on Windows/VC++
- Stop defining custom architectures because VisualCpp toolchain doesn't
  allow it. Reference to built-in architectures 'x86' and 'x86_64' since
  they are supported by all toolchains.
- Remove 'local_arch' from platforms. For unsupported platform, we just
  do not specify the target.
- Target no more than one platform at a time. This simplifies the build
  script a lot.
- Remove the TARGET_ARCHS environment variable. Add system property
  ``arch`` to override ``osdetector.arch``.
- Add ``vc.disable`` to override the default choice of VisualCpp on
  Windows.
- Add ``vc.`` prefix to the properties that are only used with VC++
2015-05-04 09:25:49 -07:00
Kun Zhang 41940f7ff7 Upgrade to protobuf plugin 0.3.1
The plugin has been published on plugins.gradle.org

Conforming to the Gradle standard that plugin IDs must be name-spaced,
the plugin ID has been changed to com.google.protobuf.
2015-04-29 16:28:50 -07:00
Kun Zhang 2b917e2eae Update to protobuf-gradle-plugin:0.2.1
Remove the workaround for windows paths as [the
fix](2183166d9a)
is included in protobuf-gradle-plugin:0.2.1
2015-04-27 14:14:39 -07:00
Kun Zhang 3ddd1d525f Log stack traces of test failures to the console.
By default we have to open a HTML page in a browser to see the details,
which is not possible if the test was run in Travis.
2015-04-22 14:49:43 -07:00
Kun Zhang af18876713 Upgrade to com.google.protobuf:protobuf-gradle-plugin:0.1.0
Commit 76f0a09 after the previous release
(ws.antonov.gradle.plugins:gradle-plugin-protobuf:0.9.1) defers the
generation of generateProto tasks to post-evaluation of the project,
which make them no longer available in the evaluation phase. We need to
move the manipulation of these tasks to post-evaluation too.
2015-04-20 10:35:11 -07:00
Kun Zhang 4bc2d6d9a4 Remove call sites of Os.isFamily(). Use osdetector instead 2015-04-17 16:35:23 -07:00
zhangkun83 da3c3f8ced Solution for GRPC codegen deployment. 2015-04-16 15:07:36 -07:00
Kun Zhang 90706dc48f Rename the codegen binary from java_plugin to protoc-gen-grpc-java 2015-04-09 15:24:46 -07:00
Xudong Ma 9aae6f65fa checkstyle change:
1. Adds <property name="separateLineBetweenGroups" value="true"/> to CustomImportOrder to enfore blank line between imports groups.
2. Uses checkstyle 6.5, which fixed a bug of "CustomImportOrder checks import sorting according to ASCII order instead of case-insensitive alphabetical order".
2015-04-07 08:27:48 +08:00
Eric Anderson 26141b445d Allow checkstyle failures fatal, and fix last issues
Failing disabled by default, but setting checkstyle.ignoreFailures=false
in ~/.gradle/gradle.properties enables failing. Travis will always run
with such failing enabled.
2015-03-23 09:10:53 -07:00
Eric Anderson c3e8dae6ce Add checkstyle checking
The checkstyle.xml is a slightly modified version of the upstream Google
checkstyle configuration. All changes have comment describing them.

Lots of warnings were corrected. Examples is the only project that has
warnings still, as the necessary changes require some thought.
2015-03-16 10:53:13 -07:00
Eric Anderson 76d0955a6e Clean up warnings
-Xlint:-options is not available on some earlier JDK 7s, but won't fail
if unsupported. It prevents the warning wanting bootclasspath specified
since target/source is 1.6.
2015-03-12 17:37:32 -07:00
Eric Anderson 7e8a02ce63 Add name and developers to pom
These are required by OSSRH.
2015-03-12 17:25:27 -07:00
Louis Ryan 767a12cc3e Switch to use new leaner auth library for OAuth interceptor 2015-03-12 16:18:25 -07:00
Eric Anderson 14444a91cf Force JavaDoc to intepret code as UTF-8
We are already specifying to javac that our code is UTF-8, but we also
need to specify to JavaDoc, even though we don't have any non-ASCII
characters in JavaDoc comments.

Tested with LC_ALL=C
2015-03-12 10:49:54 -07:00
nmittler 2a425090d1 Migrating to Netty 4.1
Fixes #164
2015-03-11 13:18:27 -07:00
nmittler 54be11ef3c Updating to the latest Netty version. 2015-03-10 15:43:19 -07:00
nmittler 732cfc0d55 Disable Javadoc doclint on Java 8
It breaks the build.
2015-03-03 07:59:13 -08:00
Eric Anderson 192144eaf9 Add Sonatype OSSRH upload support, with nice POMs
Mockito was upgraded to latest to solve JavaDoc issue with
ArgumentsAreDifferent.

We don't yet publish any artifacts for grpc-compiler.
2015-03-02 15:20:06 -08:00
Eric Anderson b938ba5106 Support building on Windows
Protoc should be in PATH and the project properties protobuf.include and
protobuf.libs should be set. For example:

gradlew build -Pprotobuf.include=C:\path\to\protobuf-3.0.0-alpha-2\src ^
  -Pprotobuf.libs=C:\path\to\protobuf-3.0.0-alpha-2\vsprojects\Release

When running more than once, it is probably more convenient to create
%HOMEDRIVE%%HOMEPATH%\.gradle\gradle.properties with contents like:

protobuf.include=C:\\path\\to\\protobuf-3.0.0-alpha-2\\src
protobuf.libs=C:\\path\\to\\protobuf-3.0.0-alpha-2\\vsprojects\\Release
2015-03-02 13:34:09 -08:00
Eric Anderson a6f5fff6e4 Depend on proto 3.0.0-alpha-2 instead of snapshot
There has now been a release of the proto code we need, so use it
instead of master.
2015-02-26 07:56:13 -08:00
rocking c60f0171cb Open source nano proto related code
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=87180572
2015-02-25 15:36:20 -08:00
Jeff Pinner b1cc7cc09d Upgrade com.twitter.hpack to v0.10.1 2015-02-25 10:17:23 -08:00
Eric Anderson 61179abcaa Set encoding for Java source to UTF-8
Our new example uses UTF-8 characters. On systems that don't have UTF-8 as
their default locale, the build fails without the override.
2015-02-24 23:02:50 +00:00
nmittler b897a89e78 Adding RouteGuide example and deleting others. 2015-02-24 13:58:16 -08:00
Jakob Buchgraber 7ddcdfd26c Define ALPN package as an extra variable, to be reused by subprojects. 2015-02-17 10:46:17 -08:00
Eric Anderson e26608fe91 Avoid MoreObjects for "old guava" compatibility
Some early grpc users on Android are using a very old Guava. They are
working on upgrading, but it will take time. This alone is not enough
for "old guava" compilibility; expect more to come.
2015-02-13 17:06:46 -08:00
Jakob Buchgraber 3fd7d0675c Add QPS Client to perform throughput and latency tests. 2015-02-11 17:47:45 -08:00
Eric Anderson fb28ad235b Improve Gradle build of protoc grpc plugin
A Gradle protoc plugin is used for generating and compiling the grpc
codegen. The code organization was changed to match what Gradle expects.

Proto 3 is now required.
2015-01-30 10:19:32 -08:00
Jake Wharton 6a93de9c59 Remove explicit Okio dependency.
The version of Okio that we want is dependent on the version of OkHttp. Let it come transitively through the normal dependency resolution mechanism.
2015-01-27 16:33:25 -08:00
nmittler f83145865a Removing all references to "stubby" 2015-01-27 11:25:25 -08:00
Manik Surtani 0ca6584d19 Move to a non-snapshot version of OkHttp 2015-01-26 15:48:14 -08:00
nmittler 02c953e5e0 Migrating run scripts to gradle. 2015-01-26 15:26:11 -08:00
nmittler 52f4220395 Adding .gitignore for eclipse files. 2015-01-21 16:14:48 -08:00
nathanmittler 164b734aa9 Adding gradle build for Java grpc
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=82152044
2015-01-08 14:43:21 -08:00