generated from sVoxelDev/spigot-plugin-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
80 lines (65 loc) · 2.1 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
buildscript {
repositories {
mavenCentral()
}
}
plugins {
id 'com.github.johnrengelman.shadow' version '7.1.0' apply false
id 'io.freefair.lombok' version '6.3.0' apply false
}
subprojects {
apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: 'io.freefair.lombok'
apply plugin: 'java-library'
apply plugin: 'jacoco'
apply plugin: 'idea'
apply from: "$rootDir/gradle/jacoco.gradle"
apply from: "$rootDir/gradle/publish.gradle"
if (project.hasProperty("local_script")) {
apply from: file(local_script + "/build.local.gradle")
}
sourceCompatibility = 16
targetCompatibility = 16
group project.property("group")
compileJava {
options.encoding = 'UTF-8'
options.compilerArgs += ["-parameters"]
options.fork = true
options.forkOptions.executable = 'javac'
}
repositories {
mavenCentral()
maven { url = 'https://jitpack.io' }
}
dependencies {
//Test dependencies
testImplementation 'org.junit.jupiter:junit-jupiter:5.8.1'
testImplementation 'org.mockito:mockito-core:4.0.0'
testImplementation 'org.assertj:assertj-core:3.21.0'
}
shadowJar {
classifier = ''
dependencies {
include(dependency('com.google.guava:guava:'))
include(dependency('org.apache.commons:commons-lang3:'))
include(dependency('org.reflections:reflections:'))
}
relocate 'org.apache.commons', "shadow.net.silthus.net.silthus.configmapper.commonslang"
relocate 'com.google', "shadow.net.silthus.net.silthus.configmapper.guava"
relocate 'org.reflections', "shadow.net.silthus.net.silthus.configmapper.reflections"
}
tasks.build.dependsOn(shadowJar)
tasks.publish.dependsOn(shadowJar)
test {
useJUnitPlatform()
testLogging {
events "passed", "skipped", "failed"
}
ignoreFailures = false
}
processResources {
project.properties.put("version", this.version)
expand project.properties
}
defaultTasks 'build'
}