This repository has been archived by the owner on Feb 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
160 lines (131 loc) · 4.18 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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
buildscript {
repositories {
gradlePluginPortal()
mavenCentral()
maven {
name 'JitPack'
url 'https://jitpack.io'
}
maven {
url = 'https://repo.spongepowered.org/maven'
}
maven {
url = 'https://repo.sk1er.club/repository/maven-public'
}
maven {
name = 'forge'
url = 'https://maven.minecraftforge.net/'
}
maven {
url 'https://jitpack.io'
}
}
dependencies {
classpath 'com.github.Skytils:ForgeGradle:41dfce0'
classpath 'com.github.LxGaming:MixinGradle:d75e32e'
classpath 'com.github.jengelman.gradle.plugins:shadow:6.1.0'
}
}
apply plugin: 'java'
apply plugin: 'net.minecraftforge.gradle.forge'
apply plugin: 'org.spongepowered.mixin'
apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: 'maven'
sourceCompatibility = targetCompatibility = JavaVersion.VERSION_1_8
archivesBaseName = 'kokomod'
group = 'io.github.kingstefan26'
version = '1.0.0'
String modid = 'stefan_util'
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
minecraft {
version = '1.8.9-11.15.1.2318-1.8.9'
runDir = 'run'
mappings = 'stable_22'
makeObfSourceJar = false
}
repositories {
mavenCentral()
maven { url 'https://repo.spongepowered.org/maven/' }
maven { url 'https://jitpack.io' }
flatDir {
dirs 'deps'
}
}
dependencies {
implementation 'org.reflections:reflections:0.10.2'
implementation 'me.xdrop:fuzzywuzzy:1.4.0'
implementation 'org.java-websocket:Java-WebSocket:1.5.3'
// https://mvnrepository.com/artifact/de.javawi.jstun/jstun
implementation 'de.javawi.jstun:jstun:0.7.4'
compile 'org.spongepowered:mixin:0.7.11-SNAPSHOT'
testImplementation 'org.junit.jupiter:junit-jupiter:5.9.0'
annotationProcessor 'org.spongepowered:mixin:0.7.11-SNAPSHOT'
implementation 'org.json:json:20220320'
compileOnly 'org.projectlombok:lombok:1.18.24'
annotationProcessor 'org.projectlombok:lombok:1.18.24'
testCompileOnly 'org.projectlombok:lombok:1.18.24'
testAnnotationProcessor 'org.projectlombok:lombok:1.18.22'
compile 'org.jetbrains:annotations:23.0.0'
}
mixin {
add sourceSets.main, 'mixins.' + modid + '.refmap.json'
}
sourceSets {
main {
output.resourcesDir = output.classesDirs.asPath
}
}
jar {
manifest.attributes(
'TweakClass': 'org.spongepowered.asm.launch.MixinTweaker',
'ModSide': 'CLIENT',
'ForceLoadAsMod': true,
'MixinConfigs': 'mixins.stefan_util.json',
'FMLCorePluginContainsFMLMod': true
// 'FMLAT': 'stefans_util_at.cfg'
)
}
shadowJar {
archiveFileName = jar.archiveFileName
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
manifest.attributes(
'FMLCorePlugin': 'io.github.kingstefan26.stefans_util.stefan_utilPlugin'
)
dependencies {
include(dependency('me.xdrop:fuzzywuzzy:1.3.1'))
include(dependency('org.spongepowered:mixin:0.7.11-SNAPSHOT'))
include(dependency('org.reflections:reflections:0.10.2'))
include(dependency('org.apache.commons:commons-lang3'))
include(dependency('net.openhft:compiler:2.21ea80'))
include(dependency('org.jetbrains:annotations:22.0.0'))
}
exclude 'module-info.class'
exclude 'dummyThing'
exclude 'LICENSE.txt'
}
reobfJar.dependsOn tasks.shadowJar
reobf {
shadowJar {
mappingType = 'SEARGE'
}
}
build.dependsOn(shadowJar)
runClient.dependsOn(build)
processResources {
// this will ensure that this task is redone when the versions change.
inputs.property 'version', project.version
inputs.property 'mcversion', project.minecraft.version
// replace stuff in mcmod.info, nothing else
from(sourceSets.main.resources.srcDirs) {
duplicatesStrategy = 'include'
include 'mcmod.info'
// replace version and mcversion
expand 'version': project.version, 'mcversion': project.minecraft.version
}
// // copy everything else, thats not the mcmod.info
// from(sourceSets.main.resources.srcDirs) {
// exclude 'mcmod.info'
// }
}