-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathbuild.gradle
95 lines (78 loc) · 2.38 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
buildscript {
repositories {
jcenter()
maven {
name = "forge"
url = "http://files.minecraftforge.net/maven"
}
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:2.0-SNAPSHOT'
}
}
apply plugin: 'net.minecraftforge.gradle.forge'
version = "0.0.2"
group= "uk.co.haxyshideout.ChocoCraft2" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "ChocoCraft2"
idea { module { inheritOutputDirs = true } }
configurations {
shade
compile.extendsFrom shade
}
minecraft {
version = "1.8-11.14.3.1550"
runDir = "run"
mappings = "snapshot_20151106"
}
reobfJar {
addExtraSrgLine "PK: ninja/leaping uk/co/haxyshideout/shaded/ninja/leaping"
}
repositories {
mavenCentral()
maven {
url 'http://oss.sonatype.org/content/repositories/snapshots'
}
}
dependencies {
shade 'ninja.leaping.configurate:configurate-hocon:2.0.1-SNAPSHOT'
compile 'org.projectlombok:lombok:1.16.6'
}
processResources
{
// replace stuff in mcmod.info, nothing else
from(sourceSets.main.resources.srcDirs) {
include 'mcmod.info'
// replace version and mcversion
expand 'version':project.version, 'mcversion':project.minecraft.version, 'fversion':"Forge 10.13.2.1230;Forge 10.13.0.1208;Forge 10.13.0.1180"
}
// copy everything else, thats not the mcmod.info
from(sourceSets.main.resources.srcDirs) {
exclude 'mcmod.info'
}
from(sourceSets.main.allSource) {
include '**/*.data'
include '**/*.schematic'
}
}
// this sets our output jar to have a 'tag' of 'universal' on it
// It also adds the minecraft version in a custom version name
// The result is files named <projectname>-<mcversion>-<version>-universal.jar
jar {
includeEmptyDirs = false
classifier = 'universal'
version = "${project.minecraft.version}-${project.version}"
configurations.shade.each { dep ->
from(project.zipTree(dep)){
exclude 'META-INF', 'META-INF/**'
}
}
}
// Add in an mcp named jar, for those who wish to run in a development environment (assuming mcp naming matches)
task deobfJar(type: Jar) {
from sourceSets.main.output
classifier = 'deobf'
version = "${project.minecraft.version}-${project.version}"
}
artifacts{
archives sourceJar, deobfJar
}