forked from ExtraCells/ExtraCells2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
171 lines (146 loc) · 4.46 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
buildscript {
repositories {
mavenCentral()
maven {
name = "gt"
url = "https://gregtech.overminddl1.com/"
}
maven {
name = "sonatype"
url = "https://oss.sonatype.org/content/repositories/snapshots/"
}
maven {
url = "https://jitpack.io"
}
}
dependencies {
classpath 'com.github.GTNH2:ForgeGradle:FG_1.2-SNAPSHOT'
}
}
apply plugin: 'scala'
apply plugin: 'forge'
apply plugin: 'idea'
ext.buildProps = file "build.properties"
version = "GTNH"
if (System.getenv("BUILD_NUMBER") != null) {
version = "${System.getenv("BUILD_NUMBER")}"
}
if (System.getenv("DRONE_BUILD_NUMBER") != null) {
version = "${System.getenv("DRONE_BUILD_NUMBER")}"
}
buildProps.withReader {
def prop = new Properties()
prop.load(it)
ext.config = new ConfigSlurper().parse prop
}
version = "${config.version.minecraft}-${config.version.mod.major}.${config.version.mod.minor}.${config.version.mod.revis}-" + getBuildNumber()
group = "extracells"
archivesBaseName = "ExtraCells"
sourceCompatibility = targetCompatibility = "1.8" // Need this here so eclipse task generates correctly.
compileJava {
sourceCompatibility = targetCompatibility = "1.8"
}
logger.lifecycle "$archivesBaseName-$version"
logger.lifecycle "" + version
minecraft {
version = "${config.version.minecraft}-${config.version.forge}-${config.version.minecraft}"
runDir = "../../MinecraftDebug/run_client"
}
repositories {
maven {
name 'Mobius Repo'
url "http://mobiusstrip.eu/maven"
}
maven {
name 'CB Repo'
url "http://chickenbones.net/maven/"
}
maven {
name 'Open Computers'
url "http://maven.cil.li/"
}
maven {
name = "Forestry and IC2 repo"
url = "http://maven.ic2.player.to/"
}
maven {
name = 'IGW'
url = "http://maven.k-4u.nl/"
}
ivy {
name "BuildCraft"
artifactPattern "http://www.mod-buildcraft.com/releases/BuildCraft/[revision]/[module]-[revision]-[classifier].[ext]"
}
maven {
name 'GT6 Maven'
url "https://gregtech.overminddl1.com/"
}
maven {
name 'GTNH Maven'
url "http://jenkins.usrv.eu:8081/nexus/content/repositories/releases/"
}
ivy {
artifactPattern "http://downloads.gtnewhorizons.com/Mods_for_Jenkins/[module]_[revision].[ext]"
}
ivy {
artifactPattern "http://downloads.gtnewhorizons.com/Mods_for_Jenkins/[module]-[revision].[ext]"
}
}
configurations {
provided
embedded
compile.extendsFrom embedded
}
dependencies {
provided name: 'CoFHCore', version: config.cofhcore.version, ext: 'jar'
compile ("appeng:appliedenergistics2-${config.version.ae}:dev") {
transitive = false
}
compile ("mcp.mobius.waila:Waila:${config.version.waila}"){
transitive = false
}
compile "li.cil.oc:OpenComputers:${config.version.oc}:dev"
compile "codechicken:CodeChickenLib:${config.version.minecraft}-${config.version.ccl}:dev"
compile "codechicken:CodeChickenCore:${config.version.minecraft}-${config.version.ccc}:dev"
compile "codechicken:NotEnoughItems:${config.version.minecraft}-${config.version.nei}:dev"
compile "igwmod:IGW-Mod-${config.version.minecraft}:${config.version.igw}:userdev"
compile name: "buildcraft", version: "${config.version.bc}", classifier: "dev", ext: 'jar'
// compile name: 'WirelessCraftingTerminal', version: config.version.wc, ext: 'jar'
}
processResources {
from(sourceSets.main.resources.srcDirs) {
include '**/*.lang'
include '**/*.info'
include '**/*.properties'
expand 'version': project.version, 'mcversion': project.minecraft.version
}
from(sourceSets.main.resources.srcDirs) {
include '**/*.lang'
include '**/*.info'
include '**/*.properties'
expand 'version': "${config.version.mod.major}.${config.version.mod.minor}.${config.version.mod.revis}", 'mcversion': project.minecraft.version
}
}
task deobfJar(type: Jar) {
from sourceSets.main.output
from sourceSets.main.scala
from sourceSets.main.java
appendix = 'deobf'
}
artifacts {
archives deobfJar
}
def static getBuildNumber() {
if (System.getenv("BUILD_NUMBER") != null) {
return "${System.getenv("BUILD_NUMBER")}"
}
else if (System.getenv("DRONE_BUILD_NUMBER") != null) {
return "${System.getenv("DRONE_BUILD_NUMBER")}"
}
return "GTNH"
}
idea {
module {
outputDir = file('build/classes/main')
}
}