-
Notifications
You must be signed in to change notification settings - Fork 27
/
build.gradle
118 lines (102 loc) · 3.35 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
apply plugin: 'java'
apply plugin: 'maven'
repositories {
mavenCentral()
maven {
url "http://mc.hackerzlair.org:8888/repository/public"
}
maven {
url = "http://repo.extendedclip.com/content/repositories/placeholderapi/"
}
}
dependencies {
compileOnly ("org.spigotmc:spigot-1.16.5:+")
compileOnly ("org.spigotmc:spigot-1.16.3R:+")
compileOnly ("org.spigotmc:spigot-1.16.1R:+")
compileOnly ("org.spigotmc:spigot-1.15.2:+")
compileOnly ("org.spigotmc:spigot-1.14.4:+")
compileOnly ("org.spigotmc:spigot-1.13.2:+")
compileOnly ("org.spigotmc:spigot-1.12.2:+")
compileOnly ("com.massivecraft:massivecore:+")
compileOnly ("com.massivecraft:factions:+")
compileOnly ("com.gmail.filoghost:holographicdisplays:+")
compileOnly ("com.comphenix:protocol:+")
compileOnly ("com.garbagemule:mobarena:+")
compileOnly ("com.sk89q:worldedit:+")
compileOnly ("com.sk89q:worldguard:+")
compileOnly ("fr.neatmonster:nocheatplus:+")
compileOnly ("me.blackvein:quests:+")
compileOnly ("me.libraryaddict:disguise:+")
compileOnly ("net.citizensnpcs:citizens:+")
compileOnly ("think:rpgitems:3.8.6")
compileOnly ("com.palmergames.bukkit.towny:Towny:+")
compileOnly ("io.lumine.xikage:mythicmobs:4.12.0")
compileOnly ("me.clip:placeholderapi:+")
}
processResources {
print("Process properties....")
Properties p1=new Properties()
File pf1=new File("$project.projectDir/gradle.properties")
if(pf1.exists())
{
p1.load(pf1.newDataInputStream())
project.version = p1.artver
project.group = p1.group
println("Done!")
}
else
{
println("Warning! gradle.properties file is missing!")
}
print("Process resources....")
inputs.property "version", project.version
from (sourceSets.main.resources.srcDirs) {
include "plugin.yml"
expand "version": project.version
}
from (sourceSets.main.resources.srcDirs) {
exclude "plugin.yml"
}
println("Done!")
}
compileJava {
dependsOn clean
doLast {
print("Create POM file....")
pom {
project {
groupId project.group
artifactId project.name
version project.version
}
}.writeTo("./build/libs/"+project.name+"-"+project.version+".xml")
println("Done!")
}
}
uploadArchives {
doLast {
print("Update repository files....")
def d1=project.projectDir
Properties archiva=new Properties()
File data=new File("${d1}/../usr.properties")
if(data.exists())
{
archiva.load(data.newDataInputStream())
def usr=archiva.getProperty('usr')
def pwd=archiva.getProperty('pwd')
repositories.mavenDeployer {
repository(url:'http://mc.hackerzlair.org:8888/repository/public/') {
authentication (userName: '${usr}', password: '${pwd}')
}
pom.version=project.version
pom.artifactId=project.name
pom.groupId='com.gmail.berndivader'
}
println("Done!")
}
else
{
println("Archiva config file is missing. Repository not updated!")
}
}
}