-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
124 lines (104 loc) · 3.04 KB
/
build.gradle.kts
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
@file:Suppress("UnstableApiUsage")
import com.google.protobuf.gradle.*
plugins {
alias(libs.plugins.fabric.loom)
alias(libs.plugins.protobuf)
`java-library`
}
group = "io.pyke.vitri"
version = "2.0.0"
description = "A Minecraft mod for simulating autonomous agents."
repositories {
mavenCentral()
maven("https://maven.parchmentmc.org")
maven("https://maven.shedaniel.me/")
maven("https://maven.terraformersmc.com/releases")
}
val includeImplementation by configurations.registering
val includeRuntimeOnly by configurations.registering
configurations {
implementation.get().extendsFrom(includeImplementation.get())
runtimeOnly.get().extendsFrom(includeRuntimeOnly.get())
include.get().extendsFrom(includeImplementation.get(), includeRuntimeOnly.get())
}
dependencies {
minecraft(libs.fabric.minecraft)
mappings(loom.layered {
officialMojangMappings()
parchment(
libs.fabric.parchment.map { parchment ->
parchment.apply {
artifact {
type = "zip" // Parchment is dumb and needs to use a non-standard artifact extension
}
}
}
)
})
modImplementation(libs.fabric.loader)
modImplementation(libs.fabric.api)
modImplementation(libs.modmenu)
modImplementation(libs.cloth.config) {
exclude("net.fabricmc.fabric-api")
}
compileOnly(libs.tomcat.annotations)
includeImplementation(libs.grpc.api)
includeImplementation(libs.grpc.core)
includeImplementation(libs.grpc.context)
includeImplementation(libs.grpc.stub)
includeImplementation(libs.grpc.services)
includeImplementation(libs.grpc.protobuf)
includeImplementation(libs.grpc.protobuf.lite)
includeImplementation(libs.grpc.netty.shaded)
includeImplementation(libs.protobuf.java)
includeRuntimeOnly(libs.perfmark.api)
}
loom {
accessWidenerPath = file("src/main/resources/finorza.accesswidener")
}
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}
protobuf {
protoc {
artifact = "com.google.protobuf:protoc:${libs.versions.protobuf.get()}"
}
plugins {
id("grpc") {
artifact = "io.grpc:protoc-gen-grpc-java:${libs.versions.grpc.get()}"
}
}
generateProtoTasks {
all().forEach { task ->
task.plugins {
id("grpc")
}
task.builtins {
id("python")
}
}
}
}
tasks {
compileJava {
options.encoding = Charsets.UTF_8.name()
}
processResources {
val props = mapOf(
"name" to project.name,
"version" to project.version,
"description" to project.description
)
inputs.properties(props)
filesMatching("fabric.mod.json") {
expand(props)
}
}
build {
dependsOn(processResources)
}
}