forked from GotoLink/RecipeHandler
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle
62 lines (54 loc) · 1.46 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
buildscript {
repositories {
jcenter()
maven {
url = "http://files.minecraftforge.net/maven"
}
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT'
}
}
apply plugin: 'net.minecraftforge.gradle.forge'
apply plugin: 'eclipse'
apply plugin: 'idea'
def mcversion = "[1.12)"
def javaVer = '1.8'
archivesBaseName = "YARCF"
version = "0.14"
sourceCompatibility = targetCompatibility = javaVer
compileJava {
sourceCompatibility = targetCompatibility = javaVer
}
minecraft {
version = "1.12.2-14.23.4.2745"
runDir = "eclipse"
mappings = "snapshot_20180801"
replace '$version', project.version
replace '$mcversion', mcversion
makeObfSourceJar = false
}
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 text files, not binary ones.
from(sourceSets.main.resources.srcDirs) {
include '**/*.info'
include '**/*.mcmeta'
// replace version and MCVersion
expand 'version': project.version, 'mcversion': mcversion
}
// copy everything else, without expanding placeholders
from(sourceSets.main.resources.srcDirs) {
exclude '**/*.info'
exclude '**/*.mcmeta'
}
}
jar {
//Keep the jar as clean as possible
includeEmptyDirs = false
//Append with minecraft version
classifier = "(${minecraft.version})"
archiveName = "${archivesBaseName}-${version}${classifier}.${extension}"
}