feat: allow to change config and cache dirs with env vars (#2159)
This commit is contained in:
@@ -5,6 +5,7 @@ plugins {
|
||||
|
||||
dependencies {
|
||||
implementation(project(":jadx-plugins:jadx-script:jadx-script-runtime"))
|
||||
implementation(project(":jadx-commons:jadx-app-commons"))
|
||||
|
||||
implementation(kotlin("scripting-common"))
|
||||
implementation(kotlin("scripting-jvm"))
|
||||
@@ -12,8 +13,5 @@ dependencies {
|
||||
|
||||
implementation("io.github.oshai:kotlin-logging-jvm:6.0.9")
|
||||
|
||||
// path for scripts cache
|
||||
implementation("dev.dirs:directories:26")
|
||||
|
||||
testImplementation(project(":jadx-core"))
|
||||
}
|
||||
|
||||
+2
-3
@@ -1,6 +1,6 @@
|
||||
package jadx.plugins.script
|
||||
|
||||
import dev.dirs.ProjectDirectories
|
||||
import jadx.commons.app.JadxCommonFiles
|
||||
import java.io.File
|
||||
import java.security.MessageDigest
|
||||
import kotlin.script.experimental.api.CompiledScript
|
||||
@@ -61,8 +61,7 @@ class ScriptCache {
|
||||
}
|
||||
|
||||
private fun getCacheDir(): File {
|
||||
val dirs = ProjectDirectories.from("io.github", "skylot", "jadx")
|
||||
val cacheBaseDir = File(dirs.cacheDir, "scripts")
|
||||
val cacheBaseDir = JadxCommonFiles.getCacheDir().resolve("scripts").toFile()
|
||||
cacheBaseDir.mkdirs()
|
||||
return cacheBaseDir
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user