/
build.gradle
76 lines (60 loc) · 1.49 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
plugins {
id 'java'
id 'maven'
id 'io.franzbecker.gradle-lombok' version '1.14'
id 'com.github.johnrengelman.shadow' version '2.0.4'
}
//from now on this is how you'll change version
def versionObj = new Version(major: 1, minor: 1, state: 'RELEASE')
group 'us.eunoians'
version = "${versionObj.toString()}"
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
repositories {
mavenCentral()
maven {
name = 'spigotmc-repo'
url = 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/'
}
maven {
name = 'sonatype'
url = 'https://oss.sonatype.org/content/groups/public/'
}
}
dependencies {
compileOnly 'org.spigotmc:spigot-api:1.16.1-R0.1-SNAPSHOT'
testImplementation 'org.junit.jupiter:junit-jupiter:5.6.2'
testCompile group: 'org.powermock', name: 'powermock-mockito-release-full', version: '1.5.4', ext: 'pom'
}
// Run JUnit tests
test {
useJUnitPlatform()
testLogging {
events "passed", "skipped", "failed"
}
}
processResources {
from(sourceSets.main.resources.srcDirs) {
expand 'pluginVersion': version
include 'plugin.yml'
}
}
shadowJar {
archiveName = "Prisma-${version}.jar"
}
artifacts {
archives shadowJar
}
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
class Version {
String major, minor, state, full
String getFullVersion() {
full = "$major.$minor-$state"
return full
}
String toString() {
getFullVersion()
}
}