-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathbuild.gradle
36 lines (31 loc) · 991 Bytes
/
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
plugins {
id "maven-publish"
id "idea"
id "fabric-loom" version "1.7-SNAPSHOT" apply false
id "net.neoforged.moddev.legacyforge" version "2.0.58-beta" apply false
}
def isGITHU_ACTION = System.getenv("GITHUB_ACTION")
def gitHash() {
String hash = System.getenv("GITHUB_SHA")
if (hash != null) return hash.substring(0,8)
return ""
}
subprojects {
apply plugin: "maven-publish"
apply plugin: "java"
apply plugin: "idea"
group = rootProject.maven_group
version = "${project.mod_version}-${rootProject.minecraft_version}"
java.toolchain.languageVersion = JavaLanguageVersion.of(17)
apply from: 'https://raw.githubusercontent.com/GregTech-Intergalactical/GradleSripts/main/repositories.gradle'
java {
withSourcesJar()
}
tasks.withType(JavaCompile).configureEach {
it.options.encoding = 'UTF-8'
}
if (isGITHU_ACTION) {
version = version + "-" + gitHash()
println("In CI mode")
}
}