Search in sources :

Example 1 with ExportGradleProject

use of jadx.core.export.ExportGradleProject in project jadx by skylot.

the class JadxDecompiler method getSaveExecutor.

private ExecutorService getSaveExecutor(boolean saveSources, boolean saveResources) {
    if (root == null) {
        throw new JadxRuntimeException("No loaded files");
    }
    int threadsCount = args.getThreadsCount();
    LOG.debug("processing threads count: {}", threadsCount);
    LOG.info("processing ...");
    ExecutorService executor = Executors.newFixedThreadPool(threadsCount);
    File sourcesOutDir;
    File resOutDir;
    if (args.isExportAsGradleProject()) {
        ExportGradleProject export = new ExportGradleProject(root, outDir);
        export.init();
        sourcesOutDir = export.getSrcOutDir();
        resOutDir = export.getResOutDir();
    } else {
        sourcesOutDir = outDir;
        resOutDir = outDir;
    }
    if (saveSources) {
        appendSourcesSave(executor, sourcesOutDir);
    }
    if (saveResources) {
        appendResourcesSave(executor, resOutDir);
    }
    return executor;
}
Also used : ExportGradleProject(jadx.core.export.ExportGradleProject) ExecutorService(java.util.concurrent.ExecutorService) JadxRuntimeException(jadx.core.utils.exceptions.JadxRuntimeException) InputFile(jadx.core.utils.files.InputFile) File(java.io.File)

Aggregations

ExportGradleProject (jadx.core.export.ExportGradleProject)1 JadxRuntimeException (jadx.core.utils.exceptions.JadxRuntimeException)1 InputFile (jadx.core.utils.files.InputFile)1 File (java.io.File)1 ExecutorService (java.util.concurrent.ExecutorService)1