-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.gradle
More file actions
41 lines (31 loc) · 1.33 KB
/
Copy pathbuild.gradle
File metadata and controls
41 lines (31 loc) · 1.33 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
import org.apache.tools.ant.filters.ReplaceTokens // We use this to replace version in plugin.yml
apply plugin: 'java'
group = 'dev.bloodstone' // Put your groupId here
version = ['git', 'describe', '--tags', '--match', 'v*'].execute().text.trim().substring(1)
archivesBaseName = 'OnePlayerSleep' // Put your artifactId here
sourceCompatibility = '1.8' // Put the minimum version of Java you want your plugin to run on
targetCompatibility = '1.8' // Put the minimum version of Java you want your plugin to run on
def bukkitVersion = '1.15.2-R0.1-SNAPSHOT' // Put the version of Bukkit/Spigot you want your plugin to depend on
repositories {
jcenter()
maven {
url 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/' // Spigot repo
content {
includeGroup 'org.bukkit'
includeGroup 'org.spigotmc'
}
}
maven {
url = 'https://oss.sonatype.org/content/repositories/snapshots'
}
}
dependencies {
compileOnly (group: 'org.spigotmc', name: 'spigot-api', version: bukkitVersion)
}
/* This will replace '@VERSION@' in the plugin.yml with the version declared above, just put '@VERSION@' for the version in the plugin.yml */
processResources {
filter ReplaceTokens, tokens: [
"VERSION": project.property("version")
]
}
compileJava.options.encoding = 'UTF-8' // Encode your source code with UTF-8