From 1b88d8c05d46fc00cea41ec2a56cbfc40be30cf1 Mon Sep 17 00:00:00 2001 From: shuyangzhou Date: Wed, 14 Nov 2018 15:46:08 -0800 Subject: [PATCH] Newer version gradle is not loading init script from current working dir. Feed it absolute path. --- src/com/liferay/netbeansproject/util/GradleUtil.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/com/liferay/netbeansproject/util/GradleUtil.java b/src/com/liferay/netbeansproject/util/GradleUtil.java index 5c7f82e4..b04674c1 100644 --- a/src/com/liferay/netbeansproject/util/GradleUtil.java +++ b/src/com/liferay/netbeansproject/util/GradleUtil.java @@ -74,8 +74,10 @@ public static Map> getJarDependencies( gradleTask.add("--daemon"); } + String userDir = System.getProperty("user.dir"); + gradleTask.add("--parallel"); - gradleTask.add("--init-script=dependency.gradle"); + gradleTask.add("--init-script=" + userDir + "/dependency.gradle"); gradleTask.add("-p"); gradleTask.add(String.valueOf(portalDirPath.resolve("modules"))); gradleTask.add(_getTaskName(portalDirPath, workDirPath));