-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathbuild.gradle
55 lines (46 loc) · 1.79 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
53
54
55
plugins {
id "maven-publish"
id "idea"
// Adds the Kotlin Gradle plugin
id 'org.jetbrains.kotlin.jvm' version "${kotlin_version}" apply false
id 'org.jetbrains.kotlin.plugin.lombok' version '2.0.20' apply false
id "io.freefair.lombok" version "8.10.2" apply false
id "fabric-loom" version "1.7-SNAPSHOT" apply false
id "net.neoforged.moddev.legacyforge" version "2.0.58-beta" apply false
}
//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 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"
apply plugin: "org.jetbrains.kotlin.jvm"
apply plugin: "org.jetbrains.kotlin.plugin.lombok"
apply plugin: "io.freefair.lombok"
group = rootProject.maven_group
version = "${project.mod_version}-${rootProject.minecraft_version}"
java.toolchain.languageVersion = JavaLanguageVersion.of(17)
compileKotlin {
kotlinOptions.jvmTarget = "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 (isCI) {
def isRELEASE = System.getenv("GITHUB_RELEASE")
if (!isRELEASE){
version = version + "-" + gitHash()
}
println("In CI mode")
}
}