forked from Asek3/Oculus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
106 lines (89 loc) · 2.81 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
plugins {
id "java-library"
id "com.gtnewhorizons.retrofuturagradle" version "1.3.26"
id 'com.github.johnrengelman.shadow' version '7.1.2'
}
archivesBaseName = "${project.mod_id}-mc${project.minecraft_version}-${project.mod_version}"
// Set the toolchain version to decouple the Java we run Gradle with from the Java used to compile and run the mod
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(8))
// Azul covers the most platforms for Java 8 toolchains, crucially including MacOS arm64
vendor.set(org.gradle.jvm.toolchain.JvmVendorSpec.AZUL)
}
}
minecraft {
mcVersion.set(minecraft_version)
username.set("Developer")
injectedTags.put("MOD_VERSION", mod_version)
injectedTags.put("MOD_NAME", "Vintagium")
}
tasks.injectTags.outputClassName.set("${mod_base_package}.Tags")
tasks.deobfuscateMergedJarToSrg.configure {accessTransformerFiles.from("src/main/resources/META-INF/oculus_at.cfg")}
repositories {
mavenLocal()
maven { url "https://maven.cleanroommc.com" }
maven {
name 'SpongePowered Maven'
url 'https://repo.spongepowered.org/maven'
}
maven {
name = "CurseForge"
url = "https://cursemaven.com"
content {
includeGroup "curse.maven"
}
}
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
content {
includeGroup "maven.modrinth"
}
}
}
dependencies {
def mixinBooter = modUtils.enableMixins("zone.rong:mixinbooter:8.9", "oculus-mixins-refmap.json")
api (mixinBooter) {
transitive = false
}
annotationProcessor "org.ow2.asm:asm-debug-all:5.2"
annotationProcessor "com.google.guava:guava:32.1.2-jre"
annotationProcessor "com.google.code.gson:gson:2.8.9"
annotationProcessor (mixinBooter) {
transitive = false
}
//modCompileOnly "maven.modrinth:rubidium:0.2.13"
implementation(shadow(project(path: ":glsl-relocated", configuration: "bundledJar"))) {
transitive = false
}
implementation(shadow("org.anarres:jcpp:1.4.14")) {
transitive = false
}
shadow("org.slf4j:slf4j-api:1.7.12") // for jcpp
implementation fileTree(dir: 'libs', include: ['*.jar'])
}
processResources {
filesMatching("mcmod.info") { fcd ->
fcd.expand(
'mod_id': project.mod_id,
'mod_name': project.mod_name,
'mod_version': project.mod_version,
'mod_description': project.mod_description,
'minecraft_version': project.minecraft_version
)
}
}
shadowJar {
configurations = [project.configurations.shadow]
from jar.archiveFile
relocate 'org.apache.commons.collections4', 'oculus.org.apache.commons.collections4'
relocate 'org.anarres.cpp', 'oculus.org.anarres.cpp'
relocate 'org.slf4j', 'oculus.org.slf4j'
archiveClassifier.set "shadow"
manifest {
attributes(
'Main-Class': 'net.coderbot.iris.LaunchWarn'
)
}
}