Commit Graph

8095 Commits

Author SHA1 Message Date
Him188
16609fb1e0
[core] Introduce Streamable for simplified multiplatform asFlow a… (#2256)
* [core] Introduce `Streamable` for simplified multiplatform `asFlow` and `asStream`. Make `Announcements.asFlow` not suspend.

* Remove `@JvmBlockingBridge` in native
2022-09-25 23:44:18 +08:00
Him188
2da0a2d6d3
[core] Fix relevant uses of Closeable 2022-09-23 23:01:39 +08:00
Him188
d4f4ea30d4
[build] Update idea plugin version to 221-2.13.0-171-2 2022-09-23 22:09:10 +08:00
Him188
ead98b192d
[docs] Add release note for 2.13.0-RC 2022-09-23 22:09:02 +08:00
ヒューマンワーキング
8cb8a71f16
[intellij] 从 Maven Central 获取 kotlin jvm 版本 (#2244)
* get kotlin version from Gradle Plugins

* add `kotlinVersion` to project module

* add kotlin version cell to wizard initial step

* get dependency `kotlin-stlib-*` version from maven

* rename `KotlinJvmVersion` to `KotlinStdlibVersion`

* `KotlinJvmVersion.kt` -> `KotlinStdlibVersion.kt`
2022-09-23 22:02:43 +08:00
Him188
d1273401f6
[core] Remove dependency kotlinx-coroutines-jdk8 from mirai-core-api 2022-09-23 21:38:07 +08:00
Him188
9122dddfb7
[core] Add net.mamoe.mirai.utils.Closeable for MPP use 2022-09-23 21:38:06 +08:00
Him188
b360f58c2b
[core] Make ExternalResource.input an internal API. helps #2254 2022-09-23 21:38:06 +08:00
cssxsh
d000f2ea0f
[core] add group level api (#2115)
* add: api dump

* feat: Member.level

* add: api dump

* rename: level to rank

* feat: rank show

* feat: honor flag

* fix: honor flag index

* feat: record and chart

* feat: flag and docs

* add: api dump

* fix: active

* fix: honor

* fix: active

* fix: rebase

* fix: docs

* feat: MemberActive

* fix: for review

* feat: other notification

* remove: low level api

* add: since and api dump

* add: since

* for: review

* add: event sync

* fix: name and docs

* fix: api dump

* fix: for review

* add: ActiveRank, MemberMedal close #2233

* fix: active for review

* improve public API for inlined GroupHonorType

* Change `@since 2.13.0` to `@since 2.13`

* dump api changes

* implement mock framework for Active

* change `GroupActive.flush` to `GroupActive.refresh`

* improve docs for GroupActive

* remove unnecessary expect/actual for MemberActive

* change property names in GroupInfo

* check permission in MockGroupActiveImpl

* optimize member names in  CommonGroupActiveImpl

* fix error checking

* dump api

Co-authored-by: Him188 <Him188@mamoe.net>
2022-09-21 23:18:50 +08:00
Him188
aa40f3f3d7
[core] fix since version of ExternalResource.input 2022-09-21 12:01:47 +08:00
Him188
00db1fe187
[build] Use modified shadow plugin to fix ASM mapping issues. Close #2230. 2022-09-20 18:50:04 +08:00
Karlatemp
bf362f9d75
[console] Add version bar before logo 2022-09-20 12:38:41 +08:00
Karlatemp
678fe6fd6b
[console] Print logo to help users distinguish between mirai-console and mirai-console-loader 2022-09-18 22:26:24 +08:00
Karlatemp
1ea68d82a7
[mock] Fix serialization 2022-09-18 17:55:28 +08:00
微莹·纤绫
a8e90c6e89
[skip ci] Create CONTRIBUTING.md 2022-09-13 23:36:10 +08:00
Him188
6b7b83f39f
[docs] Add release note for 2.12.3 2022-09-11 20:21:22 +08:00
AdoptOSS
397d824d33
[core] enhance(ECDH): reconstruct ECDH (#2161)
* enhance(ECDH): reconstruct ECDH
common: 移动特定于 QQ 平台的实现到 OicqECDH,重新设计 ECDH,使 ECDH 类只针对算法本身,而不过多包括 QQ 协议的使用细节
jvm: 尝试优先使用平台加密实现,可能改善性能
jvm & android: 使用 curveName `secp256r1` 代替 `prime256v1`,前者在 Java 中更常用,可以被更多的 JCE 实现所识别(虽然都是指同一条曲线)
android: 使用系统自带的实现以减少依赖,并尝试兼容 Android P+ 版本
native: 中间储存时保留OpenSSL内部结构而不反复 new & free,提高性能
    (为了实现智能指针,需要用到 `@ExperimentalStdlibApi` 的 `createCleaner`,但这种风险应该可以接受)
native: 直接使用 point/bignum 到 bytes 的转换,避免了 hex string 作为中间层,提高效率

* test(ECDH): fix AndroidTest

* style(Ecdh): obey official Kotlin coding conventions
> When using an acronym as part of a declaration name, capitalize it if it consists of two letters (IOStream); capitalize only the first letter if it is longer (XmlFormatter, HttpInputStream).
> [View origin](https://kotlinlang.org/docs/coding-conventions.html)

Co-authored-by: ArcticLampyrid <arcticlampyrid@outlook.com>
2022-09-11 20:14:39 +08:00
Him188
d32a8a566c
[core] Use Java URL connection for TxCaptchaHelper.
^Fixes previous commit c804bbda13
2022-09-11 20:02:42 +08:00
Him188
c804bbda13
[core] Remove dependency on ktor-client for mirai-core-api. Fix duplicated class errors on Android, close #2248 2022-09-11 19:49:43 +08:00
Him188
bfbc6bcb02 [core] Fix selector for CONNECTING state 2022-09-11 19:41:16 +08:00
Him188
eb89b6348d [core] Support solving device verification request by SMS:
- close #2190, helps #717
- deprecate `LoginSolver.onSolveUnsafeDeviceLoginVerify`, add `.onSolveDeviceVerification`
2022-09-11 19:41:16 +08:00
Cyl18
1691172667
add: Chaldene library (#2243) 2022-09-10 17:39:10 +08:00
Karlatemp
657b414c90
[mock] remove override of AbstractExternalResource 2022-09-10 13:29:53 +08:00
微莹·纤绫
2db9804cf2
Mock Testing Framework (#1521)
Co-authored-by: Eritque arcus <1930893235@qq.com>
Co-authored-by: Him188 <Him188@mamoe.net>
2022-09-10 12:49:13 +08:00
Him188
2eb2c3acd0
[core] Add default AbstractExternalResource.input implementation 2022-09-09 18:43:29 +08:00
Him188
951e835a26
[core] Fix sender name in forwarded messages. close #2187 2022-09-07 13:02:48 +08:00
Karlatemp
3949c9c08c
Fix terminal resolving; Fix terminal logic error 2022-09-06 18:21:41 +08:00
Karlatemp
500ad3cc9e
Fix console integration test 2022-09-06 18:21:40 +08:00
Karlatemp
d24a5912d3
Redesign terminal 2022-09-06 18:21:39 +08:00
Karlatemp
7952f0c15d
Update terminal dependencies
- org.jline:jline:3.21.0
- org.fusesource.jansi:jansi:2.4.0
2022-09-06 18:21:38 +08:00
Karlatemp
5ac74a336f
Create module mirai-console-frontend-base 2022-09-06 18:21:37 +08:00
Karlatemp
af2b38d476
Make MultiFilePluginDataStorageImpl.logger lazy init 2022-09-06 18:21:36 +08:00
Karlatemp
a94c98d990
Add FrontendLoggingInitContext.invokeAfterInitialization 2022-09-06 18:21:25 +08:00
Him188
637fe1a5b9
Upgrade atomicfu to 0.18.3 2022-09-04 20:40:53 +08:00
cssxsh
e00f592b84
[console] feat: login use auto login account configuration (#2209)
* feat: other account configuration

* add: test
2022-09-02 07:50:08 +08:00
ExMikuPro39
7b11ed509e
add easyMirai Library (#2221)
add easyMirai Library
2022-09-02 07:47:23 +08:00
cssxsh
7804ca1d7d
fix: watch and macOS (#2228) 2022-09-02 07:45:33 +08:00
Karlatemp
df6789889d
Fix jvm test resource directory resolving
¿¿ Who wrote it¿¿¿
2022-08-31 21:49:56 +08:00
Karlatemp
969c77f146
[console] Change convention of createLoggerFactory() 2022-08-28 22:52:48 +08:00
Him188
e967b888a3
[build] Run JVM builds no macOS, and concurrently to improve speed 2022-08-28 13:48:56 +08:00
Him188
5935e16029
[build] Remove matrix osmacos-os for Native builds 2022-08-28 12:39:53 +08:00
Him188
428089617f
[build] Run JVM builds on Windows 2022-08-28 12:36:55 +08:00
Him188
15dea7a6b2
[build] Run JVM builds on Windows 2022-08-28 12:36:02 +08:00
Him188
f0651c81c6
[core+console] Improve logging hierarchy: (#2196)
- always use factory API from mirai-core
- Terminal is still overriding standard outputs
- plugins are forbidden to override logging framework (this was allowed but not working before)
2022-08-27 18:46:16 +08:00
Him188
2d393ee0b0
[core+console] Raise deprecation level for 2.13: (#2213)
- warningSince 2.11 -> errorSince 2.13
 - errorSince 2.12 -> hiddenSince 2.13
 - some experimental APIs removed
2022-08-27 14:06:03 +08:00
Him188
f4db93745d
[core] Move structureToString from .core.utils.debug to .core.utils
due to compiler bug.
2022-08-27 01:21:14 +08:00
Him188
965ab57aaa
[core] Move StructureToStringTransformer to mirai-core-utils, and use legacy implementation as fallback. close #2097. 2022-08-26 18:42:56 +08:00
Eritque arcus
fea1d28488
[core] Support friend group (#2113)
* feat: support friend group

* remove unnecessary modifications

* toByteArray2

* support friendGroup, with api dump

* support rename, with api dump

* modify as required

* modify as required

* reverse

* doc

* FriendGroups

* api dump

* modify as required

* fix CI

* FriendGroup sync notice

* api dump

* modify as required

* immutable

* add friends: ContactList in FriendGroup

* more sync notice

* modify log content

* Change `FriendGroup.friends` to `Collection<Friend>`

* Fix `FriendGroup.friends.isEmpty()`

* modified as require, untested

* del count and online count in info

* change import

* fix missing import

* set @since 2.13 and modified as required

* modified as required

* modified as required

* doc

* change friendGroupId type to Int?

* api dumped

* change friendGroupId type to Int?

* introduce null to friendGroupId

* modified as required

* chore

* api dump

* chore: remark

* change int? to int

* api dump

* Update mirai-core-api/src/commonMain/kotlin/data/FriendGroups.kt

Co-authored-by: Him188 <Him188@mamoe.net>

* Move FriendGroup and FriendGroups to contact.friendgroup

* Make `Friend.friendGroup` not null

* add FriendGroups.default for default group

* Redesign FriendGroup interface

Co-authored-by: Karlatemp <kar@kasukusakura.com>
Co-authored-by: Him188 <Him188@mamoe.net>
2022-08-26 16:56:09 +08:00
Him188
eb892da093
[build] Fix build when local.properties not found 2022-08-26 16:42:18 +08:00
Him188
f87c142a69
[build] Support disabling modules and targets 2022-08-26 16:38:05 +08:00