-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathbuild.gradle
157 lines (139 loc) · 4.19 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
buildscript {
repositories {
mavenCentral()
//jcenter()
maven {
name = "forge"
url = "https://maven.minecraftforge.net"
}
}
dependencies {
classpath("com.anatawa12.forge:ForgeGradle:2.3-1.0.+") {
changing = true
}
}
}
repositories {
/*maven {
name 'DVS1 Maven FS'
url 'http://dvs1.progwml6.com/files/maven'
}*/
maven { // CraftTweaker
name 'jared maven'
url "http://maven.blamejared.com/"
}
maven { // TOP
name 'tterrag maven'
url "http://maven.tterrag.com/"
}
/*maven { // compatlayer
name 'K-4u maven'
url "http://maven.k-4u.nl/"
}*/
maven {
url = "https://minecraft.curseforge.com/api/maven/"
}
/*maven {
name 'forge'
url 'https://maven.minecraftforge.net'
}
maven {
name = "CoFH Maven"
url = "http://maven.covers1624.net"
}
maven {
name "AppleCore"
url "http://www.ryanliptak.com/maven/"
}
maven {
name "IC2 Forestry"
url "http://maven.ic2.player.to/"
}*/
maven {
// location of the maven that hosts JEI files
name = "Progwml6 maven"
url = "http://dvs1.progwml6.com/files/maven"
}
maven {
// location of a maven mirror for JEI files, as a fallback
name = "ModMaven"
url = "modmaven.k-4u.nl"
}
maven {
name = "CurseMaven"
url = "https://cursemaven.com"
}
}
apply plugin: 'net.minecraftforge.gradle.forge'
ext.configFile = file "gradle.properties"
configFile.withReader {
// Load config. It shall from now be referenced as simply config or project.config
def prop = new Properties()
prop.load(it)
project.ext.config = new ConfigSlurper().parse prop
}
def getArtifactVersion() {
def branch = ""
def revision = ""
def procGitBranch = "git rev-parse --abbrev-ref HEAD".execute()
procGitBranch.waitFor()
if ( procGitBranch.exitValue() == 0 ) {
branch = procGitBranch.text.trim()
} else {
branch = "ERROR"
}
def procGitRevisionNum = "git rev-parse --short HEAD".execute()
procGitRevisionNum.waitFor()
if ( procGitRevisionNum.exitValue() == 0 ) {
revision = procGitRevisionNum.text.trim()
} else {
revision = ""
}
if ( branch == "master" ) {
revision
} else if ( branch == "development" ) {
"BETA-" + revision
} else {
"SNAPSHOT-" + revision
}
}
version = project.property('minecraft_version') + "-" + project.property('mod_version') + "-" + getArtifactVersion()
group = "growthcraft"
archivesBaseName = "growthcraft"
extractAnnotationsJar.doFirst {
sourceSets.main.output.resourcesDir.listFiles().each {
System.out.println('Resources: ' + it.absolutePath)
}
sourceSets.main.output.classesDir.listFiles().each {
System.out.println('Classes: ' + it.absolutePath)
}
}
sourceCompatibility = targetCompatibility = JavaVersion.VERSION_1_8
compileJava {
sourceCompatibility = targetCompatibility = JavaVersion.VERSION_1_8
}
minecraft {
version = "1.12.2-14.23.5.2847"
runDir = "run"
mappings = "stable_39"
//makeObfSourceJar = false
}
jar.manifest {
attributes 'FMLAT': 'growthcraft_at.cfg'
}
dependencies {
compile "mcjty.theoneprobe:TheOneProbe-1.12:" + project.property('theoneprobe_version')
deobfProvided "mezz.jei:jei_" + project.property('minecraft_version') + ":" + project.property('jei_version') + ":api"
compile "curse.maven:rustic-256141:3107974"
compile "thaumcraft:Thaumcraft:" + project.property('minecraft_version') + ":" + project.property('thaumcraft_version')
compile "curse.maven:hwyla-253449:2568751"
compile "curse.maven:baubles-227083:2518667"
compile "curse.maven:crafttweaker-239197:5013567"
runtime "mezz.jei:jei_" + project.property('minecraft_version') + ":" + project.property('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
}
sourceSets { sourceSets -> main }