Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gradle multi module 2.0 #918

Merged
Merged
21 changes: 10 additions & 11 deletions src/main/groovy/io/openliberty/tools/gradle/tasks/DevTask.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ class DevTask extends AbstractFeatureTask {
verifyAppStartTimeout, appUpdateTimeout, ((long) (compileWait * 1000L)), libertyDebug,
true /* useBuildRecompile */, true /* gradle */, pollingTest, container, containerfile, containerBuildContext, containerRunOpts, containerBuildTimeout, skipDefaultPorts,
null /* compileOptions not needed since useBuildRecompile is true */, keepTempContainerfile, mavenCacheLocation, projectModuleList /* multi module upstream projects */,
false /* recompileDependencies only supported in ci.maven */, packagingType, buildFile, parentBuildGradle /* parent build files */, generateFeatures, null /* compileArtifactPaths */, null /* testArtifactPaths */, webResourceDirs /* webResources */
projectModuleList.size() > 0 /* recompileDependencies as true for multi module */, packagingType, buildFile, parentBuildGradle /* parent build files */, generateFeatures, null /* compileArtifactPaths */, null /* testArtifactPaths */, webResourceDirs /* webResources */
);
this.libertyDirPropertyFiles = AbstractServerTask.getLibertyDirectoryPropertyFiles(installDirectory, userDirectory, serverDirectory);
ServerFeatureUtil servUtil = getServerFeatureUtil(true, libertyDirPropertyFiles);
Expand Down Expand Up @@ -499,20 +499,20 @@ class DevTask extends AbstractFeatureTask {
@Override
public boolean updateArtifactPaths(ProjectModule projectModule, boolean redeployCheck, boolean generateFeatures, ThreadPoolExecutor executor)
throws PluginExecutionException {
// unable to identify the changes made, showing option for user. always return false because action is invoked manually
// for multi module, unable to identify the changes made, showing option for user. return true to trigger recompile
if (isMultiModuleProject()) {
cherylking marked this conversation as resolved.
Show resolved Hide resolved
info("A change was detected in a build file. The libertyDev task could not determine if a server restart is required.");
info("To restart the server, type 'r' and press Enter.");
warn("A change was detected in a build file. The libertyDev task could not determine if a server restart is required.");
cherylking marked this conversation as resolved.
Show resolved Hide resolved
return true;
}
return false;
cherylking marked this conversation as resolved.
Show resolved Hide resolved
}

@Override
public boolean updateArtifactPaths(File parentBuildFile) {
// unable to identify the changes made, showing option for user. always return false because action is invoked manually
// for multi module, unable to identify the changes made, showing option for user. return true to trigger recompile
if (isMultiModuleProject()) {
info("A change was detected in a build file. The libertyDev task could not determine if a server restart is required.");
info("To restart the server, type 'r' and press Enter.");
warn("A change was detected in a build file. The libertyDev task could not determine if a server restart is required.");
cherylking marked this conversation as resolved.
Show resolved Hide resolved
return true;
}
return false;
}
Expand Down Expand Up @@ -542,11 +542,10 @@ class DevTask extends AbstractFeatureTask {
boolean restartServer = false;
boolean installFeatures = false;
boolean optimizeGenerateFeatures = false;

// for multi module, unable to identify the changes made, showing option for user. return true to trigger recompile
if (isMultiModuleProject()) {
info("A change was detected in a build file. The libertyDev task could not determine if a server restart is required.");
info("To restart the server, type 'r' and press Enter.");
return false;
warn("A change was detected in a build file. The libertyDev task could not determine if a server restart is required.");
cherylking marked this conversation as resolved.
Show resolved Hide resolved
return true;
}

ProjectBuilder builder = ProjectBuilder.builder();
Expand Down
Loading