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
122 lines (101 loc) · 3.45 KB
/
build.gradle
File metadata and controls
122 lines (101 loc) · 3.45 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
112
113
114
115
116
117
118
119
120
121
122
plugins {
id 'java'
id 'com.github.johnrengelman.shadow' version '7.1.2' // for shadowing
id "io.freefair.lombok" version "8.6"
}
apply from: rootDir.toString() + '/dependencies.gradle'
group = properties['group']
version = properties['version']
java.sourceCompatibility = JavaVersion.VERSION_11
java.targetCompatibility = JavaVersion.VERSION_11
ext {
pluginMain = properties['plugin.main'] == 'default' ?
"${project.group}.${project.name.toLowerCase()}.${project.name}" :
properties['plugin.main']
}
repositories {
mavenCentral()
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/"
}
// Streamline Essentials CodeMC Repo
maven { url "https://repo.codemc.io/repository/streamline-essentials/" }
// CodeMC NMS Repo
maven { url "https://repo.codemc.io/repository/nms/" }
// JitPack
maven { url "https://jitpack.io" }
maven {
name = "placeholderapi"
url = "https://repo.extendedclip.com/content/repositories/placeholderapi/"
}
maven { url 'https://repo.papermc.io/repository/maven-snapshots/' }
maven { url 'https://repo.papermc.io/repository/maven-public/' }
maven { url 'https://repo.onarandombox.com/content/groups/public/' }
maven { url 'https://repo.bg-software.com/repository/nms/' }
maven { url 'https://repo.bg-software.com/repository/api/' }
// Husk Claims
maven { url 'https://repo.william278.net/releases' }
// WorldGuard
maven { url 'https://maven.enginehub.org/repo/' }
// GriefDefender
maven {
name = 'griefdefender'
url = 'https://repo.glaremasters.me/repository/bloodshot'
}
}
disableAutoTargetJvm()
dependencies {
// Defaults.
compileOnly(files(FILES))
annotationProcessor(ANNO)
implementation(IMPL)
compileOnly(COMP_ONLY)
shadow(SHADOW)
// Other Plugins
compileOnly(OTHER_PLUGINS)
// FAWE
implementation(platform("com.intellectualsites.bom:bom-newest:1.52")) // Ref: https://github.com/IntellectualSites/bom
compileOnly("com.fastasyncworldedit:FastAsyncWorldEdit-Core")
compileOnly("com.fastasyncworldedit:FastAsyncWorldEdit-Bukkit").transitive = false
}
processResources {
// Debugging: Print values
doFirst {
println "Version: ${project.version}, Name: ${project.name}, Main: ${project.ext.pluginMain}"
}
inputs.property('name', "${project.name}")
inputs.property('version', "${project.version}")
inputs.property('main', "${project.ext.pluginMain}")
filesMatching('**/plugin.yml') {
expand (
'name': "${project.name}",
'version': "${project.version}",
'main': "${project.ext.pluginMain}",
)
}
}
shadowJar {
archiveClassifier.set('')
buildDir = "target/"
archiveFileName = "${project.name}-${project.version}.jar"
minimize()
}
artifacts {
archives shadowJar
}
wrapper {
gradleVersion = '8.9'
distributionType = Wrapper.DistributionType.ALL
}