forked from HellFirePvP/ModularMachinery
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
170 lines (136 loc) · 4.57 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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
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'
apply plugin: 'maven-publish'
apply plugin: "java"
version = "1.12.2-1.11.1"
group = "hellfirepvp.modularmachinery"
archivesBaseName = "modularmachinery"
String build_version = ""
// Most likely inside Jenkins. Or homebrew environment.
// I hope you know what you do if it's the latter.
if (System.getenv("BUILD_NUMBER") != null) {
build_version = version + "-v" + System.getenv("BUILD_NUMBER")
}
sourceCompatibility = targetCompatibility = '1.8'
compileJava {
sourceCompatibility = targetCompatibility = '1.8'
}
minecraft {
version = "1.12.2-14.23.5.2800"
runDir = "run"
useDepAts = true
mappings = "snapshot_20171003"
}
repositories {
maven {
// for rf stuffs
url = "https://maven.covers1624.net"
}
maven {
// location of the maven that hosts JEI files
url = "http://dvs1.progwml6.com/files/maven"
}
maven {
// CraftTweaker
url "https://maven.blamejared.com/"
}
maven {
// Brandonscore and DE
url "http://chickenbones.net/maven/"
}
maven {
// Open Computers
url "http://maven.cil.li/"
}
maven {
// Curseforge
url "https://minecraft.curseforge.com/api/maven"
}
}
dependencies {
def mc_version = "1.12.2"
def jei_version = "4.14.4.267"
////JEI stuff
deobfCompile "mezz.jei:jei_${mc_version}:${jei_version}"
def rf_version = "2.1.0.7"
deobfCompile "cofh:RedstoneFlux:1.12-${rf_version}:universal"
def ct_mc_version = "MC1120"
def ct_version = "4.1.14.520"
deobfCompile "CraftTweaker2:CraftTweaker2-${ct_mc_version}-Main:1.12-${ct_version}"
//deobfCompile group: 'cofh', name: 'ThermalDynamics', version: '1.12.2-2.5.4.18', classifier: 'universal'
//deobfCompile group: 'cofh', name: 'ThermalExpansion', version: '1.12.2-5.5.3.40', classifier: 'universal'
//deobfCompile group: 'cofh', name: 'ThermalFoundation', version: '1.12.2-2.6.2.24', classifier: 'universal'
//deobfCompile group: 'cofh', name: 'CoFHCore', version: '1.12.2-4.6.1.22', classifier: 'universal'
//deobfCompile group: 'cofh', name: 'CoFHWorld', version: '1.12.2-1.2.0.5', classifier: 'universal'
deobfCompile group: 'codechicken', name: 'CodeChickenLib', version: '1.12.2-3.2.2.353', classifier: 'universal'
deobfCompile group: 'com.brandon3055.brandonscore', name: 'BrandonsCore', version: '1.12.2-2.4.9.195', classifier: 'universal'
deobfCompile group: 'com.brandon3055.draconicevolution', name: 'Draconic-Evolution', version: '1.12.2-2.3.18.329', classifier: 'universal'
deobfCompile "gregtechce:gregtech:1.12.2:1.5.21.182"
}
//Sign jar from flatfile if present - local build
task signMainJarFile(type: SignJar, dependsOn: reobfJar) {
onlyIf { // Skip the task if our secret data isn't available
project.hasProperty('keyStore')
}
if (project.hasProperty('keyStore')) { // This needs to be a path to the keystore file
keyStore = project.keyStore
alias = project.alias
storePass = project.storePass
keyPass = project.keyPass
inputFile = jar.archivePath
outputFile = jar.archivePath
}
}
build.dependsOn signMainJarFile
task deobfJar(type: Jar) {
from(sourceSets.main.output)
archiveName = "${baseName}-${version}-deobf.${extension}"
}
task srcJar(type: Jar) {
from(sourceSets.main.java)
classifier = 'sources'
archiveName = "${baseName}-${version}-sources.${extension}"
}
artifacts {
archives deobfJar, srcJar
}
publishing {
publications {
mavenJava(MavenPublication) {
groupId project.group
artifactId project.archivesBaseName
version build_version
from components.java
artifact deobfJar {
classifier 'deobf'
}
artifact srcJar {
classifier 'sources'
}
}
}
repositories {
maven {
url "file://" + System.getenv("LOCAL_MAVEN")
}
}
}
processResources {
inputs.property "version", project.version
inputs.property "mcversion", project.minecraft.version
from(sourceSets.main.resources.srcDirs) {
include 'mcmod.info'
expand 'version':project.version, 'mcversion': "1.12"
}
from(sourceSets.main.resources.srcDirs) {
exclude 'mcmod.info'
}
}