/
build.gradle
87 lines (65 loc) · 2.94 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
apply plugin: 'java'
apply plugin: 'maven'
group = 'hu.tryharddood'
description = "myZone is a easy to use protection system which is based on Worldguard, that allows users to perform various actions on user-selected areas"
sourceCompatibility = 1.8
targetCompatibility = 1.8
compileJava.options.encoding = 'UTF-8'
buildscript {
repositories {
jcenter()
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath "com.github.jengelman.gradle.plugins:shadow:1.2.4"
}
}
repositories {
maven { url "https://hub.spigotmc.org/nexus/content/repositories/snapshots/" }
maven { url "http://maven.sk89q.com/repo/" }
maven { url "http://nexus.hc.to/content/repositories/pub_releases/" }
maven { url "https://jitpack.io" }
maven { url "http://repo.maven.apache.org/maven2" }
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
}
dependencies {
compile group: 'org.spigotmc', name: 'spigot-api', version: '1.12-R0.1-SNAPSHOT'
compile group: 'org.bukkit', name: 'bukkit', version: '1.12-R0.1-SNAPSHOT'
compile group: 'de.cubeisland.engine', name: 'reflect', version: '2.0.4'
compile group: 'com.google.code.findbugs', name: 'jsr305', version: '2.0.1'
compile group: 'com.github.TryHardDood', name: 'ReflectionHelper', version: 'ef4c4c367b'
compile group: 'com.github.InventivetalentDev', name: 'ParticleAPI', version: '65b701708a'
compile group: 'com.github.TryHardDood', name: 'BossBarAPI', version: 'dafa36593c'
compile group: 'com.github.sk89q.WorldEdit', name: 'worldedit-bukkit', version: 'a8d04c24be'
compile group: 'com.github.sk89q.WorldGuard', name: 'worldguard-legacy', version: '6e56763a7f'
compile group: 'net.milkbowl.vault', name: 'VaultAPI', version: '1.6'
compile group: 'net.milkbowl.vault', name: 'Vault', version: '1.6.6'
compile files('../authlib-1.5.17.jar')
}
apply plugin: "com.github.johnrengelman.shadow"
shadowJar {
archiveName = "${baseName}.${extension}"
dependencies {
include(dependency('de.cubeisland.engine:reflect'))
include(dependency('com.github.TryHardDood:ReflectionHelper'))
include(dependency('com.github.InventivetalentDev:ParticleAPI'))
include(dependency('com.github.TryHardDood:BossBarAPI'))
}
relocate 'de.cubeisland.engine.reflect', 'hu.tryharddood.reflectapi'
relocate 'org.inventivetalent.bossbar', 'hu.tryharddood.myzone.Util.BossBarAPI'
relocate 'org.inventivetalent.particle', 'hu.tryharddood.myzone.Util.ParticleAPI'
relocate 'org.inventivetalent.reflection', 'hu.tryharddood.myzone.Util.ReflectionHelper'
}
task copyFile(type: Copy) {
from('build/libs')
into('target')
include('myZone.jar')
}
import org.apache.tools.ant.filters.ReplaceTokens
processResources {
from(sourceSets.main.resources.srcDirs) {
filter ReplaceTokens, tokens: [version: version]
}
}
assemble.dependsOn(shadowJar)
assemble.finalizedBy(copyFile)