forked from gcewing/SGCraft
-
Notifications
You must be signed in to change notification settings - Fork 29
/
build.gradle
140 lines (120 loc) · 3.93 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
buildscript {
repositories {
mavenCentral()
mavenLocal()
jcenter()
maven {
url = "https://maven.minecraftforge.net"
}
maven {
url = "https://oss.sonatype.org/content/repositories/snapshots/"
}
maven {
name = 'sponge'
url = 'https://repo.spongepowered.org/maven'
}
}
dependencies {
classpath 'com.github.jengelman.gradle.plugins:shadow:2.0.4'
classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT'
classpath 'commons-io:commons-io:2.4'
}
}
apply plugin: 'net.minecraftforge.gradle.forge'
apply plugin: 'com.github.johnrengelman.shadow'
jar {
classifier = 'original'
}
archivesBaseName = jarName
repositories {
maven { url = "https://maven.minecraftforge.net" } // spongeforge
maven { url = "http://maven.cil.li/" }
maven {
name = 'oss-sonatype-public'
url = 'https://oss.sonatype.org/content/groups/public/'
}
maven { url = "http://maven.ic2.player.to" }
maven {
name = 'sponge'
url = 'https://repo.spongepowered.org/maven'
}
maven { url = "http://cc.crzd.me/maven/" }
maven { url = "https://archiva-repository.apache.org/archiva/repository/snapshots" }
maven {
name = 'CoFH Maven'
url = 'http://maven.covers1624.net'
}
flatDir {
dirs "lib"
}
}
dependencies {
compile ("org.spongepowered:spongeforge:1.12.2-2838-7.4.5:dev") {
exclude module: 'testplugins'
exclude module: 'testmods'
}
compile 'org.spongepowered:configurate-yaml:3.7'
compile 'org.spongepowered:configurate-core:3.7'
compile 'com.google.code.gson:gson:2.8.0'
compile 'commons-io:commons-io:2.7-SNAPSHOT'
compile "li.cil.oc:OpenComputers:MC1.12.1-1.7.1.52"
compile "net.industrial-craft:industrialcraft-2:2.8.220-ex112:api"
deobfCompile "dan200.computercraft:ComputerCraft:1.80pr1-build4"
deobfCompile "cofh:RedstoneFlux:1.12-2.1.0.6:universal"
//deobfCompile "codechicken:CodeChickenLib:1.12.2-3.2.3.358:universal"
//deobfCompile "cofh:CoFHCore:1.12.2-4.6.3.27:universal"
//deobfCompile "cofh:CoFHWorld:1.12.2-1.3.1.7:universal"
//deobfCompile "cofh:ThermalExpansion:1.12.2-5.5.3.41:universal"
//deobfCompile "cofh:ThermalFoundation:1.12.2-2.6.2.26:universal"
//deobfCompile "cofh:ThermalDynamics:1.12.2-2.5.5.21:universal"
deobfCompile ('com.almuradev:malisiscore:1.12.2-6.5.3-SNAPSHOT-dev') {
transitive = false
}
}
deobfMcMCP { failOnAtError = false }
deobfMcSRG { failOnAtError = false }
minecraft {
version = "1.12.2-14.23.5.2838"
runDir = "run"
mappings = 'snapshot_20180808'
useDepAts = true
makeObfSourceJar = false
}
sourceSets.main {
compileClasspath += files("lib")
java.srcDirs "src/base", "src/mod"
resources.srcDirs "src/resources"
}
processResources {
// this will ensure that this task is redone when the versions change.
inputs.property "version", project.version
inputs.property "mcversion", project.mcversion
// 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, 'modid':project.jarName
}
// copy everything else, thats not the mcmod.info
from(sourceSets.main.resources.srcDirs) {
exclude 'mcmod.info'
}
}
shadowJar {
mainSpec.sourcePaths.clear()
dependsOn reobfJar
classifier ''
exclude 'dummyThing'
relocate 'com.typesafe.config', 'configurate.typesafe.config'
dependencies {
include dependency('org.spongepowered:configurate-core')
include dependency('org.spongepowered:configurate-yaml')
include dependency('org.yaml:snakeyaml')
}
afterEvaluate {
from zipTree(reobfJar.jar)
}
}
artifacts {
archives shadowJar
}