forked from TeamPneumatic/pnc-repressurized
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
194 lines (174 loc) · 5.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
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
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
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'
repositories {
maven {
name = "CoFH Maven"
url = "http://maven.covers1624.net"
}
maven {
name = "JEI"
url = "http://dvs1.progwml6.com/files/maven"
}
maven {
name = "MCMP"
url = "http://maven.amadornes.com/"
}
maven {
name = "OpenComputers"
url = "http://maven.cil.li/"
}
maven {
name = "ComputerCraft"
url = "http://cc.crzd.me/maven"
}
maven {
name = "hwyla"
url = 'http://tehnut.info/maven/'
}
maven { // TOP
name = "tterrag maven"
url = "http://maven.tterrag.com/"
}
maven {
name 'BlameJared - Crafttweaker'
url 'http://maven.blamejared.com/'
}
maven {
name = "K-4u Mod maven"
url = "https://modmaven.k-4u.nl/"
}
maven {
name = "ic2"
url = "http://maven.ic2.player.to/"
}
}
task copyCIArtifacts << {
if (System.getenv("CIRCLECI").equals("true")) {
copy {
from(file('build/libs/').listFiles())
into System.getenv('CIRCLE_ARTIFACTS')
}
}
}
// Only edit below this line, the above code adds and enables the necessary things for Forge to be setup.
version = "${mc_version}-${mod_version_massive}.${mod_version_major}.${mod_version_minor}"
group = "me.desht.pneumaticcraft"
archivesBaseName = "pneumaticcraft-repressurized"
if (System.getenv().BUILD_NUMBER != null) {
version += "-${System.getenv().BUILD_NUMBER}"
} else {
version += "-CUSTOM"
}
sourceCompatibility = targetCompatibility = '1.8' // Need this here so eclipse task generates correctly.
// prevent java 8's strict doclint for javadocs from failing builds
allprojects {
tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
}
}
jar {
from sourceSets.main.output
from sourceSets.api.output
}
task sourcesJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allJava
from sourceSets.api.allJava
}
task apiJar(type: Jar) {
classifier = 'api'
from sourceSets.api.java
// TODO: when FG bug is fixed, remove allJava from the api jar.
// https://github.com/MinecraftForge/ForgeGradle/issues/369
// Gradle should be able to pull them from the -sources jar.
from sourceSets.api.allJava
}
task("uploadJars", dependsOn:"reobf") {
description = "uploads JARs"
if (System.getenv("local_maven") != null) {
apply plugin: 'maven'
uploadArchives {
repositories {
mavenDeployer {
repository(url: "file://" + System.getenv("local_maven"))
}
}
}
}
}
artifacts {
archives sourcesJar
archives apiJar
}
compileJava {
sourceCompatibility = targetCompatibility = '1.8'
}
minecraft {
version = "${forge_version}"
runDir = "run"
mappings = "${mappings_version}"
clientJvmArgs += "-Dfml.coreMods.load=elucent.albedo.asm.FMLPlugin"
replace '@VERSION@', project.version
replaceIn 'PneumaticCraftRepressurized.java'
replace '@MASSIVE@', mod_version_massive
replaceIn 'lib/Versions.java'
replace '@MAJOR@', mod_version_major
replaceIn 'lib/Versions.java'
replace '@MINOR@', mod_version_minor
replaceIn 'lib/Versions.java'
replace '@MC_VERSION@', version
replaceIn 'lib/Versions.java'
if (System.getenv("BUILD_NUMBER") != null) {
replace '@BUILD_NUMBER@', System.getenv("BUILD_NUMBER")
} else {
replace '@BUILD_NUMBER@', 0
}
}
dependencies {
deobfCompile "cofh:RedstoneFlux:1.12-2.0.1.2:universal"
deobfCompile "mezz.jei:jei_${mc_version}:${jei_version}"
deobfCompile("cofh:CoFHCore:1.12.2-${cofhcore_version}:deobf") {
transitive = false
}
deobfCompile "MCMultiPart2:MCMultiPart:${mcmultipart_version}"
deobfCompile "li.cil.oc:OpenComputers:MC1.12.1-${oc_version}:api"
deobfCompile "dan200.computercraft:ComputerCraft-SquidDev-CC-ComputerCraft-feature-minecraft-1.12.2:${computercraft_version}"
deobfCompile "mcp.mobius.waila:Hwyla:${hwyla_version}"
deobfCompile "mcjty.theoneprobe:TheOneProbe-1.12:${top_version}"
deobfProvided "CraftTweaker2:CraftTweaker2-API:${crafttweaker_version}"
deobfProvided "CraftTweaker2:CraftTweaker2-MC1120-Main:1.12-${crafttweaker_version}"
compile "igwmod:IGW-Mod-1.12.2:${igwmod_version}:universal" // using universal instead of userdev for now
compile "net.industrial-craft:industrialcraft-2:2.8.27-ex112:api"
deobfCompile("appeng:appliedenergistics2:${ae2_version}:api") {
transitive = false
}
}
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'
}
}
idea { module { inheritOutputDirs = true } }
jar {
manifest {
attributes 'FMLAT': 'pneumaticcraft_at.cfg'
}
}