Skip to content

Commit

Permalink
fix: Create working directory before trying to use it
Browse files Browse the repository at this point in the history
  • Loading branch information
oSumAtrIX committed Aug 8, 2024
1 parent 3069668 commit 715fb96
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/kotlin/app/revanced/patches/gradle/PatchesPlugin.kt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import org.gradle.plugins.signing.SigningExtension
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.dsl.KotlinJvmProjectExtension
import org.jetbrains.kotlin.gradle.plugin.KotlinPluginWrapper
import java.io.File

@Suppress("unused")
abstract class PatchesPlugin : Plugin<Project> {
Expand Down Expand Up @@ -118,7 +119,7 @@ abstract class PatchesPlugin : Plugin<Project> {
task.dependsOn(tasks["jar"])

task.doLast {
val workingDirectory = layout.buildDirectory.dir("revanced").get().asFile
val workingDirectory = layout.buildDirectory.dir("revanced").get().asFile.also(File::mkdirs)

val patchesFile = tasks["jar"].outputs.files.first()
val classesZipFile = workingDirectory.resolve("classes.zip")
Expand Down

0 comments on commit 715fb96

Please sign in to comment.