generated from FabricMC/fabric-example-mod
-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathbuild.gradle
55 lines (43 loc) · 1.28 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
plugins {
id "java"
id "maven-publish"
id 'fabric-loom' version '1.7.+'
}
apply plugin: 'fabric-loom'
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
archivesBaseName = rootProject.archives_base_name
version = rootProject.mod_version
group = rootProject.maven_group
repositories {
maven {
url 'https://jitpack.io'
}
}
tasks.withType(JavaCompile).configureEach {
// ensure that the encoding is set to UTF-8, no matter what the system default is
// this fixes some edge cases with special characters not displaying correctly
// see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html
// If Javadoc is generated, this must be specified in that task too.
it.options.encoding = "UTF-8"
}
processResources {
inputs.property "version", project.version
filesMatching("fabric.mod.json") {
expand "version": project.version
}
}
java {
withSourcesJar()
}
repositories {
maven {
url 'https://jitpack.io'
}
}
dependencies {
modImplementation "net.fabricmc:fabric-loader:${rootProject.loader_version}"
modApi "net.fabricmc.fabric-api:fabric-api:${rootProject.fabric_version}"
minecraft "com.mojang:minecraft:${rootProject.minecraft_version}"
mappings("net.fabricmc:yarn:${rootProject.yarn_mappings}:v2")
}