-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathbuild.gradle
84 lines (63 loc) · 2.09 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
plugins {
id 'com.github.johnrengelman.shadow' version '7.0.0'
}
group = 'com.qualityplus.core'
version = '3.4.3'
subprojects {
version = rootProject.version
apply plugin: 'java'
apply plugin: 'maven-publish'
apply plugin: 'com.github.johnrengelman.shadow'
java {
toolchain.languageVersion.set(JavaLanguageVersion.of(21))
}
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
jar {
from '../LICENSE.txt'
}
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
maven {
url 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/'
}
maven {
url 'https://papermc.io/repo/repository/maven-public/'
}
}
dependencies {
implementation("org.jetbrains:annotations:22.0.0")
compileOnly("org.projectlombok:lombok:1.18.30")
compileOnly 'com.github.r3back:the-assistant:3.2.16'
//These both are temporal until jar class loader be added
compileOnly 'io.lettuce:lettuce-core:6.1.1.RELEASE'
compileOnly 'org.mongodb:mongo-java-driver:3.12.10'
// Enable lombok annotation processing
annotationProcessor("org.projectlombok:lombok:1.18.30")
}
processResources{
filesMatching('plugin.yml') {
expand 'version': version
}
}
shadowJar {
def name = project.name
archiveFileName = name + '.jar'
dependencies {
exclude(dependency('org.jetbrains:.*'))
}
doLast {
if (!name.contains('NMS') && !name.contains('Legacy') && !name.contains("Newest")) {
def saveFilesPath = rootProject.projectDir.getAbsolutePath() + '/all-generated'
def testSuitePath = rootProject.projectDir.getAbsolutePath() + '/test-suite/mc-config/plugins'
mkdir saveFilesPath
[saveFilesPath, testSuitePath].forEach(folder -> copy { into folder from archiveFile.get().getAsFile() })
}
}
}
artifacts {
archives shadowJar
}
}