forked from maruohon/tweakeroo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
130 lines (106 loc) · 3.17 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
buildscript {
repositories {
maven {
name = 'forge'
url = 'https://files.minecraftforge.net/maven'
}
maven {
name = 'sponge'
url = 'https://repo.spongepowered.org/repository/maven-public'
}
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT'
classpath 'org.spongepowered:mixingradle:0.6-SNAPSHOT'
}
}
repositories {
maven {
url 'https://masa.dy.fi/maven'
}
}
apply plugin: 'net.minecraftforge.gradle.liteloader'
apply plugin: 'org.spongepowered.mixin'
minecraft {
version = project.minecraft_version
mappings = project.mappings_version
runDir = 'minecraft'
makeObfSourceJar = false
ext.mod_version = project.mod_version
if (mod_version.endsWith('-dev')) {
mod_version = mod_version + "." + new Date().format('yyyyMMdd.HHmmss')
}
replaceIn 'Reference.java'
replace '@MOD_VERSION@', mod_version
}
dependencies {
deobfCompile "malilib:malilib-liteloader-${project.minecraft_version_out}:${project.malilib_version}:deobf"
}
sourceSets {
main {
ext.refMap = "mixins.${project.mod_id}.refmap.json"
}
}
group = project.mod_id // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "${project.mod_file_name}-${project.minecraft_version_out}"
version = project.minecraft.mod_version
/**
* This section allows you to customise the generated litemod.json file
*/
litemod {
json {
name = project.mod_id
displayName = project.mod_name
mcversion = project.minecraft_version
version = project.minecraft.mod_version
author = project.author
// Uncomment any of the following lines and fill in your own details as required
//requiredAPIs = [ 'someapi' ]
//tweakClass = 'name.of.tweaker.here'
dependsOn = [ 'malilib' ]
mixinConfigs = [ "mixins.${project.mod_id}.json" ]
}
}
/**
* This section allows you to customise your generated jar (litemod) file. By
* default it includes the generated litemod.json file, however if you prefer to
* include your own file from resources, simply remove the line below.
*/
jar {
// Remove the "-mc1.12" suffix from the file name
classifier = ""
// Don't append a 'mod-' filename prefix >_>
baseName = archivesBaseName
from litemod.outputs
/*
manifest.mainAttributes (
'Built-By': System.properties['user.name'],
'Created-By': System.properties['java.vm.version'] + " (" + System.properties['java.vm.vendor'] + ")",
'Implementation-Title': project.mod_id,
'Implementation-Version': project.version
)
*/
}
mixin {
defaultObfuscationEnv notch
}
//tasks.withType(Jar)*.baseName = archivesBaseName
processResources
{
// Exclude the GIMP image files
exclude '**/*.xcf'
exclude '**/xcf'
// this will ensure that this task is redone when the versions change.
inputs.property 'mod_version', project.minecraft.mod_version
inputs.property 'minecraft_version', project.minecraft_version
// replace stuff in mcmod.info, nothing else
from(sourceSets.main.resources.srcDirs) {
include 'mcmod.info'
// replace version and mcversion
expand 'mod_version': project.minecraft.mod_version, 'minecraft_version': project.minecraft_version
}
// copy everything else, thats not the mcmod.info
from(sourceSets.main.resources.srcDirs) {
exclude 'mcmod.info'
}
}