-
Notifications
You must be signed in to change notification settings - Fork 83
/
build.gradle
91 lines (71 loc) · 1.98 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
plugins {
id 'org.jetbrains.kotlin.jvm' version '1.6.20'
id 'org.jetbrains.kotlin.plugin.serialization' version '1.6.20'
id 'net.mamoe.mirai-console' version '2.11.0'
}
apply plugin: "maven-publish"
apply plugin: "java"
group = 'xmmt.dituon'
version = '5.3'
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"
implementation "com.madgag:animated-gif-lib:1.4"
implementation "com.squareup:gifencoder:0.10.1"
implementation "org.java-websocket:Java-WebSocket:1.5.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': 'moe.dituon.petpet.Main'
}
from {
(configurations.runtimeClasspath).collect {
it.isDirectory() ? it : zipTree(it)
}
}
}
task wsJar(type: Jar) {
group = 'build'
description = 'build jar, excluding the websocket lib'
archiveClassifier.set("no-ws")
exclude '**/petpet/websocket/**'
exclude '**/org/java_websocket/**'
with jar
}
mirai {
excludeDependency("org.java-websocket", "Java-WebSocket")
}
configurations {
compileOnly {
extendsFrom annotationProcessor
}
}