forked from TFC-Metallum/TFC-Metallum
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
103 lines (88 loc) · 2.73 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
buildscript {
repositories {
jcenter()
maven { url = "http://files.minecraftforge.net/maven" }
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT'
}
}
apply plugin: 'net.minecraftforge.gradle.forge'
if (System.getenv('VERSION') != null) {
version = System.getenv('VERSION')
} else {
version = "1.1.3"
}
group = "tfcmetallum"
archivesBaseName = "TFC-Metallum"
sourceCompatibility = targetCompatibility = '1.8'
compileJava {
sourceCompatibility = targetCompatibility = '1.8'
}
minecraft {
version = "1.12.2-14.23.5.2838"
runDir = "run"
mappings = "stable_39"
replace("@VERSION@", project.version)
replace("@FINGERPRINT@", project.findProperty("signSHA1"))
replaceIn("TFCMetallum.java")
}
repositories {
// Repositories required for dependencies, not ForgeGradle go here.
mavenCentral()
maven { // TOP
name 'tterrag maven'
url "https://maven.tterrag.com/"
}
maven {
// location of the maven that hosts JEI files
name = "Progwml6 maven"
url = "https://dvs1.progwml6.com/files/maven/"
}
maven {
name = "CoFH Maven"
url = "https://maven.covers1624.net/"
}
maven {
url "https://minecraft.curseforge.com/api/maven"
}
}
dependencies {
deobfProvided "mezz.jei:jei_1.12.2:4.15.0.291"
deobfProvided "mcjty.theoneprobe:TheOneProbe-1.12:1.12-1.4.12-6"
compile fileTree(include: ["*.jar"], dir: "libs")
}
processResources {
// this will ensure that this task is redone when the versions change.
inputs.property "version", project.version
inputs.property "mcversion", project.minecraft.version
// replace stuff in mcmod.info, nothing else
from(sourceSets.main.resources.srcDirs) {
include 'mcmod.info'
// replace version and mcversion
expand 'version':project.version, 'mcversion':project.minecraft.version
}
// copy everything else except the mcmod.info
from(sourceSets.main.resources.srcDirs) {
exclude 'mcmod.info'
}
// from the project root, include the LICENSE file
from('.') {
include "LICENSE.txt"
}
}
project.tasks.withType(Jar) { jarTask -> // For all jar tasks
jarTask.appendix = "MC" + project.minecraft.version
}
task signJar(type: SignJar, dependsOn: reobfJar) {
onlyIf { // Skip the task if our secret data isn't available
project.hasProperty('keyStore')
}
keyStore = project.findProperty('keyStore')
alias = project.findProperty('keyStoreAlias')
storePass = project.findProperty('keyStorePass')
keyPass = project.findProperty('keyStoreKeyPass')
inputFile = jar.archivePath
outputFile = jar.archivePath
}
build.dependsOn signJar