-
Notifications
You must be signed in to change notification settings - Fork 6
/
build.gradle
52 lines (43 loc) · 1.59 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
import net.fabricmc.loom.task.RemapJarTask
plugins {
alias libs.plugins.architectury
alias libs.plugins.architectury.loom
// alias libs.plugins.vineFlower // VineFlower, a better decompiler
alias libs.plugins.machete // automatic jar compressing on build
alias libs.plugins.shadow
// Adds the Kotlin Gradle plugin
alias libs.plugins.kotlin.jvm
// OPTIONAL Kotlin Serialization plugin
alias libs.plugins.kotlin.plugin
}
apply plugin: "dev.architectury.loom"
apply plugin: "java"
apply plugin: "architectury-plugin"
apply plugin: "maven-publish"
apply plugin: "org.jetbrains.kotlin.jvm"
apply plugin: "org.jetbrains.kotlin.plugin.serialization"
architectury {
compileOnly()
minecraft = libs.versions.minecraft
}
tasks.register('remapSlimJar', RemapJarTask) {
dependsOn(jar)
inputFile.set jar.archiveFile
}
group = maven_group
// Formats the mod version to include the loader, Minecraft version, and build number (if present)
String buildNumber = System.getenv("GITHUB_ACTION_NUMBER")
version = "${mod_version}" + (buildNumber != null ? "-build_${System.getenv("GITHUB_RUN_NUMBER")}" : "")
apply from: "$rootDir/gradle/scripts/architectury_loom.gradle"
apply from: "$rootDir/gradle/scripts/repositories.gradle"
apply from: "$rootDir/dependencies.gradle"
apply from: "$rootDir/gradle/scripts/resources.gradle"
apply from: "$rootDir/gradle/scripts/jars.gradle"
apply from: "$rootDir/gradle/scripts/publishing.gradle"
tasks.withType(JavaCompile).configureEach {
options.encoding = "UTF-8"
}
machete {
// disable machete locally for faster builds
enabled = false
}