forked from SpongePowered/SpongeForge
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
96 lines (79 loc) · 2.7 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
// Gradle plugins
buildscript {
repositories {
jcenter()
maven {
name = 'forge'
url = 'http://files.minecraftforge.net/maven'
}
maven {
name = 'sponge'
url = 'http://repo.spongepowered.org/maven'
}
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:2.1-SNAPSHOT'
classpath('nl.javadude.gradle.plugins:license-gradle-plugin:0.11.0') {
exclude module: 'guava'
}
classpath 'com.github.jengelman.gradle.plugins:shadow:1.2.2'
classpath 'org.spongepowered:spongegradle:0.2-SNAPSHOT'
classpath 'org.spongepowered:mixingradle:0.2-SNAPSHOT'
}
}
apply plugin: 'net.minecraftforge.gradle.forge'
apply plugin: 'org.spongepowered.mixin'
ext.minecraftPlugin = plugins.getPlugin('net.minecraftforge.gradle.forge')
ext.DIR_MCP_MAPPINGS = net.minecraftforge.gradle.common.Constants.DIR_MCP_MAPPINGS
// Forge Version
ext.forgeBuild = '1694'
minecraft {
forgeVersion = forgeBuild
coreMod = 'org.spongepowered.mod.SpongeCoremod'
}
// Apply shared implementation Gradle config
apply from: project(':SpongeCommon').file('gradle/implementation.gradle')
version = "$minecraft.version-$forgeBuild-$apiVersion-$buildNumber"
compileJava {
options.compilerArgs += [ "-Atokens=FORGE=$forgeBuild;FML=$forgeBuild" ]
}
jar {
exclude 'log4j2.xml' // log4j2 configuration is for the development workspace only
manifest {
attributes(
'Main-Class': 'org.spongepowered.launch.Main',
'TargetForgeBuild': forgeBuild,
'TargetForgeVersion': minecraft.forgeVersion,
'FMLCorePlugin': 'org.spongepowered.mod.SpongeCoremod',
'TweakClass': 'org.spongepowered.asm.launch.MixinTweaker',
'TweakOrder': 0
)
}
}
processResources {
from('src/main/resources') {
include 'mcmod.info'
expand(
version: project.version,
url: project.url,
minecraftVersion: minecraft.version,
forgeVersion: minecraft.forgeVersion
)
}
}
shadowJar {
exclude 'log4j2.xml' // log4j2 configuration is for the development workspace only
// Temporarily relocate and shade to avoid confict with forge. TODO: Remove when Forge updates to 1.3.0
relocate('com.typesafe.config', 'configurate.typesafe.config')
dependencies {
include dependency('com.typesafe:config')
// This is not available on the client so we need to shade it
include dependency('com.google.code.findbugs:jsr305')
}
}
reobf {
jar {
extraFiles 'extraSrg.srg'
}
}
apply from: 'changelog.gradle'