forked from Dituon/petpet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
77 lines (63 loc) · 1.64 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
plugins {
id 'org.jetbrains.kotlin.jvm' version '1.6.10'
id 'org.jetbrains.kotlin.plugin.serialization' version '1.6.10'
id 'net.mamoe.mirai-console' version '2.11.0'
}
apply plugin: "maven-publish"
apply plugin: "java"
group = 'xmmt.dituon'
version = '4.0'
repositories {
maven { url 'https://maven.aliyun.com/repository/public' }
mavenCentral()
}
dependencies {
compileOnly 'org.projectlombok:lombok:1.18.4'
annotationProcessor 'org.projectlombok:lombok:1.18.4'
implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.3.3"
testImplementation "junit:junit:4.11"
}
java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
mirai { jvmTarget = JavaVersion.VERSION_11 }
task sourcesJar(type: Jar, dependsOn: classes) {
archiveClassifier.set("sources")
from sourceSets.main.allSource
}
artifacts {
archives sourcesJar
}
publishing {
publications {
mavenJava(MavenPublication) {
// useless for jitpack: groupId = GROUP
artifactId = "petpet-share"
// useless for jitpack: version = VERSION
from components.java
}
}
}
jar {
duplicatesStrategy(DuplicatesStrategy.EXCLUDE)
manifest {
attributes 'Main-Class': 'xmmt.dituon.server.WebServer'
}
from {
(configurations.runtimeClasspath).collect {
it.isDirectory() ? it : zipTree(it)
}
}
}
test {
filter {
//exclude all tests from a package.
excludeTestsMatching "xmmt.dituon.example.*"
}
}
configurations {
compileOnly {
extendsFrom annotationProcessor
}
}