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
ab10d84a
Commit
ab10d84a
authored
Dec 02, 2019
by
Him188
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify build.gradle
parent
5d017167
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
57 additions
and
131 deletions
+57
-131
mirai-api-http/build.gradle.kts
mirai-api-http/build.gradle.kts
+20
-22
mirai-api/build.gradle
mirai-api/build.gradle
+0
-8
mirai-api/src/main/java/net/mamoe/mirai/Bot.java
mirai-api/src/main/java/net/mamoe/mirai/Bot.java
+0
-60
mirai-core/build.gradle.kts
mirai-core/build.gradle.kts
+20
-20
mirai-debug/build.gradle.kts
mirai-debug/build.gradle.kts
+16
-20
settings.gradle
settings.gradle
+1
-1
No files found.
mirai-api-http/build.gradle.kts
View file @
ab10d84a
@
file
:
Suppress
(
"UNUSED_VARIABLE"
)
import
org.jetbrains.kotlin.gradle.plugin.KotlinDependencyHandler
plugins
{
id
(
"kotlinx-atomicfu"
)
kotlin
(
"jvm"
)
...
...
@@ -22,13 +24,9 @@ val ktorVersion: String by rootProject.ext
val
serializationVersion
:
String
by
rootProject
.
ext
fun
org
.
jetbrains
.
kotlin
.
gradle
.
plugin
.
KotlinDependencyHandler
.
kotlinx
(
id
:
String
,
version
:
String
)
{
implementation
(
"org.jetbrains.kotlinx:$id:$version"
)
}
fun
KotlinDependencyHandler
.
kotlinx
(
id
:
String
,
version
:
String
)
=
"org.jetbrains.kotlinx:kotlinx-$id:$version"
fun
org
.
jetbrains
.
kotlin
.
gradle
.
plugin
.
KotlinDependencyHandler
.
ktor
(
id
:
String
,
version
:
String
=
ktorVersion
)
{
implementation
(
"io.ktor:$id:$version"
)
}
fun
KotlinDependencyHandler
.
ktor
(
id
:
String
,
version
:
String
=
ktorVersion
)
=
"io.ktor:ktor-$id:$version"
kotlin
{
...
...
@@ -37,13 +35,13 @@ kotlin {
dependencies
{
implementation
(
project
(
":mirai-core"
))
kotlin
(
"kotlin-stdlib-jdk8"
,
kotlinVersion
)
kotlin
(
"kotlin-stdlib-jdk7"
,
kotlinVersion
)
kotlin
(
"kotlin-reflect"
,
kotlinVersion
)
implementation
(
kotlin
(
"stdlib-jdk8"
,
kotlinVersion
)
)
implementation
(
kotlin
(
"stdlib-jdk7"
,
kotlinVersion
)
)
implementation
(
kotlin
(
"reflect"
,
kotlinVersion
)
)
ktor
(
"ktor-server-cio"
)
kotlinx
(
"kotlinx-io-jvm"
,
kotlinXIoVersion
)
ktor
(
"ktor-http-jvm"
)
implementation
(
ktor
(
"server-cio"
)
)
implementation
(
kotlinx
(
"io-jvm"
,
kotlinXIoVersion
)
)
implementation
(
ktor
(
"http-jvm"
)
)
}
}
...
...
@@ -60,16 +58,16 @@ kotlin {
languageSettings
.
useExperimentalAnnotation
(
"kotlin.Experimental"
)
dependencies
{
kotlin
(
"kotlin-stdlib"
,
kotlinVersion
)
kotlin
(
"kotlin-serialization"
,
kotlinVersion
)
kotlinx
(
"atomicfu"
,
atomicFuVersion
)
kotlinx
(
"kotlinx-io"
,
kotlinXIoVersion
)
kotlinx
(
"kotlinx-coroutines-io"
,
coroutinesIoVersion
)
kotlinx
(
"kotlinx-coroutines-core"
,
coroutinesVersion
)
kotlinx
(
"kotlinx-serialization-runtime"
,
serializationVersion
)
ktor
(
"ktor-server-core"
)
ktor
(
"ktor-http"
)
implementation
(
kotlin
(
"stdlib"
,
kotlinVersion
)
)
implementation
(
kotlin
(
"serialization"
,
kotlinVersion
)
)
implementation
(
"org.jetbrains.kotlinx:atomicfu:$atomicFuVersion"
)
implementation
(
kotlinx
(
"io"
,
kotlinXIoVersion
)
)
implementation
(
kotlinx
(
"coroutines-io"
,
coroutinesIoVersion
)
)
implementation
(
kotlinx
(
"coroutines-core"
,
coroutinesVersion
)
)
implementation
(
kotlinx
(
"serialization-runtime"
,
serializationVersion
)
)
implementation
(
ktor
(
"server-core"
)
)
implementation
(
ktor
(
"http"
)
)
}
}
}
mirai-api/build.gradle
deleted
100644 → 0
View file @
5d017167
apply
plugin:
"kotlin"
apply
plugin:
"java"
dependencies
{
api
project
(
":mirai-core"
)
runtime
files
(
"../mirai-core/build/classes/kotlin/jvm/main"
)
// classpath is not set correctly by IDE
implementation
project
(
':mirai-console'
)
}
mirai-api/src/main/java/net/mamoe/mirai/Bot.java
deleted
100644 → 0
View file @
5d017167
package
net.mamoe.mirai
;
import
java.util.ArrayList
;
import
java.util.List
;
public
class
Bot
{
private
final
long
qq
;
public
Bot
(
long
qq
){
this
.
qq
=
qq
;
}
public
String
getName
(){
return
"Bot"
;
}
public
List
<
String
>
getOwners
(){
return
new
ArrayList
<>();
}
public
List
<
Long
>
getFriends
(){
return
new
ArrayList
<>();
}
public
void
addFriend
(){
}
public
void
deleteFriend
(){
}
public
void
sendMessageTo
(
long
qq
,
String
message
){
}
public
List
<
Long
>
getGroups
(){
return
new
ArrayList
<>();
}
public
void
addGroup
(){
}
public
void
quitGroup
(){
}
public
void
sendGroupMessage
(
long
group
,
String
message
){
}
public
List
<
String
>
getMessageHistory
(){
return
new
ArrayList
<>();
}
}
mirai-core/build.gradle.kts
View file @
ab10d84a
...
...
@@ -22,9 +22,9 @@ val ktorVersion: String by rootProject.ext
val
serializationVersion
:
String
by
rootProject
.
ext
fun
kotlinx
(
id
:
String
,
version
:
String
)
=
"org.jetbrains.kotlinx:$id:$version"
fun
kotlinx
(
id
:
String
,
version
:
String
)
=
"org.jetbrains.kotlinx:
kotlinx-
$id:$version"
fun
ktor
(
id
:
String
,
version
:
String
)
=
"io.ktor:$id:$version"
fun
ktor
(
id
:
String
,
version
:
String
)
=
"io.ktor:
ktor-
$id:$version"
description
=
"Tencent QQ protocol library"
...
...
@@ -59,27 +59,27 @@ kotlin {
api
(
kotlin
(
"stdlib"
,
kotlinVersion
))
api
(
kotlin
(
"serialization"
,
kotlinVersion
))
api
(
kotlinx
(
"atomicfu"
,
atomicFuVersion
)
)
api
(
kotlinx
(
"
kotlinx-
io"
,
kotlinXIoVersion
))
api
(
kotlinx
(
"
kotlinx-
coroutines-io"
,
coroutinesIoVersion
))
api
(
kotlinx
(
"
kotlinx-
coroutines-core"
,
coroutinesVersion
))
api
(
"org.jetbrains.kotlinx:atomicfu:$atomicFuVersion"
)
api
(
kotlinx
(
"io"
,
kotlinXIoVersion
))
api
(
kotlinx
(
"coroutines-io"
,
coroutinesIoVersion
))
api
(
kotlinx
(
"coroutines-core"
,
coroutinesVersion
))
}
}
commonMain
{
dependencies
{
api
(
kotlin
(
"reflect"
,
kotlinVersion
))
api
(
kotlin
(
"serialization"
,
kotlinVersion
))
api
(
kotlinx
(
"
kotlinx-
coroutines-core-common"
,
coroutinesVersion
))
api
(
kotlinx
(
"
kotlinx-
serialization-runtime-common"
,
serializationVersion
))
api
(
kotlinx
(
"coroutines-core-common"
,
coroutinesVersion
))
api
(
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
))
api
(
ktor
(
"http-cio"
,
ktorVersion
))
api
(
ktor
(
"http"
,
ktorVersion
))
api
(
ktor
(
"client-core-jvm"
,
ktorVersion
))
api
(
ktor
(
"client-cio"
,
ktorVersion
))
api
(
ktor
(
"client-core"
,
ktorVersion
))
api
(
ktor
(
"network"
,
ktorVersion
))
//implementation("io.ktor:ktor-io:1.3.0-beta-1")
}
}
...
...
@@ -95,10 +95,10 @@ kotlin {
dependencies
{
api
(
kotlin
(
"reflect"
,
kotlinVersion
))
api
(
kotlinx
(
"
kotlinx-
serialization-runtime"
,
serializationVersion
))
api
(
kotlinx
(
"
kotlinx-
coroutines-android"
,
coroutinesVersion
))
api
(
kotlinx
(
"serialization-runtime"
,
serializationVersion
))
api
(
kotlinx
(
"coroutines-android"
,
coroutinesVersion
))
api
(
ktor
(
"
ktor-
client-android"
,
ktorVersion
))
api
(
ktor
(
"client-android"
,
ktorVersion
))
}
}
...
...
@@ -108,9 +108,9 @@ kotlin {
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
))
api
(
ktor
(
"client-core-jvm"
,
ktorVersion
))
api
(
kotlinx
(
"io-jvm"
,
kotlinXIoVersion
))
api
(
kotlinx
(
"serialization-runtime"
,
serializationVersion
))
}
}
...
...
mirai-debug/build.gradle.kts
View file @
ab10d84a
...
...
@@ -35,13 +35,9 @@ kotlin {
}
}
fun
DependencyHandlerScope
.
kotlinx
(
id
:
String
,
version
:
String
)
{
implementation
(
"org.jetbrains.kotlinx:$id:$version"
)
}
fun
DependencyHandlerScope
.
kotlinx
(
id
:
String
,
version
:
String
)
=
"org.jetbrains.kotlinx:kotlinx-$id:$version"
fun
DependencyHandlerScope
.
ktor
(
id
:
String
,
version
:
String
)
{
implementation
(
"io.ktor:$id:$version"
)
}
fun
DependencyHandlerScope
.
ktor
(
id
:
String
,
version
:
String
)
=
"io.ktor:ktor-$id:$version"
dependencies
{
implementation
(
project
(
":mirai-core"
))
...
...
@@ -51,23 +47,23 @@ dependencies {
implementation
(
"org.pcap4j:pcap4j-distribution:1.8.2"
)
implementation
(
"no.tornado:tornadofx:1.7.17"
)
compile
(
group
=
"org.jetbrains.kotlinx"
,
name
=
"kotlinx-coroutines-javafx"
,
version
=
"1.3.2"
)
implementation
(
group
=
"org.jetbrains.kotlinx"
,
name
=
"kotlinx-coroutines-javafx"
,
version
=
"1.3.2"
)
kotlin
(
"kotlin-stdlib"
,
kotlinVersion
)
kotlinx
(
"atomicfu"
,
atomicFuVersion
)
kotlinx
(
"kotlinx-io-jvm"
,
kotlinXIoVersion
)
kotlinx
(
"kotlinx-io"
,
kotlinXIoVersion
)
kotlinx
(
"kotlinx-coroutines-io"
,
coroutinesIoVersion
)
kotlinx
(
"kotlinx-coroutines-core"
,
coroutinesVersion
)
implementation
(
kotlin
(
"stdlib"
,
kotlinVersion
)
)
implementation
(
"org.jetbrains.kotlinx:atomicfu:$atomicFuVersion"
)
implementation
(
kotlinx
(
"io-jvm"
,
kotlinXIoVersion
)
)
implementation
(
kotlinx
(
"io"
,
kotlinXIoVersion
)
)
implementation
(
kotlinx
(
"coroutines-io"
,
coroutinesIoVersion
)
)
implementation
(
kotlinx
(
"coroutines-core"
,
coroutinesVersion
)
)
kotlinx
(
"kotlinx-serialization-runtime"
,
serializationVersion
)
implementation
(
kotlinx
(
"serialization-runtime"
,
serializationVersion
)
)
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
(
ktor
(
"http-cio"
,
ktorVersion
)
)
implementation
(
ktor
(
"http"
,
ktorVersion
)
)
implementation
(
ktor
(
"client-core-jvm"
,
ktorVersion
)
)
implementation
(
ktor
(
"client-cio"
,
ktorVersion
)
)
implementation
(
ktor
(
"client-core"
,
ktorVersion
)
)
implementation
(
ktor
(
"network"
,
ktorVersion
)
)
}
\ No newline at end of file
settings.gradle
View file @
ab10d84a
...
...
@@ -23,7 +23,7 @@ rootProject.name = 'mirai'
include
(
':mirai-core'
)
include
(
':mirai-console'
)
include
(
':mirai-api'
)
//
include(':mirai-api')
include
(
':mirai-api-http'
)
include
(
':mirai-demos:mirai-demo-1'
)
include
(
':mirai-demos:mirai-demo-gentleman'
)
...
...
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