This repository has been archived by the owner on Jun 11, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
64 lines (54 loc) · 1.65 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
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.1'
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([
'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/739/931/worldedit-5.5.8.jar',
'https://media.forgecdn.net/files/720/514/WorldGuard_Custom_Flags.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)
}
}