Skip to content

Commit

Permalink
Hardcode portal-test dependency for all tests, will clean up the hard…
Browse files Browse the repository at this point in the history
…code later.
  • Loading branch information
shuyangzhou committed Apr 18, 2021
1 parent 1d13d0c commit d60997b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions src/com/liferay/netbeansproject/container/Module.java
Original file line number Diff line number Diff line change
Expand Up @@ -522,6 +522,13 @@ private Module(
_portalModuleDependencies = portalModuleDependencies;
_checksum = checksum;
_jdkVersion = jdkVersion;

if ((_testUnitPath != null) || (_testIntegrationPath != null)) {
Path portalTest = _projectPath.resolve("portal-test");

_moduleDependencies.add(
new Dependency(portalTest, portalTest.resolve("src"), true));
}
}

private void _save() throws IOException {
Expand Down
2 changes: 1 addition & 1 deletion src/com/liferay/netbeansproject/util/GradleUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ public static Set<Dependency> getModuleDependencies(
Path buildGradlePath = modulePath.resolve("build.gradle");

if (!Files.exists(buildGradlePath)) {
return Collections.emptySet();
return new HashSet<>();
}

Set<Dependency> moduleDependencies = new HashSet<>();
Expand Down

0 comments on commit d60997b

Please sign in to comment.