|
|
@@ -9,29 +9,21 @@
|
|
|
|
|
|
## 构建需求
|
|
|
|
|
|
-- Kotlin 1.3.72 (必须)
|
|
|
-- JDK 6 或更高 (必须)
|
|
|
+- JDK 6 或更高
|
|
|
|
|
|
## 获取 Demo
|
|
|
可在 [mirai-demos](https://github.com/mamoe/mirai-demos) 中获取已经配置好依赖的示例项目.
|
|
|
|
|
|
## Quick Start
|
|
|
|
|
|
-请将 `VERSION` 替换为 `mirai-core` 的最新版本号(如 `0.23.0`):
|
|
|
+请将 `VERSION` 替换为 `mirai-core` 的最新版本号(如 `1.0.4`):
|
|
|
[](https://bintray.com/him188moe/mirai/mirai-core/)
|
|
|
|
|
|
### 添加依赖
|
|
|
可通过以下三种方法之一添加 mirai 依赖.
|
|
|
|
|
|
-#### 直接导入jar包 (不推荐)
|
|
|
-下载已经编译好的 Jar 包, 并添加 Jar 依赖:
|
|
|
-- [mirai-core](https://github.com/mamoe/mirai-repo/tree/master/shadow/mirai-core)
|
|
|
-- [mirai-qqandriod](https://github.com/mamoe/mirai-repo/tree/master/shadow/mirai-core-qqandroid)
|
|
|
-
|
|
|
#### Maven
|
|
|
|
|
|
-Kotlin 在 Maven 上只支持 JVM 平台.
|
|
|
-
|
|
|
```xml
|
|
|
<repositories>
|
|
|
<repository>
|
|
|
@@ -62,9 +54,11 @@ repositories{
|
|
|
```
|
|
|
|
|
|
**注意:**
|
|
|
-Mirai 核心由 API 模块(`mirai-core`)和协议模块组成。
|
|
|
-只添加 API 模块将无法正常工作。
|
|
|
-现在只推荐使用 QQAndroid 协议,请参照下文选择对应目标平台的依赖添加。
|
|
|
+Mirai 核心由 API 模块(`mirai-core`)和协议模块组成。依赖协议模块时会自动依赖相应版本的 API 模块。
|
|
|
+请参照下文选择目标平台的依赖添加。
|
|
|
+
|
|
|
+如果你只用 Java / Kotlin 或其他语言开发 JVM 平台应用,只需要添加下文第一条。
|
|
|
+如果你只开发 Android 应用,只需添加下文第三条。
|
|
|
|
|
|
**jvm** (JVM 平台源集)
|
|
|
|
|
|
@@ -84,6 +78,12 @@ implementation("net.mamoe:mirai-core-qqandroid-common:VERSION")
|
|
|
implementation("net.mamoe:mirai-core-qqandroid-android:VERSION")
|
|
|
```
|
|
|
|
|
|
+#### 直接导入jar包 (不推荐)
|
|
|
+下载已经编译好的 Jar 包, 并添加 Jar 依赖:
|
|
|
+- [mirai-core](https://github.com/mamoe/mirai-repo/tree/master/shadow/mirai-core)
|
|
|
+- [mirai-qqandriod](https://github.com/mamoe/mirai-repo/tree/master/shadow/mirai-core-qqandroid)
|
|
|
+
|
|
|
+
|
|
|
### 开始使用
|
|
|
|
|
|
```kotlin
|