Search in sources :

Example 1 with IjProject

use of com.facebook.buck.jvm.java.intellij.IjProject in project buck by facebook.

the class ProjectCommand method writeProjectAndGetRequiredBuildTargets.

private ImmutableSet<BuildTarget> writeProjectAndGetRequiredBuildTargets(CommandRunnerParams params, final TargetGraphAndTargets targetGraphAndTargets) throws IOException {
    ActionGraphAndResolver result = Preconditions.checkNotNull(ActionGraphCache.getFreshActionGraph(params.getBuckEventBus(), targetGraphAndTargets.getTargetGraph()));
    BuckConfig buckConfig = params.getBuckConfig();
    BuildRuleResolver ruleResolver = result.getResolver();
    SourcePathRuleFinder ruleFinder = new SourcePathRuleFinder(ruleResolver);
    SourcePathResolver sourcePathResolver = new SourcePathResolver(ruleFinder);
    JavacOptions javacOptions = buckConfig.getView(JavaBuckConfig.class).getDefaultJavacOptions();
    IjProject project = new IjProject(targetGraphAndTargets, getJavaPackageFinder(buckConfig), JavaFileParser.createJavaFileParser(javacOptions), ruleResolver, sourcePathResolver, ruleFinder, params.getCell().getFilesystem(), getIntellijAggregationMode(buckConfig), buckConfig);
    return project.write(runIjCleaner, getRemoveUnusedLibraries(buckConfig), excludeArtifacts || getExcludeArtifactsFromConfig(buckConfig));
}
Also used : JavacOptions(com.facebook.buck.jvm.java.JavacOptions) IjProject(com.facebook.buck.jvm.java.intellij.IjProject) CxxBuckConfig(com.facebook.buck.cxx.CxxBuckConfig) JavaBuckConfig(com.facebook.buck.jvm.java.JavaBuckConfig) SwiftBuckConfig(com.facebook.buck.swift.SwiftBuckConfig) HalideBuckConfig(com.facebook.buck.halide.HalideBuckConfig) PythonBuckConfig(com.facebook.buck.python.PythonBuckConfig) ActionGraphAndResolver(com.facebook.buck.rules.ActionGraphAndResolver) JavaBuckConfig(com.facebook.buck.jvm.java.JavaBuckConfig) SourcePathRuleFinder(com.facebook.buck.rules.SourcePathRuleFinder) SourcePathResolver(com.facebook.buck.rules.SourcePathResolver) BuildRuleResolver(com.facebook.buck.rules.BuildRuleResolver)

Aggregations

CxxBuckConfig (com.facebook.buck.cxx.CxxBuckConfig)1 HalideBuckConfig (com.facebook.buck.halide.HalideBuckConfig)1 JavaBuckConfig (com.facebook.buck.jvm.java.JavaBuckConfig)1 JavacOptions (com.facebook.buck.jvm.java.JavacOptions)1 IjProject (com.facebook.buck.jvm.java.intellij.IjProject)1 PythonBuckConfig (com.facebook.buck.python.PythonBuckConfig)1 ActionGraphAndResolver (com.facebook.buck.rules.ActionGraphAndResolver)1 BuildRuleResolver (com.facebook.buck.rules.BuildRuleResolver)1 SourcePathResolver (com.facebook.buck.rules.SourcePathResolver)1 SourcePathRuleFinder (com.facebook.buck.rules.SourcePathRuleFinder)1 SwiftBuckConfig (com.facebook.buck.swift.SwiftBuckConfig)1