generated from FabricMC/fabric-example-mod
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
67 lines (51 loc) · 1.65 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
plugins {
id 'java'
id 'maven-publish'
id 'fabric-loom' version '1.0-SNAPSHOT'
}
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
archivesBaseName = project.archives_base_name
version = project.mod_version
group = project.maven_group
java {
withSourcesJar()
}
tasks.withType(JavaCompile).configureEach {
it.options.encoding = "UTF-8"
it.options.release.set(17)
}
repositories {
maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
maven { url 'https://jitpack.io' } // MixinExtras
mavenCentral()
}
dependencies {
minecraft "com.mojang:minecraft:${project.minecraft_version}"
mappings loom.officialMojangMappings()
modImplementation("net.fabricmc:fabric-loader:${project.loader_version}")
implementation "com.github.LlamaLad7:MixinExtras:${project.mixin_extras_version}"
annotationProcessor("com.github.LlamaLad7:MixinExtras:${project.mixin_extras_version}")
modImplementation "me.lucko:fabric-permissions-api:${project.fabric_permissions_version}"
modImplementation "com.github.Fallen-Breath:conditional-mixin:${project.conditional_mixin_version}"
Set<String> apiModules = [
'fabric-command-api-v1'
]
apiModules.forEach {
modImplementation(fabricApi.module(it, project.fabric_version))
}
}
processResources {
inputs.property "version", version
filesMatching("fabric.mod.json") {
expand "version": version
}
}
loom {
accessWidenerPath.set(file("src/main/resources/vanilla-permissions.accesswidener"))
}
jar {
from("LICENSE") {
rename { "${it}_${project.archivesBaseName}" }
}
}