-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
101 lines (93 loc) · 2.75 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
89
90
91
92
93
94
95
96
97
98
99
100
101
plugins {
id 'com.github.johnrengelman.shadow' version '5.0.0'
id 'java'
id 'org.jetbrains.kotlin.jvm' version "1.3.61"
id 'me.qoomon.git-versioning' version '1.2.1'
}
ext{
kotlin_version ="1.3.61"
mc_version = '1.14-R0.1-SNAPSHOT'
bc_version ='1.12-SNAPSHOT'
}
allprojects{
group = 'cf.wayzer'
repositories {
maven{ url "http://maven.aliyun.com/nexus/content/groups/public/"}
jcenter()
mavenCentral()
maven {url "https://hub.spigotmc.org/nexus/content/groups/public/"}
maven {url "https://dl.bintray.com/way-zer/maven"}
maven {url "https://repo.codemc.org/repository/maven-public"}
}
}
shadowJar {
// minimize()
configurations = [project.configurations.shadow]
relocate("de.tr7zw.changeme.nbtapi","cf.wayzer.util.nbt")
// exclude("me/**")
// exclude("example/**")
// exclude("(?!plugin).yml")
include("*.jar")
//for NBT
include("de/tr7zw/changeme/nbtapi/**")
include("cf/wayzer/**")
include("*.kts")
include("META-INF/**")
include("plugin.yml")
}
//start
dependencies{
shadow 'de.tr7zw:item-nbt-api:2.2.0'
shadow 'cf.wayzer:LibraryManager:1.3.2'
compile "org.jetbrains.kotlin:kotlin-script-util:$kotlin_version"
compile "org.jetbrains.kotlin:kotlin-scripting-jvm-host:$kotlin_version"
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
implementation "org.mapdb:mapdb:3.0.7"
compileOnly "org.spigotmc:spigot-api:$mc_version"
compileOnly "net.md-5:bungeecord-chat:$bc_version"
// compile "me.dpohvar.powernbt:PowerNBT:0.8.9.2"
}
version "1.3-SNAPSHOT"
gitVersioning{
tag {
pattern = 'v(?<tagVersion>[0-9].*)'
versionFormat = '${tagVersion}'
}
commit {
versionFormat = '${version}-${commit.short}'
}
}
processResources{
filesMatching(["plugin.yml","bungee.yml"]){
filter{
it.replace("@version@", version.toString())
}
}
}
def items = subprojects.first()
task buildArtifact(type: Zip){
dependsOn items.getTasksByName("classes",false)
dependsOn shadowJar
from(file(items.buildDir.path+"/classes/kotlin/")){
includeEmptyDirs = false
include "**/*.class"
into("items")
}
// from(jar.getArchiveFile()){
// rename(".jar","-developLib.jar")
// }
from("Scripts")
from(shadowJar.getArchiveFile()){
rename("-all","")
}
archiveFileName = "SuperItem-${rootProject.version}.zip"
destinationDirectory =file("$rootDir/artifacts/")
}
task develCopy(type: Copy){
dependsOn shadowJar
from(shadowJar.getArchiveFile()){
rename("-all","")
}
into "F:\\minecraft\\RogInkTestServer\\plugins"
}