mirror of
https://gitee.com/zhangsken/AndroidIDE.git
synced 2026-10-16 07:49:44 +08:00
Check and create TMPDIR if not exists before every build
This commit is contained in:
@@ -357,6 +357,9 @@ public class IDEService {
|
||||
currentTask = task;
|
||||
listener.appendOutput(task, getString(R.string.msg_task_begin, currentTime(), task.getName()));
|
||||
try {
|
||||
|
||||
Environment.mkdirIfNotExits (Environment.TMP_DIR);
|
||||
|
||||
processExecutor.execAsync(holder, mProcessExitListener, projectRoot.getAbsolutePath(), true, getArguments(task.getTasks()));
|
||||
isBuilding = true;
|
||||
|
||||
|
||||
+3
-3
@@ -1,4 +1,4 @@
|
||||
/************************************************************************************
|
||||
/*
|
||||
* This file is part of AndroidIDE.
|
||||
*
|
||||
* AndroidIDE is free software: you can redistribute it and/or modify
|
||||
@@ -14,7 +14,7 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with AndroidIDE. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
**************************************************************************************/
|
||||
*/
|
||||
package com.itsaky.androidide.services.builder;
|
||||
|
||||
import com.blankj.utilcode.util.ThreadUtils;
|
||||
@@ -23,7 +23,7 @@ import com.itsaky.androidide.project.IDEProject;
|
||||
import com.itsaky.androidide.tasks.GradleTask;
|
||||
import java.util.Optional;
|
||||
|
||||
class MainThreadBuildListener implements BuildListener {
|
||||
class MainThreadBuildListener implements BuildListener {
|
||||
|
||||
private final BuildListener listener;
|
||||
|
||||
|
||||
@@ -181,6 +181,7 @@ public final class Environment {
|
||||
ENV_VARS.put("LD_LIBRARY_PATH", ld);
|
||||
|
||||
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.R && BaseApplication.isAarch64()) {
|
||||
// Required for JDK 11
|
||||
ENV_VARS.put("LD_PRELOAD", LIB_HOOK.getAbsolutePath());
|
||||
}
|
||||
|
||||
@@ -223,7 +224,7 @@ public final class Environment {
|
||||
}
|
||||
}
|
||||
|
||||
public static String readProp (String key) {
|
||||
public static String readPropOrNull (String key) {
|
||||
return readProp(key, null);
|
||||
}
|
||||
|
||||
@@ -244,14 +245,10 @@ public final class Environment {
|
||||
return value;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
public static String path(@NonNull File file) {
|
||||
return file.getAbsolutePath();
|
||||
}
|
||||
|
||||
public static File mkdirIfNotExits(File in) {
|
||||
if (in != null && !in.exists())
|
||||
FileUtils.createOrExistsDir(in);
|
||||
if (in != null && !in.exists()) {
|
||||
FileUtils.createOrExistsDir(in);
|
||||
}
|
||||
|
||||
return in;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user