Skip to content

Commit eba098c

Browse files
authored
Merge pull request #23 from diaozxin007/master
update version to 0.1.1-SNAPSHOT
2 parents 25835db + d81a3a8 commit eba098c

File tree

15 files changed

+168
-176
lines changed

15 files changed

+168
-176
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,14 @@ mvn install wechaty
263263

264264
### master
265265

266+
### v0.1.1 (May 31 2020)
267+
268+
1. update version to 0.1.1-SNAPSHOT
269+
1. finish all function of room
270+
1. remove log4j2 package from wechaty
271+
1. change all log level to debug
272+
1. remove log4j2.xml from wechaty
273+
266274
### v0.1 (May 18 2020)
267275

268276
We decided to use Kotlin to develop the Java Wechaty!

pom.xml

Lines changed: 44 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<groupId>io.github.wechaty</groupId>
66
<artifactId>wechaty-parent</artifactId>
77
<packaging>pom</packaging>
8-
<version>0.1.0-SNAPSHOT</version>
8+
<version>0.1.1-SNAPSHOT</version>
99
<name>kotlin-wechaty</name>
1010

1111
<description>
@@ -26,8 +26,6 @@
2626
<dokka.version>0.10.1</dokka.version>
2727
</properties>
2828

29-
30-
3129
<modules>
3230
<module>wechaty</module>
3331
<module>wechaty-puppet</module>
@@ -73,22 +71,28 @@
7371
</dependency>
7472

7573

76-
<dependency>
77-
<groupId>org.apache.logging.log4j</groupId>
78-
<artifactId>log4j-api</artifactId>
79-
<version>2.13.1</version>
80-
</dependency>
81-
<!-- https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j-core -->
82-
<dependency>
83-
<groupId>org.apache.logging.log4j</groupId>
84-
<artifactId>log4j-core</artifactId>
85-
<version>2.13.1</version>
86-
</dependency>
87-
<dependency> <!-- 桥接:告诉Slf4j使用Log4j2 -->
88-
<groupId>org.apache.logging.log4j</groupId>
89-
<artifactId>log4j-slf4j-impl</artifactId>
90-
<version>2.13.1</version>
91-
</dependency>
74+
<!-- <dependency>-->
75+
<!-- <groupId>org.apache.logging.log4j</groupId>-->
76+
<!-- <artifactId>log4j-api</artifactId>-->
77+
<!-- <version>2.13.1</version>-->
78+
<!-- </dependency>-->
79+
<!-- &lt;!&ndash; https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j-core &ndash;&gt;-->
80+
<!-- <dependency>-->
81+
<!-- <groupId>org.apache.logging.log4j</groupId>-->
82+
<!-- <artifactId>log4j-core</artifactId>-->
83+
<!-- <version>2.13.1</version>-->
84+
<!-- </dependency>-->
85+
<!-- <dependency> &lt;!&ndash; 桥接:告诉Slf4j使用Log4j2 &ndash;&gt;-->
86+
<!-- <groupId>org.apache.logging.log4j</groupId>-->
87+
<!-- <artifactId>log4j-slf4j-impl</artifactId>-->
88+
<!-- <version>2.13.1</version>-->
89+
<!-- </dependency>-->
90+
<!-- &lt;!&ndash; https://mvnrepository.com/artifact/com.lmax/disruptor &ndash;&gt;-->
91+
<!-- <dependency>-->
92+
<!-- <groupId>com.lmax</groupId>-->
93+
<!-- <artifactId>disruptor</artifactId>-->
94+
<!-- <version>3.4.2</version>-->
95+
<!-- </dependency>-->
9296

9397
<dependency>
9498
<groupId>org.slf4j</groupId>
@@ -108,13 +112,6 @@
108112
<version>2.11.0</version>
109113
</dependency>
110114

111-
<!-- https://mvnrepository.com/artifact/io.netty/netty-tcnative-boringssl-static -->
112-
<dependency>
113-
<groupId>io.netty</groupId>
114-
<artifactId>netty-tcnative-boringssl-static</artifactId>
115-
<version>2.0.30.Final</version>
116-
</dependency>
117-
118115
<!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-core -->
119116
<dependency>
120117
<groupId>com.fasterxml.jackson.core</groupId>
@@ -144,11 +141,11 @@
144141
</dependency>
145142

146143

147-
<dependency>
148-
<groupId>com.tinder.statemachine</groupId>
149-
<artifactId>statemachine</artifactId>
150-
<version>0.2.0</version>
151-
</dependency>
144+
<!-- <dependency>-->
145+
<!-- <groupId>com.tinder.statemachine</groupId>-->
146+
<!-- <artifactId>statemachine</artifactId>-->
147+
<!-- <version>0.2.0</version>-->
148+
<!-- </dependency>-->
152149

153150
<!-- https://mvnrepository.com/artifact/com.squareup.okhttp3/okhttp -->
154151
<dependency>
@@ -158,19 +155,19 @@
158155
</dependency>
159156

160157

161-
<!-- https://mvnrepository.com/artifact/com.lmax/disruptor -->
162-
<dependency>
163-
<groupId>com.lmax</groupId>
164-
<artifactId>disruptor</artifactId>
165-
<version>3.4.2</version>
166-
</dependency>
158+
<!-- &lt;!&ndash; https://mvnrepository.com/artifact/com.lmax/disruptor &ndash;&gt;-->
159+
<!-- <dependency>-->
160+
<!-- <groupId>com.lmax</groupId>-->
161+
<!-- <artifactId>disruptor</artifactId>-->
162+
<!-- <version>3.4.2</version>-->
163+
<!-- </dependency>-->
167164

168-
<!-- https://mvnrepository.com/artifact/io.grpc/grpc-kotlin-stub -->
169-
<dependency>
170-
<groupId>io.grpc</groupId>
171-
<artifactId>grpc-kotlin-stub</artifactId>
172-
<version>0.1.1</version>
173-
</dependency>
165+
<!-- &lt;!&ndash; https://mvnrepository.com/artifact/io.grpc/grpc-kotlin-stub &ndash;&gt;-->
166+
<!-- <dependency>-->
167+
<!-- <groupId>io.grpc</groupId>-->
168+
<!-- <artifactId>grpc-kotlin-stub</artifactId>-->
169+
<!-- <version>0.1.1</version>-->
170+
<!-- </dependency>-->
174171

175172
<dependency>
176173
<groupId>org.hamcrest</groupId>
@@ -199,8 +196,8 @@
199196
</dependencies>
200197
</dependencyManagement>
201198

202-
<!-- <build>-->
203-
<!-- <plugins>-->
199+
<build>
200+
<plugins>
204201
<!-- <plugin>-->
205202
<!-- <groupId>org.apache.maven.plugins</groupId>-->
206203
<!-- <artifactId>maven-gpg-plugin</artifactId>-->
@@ -221,8 +218,8 @@
221218
<!-- </execution>-->
222219
<!-- </executions>-->
223220
<!-- </plugin>-->
224-
<!-- </plugins>-->
225-
<!-- </build>-->
221+
</plugins>
222+
</build>
226223

227224

228225
<contributors>

wechaty-puppet-hostie/pom.xml

Lines changed: 18 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>io.github.wechaty</groupId>
66
<artifactId>wechaty-parent</artifactId>
7-
<version>0.1.0-SNAPSHOT</version>
7+
<version>0.1.1-SNAPSHOT</version>
88
</parent>
99
<modelVersion>4.0.0</modelVersion>
1010
<artifactId>wechaty-puppet-hostie</artifactId>
@@ -30,18 +30,6 @@
3030
<groupId>io.github.wechaty</groupId>
3131
<artifactId>grpc</artifactId>
3232
</dependency>
33-
<!-- <dependency>-->
34-
<!-- <groupId>io.netty</groupId>-->
35-
<!-- <artifactId>netty-transport-native-kqueue</artifactId>-->
36-
<!-- <classifier>osx-x86_64</classifier>-->
37-
<!-- </dependency>-->
38-
39-
<!-- <dependency>-->
40-
<!-- <groupId>io.netty</groupId>-->
41-
<!-- <artifactId>netty-transport-native-epoll</artifactId>-->
42-
<!-- <classifier>linux-x86_64</classifier>-->
43-
<!-- </dependency>-->
44-
<!-- https://mvnrepository.com/artifact/com.squareup.okhttp3/okhttp -->
4533
<dependency>
4634
<groupId>com.squareup.okhttp3</groupId>
4735
<artifactId>okhttp</artifactId>
@@ -53,34 +41,33 @@
5341
<artifactId>guava</artifactId>
5442
</dependency>
5543

56-
<dependency>
57-
<groupId>org.apache.logging.log4j</groupId>
58-
<artifactId>log4j-api</artifactId>
59-
</dependency>
60-
<dependency>
61-
<groupId>org.apache.logging.log4j</groupId>
62-
<artifactId>log4j-core</artifactId>
63-
</dependency>
64-
<dependency>
65-
<groupId>org.apache.logging.log4j</groupId>
66-
<artifactId>log4j-slf4j-impl</artifactId>
67-
</dependency>
44+
<!-- <dependency>-->
45+
<!-- <groupId>org.apache.logging.log4j</groupId>-->
46+
<!-- <artifactId>log4j-api</artifactId>-->
47+
<!-- </dependency>-->
48+
<!-- <dependency>-->
49+
<!-- <groupId>org.apache.logging.log4j</groupId>-->
50+
<!-- <artifactId>log4j-core</artifactId>-->
51+
<!-- </dependency>-->
52+
<!-- <dependency>-->
53+
<!-- <groupId>org.apache.logging.log4j</groupId>-->
54+
<!-- <artifactId>log4j-slf4j-impl</artifactId>-->
55+
<!-- </dependency>-->
6856
<dependency>
6957
<groupId>org.slf4j</groupId>
7058
<artifactId>slf4j-api</artifactId>
7159
</dependency>
7260

73-
<!-- &lt;!&ndash; https://mvnrepository.com/artifact/io.netty/netty-tcnative-boringssl-static &ndash;&gt;-->
74-
<!-- <dependency>-->
75-
<!-- <groupId>io.netty</groupId>-->
76-
<!-- <artifactId>netty-tcnative-boringssl-static</artifactId>-->
77-
<!-- </dependency>-->
78-
7961
<dependency>
8062
<groupId>com.fasterxml.jackson.module</groupId>
8163
<artifactId>jackson-module-kotlin</artifactId>
8264
</dependency>
8365

66+
<dependency>
67+
<groupId>org.apache.commons</groupId>
68+
<artifactId>commons-lang3</artifactId>
69+
</dependency>
70+
8471
</dependencies>
8572

8673
<build>

wechaty-puppet-hostie/src/main/kotlin/io/github/wechaty/grpc/GrpcPuppet.kt

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ class GrpcPuppet(puppetOptions: PuppetOptions) : Puppet(puppetOptions) {
2929

3030
private var channel: ManagedChannel? = null
3131

32-
private val GRPC_PROT = 8788
33-
3432
private val CHATIE_ENDPOINT = "https://api.chatie.io/v0/hosties/"
3533

3634
private val client: OkHttpClient = OkHttpClient()
@@ -75,7 +73,7 @@ class GrpcPuppet(puppetOptions: PuppetOptions) : Puppet(puppetOptions) {
7573
state = try {
7674
startGrpcClient().get()
7775
val state = channel!!.getState(true)
78-
log.info(state.name)
76+
log.debug(state.name)
7977
val startRequest = Base.StartRequest.newBuilder().build()
8078
val start = grpcClient!!.start(startRequest)
8179
startGrpcStream()
@@ -92,7 +90,7 @@ class GrpcPuppet(puppetOptions: PuppetOptions) : Puppet(puppetOptions) {
9290

9391
override fun stop(): Future<Void> {
9492

95-
log.info("stop()")
93+
log.debug("stop()")
9694
if (state == StateEnum.OFF) {
9795
log.warn("stop() is called on a OFF puppet. await ready(off) and return.")
9896
return CompletableFuture.completedFuture(null)
@@ -129,7 +127,7 @@ class GrpcPuppet(puppetOptions: PuppetOptions) : Puppet(puppetOptions) {
129127

130128
override fun unref() {
131129

132-
log.info("unref")
130+
log.debug("unref")
133131
super.unref()
134132

135133
}
@@ -187,7 +185,7 @@ class GrpcPuppet(puppetOptions: PuppetOptions) : Puppet(puppetOptions) {
187185
fun stopGrpcClient(): Future<Void> {
188186

189187
channel!!.shutdown().awaitTermination(5, TimeUnit.SECONDS)
190-
log.info("grpc is shutdown")
188+
log.debug("grpc is shutdown")
191189
return CompletableFuture.completedFuture(null)
192190
}
193191

@@ -580,8 +578,8 @@ class GrpcPuppet(puppetOptions: PuppetOptions) : Puppet(puppetOptions) {
580578

581579
val fileJson = file.toJsonString()
582580

583-
log.info("json is {}", fileJson)
584-
log.info("json size is {}", fileJson.length)
581+
log.debug("json is {}", fileJson)
582+
log.debug("json size is {}", fileJson.length)
585583

586584
val request = Message.MessageSendFileRequest.newBuilder()
587585
.setConversationId(conversationId)
@@ -942,7 +940,7 @@ class GrpcPuppet(puppetOptions: PuppetOptions) : Puppet(puppetOptions) {
942940
val type = event.type
943941
val payload = event.payload
944942

945-
log.info("PuppetHostie $type payload $payload")
943+
log.debug("PuppetHostie $type payload $payload")
946944

947945
if (type != Event.EventType.EVENT_TYPE_HEARTBEAT) {
948946
emit("heartbeat", EventHeartbeatPayload("heartbeat"))
@@ -1004,7 +1002,7 @@ class GrpcPuppet(puppetOptions: PuppetOptions) : Puppet(puppetOptions) {
10041002

10051003
Event.EventType.EVENT_TYPE_SCAN -> {
10061004
val eventScanPayload = JsonUtils.readValue<EventScanPayload>(payload)
1007-
log.info("scan pay load is {}", eventScanPayload)
1005+
log.debug("scan pay load is {}", eventScanPayload)
10081006
emit("scan", eventScanPayload)
10091007
}
10101008

@@ -1018,7 +1016,7 @@ class GrpcPuppet(puppetOptions: PuppetOptions) : Puppet(puppetOptions) {
10181016

10191017

10201018
else -> {
1021-
log.info("PuppetHostie $type payload $payload")
1019+
log.debug("PuppetHostie $type payload $payload")
10221020
}
10231021

10241022

wechaty-puppet/pom.xml

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>io.github.wechaty</groupId>
66
<artifactId>wechaty-parent</artifactId>
7-
<version>0.1.0-SNAPSHOT</version>
7+
<version>0.1.1-SNAPSHOT</version>
88
</parent>
99
<modelVersion>4.0.0</modelVersion>
1010
<artifactId>wechaty-puppet</artifactId>
@@ -40,21 +40,21 @@
4040
<artifactId>commons-lang3</artifactId>
4141
</dependency>
4242

43-
<!--log4j2核心包-->
44-
<dependency>
45-
<groupId>org.apache.logging.log4j</groupId>
46-
<artifactId>log4j-api</artifactId>
47-
</dependency>
48-
<dependency>
49-
<groupId>org.apache.logging.log4j</groupId>
50-
<artifactId>log4j-core</artifactId>
51-
</dependency>
52-
53-
<!--用于与slf4j保持桥接-->
54-
<dependency>
55-
<groupId>org.apache.logging.log4j</groupId>
56-
<artifactId>log4j-slf4j-impl</artifactId>
57-
</dependency>
43+
<!-- &lt;!&ndash;log4j2核心包&ndash;&gt;-->
44+
<!-- <dependency>-->
45+
<!-- <groupId>org.apache.logging.log4j</groupId>-->
46+
<!-- <artifactId>log4j-api</artifactId>-->
47+
<!-- </dependency>-->
48+
<!-- <dependency>-->
49+
<!-- <groupId>org.apache.logging.log4j</groupId>-->
50+
<!-- <artifactId>log4j-core</artifactId>-->
51+
<!-- </dependency>-->
52+
53+
<!-- &lt;!&ndash;用于与slf4j保持桥接&ndash;&gt;-->
54+
<!-- <dependency>-->
55+
<!-- <groupId>org.apache.logging.log4j</groupId>-->
56+
<!-- <artifactId>log4j-slf4j-impl</artifactId>-->
57+
<!-- </dependency>-->
5858
<!-- slf4j核心包-->
5959
<dependency>
6060
<groupId>org.slf4j</groupId>
@@ -95,10 +95,10 @@
9595
<artifactId>commons-io</artifactId>
9696
</dependency>
9797

98-
<dependency>
99-
<groupId>com.tinder.statemachine</groupId>
100-
<artifactId>statemachine</artifactId>
101-
</dependency>
98+
<!-- <dependency>-->
99+
<!-- <groupId>com.tinder.statemachine</groupId>-->
100+
<!-- <artifactId>statemachine</artifactId>-->
101+
<!-- </dependency>-->
102102

103103
<dependency>
104104
<groupId>com.squareup.okhttp3</groupId>

0 commit comments

Comments
 (0)