mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2026-06-11 10:44:23 -04:00
Hash the jar (which is now reproducable) and use that for version file Also made it so it is no longer dependent on `pwd` being the root project. Should fix part of the issues this has on compiling in android (termux / Android Code Studio)
33 lines
1.1 KiB
Groovy
33 lines
1.1 KiB
Groovy
plugins {
|
|
id 'java-library'
|
|
id("com.gradleup.shadow") version "9.2.2"
|
|
}
|
|
|
|
java {
|
|
sourceCompatibility = JavaVersion.VERSION_1_8
|
|
targetCompatibility = JavaVersion.VERSION_1_8
|
|
}
|
|
|
|
jar {
|
|
destinationDirectory.set(file("../app_pojavlauncher/src/main/assets/components/methods_injector_agent/"))
|
|
archiveBaseName.set("methods_injector_agent")
|
|
manifest {
|
|
attributes("Manifest-Version": "1.0",
|
|
"PreMain-Class": "org.angelauramc.methodsInjectorAgent.startInjectors",
|
|
"Can-Redefine-Classes": "true")
|
|
}
|
|
// Makes the jar reproducible so the version file actually is a version file
|
|
preserveFileTimestamps = false
|
|
reproducibleFileOrder = true
|
|
// Write version file
|
|
def versionFile = new File(project(":app_pojavlauncher").projectDir, "src/main/assets/components/methods_injector_agent/version")
|
|
def jarFile = archiveFile.get().asFile
|
|
doLast {
|
|
writeVersionFile(jarFile, versionFile)
|
|
}
|
|
outputs.file(versionFile) // Adds the versionFile to outputs
|
|
}
|
|
|
|
dependencies {
|
|
compileOnly 'org.ow2.asm:asm:9.9'
|
|
} |