forked from NytroCO/LandCraft
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
118 lines (102 loc) · 3.14 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
118
buildscript {
repositories {
jcenter()
maven {
name = "minecraftforge"
url = "http://files.minecraftforge.net/maven"
}
}
dependencies {
classpath("net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT")
}
}
apply plugin: "java"
apply plugin: "net.minecraftforge.gradle.forge"
apply plugin: "signing"
sourceCompatibility = 1.8
targetCompatibility = 1.8
group = "landmaster"
archivesBaseName = "landcraft"
version = "2.2.3.1"
minecraft {
version = "1.12.2-14.23.5.2768"
runDir = "run"
mappings = "stable_39"
makeObfSourceJar = false
}
configurations {
provided {
compile.extendsFrom(provided)
}
}
repositories {
jcenter()
maven {
name = "progwml6"
url = "http://dvs1.progwml6.com/files/maven"
}
maven {
name = "covers1624"
url = "https://maven.covers1624.net"
}
maven {
url "http://maven.blamejared.com"
}
}
dependencies {
provided("cofh:CoFHCore:1.12-4.3.0.3:deobf")
provided("cofh:RedstoneFlux:1.12-2.0.0.1:deobf")
provided("mezz.jei:jei_1.12:4.7.1.69")
provided("CraftTweaker2:CraftTweaker2-MC1120-Main:1.12-4.1.11.494")
}
jar {
manifest {
attributes("FMLAT": "landcraft_at.cfg")
}
from {
(configurations.compile - configurations.provided).findAll({
it.isDirectory() || it.name.endsWith(".jar")
}).collect({
it.isDirectory() ? it : zipTree(it)
})
}
exclude("dummyThing")
exclude("**/*.xcf")
}
processResources {
from("LICENSE")
rename("LICENSE", "LICENSE-" + archivesBaseName)
from (sourceSets.main.resources.srcDirs) {
include("mcmod.info")
expand("version": version, "mcversion": minecraft.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)
}
}
}