forked from ProjectsForAll/ExampleProject
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
85 lines (70 loc) · 3.27 KB
/
build.gradle
File metadata and controls
85 lines (70 loc) · 3.27 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
plugins {
id 'java'
id 'com.github.johnrengelman.shadow' version '7.1.2'
}
group rootProject.properties['group']
version rootProject.properties['version']
ext {
jdaVersion = "5.0.0-beta.21"
}
repositories {
mavenCentral()
maven { url = 'https://oss.sonatype.org/content/repositories/snapshots' }
maven { url = 'https://oss.sonatype.org/content/repositories/central' }
maven { url = 'https://jitpack.io' }
maven { url = 'https://repo.kryptonmc.org/releases' }
}
dependencies {
// Lombok
compileOnly 'org.projectlombok:lombok:1.18.30'
annotationProcessor 'org.projectlombok:lombok:1.18.30'
// LuckPerms
compileOnly 'net.luckperms:api:5.4'
// TAB
compileOnly 'com.github.NEZNAMY:TAB-API:5.0.7'
// StreamlineCore
boolean includeBapi = rootProject.properties['include-bapi'].toString().toBoolean()
if (includeBapi) {
// BukkitOfUtils
annotationProcessor(compileOnly('com.github.Streamline-Essentials:BukkitOfUtils:master-SNAPSHOT'))
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'}"))
}
// JDA
// shadow(implementation("net.dv8tion:JDA:$jdaVersion").exclude(group: "org.slf4j")).exclude(group: "org.slf4j")
// shadow(implementation("club.minnced:discord-webhooks:0.8.4").exclude(group: "org.slf4j")).exclude(group: "org.slf4j")
// compileOnly("net.dv8tion:JDA:$jdaVersion").exclude(group: "org.slf4j").exclude(group: "org.slf4j")
// compileOnly("club.minnced:discord-webhooks:0.8.4").exclude(group: "org.slf4j").exclude(group: "org.slf4j")
}
java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
tasks.withType(JavaCompile).configureEach {
options.encoding = "UTF-8"
options.incremental = true
// Set this to the version of java you want to use,
// the minimum required for JDA is 1.8
sourceCompatibility = "1.8"
}
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()
}
setArchiveFileName(archiveBaseName.get() + '-' + archiveVersion.get() + '.' + archiveExtension.get())
}
artifacts {
archives shadowJar
}
wrapper {
gradleVersion = '8.6'
distributionType = Wrapper.DistributionType.BIN
}