-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
67 lines (57 loc) · 1.91 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
plugins {
id "java"
id "de.undercouch.download" version "4.0.0"
}
// This project MUST be compiled with Java 1.7
sourceCompatibility = 1.7
targetCompatibility = 1.7
group 'com.arzio'
version = '1.8'
repositories {
mavenCentral()
}
ext {
downloadedFilesFolder = new File(buildDir, 'downloaded-files')
unzippedFilesFolder = new File(downloadedFilesFolder, 'unzip')
}
dependencies {
implementation fileTree(dir: downloadedFilesFolder, include: ['*.jar'])
implementation fileTree(dir: unzippedFilesFolder, include: ['*.jar'])
}
task deleteDownloads(type: Delete) {
delete downloadedFilesFolder
}
task downloadFiles(type: Download) {
src([
'http://central.maven.org/maven2/org/ow2/asm/asm-all/4.1/asm-all-4.1.jar',
'https://minecraft.maeyanie.com/cauldron/cauldron-1.6.4-1.965.21.204-server.jar',
'https://cdn.getbukkit.org/craftbukkit/craftbukkit-1.6.4-R2.0.jar',
'https://media.forgecdn.net/files/614/479/SimpleClans-2.4.1.jar',
'https://media.forgecdn.net/files/719/257/worldguard-5.8.jar',
'https://media.forgecdn.net/files/755/43/AuthMe.jar',
'https://media.forgecdn.net/files/707/659/PlotMe.jar',
'https://media.forgecdn.net/files/785/673/ProtocolLib-3.3.1.jar',
'https://media.forgecdn.net/files/739/931/worldedit-5.5.8.jar',
'https://media.forgecdn.net/files/720/514/WorldGuard_Custom_Flags.zip',
'https://media.forgecdn.net/files/758/474/Essentials.zip'
])
dest downloadedFilesFolder
overwrite false
// Unzips the files
doLast {
fileTree(dir: downloadedFilesFolder).include('*.zip').each { zipFile ->
copy {
from zipTree(zipFile)
into unzippedFilesFolder
}
}
}
}
compileJava.options.encoding = 'UTF-8'
compileJava.dependsOn(downloadFiles)
processResources {
// Replaces the PROJECT_VERSION tag inside of yml resources by the project version
filter {
String line -> line.replace('{PROJECT_VERSION}', version)
}
}