forked from Technus/TecTech
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
198 lines (177 loc) · 6.17 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
195
196
197
198
buildscript {
repositories {
mavenCentral()
jcenter()
maven {
url = "https://jcenter.bintray.com/"
}
maven {
name = "MavenRepo"
url = "https://repo.maven.apache.org/maven2"
}
maven {
name = "gt"
url = "https://gregtech.overminddl1.com/"
}
maven {
name = "forge"
url = "http://files.minecraftforge.net/maven"
}
maven {
name = "sonatype"
url = "https://oss.sonatype.org/content/repositories/snapshots/"
}
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath ('com.anatawa12.forge:ForgeGradle:1.2-1.0.+') {
changing = true
}
}
}
apply plugin: 'forge'
apply plugin: 'signing'
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
allprojects {
apply plugin: 'java'
sourceCompatibility = 1.8
targetCompatibility = 1.8
}
sourceSets {
main {
java {
srcDir 'src/main/java'
srcDir 'AVRcore/src'
}
}
}
file "build.properties" withReader {
def prop = new Properties()
prop.load(it)
ext.config = new ConfigSlurper().parse prop
}
version = "${config.minecraft.version}-${config.tectech.version}"
group = "com.github.technus"
archivesBaseName = "TecTech"
minecraft {
version = "${config.minecraft.version}-${config.forge.version}-${config.minecraft.version}"
runDir = "idea"
replaceIn "src/main/java/com/github/technus/tectech/Reference.java"
replace "GRADLETOKEN_VERSION", "${config.tectech.version}"
}
configurations {
provided
embedded
compile.extendsFrom provided, embedded
}
repositories {
maven { //Computercraft, NEI, chicken core and lib
name = "GregTech maven"
url = "https://gregtech.overminddl1.com/"
}
maven { //YAMCore
name 'UsrvDE maven'
url "http://jenkins.usrv.eu:8081/nexus/content/repositories/releases/"
}
maven { //IC2
name = "IC2 maven"
url = "http://maven.ic2.player.to/"
}
maven { // Baubles and Thaumcraft
name 'MC Mod Dev maven'
url 'https://maven.mcmoddev.com/'
}
maven { // OpenComputers
name "OpenComputers maven"
url "http://maven.cil.li/"
}
maven { // EnderIO
name "Tterrag maven"
url "https://maven.tterrag.com/"
}
ivy { //CoFHCore
name 'gtnh_download_source'
artifactPattern "http://downloads.gtnewhorizons.com/Mods_for_Jenkins/[module]-[revision].[ext]"
}
}
dependencies {
provided fileTree(dir: 'libs/', include:'*.jar')
compile "eu.usrv:YAMCore:${config.minecraft.version}-${config.yamcore.version}:deobf"
compile "net.industrial-craft:industrialcraft-2:${config.ic2.version}:dev"
compile "net.sengir.forestry:forestry_${config.minecraft.version}:${config.forestry.version}:api"
compile "codechicken:CodeChickenLib:${config.minecraft.version}-${config.codechickenlib.version}:dev"
compile "codechicken:CodeChickenCore:${config.minecraft.version}-${config.codechickencore.version}:dev"
compile "codechicken:NotEnoughItems:${config.minecraft.version}-${config.nei.version}:dev"
compile "com.azanor:Baubles:${config.minecraft.version}-${config.baubles.version}"
compile "com.azanor:Thaumcraft:${config.minecraft.version}-${config.thaumcraft.version}:deobf"
compile "li.cil.oc:OpenComputers:MC${config.minecraft.version}-${config.opencomputers.version}:dev"
compile "com.enderio.core:EnderCore:${config.minecraft.version}-${config.endercore.version}"
compile ("com.enderio:EnderIO:${config.minecraft.version}-${config.enderio.version}"){
exclude module: 'Waila'
exclude module: 'EnderCore'
}
compile "mcp.mobius.waila:Waila:${config.waila.version}_${config.minecraft.version}"
//Greg
compile "dan200.computercraft:ComputerCraft:${config.computercraft.version}"
compile "micdoodle8.mods:MicdoodleCore:${config.galacticraft.version}:Dev"
compile "micdoodle8.mods:GalacticraftCore:${config.galacticraft.version}:Dev"
compile "micdoodle8.mods:Galacticraft-Planets:${config.galacticraft.version}:Dev"
compile "micdoodle8.mods:Galacticraft:${config.galacticraft.version}:API"
compile "com.mod-buildcraft:buildcraft:${config.buildcraft.version}:dev"
}
task submodulesUpdate(type: Exec) {
description 'Updates (and inits) git submodules'
commandLine 'git', 'submodule', 'update', '--init', '--recursive','--remote'
group 'Build Setup'
}
tasks.setupCIWorkspace.dependsOn submodulesUpdate
tasks.setupDevWorkspace.dependsOn submodulesUpdate
tasks.setupDecompWorkspace.dependsOn submodulesUpdate
tasks.compileJava.dependsOn submodulesUpdate
tasks.sourceMainJava.dependsOn submodulesUpdate
processResources
{
def cleanVersion = project.version.split('-')[1]
// this will ensure that this task is redone when the versions change.
inputs.property "version", cleanVersion
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': cleanVersion, 'mcversion': project.minecraft.version
}
// copy everything else, thats not the mcmod.info
from(sourceSets.main.resources.srcDirs) {
exclude 'mcmod.info'
}
}
task devJar(type: Jar) {
from sourceSets.main.output
classifier = 'dev'
}
artifacts {
archives devJar
}
task signJar(dependsOn: 'reobf') {
doLast {
ant.signjar(
destDir: jar.destinationDir,
jar: jar.getArchivePath(),
alias: findProperty('keyStoreAlias') ?: '',
keystore: findProperty('keyStore') ?: '',
storepass: findProperty('keyStorePass') ?: '',
digestalg: findProperty('signDigestAlg') ?: '',
tsaurl: findProperty('signTSAurl') ?: '',
verbose: true
)
}
}
jar {
manifest
{
attributes "FMLAT": "tectech_at.cfg"
}
}