-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev' into short-video-message
# Conflicts: # mirai-core-api/src/commonMain/kotlin/contact/Contact.kt # mirai-core-api/src/jvmBaseMain/kotlin/contact/Contact.kt # mirai-core-api/src/jvmBaseMain/kotlin/utils/ExternalResource.kt
- Loading branch information
Showing
114 changed files
with
3,029 additions
and
3,874 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
...on-mirai-console/resources/META-INF/services/net.mamoe.mirai.console.plugin.jvm.JvmPlugin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# | ||
# Copyright 2019-2023 Mamoe Technologies and contributors. | ||
# | ||
# 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. | ||
# Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. | ||
# | ||
# https://github.com/mamoe/mirai/blob/dev/LICENSE | ||
# | ||
|
||
net.mamoe.console.itest.plugincandependsonmiraiconsole.PluginCanDependsOnMiraiConsole |
21 changes: 21 additions & 0 deletions
21
...on-test/testers/plugin-can-depends-on-mirai-console/src/PluginCanDependsOnMiraiConsole.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/* | ||
* Copyright 2019-2023 Mamoe Technologies and contributors. | ||
* | ||
* 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. | ||
* Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. | ||
* | ||
* https://github.com/mamoe/mirai/blob/dev/LICENSE | ||
*/ | ||
|
||
package net.mamoe.console.itest.plugincandependsonmiraiconsole | ||
|
||
import net.mamoe.mirai.console.plugin.jvm.JvmPluginDescription | ||
import net.mamoe.mirai.console.plugin.jvm.KotlinPlugin | ||
|
||
internal object PluginCanDependsOnMiraiConsole : KotlinPlugin( | ||
JvmPluginDescription("net.mamoe.tester.plugin-can-depends-mirai-console", "1.0.0") { | ||
dependsOn("net.mamoe.mirai-console") | ||
} | ||
) { | ||
|
||
} |
Empty file.
1 change: 1 addition & 0 deletions
1
...ers/plugin-with-pluginyml-can-use-libraries-while-clinit/clinit-library/resources/mvn.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
net.mamoe.consoleit.plugin-with-yml:plugin-library:0.0.0 |
11 changes: 7 additions & 4 deletions
11
...in/kotlin/internal/utils/MarkerManager.kt → ...linit/clinit-library/src/PluginLibrary.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,17 @@ | ||
/* | ||
* Copyright 2019-2022 Mamoe Technologies and contributors. | ||
* Copyright 2019-2023 Mamoe Technologies and contributors. | ||
* | ||
* 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. | ||
* Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. | ||
* | ||
* https://github.com/mamoe/mirai/blob/dev/LICENSE | ||
*/ | ||
|
||
package net.mamoe.mirai.internal.utils | ||
package net.mamoe.console.itest.pluginwithpluginyml.library | ||
|
||
internal expect object MarkerManager { | ||
fun getMarker(name: String): Marker | ||
public object PluginLibrary { | ||
@JvmStatic | ||
public fun ok() { | ||
println("Plugin with plugin.yml using libraries under clinit ok") | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
...e-libraries-while-clinit/resources/META-INF/mirai-console-plugin/dependencies-private.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
net.mamoe.consoleit.plugin-with-yml:plugin-library:0.0.0 |
10 changes: 10 additions & 0 deletions
10
...ies-while-clinit/resources/META-INF/services/net.mamoe.mirai.console.plugin.jvm.JvmPlugin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# | ||
# Copyright 2019-2023 Mamoe Technologies and contributors. | ||
# | ||
# 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. | ||
# Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. | ||
# | ||
# https://github.com/mamoe/mirai/blob/dev/LICENSE | ||
# | ||
|
||
net.mamoe.console.itest.pluginwithpluginyml.clinit.PluginWithPluginYmlClinitTest |
5 changes: 5 additions & 0 deletions
5
...on-test/testers/plugin-with-pluginyml-can-use-libraries-while-clinit/resources/plugin.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
id: net.mamoe.console.itest.plugin-with-yml-can-use-library-while-clinit | ||
version: 0.0.0 | ||
|
||
dependencies: | ||
- net.mamoe.console.itest.plugin-with-yml |
25 changes: 25 additions & 0 deletions
25
...plugin-with-pluginyml-can-use-libraries-while-clinit/src/PluginWithPluginYmlClinitTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/* | ||
* Copyright 2019-2023 Mamoe Technologies and contributors. | ||
* | ||
* 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. | ||
* Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. | ||
* | ||
* https://github.com/mamoe/mirai/blob/dev/LICENSE | ||
*/ | ||
|
||
package net.mamoe.console.itest.pluginwithpluginyml.clinit | ||
|
||
import net.mamoe.mirai.console.plugin.jvm.KotlinPlugin | ||
|
||
internal class PluginWithPluginYmlClinitTest : KotlinPlugin() { | ||
|
||
companion object { | ||
init { | ||
// this is <clinit> | ||
|
||
Thread.dumpStack() | ||
Class.forName("net.mamoe.console.itest.pluginwithpluginyml.library.PluginLibrary") | ||
.getMethod("ok").invoke(null) | ||
} | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
...n-with-pluginyml/resources/META-INF/services/net.mamoe.mirai.console.plugin.jvm.JvmPlugin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# | ||
# Copyright 2019-2023 Mamoe Technologies and contributors. | ||
# | ||
# 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. | ||
# Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. | ||
# | ||
# https://github.com/mamoe/mirai/blob/dev/LICENSE | ||
# | ||
|
||
net.mamoe.console.itest.pluginwithpluginyml.PluginWithPluginYml |
5 changes: 5 additions & 0 deletions
5
mirai-console/backend/integration-test/testers/plugin-with-pluginyml/resources/plugin.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
id: net.mamoe.console.itest.plugin-with-yml | ||
version: 0.0.0 | ||
|
||
dependencies: | ||
- net.mamoe.console.itest.serviceloader |
27 changes: 27 additions & 0 deletions
27
...console/backend/integration-test/testers/plugin-with-pluginyml/src/PluginWithPluginYml.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package net.mamoe.console.itest.pluginwithpluginyml | ||
|
||
import net.mamoe.mirai.console.plugin.PluginManager | ||
import net.mamoe.mirai.console.plugin.PluginManager.INSTANCE.description | ||
import net.mamoe.mirai.console.plugin.jvm.KotlinPlugin | ||
import kotlin.test.assertTrue | ||
|
||
/* | ||
* Copyright 2019-2023 Mamoe Technologies and contributors. | ||
* | ||
* 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. | ||
* Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. | ||
* | ||
* https://github.com/mamoe/mirai/blob/dev/LICENSE | ||
*/ | ||
|
||
internal object PluginWithPluginYml : KotlinPlugin() { | ||
override fun onEnable() { | ||
println(description) | ||
println(description.id) | ||
val pluginId = description.id | ||
|
||
assertTrue { | ||
PluginManager.plugins.first { it.description.id == pluginId } === PluginWithPluginYml | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.