forked from GTNewHorizons/GT5-Unofficial
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
180 lines (161 loc) · 5.78 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
buildscript {
repositories {
mavenCentral()
maven {
name = "gt"
url = "https://gregtech.overminddl1.com/"
}
maven {
name = "sonatype"
url = "https://oss.sonatype.org/content/repositories/snapshots/"
}
maven {
name = "jitpack.io"
url = "https://jitpack.io"
}
}
dependencies {
classpath 'com.github.GTNH2:ForgeGradle:FG_1.2-SNAPSHOT'
}
}
apply plugin: 'forge'
apply plugin: 'idea'
apply plugin: 'java'
apply plugin: 'signing'
apply plugin: 'java-library'
file "build.properties" withReader {
def prop = new Properties()
prop.load(it)
ext.config = new ConfigSlurper().parse prop
}
version = "${config.gt.version}"
group = "gregtech"
archivesBaseName = "gregtech"
compileJava {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
options.encoding = "UTF-8"
}
minecraft {
version = "${config.minecraft.version}-${config.forge.version}"
runDir = "run"
}
idea.module.inheritOutputDirs = true
repositories {
maven {
name = "gt"
url = "https://gregtech.overminddl1.com/"
}
maven {
name = "chickenbones"
url = "https://nexus.covers1624.net/repository/maven-hosted/"
}
maven {
name = "ic2, forestry"
url = "http://maven.ic2.player.to/"
}
maven { // EnderIO & EnderCore
name = 'tterrag Repo'
url = "http://maven.tterrag.com"
}
maven { // TConstruct
name = 'DVS1 Maven FS'
url = 'http://dvs1.progwml6.com/files/maven'
}
maven { // AppleCore
url = "http://www.ryanliptak.com/maven/"
}
maven { // GalacticGreg, YAMCore,..
name = 'UsrvDE'
url = "http://jenkins.usrv.eu:8081/nexus/content/repositories/releases/"
}
ivy {
name = 'gtnh_download_source_stupid_underscore_typo'
artifactPattern("http://downloads.gtnewhorizons.com/Mods_for_Jenkins/[module]_[revision].[ext]")
}
ivy {
name = 'gtnh_download_source'
artifactPattern("http://downloads.gtnewhorizons.com/Mods_for_Jenkins/[module]-[revision].[ext]")
}
maven {
name = "jitpack.io"
url = "https://jitpack.io"
}
}
dependencies {
//Hard dep to start (Without this, it wont compile nor start)
compile 'com.google.code.findbugs:jsr305:1.3.9'
compile "net.industrial-craft:industrialcraft-2:${config.ic2.version}:dev"
compile ("com.github.GTNewHorizons:StructureLib:${config.structurelib.version}:deobf")
//Hard dep to compile (Without this, it wont compile, not even as library)
api "appeng:appliedenergistics2:${config.ae2.version}:dev"
api "applecore:AppleCore:${config.applecore.version}:api"
api "codechicken:CodeChickenLib:${config.minecraft.version}-${config.codechickenlib.version}:dev"
api "codechicken:CodeChickenCore:${config.minecraft.version}-${config.codechickencore.version}:dev"
api "codechicken:NotEnoughItems:${config.minecraft.version}-${config.nei.version}:dev"
api "com.enderio.core:EnderCore:${config.enderiocore.version}:dev"
api("com.enderio:EnderIO:${config.enderio.version}:dev") {
transitive = false
}
//Soft Depths (Without this, it wont compile, not needed as library)
compileOnly 'commons-io:commons-io:2.4'
compileOnly "eu.usrv:YAMCore:${config.minecraft.version}-${config.yamcore.version}:deobf"
compileOnly "tconstruct:TConstruct:${config.minecraft.version}-${config.tconstruct.version}:deobf"
compileOnly "codechicken:Translocator:${config.minecraft.version}-${config.translocators.version}:dev"
compileOnly "net.sengir.forestry:forestry_${config.minecraft.version}:${config.forestry.version}:dev"
compileOnly files("libs/Galacticraft-API-1.7-${config.gc.version}.jar")
compileOnly files("libs/GalacticraftCore-Dev-${config.gc.version}.jar")
compileOnly name: "Galacticraft-API", version: config.gc.version, ext: 'jar'
compileOnly name: "GalacticraftCore-Dev", version: config.gc.version, ext: 'jar'
compileOnly name: 'CoFHLib', version: config.cofhlib.version, ext: 'jar'
compileOnly name: 'Railcraft', version: config.railcraft.version, ext: 'jar'
compileOnly name: 'IC2NuclearControl', version: config.nc.version, ext: 'jar'
}
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, that's not the mcmod.info
from(sourceSets.main.resources.srcDirs) {
exclude 'mcmod.info'
}
exclude '**/Thumbs.db'
}
task sourceJar(type: Jar) {
from sourceSets.main.allSource
archiveClassifier.set('sources')
}
task devJar(type: Jar) {
from sourceSets.main.output
archiveClassifier.set('dev')
}
task apiJar(type: Jar) {
from sourceSets.main.allSource
include("gregtech/api/**")
archiveClassifier.set('api')
}
artifacts {
archives(devJar)
archives(sourceJar)
archives(apiJar)
}
task signJar(dependsOn: 'reobf') {
doLast {
ant.signjar(
destDir: jar.getDestinationDirectory(),
jar: jar.getArchivePath(),
alias: findProperty('keyStoreAlias') ?: '',
keystore: findProperty('keyStore') ?: '',
storepass: findProperty('keyStorePass') ?: '',
digestalg: findProperty('signDigestAlg') ?: '',
tsaurl: findProperty('signTSAurl') ?: '',
verbose: true
)
}
}