-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
57 lines (43 loc) · 1.19 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
import org.apache.tools.ant.filters.ReplaceTokens
apply plugin: 'java'
apply plugin: 'java-library'
apply plugin: 'com.github.johnrengelman.shadow'
group = 'com.yuhtin'
version = '1.2'
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
compileJava.options.encoding = "UTF-8"
compileTestJava.options.encoding = "UTF-8"
repositories {
mavenCentral()
maven { url = 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/' }
maven { url = 'https://oss.sonatype.org/content/groups/public/' }
}
dependencies {
def spigot = 'org.spigotmc:spigot-api:1.17.1-R0.1-SNAPSHOT'
compileOnly spigot
testCompileOnly spigot
api 'org.jetbrains:annotations:22.0.0'
}
processResources {
from(sourceSets.main.resources.srcDirs) {
filter ReplaceTokens, tokens: [version: version]
}
}
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.github.jengelman.gradle.plugins:shadow:5.0.0'
}
}
def defaultJarName = project.name + '-' + project.version
shadowJar {
archiveName("${defaultJarName}.jar")
}
tasks.build.dependsOn shadowJar
task buildTest(type: Jar) {
from sourceSets.main.output
from sourceSets.test.output
}