This repository has been archived by the owner on Jan 21, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
/
build.gradle
111 lines (96 loc) · 2.91 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
buildscript {
repositories {
mavenCentral()
maven {
name = "forge"
url = "http://files.minecraftforge.net/maven"
}
maven {
name = "sonatype"
url = "https://oss.sonatype.org/content/repositories/snapshots/"
}
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT'
}
}
file "build.properties" withReader {
def prop = new Properties()
prop.load(it)
ext.config = new ConfigSlurper().parse prop
}
apply plugin: 'forge'
version = "${config.occ.version}"
group = "li.cil.occ"
archivesBaseName = "OpenComponents"
if (System.getenv("BUILD_NUMBER") != null)
version += ".${System.getenv("BUILD_NUMBER")}"
ext.simpleVersion = version
version = "MC${config.minecraft.version}-${project.version}"
repositories {
maven {
name = "bc"
url = "http://mod-buildcraft.com/"
}
maven {
name = "chickenbones"
url = "http://chickenbones.net/maven/"
}
maven {
name = "ic2"
url = "http://maven.ic2.player.to/"
}
maven {
name = "mobius"
url = "http://mobiusstrip.eu/maven"
}
maven {
name = "oc"
url = "http://maven.cil.li/"
}
maven {
name "FireBall API Depot"
url "http://dl.tsr.me/artifactory/libs-release-local"
}
}
// From http://stackoverflow.com/questions/10405970/how-do-i-define-a-compile-time-only-classpath-in-gradle
configurations {
provided
}
dependencies {
provided "appeng:appliedenergistics2:${config.ae2.version}:dev"
provided "codechicken:EnderStorage:${config.minecraft.version}-${config.es.version}:dev"
provided "com.mod-buildcraft:buildcraft:${config.bc.version}:dev"
provided "li.cil.oc:OpenComputers:MC${config.minecraft.version}-${config.oc.version}:api"
provided "net.industrial-craft:industrialcraft-2:${config.ic2.version}:api"
provided "com.gregoriust.gregtech:gregtech_${config.minecraft.version}:${config.gt.version}:dev"
provided "api:rotarycraft:${config.rotc.version}"
}
sourceSets.main.compileClasspath += configurations.provided
idea.module.scopes.PROVIDED.plus += configurations.provided
eclipse.classpath.plusConfigurations += configurations.provided
minecraft {
version = "${config.minecraft.version}-${config.forge.version}"
replaceIn "li/cil/occ/OpenComponents.java"
replace "@VERSION@", project.simpleVersion
}
processResources {
from(sourceSets.main.resources.srcDirs) {
include 'mcmod.info'
expand 'version': project.simpleVersion, 'mcversion': config.minecraft.version
}
from(sourceSets.main.resources.srcDirs) {
exclude 'mcmod.info'
}
}
jar {
classifier = 'universal'
}
// because the normal default jar task has been modified to be obfuscated
task deobfJar(type: Jar) {
from sourceSets.main.output
classifier = 'deobf'
}
artifacts {
archives deobfJar
}