This repository was archived by the owner on May 25, 2026. It is now read-only.
forked from bschoenmaeckers/MenuMobs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
89 lines (75 loc) · 2.08 KB
/
Copy pathbuild.gradle
File metadata and controls
89 lines (75 loc) · 2.08 KB
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
buildscript {
repositories {
jcenter()
maven {
name = "forge"
url = "http://files.minecraftforge.net/maven"
}
maven {
name = "sonatype"
url = "https://oss.sonatype.org/content/repositories/snapshots/"
}
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT'
}
}
plugins {
id "net.minecraftforge.gradle.forge" version "2.0.2"
}
apply plugin: "net.minecraftforge.gradle.forge"
apply plugin: "maven"
apply plugin: 'idea'
idea {
module {
inheritOutputDirs = true
}
}
compileJava.options.encoding = 'UTF-8'
// define the properties file
ext.configFile = file "build.properties"
configFile.withReader {
// read config. it shall from now on be referenced as simply config or as project.config
def prop = new Properties()
prop.load(it)
project.ext.config = new ConfigSlurper().parse prop
}
group = config.group_name
version = "${config.minecraft_version}-${config.mod_version}"
archivesBaseName = "${config.mod_id}"
sourceCompatibility = 1.8
targetCompatibility = 1.8
minecraft {
version = config.minecraft_version + "-" + config.forge_version //+ "-1.10.0" // grab latest forge
mappings = config.mappings_version
runDir = "run"
replace '@MOD_VERSION@', config.mod_version
replace '@MINECRAFT_VERSION@', config.minecraft_version
}
processResources {
// replace stuff in the files we want.
from(sourceSets.main.resources.srcDirs) {
include '**/*.info'
include '**/*.properties'
// replaces
expand ([
'mod_version': config.mod_version,
'forge_version': config.forge_version,
'minecraft_version': config.minecraft_version,
])
}
// copy everything else that we didnt do before
from(sourceSets.main.resources.srcDirs) {
exclude '**/*.info'
exclude '**/*.properties'
}
}
// Add Access Transformers Manifest
jar {
manifest {
attributes 'FMLAT': 'MenuMobs_at.cfg'
}
}
dependencies {
compile files('libs/')
}