-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathbuild.gradle.kts
82 lines (72 loc) · 1.84 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
@file:Suppress("UnstableApiUsage")
plugins {
id("java")
alias(libs.plugins.idea.ext)
}
val modName: String by project
val modAuthor: String by project
val modVersion: String by project
val javaVersion: String by project
val javaToolchainVersion: String by project
version = "${libs.versions.minecraft.get()}-$modVersion"
subprojects {
apply(plugin = "java")
java.toolchain.languageVersion = JavaLanguageVersion.of(javaToolchainVersion)
version = rootProject.version
repositories {
mavenCentral()
exclusiveContent {
forRepository {
maven("https://maven.fabricmc.net/")
}
filter {
includeGroupAndSubgroups("net.fabricmc")
includeGroup("fabric-loom")
}
}
exclusiveContent {
forRepository {
maven("https://raw.githubusercontent.com/Fuzss/modresources/main/maven/")
}
filter {
includeGroupAndSubgroups("fuzs")
}
}
maven("https://maven2.bai.lol") {
content {
includeGroup("lol.bai")
includeGroup("mcp.mobius.waila")
}
}
maven("https://www.cursemaven.com") {
content {
includeGroup("curse.maven")
}
}
}
tasks.withType<Jar>().configureEach {
manifest {
attributes(mapOf(
"Specification-Title" to modName,
"Specification-Vendor" to modAuthor,
"Specification-Version" to modVersion,
"Implementation-Title" to project.name,
"Implementation-Version" to "${libs.versions.minecraft.get()}-$modVersion",
"Implementation-Vendor" to modAuthor
))
}
}
tasks.withType<JavaCompile>().configureEach {
options.encoding = "UTF-8"
options.release.set(JavaLanguageVersion.of(javaVersion).asInt())
}
tasks.withType<Javadoc> {
with(options as StandardJavadocDocletOptions) {
addStringOption("Xdoclint:none", "-quiet")
}
}
tasks.withType<AbstractArchiveTask>().configureEach {
isPreserveFileTimestamps = false
isReproducibleFileOrder = true
}
}