From 715fb96382037fd66351e5735e39a3dd512b1346 Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Thu, 8 Aug 2024 19:07:46 +0200 Subject: [PATCH] fix: Create working directory before trying to use it --- src/main/kotlin/app/revanced/patches/gradle/PatchesPlugin.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/app/revanced/patches/gradle/PatchesPlugin.kt b/src/main/kotlin/app/revanced/patches/gradle/PatchesPlugin.kt index f0d3e13..9908bfb 100644 --- a/src/main/kotlin/app/revanced/patches/gradle/PatchesPlugin.kt +++ b/src/main/kotlin/app/revanced/patches/gradle/PatchesPlugin.kt @@ -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 { @@ -118,7 +119,7 @@ abstract class PatchesPlugin : Plugin { 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")