generated from LabyMod/1.16.5-addon-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
109 lines (86 loc) · 3.02 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
buildscript {
repositories {
maven { url = 'https://files.minecraftforge.net/maven' }
maven { url = 'https://repo.spongepowered.org/maven' }
maven {
name = 'impactdevelopment-repo'
url = 'https://impactdevelopment.github.io/maven/'
}
jcenter()
mavenCentral()
}
dependencies {
classpath group: 'com.github.ImpactDevelopment', name: 'ForgeGradle', version: '3.0.115'
classpath group: 'com.github.ImpactDevelopment', name: 'MixinGradle', version: '0.6.2'
}
}
plugins {
id 'de.undercouch.download' version '4.0.0'
}
apply plugin: 'net.minecraftforge.gradle'
// Only edit below this line, the above code adds and enables the necessary things for Forge to be setup.
apply plugin: 'org.spongepowered.mixin'
version = '1.0'
group = 'de.raik' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = 'Better Perspective'
sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8' // Need this here so eclipse task generates correctly.
def mcpVersion = [channel: 'snapshot', version: '20201028-1.16.3']
mixin {
defaultObfuscationEnv searge
add sourceSets.main, "better-perspective.refmap.json"
}
minecraft {
mappings mcpVersion
if (getProject().hasProperty("forge")) {
reobfMappings 'searge'
} else {
reobfMappings 'notch'
}
runs {
client {
workingDirectory project.file('run')
main "launch.AddonLauncher"
environment 'assetIndex', '{asset_index}'
environment 'assetDirectory', downloadAssets.output
environment 'nativesDirectory', extractNatives.output
environment 'tweakClass', 'net.labymod.vanilla.LabyModTweaker'
jvmArg('-DdebugMode=true')
jvmArg('-Daddonresources=addon.json')
}
}
}
repositories {
mavenCentral()
maven {
name = "spongepowered"
url = "https://repo.spongepowered.org/maven"
}
maven {
name = 'impactdevelopment-repo'
url = 'https://impactdevelopment.github.io/maven/'
}
mavenLocal()
}
dependencies {
annotationProcessor("org.spongepowered:mixin:0.8.2:processor")
minecraft 'com.github.ImpactDevelopment:Vanilla:1.16.5'
compile(files('libs/lm_api_mc1.16.5.jar'))
compile("org.ow2.asm:asm-analysis:6.2") { transitive = false }
compile("org.ow2.asm:asm-util:6.2") { transitive = false }
compile("org.ow2.asm:asm-commons:6.2") { transitive = false }
compile("org.spongepowered:mixin:0.8.2") { transitive = false }
compile("net.minecraft:launchwrapper:1.12") { transitive = false }
}
jar {
// Excludes the start file
exclude("**/launch")
}
task downloadAPI(type: Download) {
group("labymod")
File libraryDirectory = new File("libs/")
if (!libraryDirectory.exists()) {
libraryDirectory.mkdirs()
}
src "https://dl.labymod.net/latest/api/files/lm_api_mc1.16.5.jar"
dest 'libs/'
}