-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathbuild.gradle
152 lines (133 loc) · 5.73 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
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
plugins {
id "maven-publish"
id "idea"
// Adds the Kotlin Gradle plugin
id "io.freefair.lombok" version "8.10.2" apply false
id "net.neoforged.moddev.legacyforge" version "2.0.78" apply false
}
apply plugin: "net.neoforged.moddev.legacyforge"
//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'))
archivesBaseName = "${project.archive_base_name}"
def isCI = System.getenv("GITHUB_ACTION")
def gitHash() {
String hash = System.getenv("GITHUB_SHA")
if (hash != null) return hash.substring(0,8)
return ""
}
allprojects {
apply plugin: "maven-publish"
apply plugin: "java"
apply plugin: "idea"
apply plugin: "io.freefair.lombok"
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 (isCI) {
def isRELEASE = System.getenv("GITHUB_RELEASE")
if (!isRELEASE){
version = version + "-" + gitHash()
}
println("In CI mode")
}
}
legacyForge {
version = "${project.minecraft_version}-${project.forge_version}"
parchment {
minecraftVersion = project.minecraft_version
mappingsVersion = project.mappings_version
}
runs {
client {
client()
}
data {
data()
}
server {
server()
}
}
mods {
"${mod_id}" {
sourceSet sourceSets.main
}
}
}
mixin {
add sourceSets.main, "gt4r.refmap.json"
config "gt4r.mixins.json"
config "antimatter.mixins.json"
config "antimatter.rei.mixins.json"
}
dependencies {
//subprojects
implementation(project(path: ":tesseract-forge"))
compileOnly(project(path: ":tesseract-common"))
implementation(project(path: ":GT-Lib"))
//antimatter deps
implementation 'org.apache.commons:commons-collections4:4.4'
implementation("org.jetbrains:annotations:26.0.1")
//modCompileOnly("mezz.jei:jei-${rootProject.minecraft_version}-forge:${rootProject.jei_version}")
//modRuntimeOnly("mezz.jei:jei-${rootProject.minecraft_version}-forge:${rootProject.jei_version}")
modImplementation("mezz.jei:jei-1.18.2:9.7.2.1001")
modCompileOnly("me.shedaniel:RoughlyEnoughItems-forge:${project.rei_version}")
modCompileOnly("me.shedaniel.cloth:cloth-config-forge:6.5.133")
modImplementation("com.blamejared.crafttweaker:CraftTweaker-forge-1.18.2:${project.crafttweaker_version}")
modImplementation("dev.trinsdar:arrp-forge:0.6.7.1")
modImplementation("dev.trinsdar:terraform-utils-v1:3.1.5")
modImplementation("org.gt-reimagined:structurelib-forge:${project.structurelib_version}-${project.minecraft_version}")
modImplementation("com.teamresourceful.resourcefullib:resourcefullib-forge-1.18.2:${project.resourcefullib_version}")
modImplementation("maven.modrinth:carbon-config:${project.carbon_config_forge_version}")
modImplementation("dev.latvian.mods:kubejs-forge:${project.kubejs_version}")
modImplementation("dev.latvian.mods:rhino-forge:${project.rhino_version}")
modImplementation("dev.architectury:architectury-forge:${project.architectury_version}")
modRuntimeOnly("com.blamejared.crafttweaker:CraftTweaker-forge-1.18.2:${project.crafttweaker_version}")
modImplementation("curse.maven:the-one-probe-245211:${project.top_forge_file}")
implementation("io.github.llamalad7:mixinextras-forge:0.4.1")
//MIXIN
if (System.getProperty('idea.sync.active') != 'true') {
annotationProcessor 'org.spongepowered:mixin:0.8.5-SNAPSHOT:processor'
}
//gt4r deps
//minecraftRuntimeLibraries(group: 'com.github.Speiger', name: 'Primitive-Collections', version: '[0.8,0.9)')
modImplementation(jarJar("org.gt-reimagined:gtcore:${project.gt_core_version}-${project.minecraft_version}"))
modRuntimeOnly(jarJar("dev.trinsdar:terraform-wood-api-v1:3.1.5"))
runtimeOnly("curse.maven:portality-291493:3840074")
runtimeOnly("curse.maven:titanium-287342:4117991")
modImplementation("curse.maven:the-one-probe-245211:${project.top_forge_file}")
modImplementation("curse.maven:ctm-267602:3933537")
modRuntimeOnly("curse.maven:worldstripper-250603:3670854")
//modImplementation("com.simibubi.create:create-${minecraft_version}:0.5.0.i-249:slim") { transitive = false }
modImplementation("com.tterrag.registrate:Registrate:MC1.18.2-1.1.3")
modImplementation("com.jozufozu.flywheel:flywheel-forge-${minecraft_version}:0.6.8.a-99")
}
jar {
zip64 true
manifest {
attributes([
'Specification-Title' : mod_id,
'Specification-Vendor' : "GT-Reimagined",
'Specification-Version' : '1', // We are version 1 of ourselves
'Implementation-Title' : "GT4 Reimagined",
'Implementation-Version' : project.version,
'Implementation-Vendor' : "GT-Reimagined",
'Implementation-Timestamp': new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"),
"MixinConfigs" : "gt4r.mixins.json"
])
}
}
processResources {
exclude('old_gt4_textures')
inputs.property "version", project.mod_version
filesMatching("META-INF/mods.toml") {
expand "version": project.mod_version
}
}