-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
91 lines (78 loc) · 2.53 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
buildscript {
repositories {
maven { url = 'https://maven.minecraftforge.net' }
maven { url = 'https://jitpack.io' }
mavenCentral()
}
dependencies {
classpath("com.github.GregTechCE:ForgeGradle:FG_2.3-SNAPSHOT"){
changing = true
}
}
}
apply plugin: 'java'
apply plugin: 'net.minecraftforge.gradle.forge'
// Fetch version from source because having to write version in two separate place is dumb
version = getVersionFromSource()
String getVersionFromSource(){
File file = file("src/main/java/tictim/ceu/CeuMod.java")
String version = file.find { String s->
return s.contains("String VERSION")
}
return version.substring(version.indexOf('"')+1, version.lastIndexOf('"'))
}
group = "tictim.ceu"
archivesBaseName = "CEU-1.12.2"
compileJava.options.encoding = 'UTF-8'
sourceCompatibility = targetCompatibility = '1.8' // Need this here so eclipse task generates correctly.
compileJava {
sourceCompatibility = targetCompatibility = '1.8'
}
minecraft {
version = "1.12.2-14.23.5.2847"
runDir = "run"
mappings = "stable_39"
makeObfSourceJar = false
}
repositories {
maven {
name = "ChickenBones maven"
url = "https://chickenbones.net/maven/"
}
maven {
name = "Progwml6 maven"
url = "https://dvs1.progwml6.com/files/maven/"
}
maven {
name = "CurseForge"
url = "https://minecraft.curseforge.com/api/maven"
}
maven {
name = "ModMaven"
url = "https://modmaven.k-4u.nl"
}
}
dependencies {
deobfCompile "gregtechce:gregtech:1.12.2:1.17.1.770"
deobfCompile "codechicken-lib-1-8:CodeChickenLib-1.12.2:3.2.3.358:universal"
deobfCompile "gregicality:Gregicality:1.12.2:0.23.1"
// compile against the JEI API but do not include it at runtime
compileOnly "mezz.jei:jei_1.12.2:4.15.0.268:api"
// at runtime, use the full JEI jar
runtimeOnly "mezz.jei:jei_1.12.2:4.15.0.268"
}
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'
}
}