This repository has been archived by the owner on Feb 3, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
73 lines (59 loc) · 2.18 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
plugins {
id 'java'
id 'java-library'
id 'maven-publish'
id 'com.github.johnrengelman.shadow' version '8.1.1'
}
group = "dev.kylejulian.twsmanagement"
def dirStr = buildDir.toString() + '/libs/'
def pipelineVersion = System.getenv('GITHUB_REF_NAME')
version = pipelineVersion
if (version.split('v').length < 2) {
version = '1.0.0-beta'
}
else {
version = version.split('v')[1]
}
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
repositories {
mavenCentral()
maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
maven { url 'https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-core' }
maven { url 'https://mvnrepository.com/artifact/org.apache.commons/commons-dbcp2' }
maven { url 'https://repo.purpurmc.org/snapshots' }
maven { url 'https://jitpack.io' }
maven { url 'https://repo.kryptonmc.org/releases' } // TAB API
}
dependencies {
implementation 'com.fasterxml.jackson.core:jackson-core:2.15.2'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.15.2'
implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.15.2'
implementation 'org.apache.commons:commons-dbcp2:2.9.0' // Connection Pooling
implementation 'org.apache.commons:commons-lang3:3.12.0'
implementation 'net.kyori:adventure-api:4.14.0'
implementation "net.kyori:adventure-text-minimessage:4.14.0"
compileOnly 'me.neznamy:tab-api:4.0.0'
compileOnly 'net.luckperms:api:5.4'
compileOnly 'org.jetbrains:annotations:24.0.0'
compileOnly 'org.purpurmc.purpur:purpur-api:1.20.1-R0.1-SNAPSHOT'
}
// Patch plugin.yml file
processResources {
filesMatching("**/plugin.yml") {
expand ( PLUGINVERSION: version, PACKAGE: project.group.toString(), NAME: rootProject.name )
}
}
shadowJar {
archiveClassifier.set('SNAPSHOT')
}
jar.enabled = false
assemble.dependsOn(shadowJar)
task release {
dependsOn build
doLast {
file(dirStr + rootProject.name + "-" + version + '-SNAPSHOT.jar').renameTo(dirStr + rootProject.name + '-' + version + '.jar')
}
}