From 0c9242d429639bcfe208e15b9816426f5c1bc8e7 Mon Sep 17 00:00:00 2001 From: Charles Wu Date: Sun, 13 Dec 2020 23:32:25 +1100 Subject: [PATCH 1/4] add support of base64 in bufferbyte --- .../src/main/kotlin/io/github/wechaty/filebox/FileBox.kt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/wechaty-puppet/src/main/kotlin/io/github/wechaty/filebox/FileBox.kt b/wechaty-puppet/src/main/kotlin/io/github/wechaty/filebox/FileBox.kt index 80dec61..98236a7 100644 --- a/wechaty-puppet/src/main/kotlin/io/github/wechaty/filebox/FileBox.kt +++ b/wechaty-puppet/src/main/kotlin/io/github/wechaty/filebox/FileBox.kt @@ -138,13 +138,13 @@ class FileBox(options: FileBoxOptions) { } fun toJsonString(): String { - buffer = toByte(this) + buffer = getBufferByte(this) return JsonUtils.write(this) } - fun toByte(fileBox: FileBox): ByteArray? { + fun getBufferByte(fileBox: FileBox): ByteArray? { when (fileBox.type()) { FileBoxType.File -> { @@ -153,11 +153,12 @@ class FileBox(options: FileBoxOptions) { return FileUtils.readFileToByteArray(file) } - FileBoxType.Url -> { return null; } - + FileBoxType.Base64 -> { + return null; + } else -> { TODO() } From 63f5d8d22d0f2d8348148e2a627c669b145e0665 Mon Sep 17 00:00:00 2001 From: Charles Wu Date: Mon, 14 Dec 2020 21:01:05 +1100 Subject: [PATCH 2/4] change method to private --- .../src/main/kotlin/io/github/wechaty/filebox/FileBox.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wechaty-puppet/src/main/kotlin/io/github/wechaty/filebox/FileBox.kt b/wechaty-puppet/src/main/kotlin/io/github/wechaty/filebox/FileBox.kt index 98236a7..5e3b9f4 100644 --- a/wechaty-puppet/src/main/kotlin/io/github/wechaty/filebox/FileBox.kt +++ b/wechaty-puppet/src/main/kotlin/io/github/wechaty/filebox/FileBox.kt @@ -144,7 +144,7 @@ class FileBox(options: FileBoxOptions) { } - fun getBufferByte(fileBox: FileBox): ByteArray? { + private fun getBufferByte(fileBox: FileBox): ByteArray? { when (fileBox.type()) { FileBoxType.File -> { From a0a374b8db2575f39306cbb0aa84b5950ff35a74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Huan=20=28=E6=9D=8E=E5=8D=93=E6=A1=93=29?= Date: Wed, 23 Dec 2020 15:11:56 +0800 Subject: [PATCH 3/4] add stars history badge --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 910bdf6..d2bd3b9 100644 --- a/README.md +++ b/README.md @@ -323,6 +323,10 @@ We decided to use Kotlin to develop the Java Wechaty! - [Java Wechaty](https://github.com/wechaty/java-wechaty) - Java WeChaty Conversational AI Chatbot SDK for Wechat Individual Accounts (Java) - [Scala Wechaty](https://github.com/wechaty/scala-wechaty) - Scala WeChaty Conversational AI Chatbot SDK for WechatyIndividual Accounts (Scala) +## Stargazers over time + +[![Stargazers over time](https://starchart.cc/wechaty/java-wechaty.svg)](https://starchart.cc/wechaty/java-wechaty) + ## Badge [![Wechaty in Kotlin](https://img.shields.io/badge/Wechaty-Kotlin-orange)](https://github.com/wechaty/java-wechaty) From 79817a2bf32b529befc45ec4b6b170a2f4c59e14 Mon Sep 17 00:00:00 2001 From: HeBo Date: Tue, 26 Jan 2021 11:34:27 +0800 Subject: [PATCH 4/4] Adding kotlin sources to built *-sources.jar Does not containing kotlin sources in built *-sources.jar currently, it's make using wechaty more diffcult. --- pom.xml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/pom.xml b/pom.xml index 59edf86..05f8401 100644 --- a/pom.xml +++ b/pom.xml @@ -180,6 +180,25 @@ + + org.codehaus.mojo + build-helper-maven-plugin + 3.0.0 + + + + generate-sources + + add-source + + + + src/main/kotlin + + + + +