-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
93 lines (75 loc) · 2.02 KB
/
Copy pathbuild.gradle.kts
File metadata and controls
93 lines (75 loc) · 2.02 KB
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
plugins {
alias(libs.plugins.fabric.loom)
}
base {
archivesName = properties["archives_base_name"] as String
group = properties["maven_group"] as String
version = libs.versions.mod.version.get()
}
repositories {
maven {
name = "meteor-maven"
url = uri("https://maven.meteordev.org/releases")
}
maven {
name = "meteor-maven-snapshots"
url = uri("https://maven.meteordev.org/snapshots")
}
mavenCentral()
}
val modInclude: Configuration by configurations.creating
configurations {
implementation.configure { extendsFrom(modInclude) }
include.configure { extendsFrom(modInclude) }
}
dependencies {
// Fabric
minecraft(libs.minecraft)
implementation(libs.fabric.loader)
// Meteor
implementation(libs.meteor.client)
// HTTP client for downloading addons
modInclude(libs.okhttp)
include(libs.okio)
include(libs.kotlin.stdlib)
// JSON parsing
modInclude(libs.gson)
// Testing
testImplementation(libs.junitApi)
testImplementation(libs.junitParams)
testRuntimeOnly(libs.junitEngine)
testRuntimeOnly(libs.junitLauncher)
}
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(libs.versions.jdk.get().toInt()))
}
}
tasks {
processResources {
val propertyMap = mapOf(
"version" to project.version,
"mc_version" to libs.versions.minecraft.get()
)
inputs.properties(propertyMap)
filteringCharset = "UTF-8"
filesMatching("fabric.mod.json") {
expand(propertyMap)
}
}
jar {
inputs.property("archivesName", project.base.archivesName.get())
from("LICENSE") {
rename { "${it}_${inputs.properties["archivesName"]}" }
}
}
withType<JavaCompile> {
options.encoding = "UTF-8"
options.release = 25
options.compilerArgs.add("-Xlint:deprecation")
options.compilerArgs.add("-Xlint:unchecked")
}
test {
useJUnitPlatform()
}
}