forked from wmers/Mirai-Bot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
63 lines (53 loc) · 1.68 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
plugins {
id 'java'
id 'com.github.johnrengelman.shadow' version '6.0.0'
id 'org.jetbrains.kotlin.jvm' version '1.3.72'
}
description('一个基于Mirai的机器人')
group 'me.lovesasuna'
version '2.6.6'
ext {
workDir = 'E:\\work\\Mirai'
}
sourceCompatibility = 8
targetCompatibility = 8
repositories {
mavenCentral()
jcenter()
maven {
url 'https://jitpack.io/'
}
}
defaultTasks("shadowJar")
shadowJar {
processResources.dependsOn(project('CustomCore').getTasksByName('shadowJar', false))
logger.log(LogLevel.INFO, "The newest mirai version is " + project('CustomCore').version)
manifest {
attributes("Main-Class": "me.lovesasuna.bot.MainKt")
}
}
dependencies {
compileOnly 'org.jsoup:jsoup:1.13.1'
compileOnly 'net.mamoe:mirai-core-qqandroid:' + project('CustomCore').version
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.7'
testImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.7'
compileOnly 'com.github.dnsjava:dnsjava:-SNAPSHOT'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
testImplementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
compileOnly "com.fasterxml.jackson.module:jackson-module-kotlin:2.11.1"
testCompileOnly "com.fasterxml.jackson.module:jackson-module-kotlin:2.11.1"
}
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
options.compilerArgs.add('-Xlint:deprecation')
options.compilerArgs.add('-Xlint:unchecked')
}
task copyFile(type: Copy, dependsOn: shadowJar) {
duplicatesStrategy = DuplicatesStrategy.INCLUDE
from('build/libs/')
into(workDir)
include('Mirai-Bot*.jar')
rename {
"Bot.jar"
}
}