Skip to content

Commit

Permalink
version 3.10.1
Browse files Browse the repository at this point in the history
  • Loading branch information
os72 committed Nov 29, 2019
1 parent ce8da8b commit 2a39acd
Show file tree
Hide file tree
Showing 10 changed files with 32 additions and 29 deletions.
42 changes: 21 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ protoc-jar
==========

Protocol Buffers protobuf compiler - multi-platform executable protoc JAR and API.
Available on Maven Central: https://repo.maven.apache.org/maven2/com/github/os72/protoc-jar/3.9.2/
Available on Maven Central: https://repo.maven.apache.org/maven2/com/github/os72/protoc-jar/3.10.1/

[![Maven Central](https://img.shields.io/badge/maven%20central-3.9.2-brightgreen.svg)](http://search.maven.org/#artifactdetails|com.github.os72|protoc-jar|3.9.2|)
[![Maven Central](https://img.shields.io/badge/maven%20central-3.10.1-brightgreen.svg)](http://search.maven.org/#artifactdetails|com.github.os72|protoc-jar|3.10.1|)

---

Simple convenience JAR that embeds protoc compiler binaries for Linux, Mac/OSX, and Windows, providing some portability across the major platforms. At runtime the library detects the platform and executes the corresponding protoc binary.
Supports embedded protoc versions 2.4.1, 2.5.0, 2.6.1, 3.9.2, and any protoc version available for download from maven central
Supports embedded protoc versions 2.4.1, 2.5.0, 2.6.1, 3.10.1, and any protoc version available for download from maven central

* Support for FreeBSD on x86 platform (freebsd-x86_64), thanks [kjopek](https://github.com/kjopek)
* Support for Solaris on x86 platform (sunos-x86_64), thanks [siepkes](https://github.com/siepkes)
Expand All @@ -33,40 +33,40 @@ Binaries
* https://oss.sonatype.org/content/repositories/snapshots/com/github/os72/protoc/

Version support
* protobuf 2.4.1: `-v2.4.1`, `-v241`
* protobuf 2.5.0: `-v2.5.0`, `-v250`
* protobuf 2.6.1: `-v2.6.1`, `-v261`
* protobuf 3.9.2: `-v3.9.2`, `-v392`
* protobuf 2.4.1: `-v2.4.1`
* protobuf 2.5.0: `-v2.5.0`
* protobuf 2.6.1: `-v2.6.1`
* protobuf 3.10.1: `-v3.10.1`
* Other versions: will attempt download from maven central
* Download by maven artifact id: `-v:<group>:<artifact>:<version>` (eg, `-v:com.google.protobuf:protoc:3.0.0`)

#### Usage - executable
```
$ java -jar protoc-jar-3.9.2.jar -v2.4.1 --version
$ java -jar protoc-jar-3.10.1.jar -v2.4.1 --version
protoc-jar: protoc version: 2.4.1, detected platform: windows-x86_64 (windows 8.1/amd64)
protoc-jar: embedded: bin/2.4.1/protoc-2.4.1-windows-x86_64.exe
protoc-jar: executing: [C:\cygwin64\tmp\protocjar4043021753132417014\bin\protoc.exe, --version]
libprotoc 2.4.1
$ java -jar protoc-jar-3.9.2.jar -v2.5.0 --version
$ java -jar protoc-jar-3.10.1.jar -v2.5.0 --version
protoc-jar: protoc version: 2.5.0, detected platform: windows-x86_64 (windows 8.1/amd64)
protoc-jar: embedded: bin/2.5.0/protoc-2.5.0-windows-x86_64.exe
protoc-jar: executing: [C:\cygwin64\tmp\protocjar1249962506895049512\bin\protoc.exe, --version]
libprotoc 2.5.0
$ java -jar protoc-jar-3.9.2.jar -v2.6.1 --version
$ java -jar protoc-jar-3.10.1.jar -v2.6.1 --version
protoc-jar: protoc version: 2.6.1, detected platform: windows-x86_64 (windows 8.1/amd64)
protoc-jar: embedded: bin/2.6.1/protoc-2.6.1-windows-x86_64.exe
protoc-jar: executing: [C:\cygwin64\tmp\protocjar6776927966028536935\bin\protoc.exe, --version]
libprotoc 2.6.1
$ java -jar protoc-jar-3.9.2.jar -v3.9.2 --version
protoc-jar: protoc version: 3.9.2, detected platform: windows-x86_64 (windows 8.1/amd64)
protoc-jar: embedded: bin/3.9.2/protoc-3.9.2-windows-x86_64.exe
$ java -jar protoc-jar-3.10.1.jar -v3.10.1 --version
protoc-jar: protoc version: 3.10.1, detected platform: windows-x86_64 (windows 8.1/amd64)
protoc-jar: embedded: bin/3.10.1/protoc-3.10.1-windows-x86_64.exe
protoc-jar: executing: [C:\cygwin64\tmp\protocjar6721276946617095290\bin\protoc.exe, --version]
libprotoc 3.9.2
libprotoc 3.10.1
$ java -jar protoc-jar-3.9.2.jar -v3.1.0 --version
$ java -jar protoc-jar-3.10.1.jar -v3.1.0 --version
protoc-jar: protoc version: 3.1.0, detected platform: windows-x86_64 (windows 8.1/amd64)
protoc-jar: downloading: http://central.maven.org/maven2/com/google/protobuf/protoc/maven-metadata.xml
protoc-jar: saved: C:\cygwin64\tmp\protocjar.webcache\com\google\protobuf\protoc\maven-metadata.xml
Expand All @@ -81,15 +81,15 @@ libprotoc 3.1.0

#### Usage - executable, include google.protobuf standard types (option --include_std_types)
```
$ java -jar protoc-jar-3.9.2.jar --include_std_types -I. --java_out=out StdTypeExample.proto
protoc-jar: protoc version: 3.9.2, detected platform: windows-x86_64 (windows 8.1/amd64)
protoc-jar: embedded: bin/3.9.2/protoc-3.9.2-windows-x86_64.exe
$ java -jar protoc-jar-3.10.1.jar --include_std_types -I. --java_out=out StdTypeExample.proto
protoc-jar: protoc version: 3.10.1, detected platform: windows-x86_64 (windows 8.1/amd64)
protoc-jar: embedded: bin/3.10.1/protoc-3.10.1-windows-x86_64.exe
protoc-jar: executing: [C:\cygwin64\tmp\protocjar4162580735258750520\bin\protoc.exe, -IC:\cygwin64\tmp\protocjar4162580735258750520\include, -I., --java_out=out, StdTypeExample.proto]
```

#### Usage - executable, apply shading for use with protobuf-java-shaded-241 (option --java_shaded_out)
```
$ java -jar protoc-jar-3.9.2.jar -v2.4.1 --java_shaded_out=out PersonSchema.proto
$ java -jar protoc-jar-3.10.1.jar -v2.4.1 --java_shaded_out=out PersonSchema.proto
protoc-jar: protoc version: 2.4.1, detected platform: windows-x86_64 (windows 8.1/amd64)
protoc-jar: embedded: bin/2.4.1/protoc-2.4.1-windows-x86_64.exe
protoc-jar: executing: [C:\cygwin64\tmp\protocjar139806143399660474\bin\protoc.exe, --java_out=out, PersonSchema.proto]
Expand All @@ -98,7 +98,7 @@ protoc-jar: shading (version 2.4.1): out

#### Usage - run platform detector (option -pp, print platform, usually for debugging)
```
$ java -jar protoc-jar-3.9.2.jar -pp
$ java -jar protoc-jar-3.10.1.jar -pp
------------------------------------------------------------------------
Detecting the operating system and CPU architecture
------------------------------------------------------------------------
Expand All @@ -125,6 +125,6 @@ Protoc.runProtoc(args);
<dependency>
<groupId>com.github.os72</groupId>
<artifactId>protoc-jar</artifactId>
<version>3.9.2</version>
<version>3.10.1</version>
</dependency>
```
3 changes: 3 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
protoc-jar release notes
========================

#### 3.10.1 (28-Nov-2019)
* Upgrade to protoc 3.10.1 (issue #73)

#### 3.9.2 (28-Nov-2019)
* Upgrade to protoc 3.9.2 (issue #72)

Expand Down
6 changes: 3 additions & 3 deletions assembly.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
<include>2.*/*linux-x86_64*</include>
<include>2.*/*osx-x86_64*</include>
<include>2.*/*windows-x86_64*</include>
<include>3.9.2/*linux-x86_64*</include>
<include>3.9.2/*osx-x86_64*</include>
<include>3.9.2/*windows-x86_64*</include>
<include>3.10.1/*linux-x86_64*</include>
<include>3.10.1/*osx-x86_64*</include>
<include>3.10.1/*windows-x86_64*</include>
</includes>
</fileSet>
</fileSets>
Expand Down
Binary file added bin/3.10.1/protoc-3.10.1-linux-x86_64.exe
Binary file not shown.
Binary file added bin/3.10.1/protoc-3.10.1-osx-x86_64.exe
Binary file not shown.
Binary file added bin/3.10.1/protoc-3.10.1-windows-x86_64.exe
Binary file not shown.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<groupId>com.github.os72</groupId>
<artifactId>protoc-jar</artifactId>
<packaging>jar</packaging>
<version>3.9.2</version>
<version>3.10.1</version>
<name>protoc-jar</name>
<url>https://github.com/os72/protoc-jar</url>
<description>Protocol Buffers compiler - executable JAR and API</description>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/github/os72/protocjar/ProtocVersion.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

public class ProtocVersion
{
public static final ProtocVersion PROTOC_VERSION = new ProtocVersion(null, null, "3.9.2");
public static final ProtocVersion PROTOC_VERSION = new ProtocVersion(null, null, "3.10.1");

public static ProtocVersion getVersion(String spec) {
if (!spec.startsWith("-v")) return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ option objc_class_prefix = "GPB";
// if (duration.seconds < 0 && duration.nanos > 0) {
// duration.seconds += 1;
// duration.nanos -= 1000000000;
// } else if (durations.seconds > 0 && duration.nanos < 0) {
// } else if (duration.seconds > 0 && duration.nanos < 0) {
// duration.seconds -= 1;
// duration.nanos += 1000000000;
// }
Expand Down
4 changes: 2 additions & 2 deletions src/test/java/com/github/os72/protocjar/ProtocTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public void testRunProtocBasic() throws Exception {
assertEquals(0, Protoc.runProtoc(args));
}
{
String[] args = {"--version", "-v3.9.2"};
String[] args = {"--version", "-v3.10.1"};
assertEquals(0, Protoc.runProtoc(args));
}
{
Expand Down Expand Up @@ -84,7 +84,7 @@ public void testStdTypes() throws Exception {
{
String outDir = "target/test-protoc-stdtypes";
new File(outDir).mkdirs();
String[] args = {"-v3.9.2", "--include_std_types", "-I.", "--java_out="+outDir, sStdTypeExampleFile3};
String[] args = {"-v3.10.1", "--include_std_types", "-I.", "--java_out="+outDir, sStdTypeExampleFile3};
assertEquals(0, Protoc.runProtoc(args));
}
}
Expand Down

0 comments on commit 2a39acd

Please sign in to comment.