-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
39 lines (32 loc) · 1.18 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
plugins {
id "maven-publish"
id "idea"
}
//Print out JVM information so that we know what version is running. Extreamly useful for people to know when helping you.
println('Java: ' + System.getProperty('java.version') + ' JVM: ' + System.getProperty('java.vm.version') + '(' + System.getProperty('java.vendor') + ') Arch: ' + System.getProperty('os.arch'))
def isCI = System.getenv("GITHUB_ACTION")
def isRELEASE = System.getenv("GITHUB_RELEASE")
static 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()
}
if (isCI) {
if (!isRELEASE){
version = version + "-" + gitHash()
println("Not in CI Release mode")
}
println("In CI mode")
}
}