This repository has been archived by the owner on Apr 18, 2024. It is now read-only.
generated from LabyMod/1.16.5-addon-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
143 lines (115 loc) · 4 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
131
132
133
134
135
136
137
138
139
140
141
142
143
buildscript {
ext.mcVersion = "1.17.1"
ext.mcPlatform = "fabric"
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 'com.github.ImpactDevelopment:ForgeGradle:3.0.115'
classpath 'com.github.ImpactDevelopment:MixinGradle:0.6.2'
}
}
plugins {
id 'de.undercouch.download' version '4.0.0'
id 'java'
}
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: 'eclipse'
apply plugin: 'maven-publish'
apply plugin: 'org.spongepowered.mixin'
apply plugin: 'java'
compileJava.options.encoding = 'UTF-8'
compileTestJava.options.encoding = 'UTF-8'
javadoc.options.encoding = 'UTF-8'
version = '1.0.0'
group = 'de.finn_tegeler.developing.labymod.cvc' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = 'CvC Addon v2 (without Kotlin)'
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']
configurations {
shade
compile.extendsFrom shade
}
mixin {
defaultObfuscationEnv searge
add sourceSets.main, "example.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()
maven {
url = "https://repo.hypixel.net/repository/Hypixel/"
}
maven {
url 'https://maven.ferenyr.info/artifactory/libs-release'
}
}
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 }
compile("net.hypixel:hypixel-api-transport-apache:4.1")
shade("net.hypixel:hypixel-api-transport-apache:4.1")
compile("com.google.code.gson:gson:2.8.6")
compile("org.yaml:snakeyaml:1.13")
compile("de.cronn:reflection-util:2.7.0")
}
jar {
// Excludes the start file
exclude("**/launch")
configurations.shade.each { dep ->
from(project.zipTree(dep)) {
exclude 'META-INF', 'META-INF/**'
}
}
}
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/")
}