Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Java Support #52

Merged
merged 6 commits into from
Apr 20, 2020
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,6 @@ generated/
id_rsa*
t/
t.*

.idea
target/
75 changes: 75 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

<modelVersion>4.0.0</modelVersion>
<groupId>io.github.wechaty</groupId>
<artifactId>wechaty-grpc-proto</artifactId>
huan marked this conversation as resolved.
Show resolved Hide resolved
<packaging>jar</packaging>
<version>1.0.0</version>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this version number is the module number of our Java GRPC.

It should be sync to the exact version in our package.json.

I'm not sure the workflow between the GitHub and the Marven Central Repo, it will be great if this can be archived via the DevOps workflow (GitHub Actions in our case)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix too

<name>wechaty-grpc-proto</name>
huan marked this conversation as resolved.
Show resolved Hide resolved

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>

<description>
Wechaty is a Wechat Bot SDK for Personal Account that lets you create software to extend the functionality of the Wechat,
writen in Node.js with TypeScript, Support all platforms including Linux, Windows, Darwin(OSX/Mac) and Docker.
</description>
<url>https://github.com/Chatie/grpc</url>

<contributors>
<contributor>
<name>Zhengxin Diao</name>
<email>diaozxin@gmail.com</email>
</contributor>
</contributors>

<scm>
<url>https://github.com/Chatie/grpc</url>
<connection>scm:git:ssh://github.com/Chatie/grpc.git</connection>
<developerConnection>scm:git:ssh://git@github.com/Chatie/grpc.git</developerConnection>
<tag>HEAD</tag>
</scm>

<dependencies>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-all</artifactId>
<version>1.28.1</version>
</dependency>
</dependencies>

<build>
<extensions>
<extension>
<groupId>kr.motd.maven</groupId>
<artifactId>os-maven-plugin</artifactId>
<version>1.6.2</version>
</extension>
</extensions>
<plugins>
<plugin>
<groupId>org.xolstice.maven.plugins</groupId>
<artifactId>protobuf-maven-plugin</artifactId>
<version>0.6.1</version>
<configuration>
<protocArtifact>com.google.protobuf:protoc:3.11.4:exe:${os.detected.classifier}</protocArtifact>
<pluginId>grpc-java</pluginId>
<pluginArtifact>io.grpc:protoc-gen-grpc-java:1.28.1:exe:${os.detected.classifier}</pluginArtifact>
<protoSourceRoot>${basedir}/proto/wechaty</protoSourceRoot>
</configuration>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>compile-custom</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

</project>
2 changes: 2 additions & 0 deletions proto/wechaty/puppet.proto
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
syntax = "proto3";
package wechaty;

option java_package="io.github.wechaty.puppet";
huan marked this conversation as resolved.
Show resolved Hide resolved

import public "puppet/base.proto";
import public "puppet/contact.proto";
import public "puppet/event.proto";
Expand Down
1 change: 1 addition & 0 deletions proto/wechaty/puppet/base.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ syntax = "proto3";
package wechaty.puppet;

option go_package="github.com/wechaty/go-grpc/wechaty/puppet";
option java_package="io.github.wechaty.puppet";

message StartRequest {}
message StartResponse {}
Expand Down
1 change: 1 addition & 0 deletions proto/wechaty/puppet/contact.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ syntax = "proto3";
package wechaty.puppet;

option go_package="github.com/wechaty/go-grpc/wechaty/puppet";
option java_package="io.github.wechaty.puppet";

import "google/protobuf/wrappers.proto";

Expand Down
1 change: 1 addition & 0 deletions proto/wechaty/puppet/event.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ syntax = "proto3";
package wechaty.puppet;

option go_package="github.com/wechaty/go-grpc/wechaty/puppet";
option java_package="io.github.wechaty.puppet";

enum EventType {
EVENT_TYPE_UNSPECIFIED = 0;
Expand Down
1 change: 1 addition & 0 deletions proto/wechaty/puppet/friendship.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ syntax = "proto3";
package wechaty.puppet;

option go_package="github.com/wechaty/go-grpc/wechaty/puppet";
option java_package="io.github.wechaty.puppet";

import "google/protobuf/wrappers.proto";

Expand Down
1 change: 1 addition & 0 deletions proto/wechaty/puppet/message.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ syntax = "proto3";
package wechaty.puppet;

option go_package="github.com/wechaty/go-grpc/wechaty/puppet";
option java_package="io.github.wechaty.puppet";

import "google/protobuf/wrappers.proto";

Expand Down
1 change: 1 addition & 0 deletions proto/wechaty/puppet/room.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ syntax = "proto3";
package wechaty.puppet;

option go_package="github.com/wechaty/go-grpc/wechaty/puppet";
option java_package="io.github.wechaty.puppet";

import "google/protobuf/wrappers.proto";

Expand Down
1 change: 1 addition & 0 deletions proto/wechaty/puppet/room_invitation.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ syntax = "proto3";
package wechaty.puppet;

option go_package="github.com/wechaty/go-grpc/wechaty/puppet";
option java_package="io.github.wechaty.puppet";

import "google/protobuf/wrappers.proto";

Expand Down
1 change: 1 addition & 0 deletions proto/wechaty/puppet/room_member.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ syntax = "proto3";
package wechaty.puppet;

option go_package="github.com/wechaty/go-grpc/wechaty/puppet";
option java_package="io.github.wechaty.puppet";

message RoomMemberPayloadRequest {
string id = 1;
Expand Down
1 change: 1 addition & 0 deletions proto/wechaty/puppet/tag.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ syntax = "proto3";
package wechaty.puppet;

option go_package="github.com/wechaty/go-grpc/wechaty/puppet";
option java_package="io.github.wechaty.puppet";

import "google/protobuf/wrappers.proto";

Expand Down