mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-CR-1672: fix support to use build script file(instead of directory) as to run a build
GitOrigin-RevId: e25718efd4608ccac85428657af2a396f2ed1e60
This commit is contained in:
committed by
intellij-monorepo-bot
parent
571af6bb9c
commit
a37c7a545a
+9
-9
@@ -96,21 +96,21 @@ public class GradleExecutionHelper {
|
||||
@Nullable ExternalSystemTaskNotificationListener listener,
|
||||
@Nullable CancellationTokenSource cancellationTokenSource,
|
||||
@NotNull Function<? super ProjectConnection, ? extends T> f) {
|
||||
String projectDir;
|
||||
File projectPathFile = new File(projectPath);
|
||||
if (projectPathFile.isFile() && projectPath.endsWith(GradleConstants.EXTENSION) && projectPathFile.getParent() != null) {
|
||||
projectDir = projectPathFile.getParent();
|
||||
}
|
||||
else {
|
||||
projectDir = projectPath;
|
||||
}
|
||||
CancellationToken cancellationToken = cancellationTokenSource != null ? cancellationTokenSource.token() : null;
|
||||
return withGradleConnection(
|
||||
projectPath, taskId, settings, listener, cancellationToken,
|
||||
projectDir, taskId, settings, listener, cancellationToken,
|
||||
connection -> {
|
||||
String userDir = null;
|
||||
if (!GradleEnvironment.ADJUST_USER_DIR) {
|
||||
try {
|
||||
String projectDir;
|
||||
File projectPathFile = new File(projectPath);
|
||||
if (projectPathFile.isFile() && projectPath.endsWith(GradleConstants.EXTENSION) && projectPathFile.getParent() != null) {
|
||||
projectDir = projectPathFile.getParent();
|
||||
}
|
||||
else {
|
||||
projectDir = projectPath;
|
||||
}
|
||||
userDir = System.getProperty("user.dir");
|
||||
if (userDir != null) System.setProperty("user.dir", projectDir);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user