Commit Graph

49 Commits

Author SHA1 Message Date
Him188
6fc1482f69
[core] Relocate ktor-io in mirai-core-api. Fix #2381 2022-12-04 14:49:47 +00:00
Him188
60bbcf6e2c
[core] Revert "Review atomic calls and enable atomicfu compiler. Close #2315", due to atomicfu does not behave correctly when mirai-console depends on mirai-core-utils. Fixes #2329.
This commit reverts part of commit 564a7ce8f8
2022-11-27 20:08:21 +00:00
Him188
3360347ca2 [build] Fix dependency exclusion for builds when IDEA_ACTIVE 2022-11-27 15:25:18 +00:00
Him188
c0ccdbe9d3 [build] Rewrite shadow relocation 2022-11-27 15:25:18 +00:00
Him188
564a7ce8f8
[core] Review atomic calls and enable atomicfu compiler. Close #2315 2022-10-29 13:04:37 +01:00
Him188
25e66d19c7
[core] Filter out relocated ktor dependencies in runtime except for mirai-core-utils and mirai-core-all. Fix #2291 2022-10-21 16:09:27 +01:00
Him188
d1273401f6
[core] Remove dependency kotlinx-coroutines-jdk8 from mirai-core-api 2022-09-23 21:38:07 +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
fd67ba9204 Configure shadow relocation and add checks for multiplatform publishing 2022-07-20 00:30:16 +08:00
AdoptOSS
7325c1f7e2 native: 优化 build script 及 actions,修复 ECDH 相关资源释放问题 (#2110)
* build: fix build on Windows

* test: fix ContentEqualsTest on native

* build: allow disabling targets with property

* fix: free ECDH-related resources properly on native
avoid memory leaking (usually on *nix) or crash (usually on Windows)

Signed-off-by: AdoptOSS <adoptoss@outlook.com>

* build(workflow): remove invalid options

* fix(styling): `mirai.target` property

* build(workflow): try to limit memory usage during mirai-console:tools:gradle-plugin:integTest

* enhance(test): use buildList

* build(workflow): retry

Co-authored-by: ArcticLampyrid <arcticlampyrid@outlook.com>
2022-07-20 00:30:16 +08:00
Him188
21c4a5ba04 Use kotlinx-coroutines-test 2022-07-20 00:30:16 +08:00
Him188
cca40b8aa3 Add dummy jvmBase target for IDE 2022-07-20 00:30:16 +08:00
Him188
7dbb1a5ad7 Add RunConfigurations 2022-07-20 00:30:16 +08:00
Him188
4c6b879873 Upgrade to Ktor 2.0.2, use CIO engine for linux targets; Remove ktor-client-okhttp from mirai-core-api jvmBaseMain
Use Input.readAllText instead of Input.readText, because readText only reads one buffer.
#2084
2022-07-20 00:30:16 +08:00
Him188
7088835402 HMPP 2022-07-20 00:30:16 +08:00
Him188
ff2a8acb0c Implement multiplatform modules 2022-07-20 00:30:16 +08:00
Him188
ce87400998 Use ktor-io to replace kotlinx-io 2022-07-20 00:30:16 +08:00
Him188
d96641dedb Configure HMPP project structure 2022-07-20 00:30:16 +08:00
Him188
287769799a Enable kotlin-dynamic-delegation in mirai-core and mirai-core-api 2022-05-25 22:39:53 +01:00
Him188
3d864362aa Generalize binary validator 2022-01-06 20:26:52 +00:00
Him188
2a036d7bb3 Simplify buildscript: remove redundant comments 2022-01-06 04:46:58 +00:00
Him188
1cd354a7e3 Add @ResolveContext for usages of abstract message keys, implement relevant inspections, close #1363 2021-12-27 13:07:17 +00:00
Him188
7faf630454 Update kotlin-jvm-blocking-bridge to 2.0.0-160.2 2021-12-23 01:37:11 +00:00
Him188
575225874c Explicitly add dependency on kotlinx-coroutines-core-jvm to help IDE analysis 2021-12-21 18:09:12 +00:00
Him188
66999aadaf Migrate to Kotlin 1.5.30 and review dependencies:
- Remove redundant atomicfu-common
- Do not expose kotlinx-io and atomicfu
2021-09-01 18:52:36 +08:00
Him188
5950e9e1e8 Improve logging: use Log4j internally and support markers
Migrate usages of `MiraiLogger.create` to new API
apiDump for new logging
2021-08-11 15:24:32 +08:00
Him188
5e25c0e25b Remove bintray 2021-05-25 12:25:53 +08:00
AdoptOSS
09475efbda
fix: serialization plugin should not be put into runtime classpath (#1197) 2021-04-17 19:56:19 +08:00
AdoptOSS
21e8852e0f
buildscript: fix task not found errors when android sdk not available (#1161)
* buildscript: fix task not found errors when android sdk not available

* fix: this shadowed by run

* cleanup: code style

* improve: avoid breaking index map
2021-04-05 22:35:38 +08:00
Karlatemp
f9353b6aef
Compiled code verify (#1080)
* Compiled code verify

* Run `verifyCompiledClasses` in `check` task

* Redesign verification

Co-authored-by: Bo Zhang <bo@gradle.com>

* Disable console verify

* Decoupling

Co-authored-by: Bo Zhang <bo@gradle.com>
2021-03-20 13:34:04 +08:00
Him188
e256ec06d3
Support file operations (#1069)
* Proto structs for group file

* RemoteFile fundamental abstraction and proto structs

* Configure JVM target for mirai-console-intellij

* Add Group.filesRoot

* Fix build

* Implement a FileSystem for RemoteFile resolution

* Fix RemoteFile FileSystem and implement resolve and listFiles

* Implement file info query and file download

* Support uploading group file

* Support file feeds

* 2.5-M2-dev-1

* Fix tests

* 2.5-M2-dev-2

* Add uuid-based resolving, support getting file details

* Support FileMessage receive

* Support sending FileMessage

* 2.5-M2-dev-3

* Add DownloadInfo.id

* Improve RemoteFile.delete

* Support move, delete, rename, mkdir. Simplify listFiles

* - Rename RemoteFile.write to .upload.
- Prefer id matching
- Improve move

* Add permission checks

* Improve permission checks

* Rearrange functions and add constant ROOT_PATH

* Introduce FileSupported, add extensions

* Introduce ProgressionCallback

* Fix docs and uploadFileAndSend

* Remove empty FileHighway.kt

* Add test testNormalize

* Add RemoteFile.contact, change RemoteFile.uploadAndSend return type to MessageReceipt

* Move @JvmBlockingBridge to file

* Change FileMessage.toRemoteFile parameter type Group to FileSupported

* Add impl notes #1082
2021-03-08 18:34:45 +08:00
Him188
2c14f0016f Disable atomicFU compiler plugin 2021-02-25 09:35:51 +08:00
Karlatemp
7a7c88b783
Android api level check 2021-02-25 00:12:58 +08:00
Him188
9c3a175b02 Configure binary compatibility validator for android target 2021-02-24 11:36:03 +08:00
Him188
0b971b2117 Merge branch 'dev' into android_target
# Conflicts:
#	build.gradle.kts
#	buildSrc/src/main/kotlin/Versions.kt
2021-02-24 09:20:47 +08:00
Him188
d0cbe087b1 Add jetbrains-annotations dependency to mirai-core-api 2021-02-12 14:38:22 +08:00
Him188
bacfef584f Add android compilation target 2021-02-01 12:23:28 +08:00
Him188
f1c6677af9 Add binary compatibility validator 2021-01-21 14:20:43 +08:00
Him188
988794343b Improve buildscript, fix publication 2021-01-21 10:08:21 +08:00
Him188
93fcb566fd Introduce AsyncRecallResult for getting result of recallIn 2021-01-11 18:36:04 +08:00
Him188
dfad8572ee Use OkHttp client than CIO 2020-12-28 15:10:32 +08:00
Him188
82f24b736c Fix HMPP platform structure 2020-12-18 15:37:13 +08:00
Him188
bf88731086 Fix publishing and add mirai-core-all 2020-12-17 12:41:44 +08:00
Him188
8fdfe830fe Introduce new module mirai-core-utils 2020-12-02 09:25:25 +08:00
Him188
eafca6d4ed Simplify platform structure: merge jvmMain into commonMain 2020-11-30 23:30:57 +08:00
Him188
b8002d4b4d Hierarchical MPP:
- JDK in common target
- Disabled common compilations
- Android targets
- Kotlin 1.4.20
2020-11-22 14:25:49 +08:00
Him188
1e7aaaec48 Rearrange protocol implementations 2020-11-01 15:07:32 +08:00
Him188
80722aaea7 Pretty buildscript 2020-10-03 13:35:05 +08:00
Him188
a9d4d14576 Rearrange module structure:
- Rename mirai-core to mirai-core-api
- Rename mirai-core-qqandroid to mirai-core
- Rename package net.mamoe.mirai.qqandroid to net.mamoe.mirai.internal
- Delete old android targets
- Configure default packages correctly
- Update licenses
2020-10-03 12:42:13 +08:00