mirror of
https://github.com/xiaozhou233/OrangeX-Client.git
synced 2026-12-05 13:05:52 +08:00
- Remove Loader from settings.gradle, build.gradle, and .idea/gradle.xml - Update config.toml JarPath from Loader.jar to OrangeX.jar - Set Java 8 compatibility in OrangeX build.gradle - Clean up Loader.java imports and remove Detector call
53 lines
1.2 KiB
Groovy
53 lines
1.2 KiB
Groovy
plugins {
|
|
id 'lifecycle-base'
|
|
}
|
|
|
|
// ============================
|
|
// Variables
|
|
// ============================
|
|
def outDir = layout.projectDirectory.dir("out")
|
|
def tmpDir = layout.projectDirectory.dir("out/tmp")
|
|
|
|
tasks.register("cleanTmp", Delete) {
|
|
delete tmpDir
|
|
}
|
|
|
|
tasks.register("buildInjection", Copy) {
|
|
outputs.upToDateWhen { false }
|
|
|
|
dependsOn(
|
|
tasks.named("cleanTmp"),
|
|
project(':OrangeX').tasks.named('shadowJar'),
|
|
project(':Injector').tasks.named('shadowJar')
|
|
)
|
|
|
|
from(project(':OrangeX').tasks.named('shadowJar').flatMap { it.archiveFile })
|
|
from(rootProject.layout.projectDirectory.dir('natives'))
|
|
from(rootProject.layout.projectDirectory.dir('resources'))
|
|
into(tmpDir)
|
|
}
|
|
|
|
tasks.register("packInjection", Zip) {
|
|
group = 'build'
|
|
description = 'Package all files from tmp into injection.zip'
|
|
|
|
dependsOn(tasks.named("buildInjection"))
|
|
|
|
destinationDirectory.set(outDir)
|
|
archiveFileName.set("injection.zip")
|
|
|
|
from(tmpDir)
|
|
}
|
|
|
|
tasks.register("buildAll") {
|
|
dependsOn(tasks.named("buildInjection"))
|
|
dependsOn(tasks.named("packInjection"))
|
|
|
|
doFirst {
|
|
println("Building OrangeX-Client...")
|
|
}
|
|
|
|
doLast {
|
|
println("Build finished!")
|
|
}
|
|
} |