forked from ProjectInfinity/ReportRTS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
89 lines (78 loc) · 2.5 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
apply plugin: "java"
apply plugin: "signing"
sourceCompatibility = 1.8
targetCompatibility = 1.8
group = "nz.co.lolnet"
archivesBaseName = "ReportRTS"
version = "1.0.2"
configurations {
provided {
compile.extendsFrom(provided)
}
}
repositories {
jcenter()
maven {
name = "lxgaming"
url = "https://lxgaming.github.io/repo/maven"
}
maven {
name = "md-5"
url = "http://repo.md-5.net/content/repositories/releases"
}
maven {
name = "sonatype"
url = "https://oss.sonatype.org/content/repositories/snapshots"
}
}
dependencies {
provided("com.imaginarycode.minecraft:RedisBungee:0.3.8-INTERIM")
provided("io.github.lxgaming:bungeeplayer:1.1.3")
provided("net.md-5:bungeecord-api:1.13-SNAPSHOT")
}
jar {
from {
(configurations.compile - configurations.provided).findAll({
it.isDirectory() || it.name.endsWith(".jar")
}).collect({
it.isDirectory() ? it : zipTree(it)
})
}
}
processResources {
from("LICENSE")
rename("LICENSE", "LICENSE-" + archivesBaseName)
from (sourceSets.main.resources.srcDirs) {
include("bungee.yml")
expand("name": archivesBaseName, "version": version)
}
}
task signJar {
doFirst {
if (!project.hasProperty("signing.keyStorePath") || !project.hasProperty("signing.secretKeyRingFile")) {
project.logger.warn("========== [WARNING] ==========")
project.logger.warn("")
project.logger.warn(" This build is not signed! ")
project.logger.warn("")
project.logger.warn("========== [WARNING] ==========")
throw new StopExecutionException()
}
}
doLast {
configurations.archives.allArtifacts.files.each {
ant.signjar(
jar: it,
alias: project.property("signing.alias"),
storepass: project.property("signing.keyStorePassword"),
keystore: project.property("signing.keyStorePath"),
keypass: project.property("signing.keyStorePassword"),
preservelastmodified: project.property("signing.preserveLastModified"),
tsaurl: project.property("signing.timestampAuthority"),
digestalg: project.property("signing.digestAlgorithm")
)
project.logger.lifecycle("JAR Signed: " + it.name)
signing.sign(it)
project.logger.lifecycle("PGP Signed: " + it.name)
}
}
}