Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
Mirai
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
Mirai
Commits
951563d6
Commit
951563d6
authored
Nov 23, 2019
by
Him188
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Publish to jcenter
parent
975f3758
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
244 additions
and
150 deletions
+244
-150
.gitignore
.gitignore
+1
-1
README.md
README.md
+31
-6
build.gradle
build.gradle
+9
-1
gradle.properties
gradle.properties
+2
-2
gradle/publish.gradle
gradle/publish.gradle
+105
-0
mirai-api-http/build.gradle.kts
mirai-api-http/build.gradle.kts
+1
-1
mirai-core/build.gradle.kts
mirai-core/build.gradle.kts
+75
-139
mirai-core/src/main/AndroidManifest.xml
mirai-core/src/main/AndroidManifest.xml
+0
-0
settings.gradle
settings.gradle
+20
-0
No files found.
.gitignore
View file @
951563d6
...
@@ -40,4 +40,4 @@ mirai.iml
...
@@ -40,4 +40,4 @@ mirai.iml
local.properties
local.properties
# Maven publishing credits
# Maven publishing credits
mirai-core/credits.properties
keys.properties
\ No newline at end of file
\ No newline at end of file
README.md
View file @
951563d6
# Mirai
# Mirai
[

](http://hits.dwyl.io/him188/mamoe/mirai)
[

](https://www.codacy.com/manual/Him188/mirai?utm_source=github.com
&
utm_medium=referral
&
utm_content=mamoe/mirai
&
utm_campaign=Badge_Grade)
[

](http://hits.dwyl.io/him188/mamoe/mirai)
[

](https://www.codacy.com/manual/Him188/mirai?utm_source=github.com
&
utm_medium=referral
&
utm_content=mamoe/mirai
&
utm_campaign=Badge_Grade)
一个以
**TIM PC协议(非web)**
驱动的跨平台开源 QQ 机器人支持库, 现有 JVM 和 AndroidLib 支持。
一个以
**TIM PC协议(非web)**
驱动的跨平台开源 QQ 机器人支持库, 现有 JVM 和 AndroidLib 支持。
Mirai 使用纯 Kotlin 实现 QQ 协议库并跨平台。
Mirai 使用纯 Kotlin 实现 QQ 协议库并跨平台。
...
@@ -11,6 +12,32 @@ Mirai 在 JVM 平台额外提供插件模式运行的服务端。
...
@@ -11,6 +12,32 @@ Mirai 在 JVM 平台额外提供插件模式运行的服务端。
**一切开发旨在学习,请勿用于非法用途**
**一切开发旨在学习,请勿用于非法用途**
## Use as library
把 Mirai 作为库内置于您的项目中使用.
Mirai 只上传在 jcenter, 因此请确保添加
`jcenter()`
仓库
```
kotlin
repositories
{
jcenter
()
}
```
若您需要使用在跨平台项目, 您需要对各个目标平台添加不同的依赖.
若您只需要使用在单一平台, 则只需要添加一项该平台的依赖.
您需要将
`VERSION`
替换为最新的版本:
[

](https://bintray.com/him188moe/mirai/mirai-core/)
#### common
```
kotlin
implementation
(
"net.mamoe:mirai-core-common:VERSION"
)
```
#### jvm
```
kotlin
implementation
(
"net.mamoe:mirai-core-jvm:VERSION"
)
```
#### android
```
kotlin
implementation
(
"net.mamoe:mirai-core-android:VERSION"
)
```
## Try
## Try
### On JVM or Android
### On JVM or Android
...
@@ -132,7 +159,7 @@ Samples and demos.
...
@@ -132,7 +159,7 @@ Samples and demos.
监听事件示例
[
SubscribeSamples
](
mirai-demos/mirai-demo-1/src/main/java/demo/subscribe/SubscribeSamples.kt
)
监听事件示例
[
SubscribeSamples
](
mirai-demos/mirai-demo-1/src/main/java/demo/subscribe/SubscribeSamples.kt
)
随机图片发送
[
Gentleman
](
mirai-demos/mirai-demo-gentleman/src/main/kotlin/demo/gentleman/Main.kt
)
随机图片发送
[
Gentleman
](
mirai-demos/mirai-demo-gentleman/src/main/kotlin/demo/gentleman/Main.kt
)
感谢
[
@Freedom
](
https://github.com/Freedom0925
)
的
[
Android App Demo
](
mirai-de
https://github.com/mamoe/mirai/blob/master/mirai-demos/mirai-demo-android/src/main/kotlin/net/mamoe/mirai/demo/MainActivity.kt
)
感谢
[
@Freedom
](
https://github.com/Freedom0925
)
的
[
Android App Demo
](
https://github.com/mamoe/mirai/blob/master/mirai-demos/mirai-demo-android/src/main/kotlin/net/mamoe/mirai/demo/MainActivity.kt
)
#### mirai-debug
#### mirai-debug
抓包工具和分析工具. 不会进行稳定性维护.
抓包工具和分析工具. 不会进行稳定性维护.
...
@@ -242,15 +269,13 @@ Mirai 中所有的消息均为对象化的 [Message](mirai-core/src/commonMain/k
...
@@ -242,15 +269,13 @@ Mirai 中所有的消息均为对象化的 [Message](mirai-core/src/commonMain/k
-
`suspend IMAGE.toExternalImage():ExternalImage`
-
`suspend IMAGE.toExternalImage():ExternalImage`
直接发送
直接发送
-
`suspend IMAGE.sendTo(Contact)`
-
`suspend IMAGE.send
AsImage
To(Contact)`
-
`suspend Contact.sendImage(IMAGE)`
-
`suspend Contact.sendImage(IMAGE)`
转为 Message
转为 Message
-
`suspend IMAGE.upload(Contact)`
-
`suspend IMAGE.upload
AsImage
(Contact)`
-
`suspend Contact.upload(IMAGE)`
-
`suspend Contact.upload(IMAGE)`
只要语义上正确的函数, 在 Mirai 都是可行的.
### Event
### Event
#### Subscription
#### Subscription
...
...
build.gradle
View file @
951563d6
...
@@ -11,6 +11,8 @@ buildscript {
...
@@ -11,6 +11,8 @@ buildscript {
classpath
"org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
classpath
"org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
classpath
"org.jetbrains.kotlin:kotlin-serialization:$kotlinVersion"
classpath
"org.jetbrains.kotlin:kotlin-serialization:$kotlinVersion"
classpath
"org.jetbrains.kotlinx:atomicfu-gradle-plugin:$atomicFuVersion"
classpath
"org.jetbrains.kotlinx:atomicfu-gradle-plugin:$atomicFuVersion"
//classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.0'
}
}
}
}
...
@@ -18,6 +20,12 @@ allprojects {
...
@@ -18,6 +20,12 @@ allprojects {
group
=
"net.mamoe"
group
=
"net.mamoe"
version
=
getProperty
(
"mirai_version"
)
version
=
getProperty
(
"mirai_version"
)
// tasks.withType(KotlinCompile).all { task ->
// task.kotlinOptions{
// jvmTarget = '1.6'
// }
// }
repositories
{
repositories
{
maven
{
url
"https://mirrors.huaweicloud.com/repository/maven/"
}
maven
{
url
"https://mirrors.huaweicloud.com/repository/maven/"
}
mavenLocal
()
mavenLocal
()
...
@@ -27,4 +35,4 @@ allprojects {
...
@@ -27,4 +35,4 @@ allprojects {
maven
{
url
"https://dl.bintray.com/kotlin/kotlin-eap"
}
maven
{
url
"https://dl.bintray.com/kotlin/kotlin-eap"
}
maven
{
url
"https://dl.bintray.com/kotlin/kotlin-dev"
}
maven
{
url
"https://dl.bintray.com/kotlin/kotlin-dev"
}
}
}
}
}
\ No newline at end of file
gradle.properties
View file @
951563d6
# style guide
# style guide
kotlin.code.style
=
official
kotlin.code.style
=
official
# config
# config
mirai_version
=
1.0.0
mirai_version
=
0.1.4
kotlin.incremental.multiplatform
=
true
kotlin.incremental.multiplatform
=
true
kotlin.parallel.tasks.in.project
=
true
kotlin.parallel.tasks.in.project
=
true
# kotlin
# kotlin
...
@@ -14,6 +14,6 @@ kotlinXIoVersion=0.1.15
...
@@ -14,6 +14,6 @@ kotlinXIoVersion=0.1.15
coroutinesIoVersion
=
0.24.0
coroutinesIoVersion
=
0.24.0
# utility
# utility
ktorVersion
=
1.2.4
ktorVersion
=
1.2.4
klockVersion
=
1.
8
.0
klockVersion
=
1.
7
.0
# gradle plugin
# gradle plugin
protobufJavaVersion
=
3.10.0
protobufJavaVersion
=
3.10.0
\ No newline at end of file
gradle/publish.gradle
0 → 100644
View file @
951563d6
// 部分源码来自 kotlinx.coroutines
def
pomConfig
=
{
licenses
{
license
{
name
"AGPL-V3"
url
"https://www.gnu.org/licenses/agpl-3.0.txt"
distribution
"repo"
}
}
developers
{
developer
{
id
"mamoe"
name
"Mamoe Technologies"
}
}
scm
{
url
"https://github.com/mamoe/mirai"
}
}
bintray
{
def
keyProps
=
new
Properties
()
def
keyFile
=
file
(
"../keys.properties"
)
if
(
keyFile
.
exists
())
keyFile
.
withInputStream
{
keyProps
.
load
(
it
)
}
user
=
keyProps
.
getProperty
(
"bintrayUser"
)
key
=
keyProps
.
getProperty
(
"bintrayKey"
)
pkg
{
repo
=
'mirai'
name
=
"mirai-core"
licenses
=
[
'AGPL'
]
vcsUrl
=
'https://github.com/mamoe/mirai'
}
}
afterEvaluate
{
project
.
publishing
.
publications
.
forEach
{
publication
->
publication
.
pom
.
withXml
{
def
root
=
asNode
()
//root.appendNode('groupId', project.group)
//root.appendNode('artifactId', project.name)
//root.appendNode('version', project.version)
root
.
appendNode
(
'name'
,
project
.
name
)
root
.
appendNode
(
'description'
,
project
.
description
)
root
.
appendNode
(
'packing'
,
"jar"
)
root
.
appendNode
(
'url'
,
'https://github.com/mamoe/mirai'
)
root
.
children
().
last
()
+
pomConfig
}
}
}
bintrayUpload
.
doFirst
{
publications
=
project
.
publishing
.
publications
}
bintrayUpload
.
dependsOn
{
def
list
=
new
LinkedList
<
Task
>()
list
.
add
(
tasks
.
getByName
(
"build"
))
list
.
addAll
(
tasks
.
findAll
{
task
->
task
.
name
.
contains
(
'Jar'
)
})
list
.
addAll
(
tasks
.
findAll
{
task
->
task
.
name
.
startsWith
(
'generateMetadataFileFor'
)
})
list
.
addAll
(
tasks
.
findAll
{
task
->
task
.
name
.
startsWith
(
'generatePomFileFor'
)
})
list
}
// empty xxx-javadoc.jar
task
javadocJar
(
type:
Jar
)
{
archiveClassifier
=
'javadoc'
}
publishing
{
publications
.
all
{
// add empty javadocs (no need for MPP root publication which publishes only pom file)
if
(
it
.
name
!=
'kotlinMultiplatform'
)
{
it
.
artifact
(
javadocJar
)
}
// Rename MPP artifacts for backward compatibility
def
type
=
it
.
name
switch
(
type
)
{
case
'kotlinMultiplatform'
:
it
.
artifactId
=
"$project.name"
break
case
'metadata'
:
it
.
artifactId
=
"$project.name-common"
break
case
'jvm'
:
it
.
artifactId
=
"$project.name"
break
case
'js'
:
case
'native'
:
it
.
artifactId
=
"$project.name-$type"
break
}
// disable metadata everywhere, but in native modules
if
(
type
==
'maven'
||
type
==
'metadata'
||
type
==
'jvm'
||
type
==
'js'
)
{
moduleDescriptorGenerator
=
null
}
}
}
\ No newline at end of file
mirai-api-http/build.gradle.kts
View file @
951563d6
...
@@ -7,7 +7,7 @@ plugins {
...
@@ -7,7 +7,7 @@ plugins {
}
}
group
=
"net.mamoe.mirai"
group
=
"net.mamoe.mirai"
version
=
"0.1.0"
version
=
rootProject
.
ext
[
"mirai_version"
].
toString
()
description
=
"Mirai Http Api"
description
=
"Mirai Http Api"
...
...
mirai-core/build.gradle.kts
View file @
951563d6
@
file
:
Suppress
(
"UNUSED_VARIABLE"
)
@
file
:
Suppress
(
"UNUSED_VARIABLE"
)
import
com.android.build.gradle.api.AndroidSourceSet
plugins
{
plugins
{
id
(
"kotlinx-atomicfu"
)
id
(
"kotlinx-atomicfu"
)
kotlin
(
"multiplatform"
)
kotlin
(
"multiplatform"
)
id
(
"com.android.library"
)
id
(
"com.android.library"
)
id
(
"kotlinx-serialization"
)
id
(
"kotlinx-serialization"
)
`maven-publish`
`maven-publish`
id
(
"com.jfrog.bintray"
)
version
"1.8.4-jetbrains-3"
}
}
group
=
"net.mamoe.mirai"
apply
(
from
=
rootProject
.
file
(
"gradle/publish.gradle"
))
version
=
"0.1.0"
description
=
"Mirai core"
val
kotlinVersion
:
String
by
rootProject
.
ext
val
kotlinVersion
:
String
by
rootProject
.
ext
val
atomicFuVersion
:
String
by
rootProject
.
ext
val
atomicFuVersion
:
String
by
rootProject
.
ext
...
@@ -27,166 +22,107 @@ val ktorVersion: String by rootProject.ext
...
@@ -27,166 +22,107 @@ val ktorVersion: String by rootProject.ext
val
serializationVersion
:
String
by
rootProject
.
ext
val
serializationVersion
:
String
by
rootProject
.
ext
fun
org
.
jetbrains
.
kotlin
.
gradle
.
plugin
.
KotlinDependencyHandler
.
kotlinx
(
id
:
String
,
version
:
String
)
{
fun
kotlinx
(
id
:
String
,
version
:
String
)
=
"org.jetbrains.kotlinx:$id:$version"
implementation
(
"org.jetbrains.kotlinx:$id:$version"
)
}
fun
org
.
jetbrains
.
kotlin
.
gradle
.
plugin
.
KotlinDependencyHandler
.
ktor
(
id
:
String
,
version
:
String
)
{
fun
ktor
(
id
:
String
,
version
:
String
)
=
"io.ktor:$id:$version"
implementation
(
"io.ktor:$id:$version"
)
}
description
=
"Tencent QQ protocol library"
kotlin
{
kotlin
{
android
(
"android"
)
{
android
(
"android"
)
{
project
.
plugins
.
apply
(
"com.android.library"
)
publishAllLibraryVariants
()
//publishLibraryVariants("release", "debug")
project
.
android
{
project
.
android
{
compileSdkVersion
(
29
)
compileSdkVersion
(
29
)
buildToolsVersion
(
"29.0.2"
)
defaultConfig
{
defaultConfig
{
minSdkVersion
(
15
)
minSdkVersion
(
15
)
targetSdkVersion
(
29
)
versionCode
=
1
versionName
=
"1.0"
// testInstrumentationRunner = "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes
{
getByName
(
"release"
)
{
isMinifyEnabled
=
false
// proguardFiles(getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro")
}
}
}
sourceSets
.
filterIsInstance
(
com
.
android
.
build
.
gradle
.
api
.
AndroidSourceSet
::
class
.
java
).
forEach
{
// sourceSets.filterIsInstance(com.android.build.gradle.api.AndroidSourceSet::class.java).forEach {
it
.
manifest
.
srcFile
(
"src/androidMain/res/AndroidManifest.xml"
)
// it.manifest.srcFile("src/androidMain/res/AndroidManifest.xml")
it
.
res
.
srcDirs
(
file
(
"src/androidMain/res"
))
// it.res.srcDirs(file("src/androidMain/res"))
}
// }
//(sourceSets["main"] as AndroidSourceSet).java.srcDirs(file("src/androidMain/kotlin"))
(
sourceSets
[
"main"
]
as
AndroidSourceSet
).
java
.
srcDirs
(
file
(
"src/androidMain/kotlin"
))
}
}
jvm
(
"jvm"
)
{
// withJava()
}
/*
val proto = sourceSets["proto"].apply {
}*/
val
commonMain
=
sourceSets
[
"commonMain"
].
apply
{
dependencies
{
kotlin
(
"kotlin-reflect"
,
kotlinVersion
)
//kotlin("kotlin-serialization", kotlinVersion)
kotlinx
(
"kotlinx-coroutines-core-common"
,
coroutinesVersion
)
kotlinx
(
"kotlinx-serialization-runtime-common"
,
serializationVersion
)
api
(
"com.soywiz.korlibs.klock:klock:$klockVersion"
)
ktor
(
"ktor-http-cio"
,
ktorVersion
)
ktor
(
"ktor-http"
,
ktorVersion
)
ktor
(
"ktor-client-core-jvm"
,
ktorVersion
)
ktor
(
"ktor-client-cio"
,
ktorVersion
)
ktor
(
"ktor-client-core"
,
ktorVersion
)
ktor
(
"ktor-network"
,
ktorVersion
)
//implementation("io.ktor:ktor-io:1.3.0-beta-1")
}
}
}
}
sourceSets
[
"androidMain"
].
apply
{
jvm
(
"jvm"
)
{
dependencies
{
dependsOn
(
commonMain
)
kotlin
(
"kotlin-reflect"
,
kotlinVersion
)
kotlinx
(
"kotlinx-serialization-runtime"
,
serializationVersion
)
kotlinx
(
"kotlinx-coroutines-android"
,
coroutinesVersion
)
ktor
(
"ktor-client-android"
,
ktorVersion
)
}
}
}
sourceSets
[
"jvmMain"
].
apply
{
sourceSets
{
dependencies
{
all
{
dependsOn
(
commonMain
)
languageSettings
.
enableLanguageFeature
(
"InlineClasses"
)
languageSettings
.
useExperimentalAnnotation
(
"kotlin.Experimental"
)
kotlin
(
"kotlin-stdlib-jdk8"
,
kotlinVersion
)
dependencies
{
kotlin
(
"kotlin-stdlib-jdk7"
,
kotlinVersion
)
api
(
kotlin
(
"stdlib"
,
kotlinVersion
)
)
kotlin
(
"kotlin-reflect"
,
kotlinVersion
)
api
(
kotlin
(
"serialization"
,
kotlinVersion
)
)
ktor
(
"ktor-client-core-jvm"
,
ktorVersion
)
api
(
kotlinx
(
"atomicfu"
,
atomicFuVersion
))
kotlinx
(
"kotlinx-io-jvm"
,
kotlinXIoVersion
)
api
(
kotlinx
(
"kotlinx-io"
,
kotlinXIoVersion
))
kotlinx
(
"kotlinx-serialization-runtime"
,
serializationVersion
)
api
(
kotlinx
(
"kotlinx-coroutines-io"
,
coroutinesIoVersion
))
api
(
kotlinx
(
"kotlinx-coroutines-core"
,
coroutinesVersion
))
}
}
}
}
commonMain
{
dependencies
{
sourceSets
[
"commonTest"
].
apply
{
api
(
kotlin
(
"reflect"
,
kotlinVersion
))
dependencies
{
api
(
kotlin
(
"serialization"
,
kotlinVersion
))
kotlin
(
"kotlin-test-annotations-common"
)
api
(
kotlinx
(
"kotlinx-coroutines-core-common"
,
coroutinesVersion
))
kotlin
(
"kotlin-test-common"
)
api
(
kotlinx
(
"kotlinx-serialization-runtime-common"
,
serializationVersion
))
api
(
"com.soywiz.korlibs.klock:klock:$klockVersion"
)
api
(
ktor
(
"ktor-http-cio"
,
ktorVersion
))
api
(
ktor
(
"ktor-http"
,
ktorVersion
))
api
(
ktor
(
"ktor-client-core-jvm"
,
ktorVersion
))
api
(
ktor
(
"ktor-client-cio"
,
ktorVersion
))
api
(
ktor
(
"ktor-client-core"
,
ktorVersion
))
api
(
ktor
(
"ktor-network"
,
ktorVersion
))
//implementation("io.ktor:ktor-io:1.3.0-beta-1")
}
}
}
kotlin
.
setSrcDirs
(
listOf
(
"src/$name/kotlin"
))
commonTest
{
}
dependencies
{
api
(
kotlin
(
"test-annotations-common"
))
sourceSets
[
"jvmTest"
].
apply
{
api
(
kotlin
(
"test-common"
))
dependencies
{
}
kotlin
(
"kotlin-test"
,
kotlinVersion
)
kotlin
.
setSrcDirs
(
listOf
(
"src/$name/kotlin"
))
kotlin
(
"kotlin-test-annotations-common"
,
kotlinVersion
)
kotlin
(
"kotlin-test-junit5"
,
kotlinVersion
)
implementation
(
"org.junit.jupiter:junit-jupiter-api:5.5.2"
)
}
}
kotlin
.
outputDir
=
file
(
"build/classes/kotlin/jvm/test"
)
kotlin
.
setSrcDirs
(
listOf
(
"src/$name/kotlin"
))
}
sourceSets
.
all
{
val
androidMain
by
getting
{
languageSettings
.
enableLanguageFeature
(
"InlineClasses"
)
dependencies
{
languageSettings
.
useExperimentalAnnotation
(
"kotlin.Experimental"
)
api
(
kotlin
(
"reflect"
,
kotlinVersion
)
)
dependencies
{
api
(
kotlinx
(
"kotlinx-serialization-runtime"
,
serializationVersion
))
kotlin
(
"kotlin-stdlib"
,
kotlinVersion
)
api
(
kotlinx
(
"kotlinx-coroutines-android"
,
coroutinesVersion
))
kotlin
(
"kotlin-serialization"
,
kotlinVersion
)
kotlinx
(
"atomicfu"
,
atomicFuVersion
)
api
(
ktor
(
"ktor-client-android"
,
ktorVersion
))
kotlinx
(
"kotlinx-io"
,
kotlinXIoVersion
)
}
kotlinx
(
"kotlinx-coroutines-io"
,
coroutinesIoVersion
)
kotlinx
(
"kotlinx-coroutines-core"
,
coroutinesVersion
)
}
}
}
sourceSets
{
val
jvmMain
by
getting
{
getByName
(
"commonMain"
)
{
dependencies
{
dependencies
{
implementation
(
kotlin
(
"reflect"
))
api
(
kotlin
(
"stdlib-jdk8"
,
kotlinVersion
))
api
(
kotlin
(
"stdlib-jdk7"
,
kotlinVersion
))
api
(
kotlin
(
"reflect"
,
kotlinVersion
))
api
(
ktor
(
"ktor-client-core-jvm"
,
ktorVersion
))
api
(
kotlinx
(
"kotlinx-io-jvm"
,
kotlinXIoVersion
))
api
(
kotlinx
(
"kotlinx-serialization-runtime"
,
serializationVersion
))
}
}
}
}
}
}
/*
val
jvmTest
by
getting
{
publishing {
dependencies
{
publications.withType<MavenPublication>().apply {
api
(
kotlin
(
"test"
,
kotlinVersion
))
val jvm by getting {}
api
(
kotlin
(
"test-annotations-common"
,
kotlinVersion
))
val metadata by getting { }
api
(
kotlin
(
"test-junit5"
,
kotlinVersion
))
}
api
(
"org.junit.jupiter:junit-jupiter-api:5.5.2"
)
}*/
/*
publishing {
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/mamoe/mirai")
credentials {
val local = loadProperties("local.properties")
username = local["miraiCorePublicationUsername"]?.toString()?:error("Cannot find miraiCorePublicationUsername")
password = local["miraiCorePublicationKey"].toString()?:error("Cannot find miraiCorePublicationKey")
}
}
kotlin
.
outputDir
=
file
(
"build/classes/kotlin/jvm/test"
)
kotlin
.
setSrcDirs
(
listOf
(
"src/$name/kotlin"
))
}
}
}
}
}
}
\ No newline at end of file
fun loadProperties(filename: String): Properties = Properties().apply { load(DataInputStream(rootProject.file(filename).inputStream())) }
*/
\ No newline at end of file
mirai-core/src/
androidMain/res
/AndroidManifest.xml
→
mirai-core/src/
main
/AndroidManifest.xml
View file @
951563d6
File moved
settings.gradle
View file @
951563d6
pluginManagement
{
resolutionStrategy
{
eachPlugin
{
switch
(
requested
.
id
.
id
)
{
case
"org.jetbrains.kotlin.multiplatform"
:
useModule
(
"org.jetbrains.kotlin:kotlin-gradle-plugin:${requested.version}"
);
break
case
"com.android.library"
:
useModule
(
"com.android.tools.build:gradle:${requested.version}"
);
break
case
"com.jfrog.bintray"
:
useModule
(
"com.jfrog.bintray.gradle:gradle-bintray-plugin:${requested.version}"
)
}
}
}
repositories
{
google
()
mavenCentral
()
maven
{
url
"https://plugins.gradle.org/m2/"
}
maven
{
url
"https://dl.bintray.com/jetbrains/kotlin-native-dependencies"
}
jcenter
()
}
}
rootProject
.
name
=
'mirai'
rootProject
.
name
=
'mirai'
include
(
':mirai-core'
)
include
(
':mirai-core'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment