Skip to content

Commit 9c3370a

Browse files
committed
mcl: release 2.0.0-beta.1
1 parent cf29e0d commit 9c3370a

File tree

3 files changed

+10
-14
lines changed

3 files changed

+10
-14
lines changed

build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ plugins {
44
}
55

66
group 'org.itxtech'
7-
version '1.2.3'
7+
version '2.0.0-beta.1'
88
description '模块化、轻量级且支持完全自定义的 mirai 加载器。'
99

1010
repositories {
@@ -28,7 +28,7 @@ def getGitHash = { ->
2828

2929
task fatJar(type: Jar) {
3030
from sourceSets.main.output
31-
archiveBaseName.set("mcl")
31+
archiveFileName = "mcl-${project.version}-all.jar"
3232

3333
manifest {
3434
attributes "Main-Class": "org.itxtech.mcl.Loader"
@@ -63,11 +63,11 @@ task launchTest(type: JavaExec) {
6363
task zipAll(type: Zip) {
6464
from fileTree(dir: ".", includes: ["README.md", "LICENSE", "mcl", "mcl.cmd"])
6565
from("$buildDir/libs") {
66-
include "mcl-${project.version}.jar"
66+
include "mcl-${project.version}-all.jar"
6767
rename { "mcl.jar" }
6868
}
6969
destinationDirectory = file("$buildDir/libs")
70-
archiveFileName = "mirai-console-loader-${project.version}.zip"
70+
archiveFileName = "mcl-${project.version}.zip"
7171
}
7272

7373
assemble.dependsOn(fatJar)

docs/Plugin.md

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# MCL Plugin
22

3-
`Mirai Console`中使用`MCL API`,本文档采用`Kotlin`编写。
3+
`Mirai Console`插件中使用`MCL API`,本文档采用`Kotlin`编写。
44

55
## `build.gradle(.kts)` 中添加`MCL`依赖
66

77
```groovy
88
dependencies {
99
//打包时排除mcl包,如果您的插件打包时不打包依赖,则可使用implementation
10-
compileOnly("org.itxtech:mirai-console-loader:1.2.1")
10+
compileOnly("org.itxtech:mirai-console-loader:2.0.0")
1111
}
1212
```
1313

@@ -35,7 +35,7 @@ val mcl = Loader.getInstance()
3535

3636
fun runMclCommand(args: Array<String>) {
3737
mcl.parseCli(args, true) //调用mcl解析参数
38-
mcl.manager.phaseCli() //调用脚本管理器执行cli阶段
38+
mcl.manager.phaseCli() //调用模块管理器执行cli阶段
3939
}
4040

4141
//执行添加包指令
@@ -55,10 +55,6 @@ mcl.config.packages.add(
5555
Config.Package("org.itxtech:mirai-native", "stable")
5656
)
5757

58-
//执行 updater 脚本,如果updater被禁用则无法调用
59-
mcl.manager.getScript("updater")?.apply {
60-
phase.load?.run() //执行脚本的 load 阶段
61-
return
62-
}
63-
58+
//执行 updater 模块,如果updater被禁用则无法调用
59+
mcl.manager.getModule("updater")?.load() //执行模块的 load 阶段
6460
```

settings.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ pluginManagement {
44
gradlePluginPortal()
55
}
66
}
7-
rootProject.name = 'mirai-console-loader'
7+
rootProject.name = 'mcl'
88

0 commit comments

Comments
 (0)