org.realityforge.bazel.depgen.PrintGraphCommand Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bazel-depgen Show documentation
Show all versions of bazel-depgen Show documentation
bazel-depgen: Generate Bazel dependency scripts by traversing Maven repositories
package org.realityforge.bazel.depgen;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.annotation.Nonnull;
import org.realityforge.bazel.depgen.record.ApplicationRecord;
final class PrintGraphCommand
extends Command
{
PrintGraphCommand()
{
super( Main.PRINT_GRAPH_COMMAND );
}
@Override
int run( @Nonnull final Context context )
throws Exception
{
final ApplicationRecord record = context.loadRecord();
final Logger logger = context.environment().logger();
if ( logger.isLoggable( Level.WARNING ) )
{
logger.log( Level.WARNING, "Dependency Graph:" );
record.getNode().accept( new DependencyGraphEmitter( record.getSource(), l -> logger.log( Level.WARNING, l ) ) );
}
return ExitCodes.SUCCESS_EXIT_CODE;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy