forked from mdsimmo/bomberman
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
88 lines (74 loc) · 2.25 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
81
82
83
84
85
86
87
88
plugins {
id 'java'
id "org.jetbrains.kotlin.jvm" version "1.3.71"
id 'idea'
}
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
group = 'io.github.mdsimmo'
version = '0.4.12'
repositories {
mavenCentral()
jcenter()
maven {
// bukkits repo
url "https://hub.spigotmc.org/nexus/content/repositories/snapshots/"
}
maven {
// world edit repo
url "https://maven.enginehub.org/repo"
}
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.71"
implementation "net.objecthunter:exp4j:0.4.8"
compileOnly "org.bukkit:bukkit:1.8-R0.1-SNAPSHOT"
testImplementation "org.bukkit:bukkit:1.8-R0.1-SNAPSHOT"
compileOnly "com.sk89q.worldedit:worldedit-bukkit:7.0.0"
testImplementation "com.sk89q.worldedit:worldedit-bukkit:7.0.0"
testImplementation "junit:junit:4.+"
testImplementation "org.mockito:mockito-core:3.3.+"
}
processResources {
// auto assign values in the plugin.yml
// Do not filter schematics as they get corrupted when trying to be read as text
filesNotMatching("**.schem") {
filter {
line ->
line
.replace('${version}', version)
}
}
}
task clearOldPluginJar( type: Delete ) {
description 'Deletes any old bomberman plugins from the server'
if ( project.hasProperty("serverLocation" ) ) {
delete project.fileTree( "$serverLocation/plugins/update" ) {
include '*omberman*.jar'
}
}
}
task copyToServer(type: Copy, dependsOn: clearOldPluginJar ) {
description 'Copies the plugin to the server'
if ( project.hasProperty("serverLocation" ) ) {
from jar
into "$serverLocation/plugins/update"
}
}
task install( dependsOn: [build, copyToServer] ) {
description 'Compiles, tests and copies the code to the server'
}
jar {
from {
configurations.runtimeClasspath.collect {
it.isDirectory() ? it : zipTree(it)
}
}
}
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
kotlinOptions {
jvmTarget = "1.8"
}
}