-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
190 lines (173 loc) · 5.67 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
buildscript {
repositories {
jcenter()
maven {
name = 'forge'
url = "http://files.minecraftforge.net/maven" }
maven {
name = 'gradle'
url 'https://plugins.gradle.org/m2/'
}
maven {
name = 'sonatype'
url = 'https://oss.sonatype.org/content/groups/public'
}
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT'
classpath 'org.junit.platform:junit-platform-gradle-plugin:1.2.0'
}
}
plugins {
//id "com.github.spotbugs" version "1.6.1"
//id "com.jaredsburrows.checkerframework" version "0.2.1"
id "com.matthewprenger.cursegradle" version "1.0.11"
id "org.sonarqube" version "2.6.2"
}
apply plugin: 'net.minecraftforge.gradle.forge'
//Only edit below this line, the above code adds and enables the necessary things for Forge to be setup.
apply plugin: 'com.matthewprenger.cursegradle'
apply plugin: 'maven-publish'
apply plugin: 'org.sonarqube'
apply plugin: 'org.junit.platform.gradle.plugin'
apply plugin: 'jacoco'
//apply plugin: 'spotbugs'
//apply plugin: 'com.jaredsburrows.checkerframework'
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
testCompile('org.junit.jupiter:junit-jupiter-api:5.2.+')
testCompile('org.junit.platform:junit-platform-launcher:1.2.+')
testRuntime('org.junit.jupiter:junit-jupiter-engine:5.2.+')
testCompile('org.mockito:mockito-core:2.+')
}
version = "${mod_version}"
group = "trinsdar.poormetals" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "Poor Metals"
sourceCompatibility = targetCompatibility = '1.8' // Need this here so eclipse task generates correctly.
compileJava {
sourceCompatibility = targetCompatibility = '1.8'
}
minecraft {
version = "${forgemc_version}-${forge_version}"
runDir = "run"
mappings = "${mappings_version}"
// makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.
replace "@VERSION@", project.version
replaceIn "PoorMetals.java"
}
repositories{
maven { // Mantle, TCon, JEI
name 'DVS1 Maven FS'
url 'http://dvs1.progwml6.com/files/maven/'
}
maven { // CCL, CCC, NEI
name 'Chickenbones Repo'
url 'http://chickenbones.net/maven/'
}
maven { // The One Probe, EnderIO, EnderCore
name 'tterrag'
url 'http://maven.tterrag.com/'
}
maven { // Tesla
name 'MMD'
url 'https://maven.mcmoddev.com/'
}
maven { // MCMultipart
name 'amadornes'
url 'http://maven.amadornes.com/'
}
maven { // CraftTweaker, ZenScript
name 'blamejared'
url 'http://maven.blamejared.com/'
}
maven { // IC2
name 'industrialcraft'
url 'http://maven.ic2.player.to/'
}
maven { // HWYLA
name 'tehnut'
url 'http://tehnut.info/maven/'
}
maven { // CoFH
name 'Covers Maven'
url 'http://maven.covers1624.net/'
}
maven {
name = 'CurseForge'
url = 'https://minecraft.curseforge.com/api/maven/'
}
maven {
name 'opencomputers'
url 'http://maven.cil.li/'
}
maven { // Mekanism, TAIGA
name 'jitpack'
url 'https://jitpack.io/'
}
maven { // Buildcraft
name 'buildcraft'
url 'https://mod-buildcraft.com/maven/'
}
maven { // Storage Drawers
name 'thiakil'
url 'http://maven.thiakil.com/'
}
maven { // Applied Energistics
name 'forge'
url 'https://files.minecraftforge.net/maven/'
}
}
dependencies {
deobfProvided ("com.mcmoddev:OreSpawn:${mc_version}-${orespawn_version}") {
exclude group: "com.mcmoddev"
}
runtime ("com.mcmoddev:OreSpawn:${mc_version}-${orespawn_version}") {
exclude group: "com.mcmoddev"
}
deobfProvided ("com.mcmoddev:MMDLib:${mc_version}-${mmdlib_version}") {
exclude group: "com.mcmoddev"
}
runtime ("com.mcmoddev:MMDLib:${mc_version}-${mmdlib_version}") {
exclude group: "com.mcmoddev"
}
deobfProvided ("com.mcmoddev:BaseMetals:${mc_version}-${bme_version}") {
exclude group: "com.mcmoddev"
}
runtime ("com.mcmoddev:BaseMetals:${mc_version}-${bme_version}") {
exclude group: "com.mcmoddev"
}
deobfProvided ("com.mcmoddev:BaseMinerals:${mc_version}-${bmi_version}") {
exclude group: "com.mcmoddev"
}
runtime ("com.mcmoddev:BaseMinerals:${mc_version}-${bmi_version}") {
exclude group: "com.mcmoddev"
}
deobfProvided ("com.mcmoddev:ModernMetals:${mc_version}-${mme_version}") {
exclude group: "com.mcmoddev"
}
runtime ("com.mcmoddev:ModernMetals:${mc_version}-${mme_version}") {
exclude group: "com.mcmoddev"
}
deobfProvided "net.industrial-craft:industrialcraft-2:${ic2_version}:api"
runtime "net.industrial-craft:industrialcraft-2:${ic2_version}"
deobfProvided "mezz.jei:jei_${forgemc_version}:${jei_version}:api"
runtime "mezz.jei:jei_${forgemc_version}:${jei_version}"
}
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 except the mcmod.info
from(sourceSets.main.resources.srcDirs) {
exclude 'mcmod.info'
}
}