-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.gradle
More file actions
111 lines (92 loc) · 3.42 KB
/
build.gradle
File metadata and controls
111 lines (92 loc) · 3.42 KB
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
plugins {
id 'java'
id 'com.github.johnrengelman.shadow' version '7.1.2'
id 'io.freefair.lombok' version '8.10.2'
}
group properties['group']
version properties['version']
ext {
deps = ""
StringBuilder builder = new StringBuilder()
int i = 0
List<String> list = properties['pf.dependencies'].toString().split(", ")
for (String s : list) {
if (i == list.size() - 1) {
builder.append(s)
} else {
builder.append(s).append(", ")
}
i ++
}
deps = builder.toString()
needs_bapi = false
String include_bapi = rootProject.properties.get('include-bapi', "false");
if (include_bapi.toBoolean()) {
needs_bapi = true
}
}
repositories {
mavenCentral()
mavenLocal()
maven {
url = 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/'
// As of Gradle 5.1, you can limit this to only those
// dependencies you expect from it
content {
includeGroup 'org.bukkit'
includeGroup 'org.spigotmc'
}
}
maven { url = 'https://oss.sonatype.org/content/repositories/snapshots' }
maven { url = 'https://oss.sonatype.org/content/repositories/central' }
maven {
name = "sonatype"
url = "https://oss.sonatype.org/content/groups/public/"
}
maven { url = 'https://jitpack.io' }
maven {
name = "placeholderapi"
url = "https://repo.extendedclip.com/content/repositories/placeholderapi/"
}
}
dependencies {
// LuckPerms
compileOnly 'net.luckperms:api:5.4'
// PlaceholderAPI
compileOnly 'me.clip:placeholderapi:2.11.6'
// Redis
implementation 'redis.clients:jedis:4.3.0'
shadow 'redis.clients:jedis:4.3.0'
// StreamlineCore
boolean includeBapi = rootProject.properties['include-bapi'].toString().toBoolean()
if (includeBapi) {
annotationProcessor(compileOnly("com.github.Streamline-Essentials.StreamlineCore:StreamlineCore-BAPI:${rootProject.properties['streamline.version'] ?: 'master-SNAPSHOT'}"))
} else {
annotationProcessor(compileOnly("com.github.Streamline-Essentials.StreamlineCore:StreamlineCore-API:${rootProject.properties['streamline.version'] ?: 'master-SNAPSHOT'}"))
}
}
java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
shadowJar {
manifest {
attributes 'Plugin-Class': rootProject.properties['pf.class'].toString() + '.' + rootProject.name.toString()
attributes 'Plugin-Id': rootProject.properties['pf.id'].toString()
attributes 'Plugin-Version': rootProject.version.toString()
attributes 'Plugin-Requires': ( rootProject.properties['pf.requires'].toString() == 'none' ? '' : rootProject.properties['pf.requires'].toString() )
attributes 'Plugin-Dependencies': ( rootProject.properties['pf.dependencies'].toString() == 'none' ? '' : rootProject.properties['pf.dependencies'].toString() )
attributes 'Plugin-Description': rootProject.properties['pf.description'].toString()
attributes 'Plugin-Provider': rootProject.properties['pf.provider'].toString()
attributes 'Plugin-License': rootProject.properties['pf.license'].toString()
}
archiveFileName = project.name + '-' + project.version + '.jar'
minimize()
}
artifacts {
archives shadowJar
}
wrapper {
gradleVersion = '8.9'
distributionType = Wrapper.DistributionType.BIN
}