mirror of
https://github.com/revanced/revanced-patches
synced 2024-09-03 04:56:05 +02:00
fix: broken gradle task
This commit is contained in:
parent
c34c1be21f
commit
28e3f554ea
@ -22,19 +22,28 @@ dependencies {
|
|||||||
}
|
}
|
||||||
|
|
||||||
tasks {
|
tasks {
|
||||||
register<Exec>("generateDex") {
|
register<DefaultTask>("generateDex") {
|
||||||
description = "Generate dex files from build"
|
description = "Generate dex files from build"
|
||||||
dependsOn(build)
|
dependsOn(build)
|
||||||
|
|
||||||
|
doLast {
|
||||||
val androidHome = System.getenv("ANDROID_HOME") ?: throw GradleException("ANDROID_HOME not found")
|
val androidHome = System.getenv("ANDROID_HOME") ?: throw GradleException("ANDROID_HOME not found")
|
||||||
val d8 = "${androidHome}/build-tools/32.0.0/d8"
|
val d8 = "${androidHome}/build-tools/32.0.0/d8"
|
||||||
val input = build.get().outputs.files.singleFile.absolutePath
|
val input = build.get().outputs.files.singleFile.absolutePath
|
||||||
val output = input.replace(".jar", ".dex")
|
val output = input.replace(".jar", ".dex")
|
||||||
|
val work = File("${buildDir}/libs")
|
||||||
|
|
||||||
workingDir = File("${buildDir}/libs")
|
exec {
|
||||||
|
workingDir = work
|
||||||
commandLine = listOf(d8, input)
|
commandLine = listOf(d8, input)
|
||||||
|
}
|
||||||
|
|
||||||
|
exec {
|
||||||
|
workingDir = work
|
||||||
commandLine = listOf("mv", "*.dex", output)
|
commandLine = listOf("mv", "*.dex", output)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
// Dummy task to fix the Gradle semantic-release plugin.
|
// Dummy task to fix the Gradle semantic-release plugin.
|
||||||
// Remove this if you forked it to support building only.
|
// Remove this if you forked it to support building only.
|
||||||
// Tracking issue: https://github.com/KengoTODA/gradle-semantic-release-plugin/issues/435
|
// Tracking issue: https://github.com/KengoTODA/gradle-semantic-release-plugin/issues/435
|
||||||
|
Loading…
Reference in New Issue
Block a user