-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
145 lines (125 loc) · 4.77 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
import com.mmodding.gradle.api.EnvironmentTarget
plugins {
id 'fabric-loom' version '1.7-SNAPSHOT'
id 'com.mmodding.gradle' version '0.0.9'
id 'maven-publish'
}
version = project.mod_version
group = project.maven_group
base {
archivesName = project.archives_base_name
}
repositories {
// Add repositories to retrieve artifacts from in here.
// You should only use this when depending on other mods because
// Loom adds the essential maven repositories to download Minecraft and libraries from automatically.
// See https://docs.gradle.org/current/userguide/declaring_repositories.html
// for more information about repositories.
maven { url 'https://jitpack.io' }
maven { url 'https://maven.cafeteria.dev/releases' }
exclusiveContent {
forRepository {
maven { url 'https://api.modrinth.com/maven' }
}
filter {
includeGroup "maven.modrinth"
}
}
}
dependencies {
// To change the versions see the gradle.properties file
minecraft "com.mojang:minecraft:${project.minecraft_version}"
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
// MixinExtras
include(implementation(annotationProcessor("io.github.llamalad7:mixinextras-fabric:0.3.2")))
// Fabric API
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
// env.json
modImplementation "com.mmodding:env.json:${project.env_json_version}"
// sodium-fabric, needed for compatibility
modImplementation "maven.modrinth:sodium:${project.sodium_version}"
// Axiom is an All Rights Reserved project which is under its own eula (https://axiom.moulberry.com/eula)
// I received an explicit permission from Moulberry (current Axiom maintainer) to access and use Axiom's code by Modrinth Maven for that project
// as long I'm using it to create and keep compatibility - still not working currently => will take more time before being done
modCompileOnly "maven.modrinth:axiom:${project.axiom_version}"
modCompileOnly "com.github.moulberry:AxiomClientAPI:1.0.5.3"
}
loom {
accessWidenerPath = file("src/main/resources/env_driven_assets.accesswidener")
}
mmodding {
configureFabricModJson {
namespace = "env_driven_assets"
name = "Environment Driven Assets"
description = "Environment Driven Assets is a FabricMC mod which implements the env.json library in order to apply it on vanilla asset types."
addAuthor("MModding Team")
addContributor("FirstMegaGame4")
withContact {
it.homepage = "https://modrinth.com/mod/env-driven-assets"
it.sources = "https://github.com/MModding/env-driven-assets"
it.issues = "https://github.com/MModding/env-driven-assets/issues"
}
license = "Code: PolyForm-Shield-1.0.0\\nAssets: All Rights Reserved"
icon = "assets/env_driven_assets/icon.png"
environment = EnvironmentTarget.ANY
withEntrypoints {
it.client("com.mmodding.env.driven.assets.client.EnvironmentDrivenAssets")
}
accessWidener = "env_driven_assets.accesswidener"
addMixin("env_driven_assets.mixins.json")
withDependencies {
it.fabricLoaderVersion = ">=" + project.loader_version
it.minecraftVersion = ">=" + project.minecraft_version
it.javaVersion = ">=" + 21
it.fabricApiVersion = "*"
it.addDependency("env_json", ">=" + project.env_json_version + "-")
}
withSuggestions {
it.addDependency("env_driven_data", "*")
}
withInjectedInterfaces {
it.injectTo("net/minecraft/class_1087", "com/mmodding/env/driven/assets/client/injected/BakedModelRedirection")
it.injectTo("net/minecraft/class_1088", "com/mmodding/env/driven/assets/client/injected/ManagerContainer")
it.injectTo("net/minecraft/class_1092", "com/mmodding/env/driven/assets/client/injected/ManagerContainer")
}
withParent("env_json")
}
}
processResources {
inputs.property "version", project.version
filesMatching("fabric.mod.json") {
expand "version": project.version
}
}
tasks.withType(JavaCompile).configureEach {
it.options.release = 21
}
java {
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
// if it is present.
// If you remove this line, sources will not be generated.
withSourcesJar()
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}
jar {
from("LICENSE.md") {
rename { "${it}_${project.base.archivesName.get()}"}
}
}
// configure the maven publication
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
}
}
// See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
repositories {
// Add repositories to publish to here.
// Notice: This block does NOT have the same function as the block in the top level.
// The repositories here will be used for publishing your artifact, not for
// retrieving dependencies.
}
}