-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
80 lines (68 loc) · 2.76 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
plugins {
id 'fabric-loom' version '1.9-SNAPSHOT'
id 'maven-publish'
}
version = project.mod_version + "+" + stonecutter.current.version
group = project.maven_group
base {
archivesName = project.archives_base_name
}
repositories {
maven { url = "https://maven.parchmentmc.org" }
maven { url = "https://maven.terraformersmc.com/" }
maven { url = "https://maven.wispforest.io/releases/" }
maven { url = "https://maven.shedaniel.me/" }
maven { url = "https://jitpack.io/" }
}
dependencies {
minecraft "com.mojang:minecraft:${stonecutter.current.project}"
mappings loom.layered() {
officialMojangMappings()
parchment("org.parchmentmc.data:parchment-${property("parchment_version")}@zip")
}
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
modImplementation "net.fabricmc.fabric-api:fabric-api:${property("fabric_version")}"
implementation(annotationProcessor("io.github.llamalad7:mixinextras-fabric:${property("mixinextras_version")}"))
include("io.github.llamalad7:mixinextras-fabric:${property("mixinextras_version")}")
modImplementation(include("com.github.ramixin:mixson:${project.mixson_version}"))
modImplementation("com.terraformersmc:modmenu:${property("modmenu_version")}")
annotationProcessor modImplementation("io.wispforest:owo-lib:${property("owo_version")}")
include 'net.objecthunter:exp4j:0.4.8'
implementation 'net.objecthunter:exp4j:0.4.8'
modCompileOnly "dev.emi:emi-fabric:${property("emi_version")}"
modImplementation "me.shedaniel:RoughlyEnoughItems-fabric:${property("rei_version")}"
}
processResources {
inputs.property "version", project.version
inputs.property "minecraft", stonecutter.current.version
inputs.property "loader_version", project.loader_version
filteringCharset "UTF-8"
filesMatching("fabric.mod.json") {
expand "version": project.version,
"minecraft": stonecutter.current.version,
"loader_version": project.loader_version
}
}
def targetJavaVersion = 21
tasks.withType(JavaCompile).configureEach {
it.options.encoding = "UTF-8"
if (targetJavaVersion >= 10 || JavaVersion.current().isJava10Compatible()) {
it.options.release.set(targetJavaVersion)
}
}
java {
def javaVersion = JavaVersion.toVersion(targetJavaVersion)
if (JavaVersion.current() < javaVersion) {
toolchain.languageVersion = JavaLanguageVersion.of(targetJavaVersion)
}
withSourcesJar()
def java = stonecutter.eval(stonecutter.current.version, ">=1.20.5")
? JavaVersion.VERSION_21 : JavaVersion.VERSION_17
targetCompatibility = java
sourceCompatibility = java
}
jar {
from("LICENSE") {
rename { "${it}_${project.archivesBaseName}" }
}
}