-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
56 lines (45 loc) · 1.8 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
plugins {
id 'org.jetbrains.kotlin.jvm' version '1.4.21'
id 'org.jetbrains.kotlin.kapt' version '1.4.21'
id("maven-publish")
id("net.mamoe.maven-central-publish") version "0.5.0"
}
group 'net.mamoe'
version project.property("project.version")
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
def compileAndTest = { dep ->
compileOnly dep
testCompile dep
}
def autoService = '1.0-rc7'
kapt "com.google.auto.service:auto-service:$autoService"
compileOnly "com.google.auto.service:auto-service-annotations:$autoService"
compileAndTest "org.jetbrains.kotlin:kotlin-stdlib"
compileAndTest("net.mamoe:mirai-core-api:" + project.property("mirai.version"))
compileAndTest group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.13.3'
// https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j-slf4j-impl
testCompile group: 'org.apache.logging.log4j', name: 'log4j-slf4j-impl', version: '2.13.3'
testCompile "org.jetbrains.kotlin:kotlin-test"
testCompile "org.jetbrains.kotlin:kotlin-test-junit"
testCompile "org.junit.jupiter:junit-jupiter-api:5.2.0"
// For console plugin mode.
// 修改 static final 必须使用 Unsafe
compile('io.github.karlatemp:unsafe-accessor:' + project.property("unsafe-accessor.version"))
compileOnly('net.mamoe:mirai-console:' + project.property("mirai-console.version"))
}
jar {
from { configurations.runtime.collect { it.isDirectory() ? it : zipTree(it) } }
}
task sourceJar(type: Jar) {
archiveClassifier.set("sources")
from(sourceSets.main.allSource)
}
mavenCentralPublish {
githubProject("project-mirai", "mirai-login-slf4j-bridge")
licenseFromGitHubProject("Apache-2.0", "master")
developer("Karlatemp", "Karlatemp", "[email protected]")
}