Skip to content

Commit 6bda2c7

Browse files
committed
build: 2.2.2
1 parent 72b9b7d commit 6bda2c7

File tree

6 files changed

+19
-16
lines changed

6 files changed

+19
-16
lines changed

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -118,4 +118,4 @@ run/
118118
!gradle-wrapper.jar
119119

120120
# Local Test Launch point
121-
src/test/kotlin/RunTerminal.kt
121+
debug-sandbox

README.md

+6-5
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ mirai {
5656
* `/selenium status` 驱动进程状态
5757
* `/selenium firefox` 下载解压 firefox
5858
* `/selenium chromium` 下载解压 chromium
59+
* `/selenium chart` 测试 图表绘制功能,将以群员入群事件和发言时间为数据集
5960

6061
## 配置
6162

@@ -70,7 +71,7 @@ mirai {
7071
* `proxy` 代理地址
7172
* `log` 启用日志文件
7273
* `browser` 指定使用的浏览器: `Chrome`,`Chromium`,`Firefox`,`Edge`
73-
* `factory` 指定使用的Factory: ~~ktor~~,`netty` (ktor 不再可用)
74+
* `factory` 指定使用的Factory: `netty` (ktor 不再可用)
7475
* `arguments` 自定义 arguments, 可以尝试加入 `--no-sandbox`, `--disable-dev-shm-usage`, 解决兼容性问题
7576
* `preferences` 自定义 preferences,浏览器配置
7677

@@ -80,9 +81,9 @@ mirai {
8081
* `edge` Edge 二进制文件路径
8182
* `firefox` Firefox 二进制文件路径
8283

83-
## LoginSolver
84+
## [MiraiSeleniumLoginSolver](src/main/kotlin/xyz/cssxsh/mirai/selenium/MiraiSeleniumLoginSolver.kt)
8485

85-
本插件提供了 [MiraiSeleniumLoginSolver](src/main/kotlin/xyz/cssxsh/mirai/selenium/MiraiSeleniumLoginSolver.kt)
86+
本插件提供了 一个类似 [mirai-login-solver-selenium](https://github.com/project-mirai/mirai-login-solver-selenium) 的 登陆处理器
8687
需要在 mirai 运行时中添加 JVM 属性 mirai.slider.captcha.supported (添加参数 -Dmirai.slider.captcha.supported) 启用
8788

8889
## 安装
@@ -94,5 +95,5 @@ mirai {
9495

9596
### 手动安装
9697

97-
1. 运行 [Mirai Console](https://github.com/mamoe/mirai-console) 生成`plugins`文件夹
98-
1.[Releases](https://github.com/cssxsh/mirai-selenium-plugin/releases) 下载`jar`并将其放入`plugins`文件夹中
98+
1. 运行 [Mirai Console](https://github.com/mamoe/mirai-console) 生成 `plugins` 文件夹
99+
2.[Releases](https://github.com/cssxsh/mirai-selenium-plugin/releases) 下载 `jar` 并将其放入 `plugins` 文件夹中

build.gradle.kts

+9-7
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
11
plugins {
2-
kotlin("jvm") version "1.6.21"
3-
kotlin("plugin.serialization") version "1.6.21"
2+
kotlin("jvm") version "1.7.10"
3+
kotlin("plugin.serialization") version "1.7.10"
44

5-
id("net.mamoe.mirai-console") version "2.12.0"
6-
id("net.mamoe.maven-central-publish") version "0.7.1"
7-
id("me.him188.kotlin-jvm-blocking-bridge") version "2.1.0-162.1"
5+
id("net.mamoe.mirai-console") version "2.12.1"
6+
id("me.him188.maven-central-publish") version "1.0.0-dev-3"
7+
id("me.him188.kotlin-jvm-blocking-bridge") version "2.1.0-170.1"
88
}
99

1010
group = "xyz.cssxsh.mirai"
11-
version = "2.2.1"
11+
version = "2.2.2"
1212

1313
mavenCentralPublish {
1414
useCentralS01()
1515
singleDevGithubProject("cssxsh", "mirai-selenium-plugin")
1616
licenseFromGitHubProject("AGPL-3.0", "master")
17+
workingDir = System.getenv("PUBLICATION_TEMP")?.let { file(it).resolve(projectName) }
18+
?: project.buildDir.resolve("publishing-tmp")
1719
publication {
1820
artifact(tasks.getByName("buildPlugin"))
1921
}
@@ -34,7 +36,7 @@ dependencies {
3436
exclude("org.slf4j")
3537
}
3638
compileOnly("com.google.auto.service:auto-service-annotations:1.0.1")
37-
compileOnly("net.mamoe:mirai-core-utils:2.12.0")
39+
compileOnly("net.mamoe:mirai-core-utils:2.12.1")
3840
// test
3941
testImplementation(kotlin("test", "1.6.21"))
4042
testImplementation("org.icepear.echarts:echarts-java:1.0.3")

src/main/kotlin/xyz/cssxsh/mirai/selenium/MiraiSeleniumPlugin.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public object MiraiSeleniumPlugin : KotlinPlugin(
2020
JvmPluginDescription(
2121
id = "xyz.cssxsh.mirai.plugin.mirai-selenium-plugin",
2222
name = "mirai-selenium-plugin",
23-
version = "2.2.1",
23+
version = "2.2.2",
2424
) {
2525
author("cssxsh")
2626
}

src/main/kotlin/xyz/cssxsh/mirai/selenium/command/SeleniumCommand.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public object SeleniumCommand : CompositeCommand(
9898
}
9999

100100
@SubCommand
101-
@Description("下载解压 chromium, https://github.com/macchrome")
101+
@Description("测试 图表绘制功能,将以群员入群事件和发言时间为数据集")
102102
public suspend fun MemberCommandSenderOnMessage.chart() {
103103
val tags = mapOf(
104104
"Within 1 days" to LocalDateTime.now().minusDays(1),

src/test/kotlin/xyz/cssxsh/mirai/test/RemoteWebDriver.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import org.openqa.selenium.remote.*
44

55
/**
66
* 注意,[RemoteWebDriver] 不要出现在 if (selenium) { } 外面,
7-
* 否则 [MiraiSeleniumPlugin] 未安装时会出现 [NoClassDefFoundError]
7+
* 否则 [xyz.cssxsh.mirai.selenium.MiraiSeleniumPlugin] 未安装时会出现 [NoClassDefFoundError]
88
* 也不应该作为 KotlinPlugin 的属性声明,否则会出现 [NoClassDefFoundError]
99
*/
1010
lateinit var driver: RemoteWebDriver

0 commit comments

Comments
 (0)