feat: allow to change config and cache dirs with env vars (#2159)
This commit is contained in:
@@ -5,6 +5,7 @@ plugins {
|
||||
dependencies {
|
||||
api(project(":jadx-core"))
|
||||
|
||||
implementation("dev.dirs:directories:26")
|
||||
implementation(project(":jadx-commons:jadx-app-commons"))
|
||||
|
||||
implementation("com.google.code.gson:gson:2.10.1")
|
||||
}
|
||||
|
||||
@@ -1,22 +1,19 @@
|
||||
package jadx.plugins.tools.utils;
|
||||
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
|
||||
import dev.dirs.ProjectDirectories;
|
||||
import jadx.commons.app.JadxCommonFiles;
|
||||
|
||||
import static jadx.core.utils.files.FileUtils.makeDirs;
|
||||
|
||||
public class PluginFiles {
|
||||
private static final ProjectDirectories DIRS = ProjectDirectories.from("io.github", "skylot", "jadx");
|
||||
|
||||
private static final Path PLUGINS_DIR = Paths.get(DIRS.configDir, "plugins");
|
||||
private static final Path PLUGINS_DIR = JadxCommonFiles.getConfigDir().resolve("plugins");
|
||||
public static final Path PLUGINS_JSON = PLUGINS_DIR.resolve("plugins.json");
|
||||
public static final Path INSTALLED_DIR = PLUGINS_DIR.resolve("installed");
|
||||
public static final Path DROPINS_DIR = PLUGINS_DIR.resolve("dropins");
|
||||
|
||||
private static final Path CACHE_DIR = Paths.get(DIRS.cacheDir);
|
||||
public static final Path PLUGINS_LIST_CACHE = CACHE_DIR.resolve("plugin-list.json");
|
||||
public static final Path PLUGINS_LIST_CACHE = JadxCommonFiles.getCacheDir().resolve("plugin-list.json");
|
||||
|
||||
static {
|
||||
makeDirs(INSTALLED_DIR);
|
||||
|
||||
Reference in New Issue
Block a user