-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathbuild.gradle
More file actions
123 lines (102 loc) · 3.08 KB
/
build.gradle
File metadata and controls
123 lines (102 loc) · 3.08 KB
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
buildscript {
repositories {
mavenCentral()
maven {
url = "https://maven.minecraftforge.net/"
}
maven {
url = "https://repo.spongepowered.org/repository/maven-public/"
}
maven {
url = "https://repo.viaversion.com"
}
maven {
url = "https://jitpack.io/"
}
}
dependencies {
classpath "net.minecraftforge.gradle:ForgeGradle:2.1-SNAPSHOT"
classpath "org.spongepowered:mixingradle:0.6-SNAPSHOT"
classpath "com.github.johnrengelman.shadow:com.github.johnrengelman.shadow.gradle.plugin:4.0.4"
}
}
apply plugin: "java"
apply plugin: "idea"
apply plugin: "net.minecraftforge.gradle.forge"
apply plugin: "org.spongepowered.mixin"
apply plugin: "com.github.johnrengelman.shadow"
group = project.maven_group
archivesBaseName = project.maven_name
version = project.maven_version
compileJava.options.encoding = "UTF-8"
repositories {
mavenCentral()
maven { url = "https://maven.minecraftforge.net/" }
maven { url = "https://repo.spongepowered.org/repository/maven-public/" }
maven { url = "https://repo.viaversion.com" }
maven { url = "https://jitpack.io/" }
}
minecraft {
version = "1.8.9-11.15.1.2318-1.8.9"
runDir = "run"
mappings = "stable_22"
makeObfSourceJar = false
clientJvmArgs += ["-Dfml.coreMods.load=net.aspw.viaforgeplus.mixin.MixinLoader"]
}
sourceSets {
main.java.srcDirs += 'src/main/java'
main.java.srcDirs += '../shared/main/java'
main.resources.srcDirs += '../shared/main/resources'
}
configurations {
include
implementation.extendsFrom(include)
}
dependencies {
include fileTree(dir: "output", include: "*.jar")
include "com.squareup.okhttp3:okhttp:4.9.2"
include "org.slf4j:slf4j-api:2.0.16"
include compile ("org.spongepowered:mixin:${project.mixin_version}") {
exclude module: "launchwrapper"
}
}
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
processResources {
from(sourceSets.main.resources.srcDirs) {
exclude "mcmod.info"
}
rename '(.+_at.cfg)', 'META-INF/$1'
}
mixin {
add sourceSets.main, "mixins.${maven_name}.refmap.json"
}
jar {
manifest.attributes(
"MixinConfigs": "mixins.${maven_name}.json",
"TweakClass": "org.spongepowered.asm.launch.MixinTweaker",
"TweakOrder": 0,
"FMLCorePlugin": "net.aspw.viaforgeplus.mixin.MixinLoader",
"FMLCorePluginContainsFMLMod": "true",
"ForceLoadAsMod": "true",
"FMLAT": "viaforgeplus_at.cfg",
)
enabled = false
}
idea {
module {
inheritOutputDirs = true
}
}
shadowJar {
archiveName = jar.archiveName
configurations = [project.configurations.include] // Include the dependencies from the include configuration
duplicatesStrategy DuplicatesStrategy.EXCLUDE
// Prevent conflicts with Forge's weird service loading
exclude("META-INF/maven/**")
exclude("META-INF/versions/**")
}
reobf {
shadowJar {}
}
jar.dependsOn("shadowJar")