-
Notifications
You must be signed in to change notification settings - Fork 5
/
build.gradle
72 lines (66 loc) · 2.08 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
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 from: 'build-common.gradle'
sourceCompatibility = targetCompatibility = 1.8
group = project.package_base
archivesBaseName = "${project.name}-${project.mc_version}"
def coremodBaseName = "${project.name}Core-${project.mc_version}"
version = project.mod_version
task coreJar(type: Jar) {
from(sourceSets.main.output) {
include "teamrtg/passableleaves/asm/**"
}
from(sourceSets.main.resources) {
include "assets/passableleaves/logo.png"
}
setBaseName coremodBaseName
setVersion project.coremod_version
manifest {
attributes ([
"FMLCorePlugin": "teamrtg.passableleaves.asm.PassableLeavesCore",
"Maven-Artifact": "${project.group}:${coremodBaseName}:${project.coremod_version}"
])
}
}
jar {
exclude "teamrtg/passableleaves/asm/**"
from(coreJar.archivePath.absolutePath) {}
manifest {
attributes([
"FMLAT": "passableleaves_at.cfg",
"ContainedDeps": coreJar.archivePath.name,
"Maven-Artifact": "${project.group}:${archivesBaseName}:${project.version}"
])
}
dependsOn coreJar
}
minecraft {
version = project.mcf_version
mappings = project.mcp_mappings
runDir = "run"
makeObfSourceJar = false
replace "@MOD_VERSION@", project.version
replaceIn "PassableLeaves.java"
replace "@COREMOD_VERSION@", project.coremod_version
replace "@ACCEPTABLE_MC_VER_RANGE@", project.acceptable_mc_ver_range
replaceIn "PassableLeavesCore.java"
}
processResources {
from(sourceSets.main.resources.srcDirs) {
include "mcmod.info"
expand ([
"version" : project.mod_version,
"mcversion" : project.mc_version
])
}
from(sourceSets.main.resources.srcDirs) {exclude "mcmod.info"}
rename "(.+_at.cfg)", "META-INF/\$1"
}