Search in sources :

Example 1 with JavaBuckConfig

use of com.facebook.buck.jvm.java.JavaBuckConfig in project buck by facebook.

the class TestRunning method runTests.

@SuppressWarnings("PMD.EmptyCatchBlock")
public static int runTests(final CommandRunnerParams params, Iterable<TestRule> tests, ExecutionContext executionContext, final TestRunningOptions options, ListeningExecutorService service, BuildEngine buildEngine, final StepRunner stepRunner, SourcePathResolver sourcePathResolver, SourcePathRuleFinder ruleFinder) throws IOException, ExecutionException, InterruptedException {
    ImmutableSet<JavaLibrary> rulesUnderTestForCoverage;
    // If needed, we first run instrumentation on the class files.
    if (options.isCodeCoverageEnabled()) {
        rulesUnderTestForCoverage = getRulesUnderTest(tests);
        if (!rulesUnderTestForCoverage.isEmpty()) {
            try {
                // We'll use the filesystem of the first rule under test. This will fail if there are any
                // tests from a different repo, but it'll help us bootstrap ourselves to being able to
                // support multiple repos
                // TODO(t8220837): Support tests in multiple repos
                JavaLibrary library = rulesUnderTestForCoverage.iterator().next();
                stepRunner.runStepForBuildTarget(executionContext, new MakeCleanDirectoryStep(library.getProjectFilesystem(), JacocoConstants.getJacocoOutputDir(library.getProjectFilesystem())), Optional.empty());
            } catch (StepFailedException e) {
                params.getBuckEventBus().post(ConsoleEvent.severe(Throwables.getRootCause(e).getLocalizedMessage()));
                return 1;
            }
        }
    } else {
        rulesUnderTestForCoverage = ImmutableSet.of();
    }
    final ImmutableSet<String> testTargets = FluentIterable.from(tests).transform(BuildRule::getBuildTarget).transform(Object::toString).toSet();
    final int totalNumberOfTests = Iterables.size(tests);
    params.getBuckEventBus().post(TestRunEvent.started(options.isRunAllTests(), options.getTestSelectorList(), options.shouldExplainTestSelectorList(), testTargets));
    // Start running all of the tests. The result of each java_test() rule is represented as a
    // ListenableFuture.
    List<ListenableFuture<TestResults>> results = Lists.newArrayList();
    TestRuleKeyFileHelper testRuleKeyFileHelper = new TestRuleKeyFileHelper(buildEngine);
    final AtomicInteger lastReportedTestSequenceNumber = new AtomicInteger();
    final List<TestRun> separateTestRuns = Lists.newArrayList();
    List<TestRun> parallelTestRuns = Lists.newArrayList();
    for (final TestRule test : tests) {
        // Determine whether the test needs to be executed.
        final Callable<TestResults> resultsInterpreter = getCachingCallable(test.interpretTestResults(executionContext, /*isUsingTestSelectors*/
        !options.getTestSelectorList().isEmpty()));
        boolean isTestRunRequired;
        isTestRunRequired = isTestRunRequiredForTest(test, buildEngine, executionContext, testRuleKeyFileHelper, options.getTestResultCacheMode(), resultsInterpreter, !options.getTestSelectorList().isEmpty(), !options.getEnvironmentOverrides().isEmpty());
        final Map<String, UUID> testUUIDMap = new HashMap<>();
        final AtomicReference<TestStatusMessageEvent.Started> currentTestStatusMessageEvent = new AtomicReference<>();
        TestRule.TestReportingCallback testReportingCallback = new TestRule.TestReportingCallback() {

            @Override
            public void testsDidBegin() {
                LOG.debug("Tests for rule %s began", test.getBuildTarget());
            }

            @Override
            public void statusDidBegin(TestStatusMessage didBeginMessage) {
                LOG.debug("Test status did begin: %s", didBeginMessage);
                TestStatusMessageEvent.Started startedEvent = TestStatusMessageEvent.started(didBeginMessage);
                TestStatusMessageEvent.Started previousEvent = currentTestStatusMessageEvent.getAndSet(startedEvent);
                Preconditions.checkState(previousEvent == null, "Received begin status before end status (%s)", previousEvent);
                params.getBuckEventBus().post(startedEvent);
                String message = didBeginMessage.getMessage();
                if (message.toLowerCase().contains("debugger")) {
                    executionContext.getStdErr().println(executionContext.getAnsi().asWarningText(message));
                }
            }

            @Override
            public void statusDidEnd(TestStatusMessage didEndMessage) {
                LOG.debug("Test status did end: %s", didEndMessage);
                TestStatusMessageEvent.Started previousEvent = currentTestStatusMessageEvent.getAndSet(null);
                Preconditions.checkState(previousEvent != null, "Received end status before begin status (%s)", previousEvent);
                params.getBuckEventBus().post(TestStatusMessageEvent.finished(previousEvent, didEndMessage));
            }

            @Override
            public void testDidBegin(String testCaseName, String testName) {
                LOG.debug("Test rule %s test case %s test name %s began", test.getBuildTarget(), testCaseName, testName);
                UUID testUUID = UUID.randomUUID();
                // UUID is immutable and thread-safe as of Java 7, so it's
                // safe to stash in a map and use later:
                //
                // http://bugs.java.com/view_bug.do?bug_id=6611830
                testUUIDMap.put(testCaseName + ":" + testName, testUUID);
                params.getBuckEventBus().post(TestSummaryEvent.started(testUUID, testCaseName, testName));
            }

            @Override
            public void testDidEnd(TestResultSummary testResultSummary) {
                LOG.debug("Test rule %s test did end: %s", test.getBuildTarget(), testResultSummary);
                UUID testUUID = testUUIDMap.get(testResultSummary.getTestCaseName() + ":" + testResultSummary.getTestName());
                Preconditions.checkNotNull(testUUID);
                params.getBuckEventBus().post(TestSummaryEvent.finished(testUUID, testResultSummary));
            }

            @Override
            public void testsDidEnd(List<TestCaseSummary> testCaseSummaries) {
                LOG.debug("Test rule %s tests did end: %s", test.getBuildTarget(), testCaseSummaries);
            }
        };
        List<Step> steps;
        if (isTestRunRequired) {
            params.getBuckEventBus().post(IndividualTestEvent.started(testTargets));
            ImmutableList.Builder<Step> stepsBuilder = ImmutableList.builder();
            Preconditions.checkState(buildEngine.isRuleBuilt(test.getBuildTarget()));
            List<Step> testSteps = test.runTests(executionContext, options, sourcePathResolver, testReportingCallback);
            if (!testSteps.isEmpty()) {
                stepsBuilder.addAll(testSteps);
                stepsBuilder.add(testRuleKeyFileHelper.createRuleKeyInDirStep(test));
            }
            steps = stepsBuilder.build();
        } else {
            steps = ImmutableList.of();
        }
        TestRun testRun = TestRun.of(test, steps, getStatusTransformingCallable(isTestRunRequired, resultsInterpreter), testReportingCallback);
        // commands because the rule is cached, but its results must still be processed.
        if (test.runTestSeparately()) {
            LOG.debug("Running test %s in serial", test);
            separateTestRuns.add(testRun);
        } else {
            LOG.debug("Running test %s in parallel", test);
            parallelTestRuns.add(testRun);
        }
    }
    for (TestRun testRun : parallelTestRuns) {
        ListenableFuture<TestResults> testResults = runStepsAndYieldResult(stepRunner, executionContext, testRun.getSteps(), testRun.getTestResultsCallable(), testRun.getTest().getBuildTarget(), params.getBuckEventBus(), service);
        results.add(transformTestResults(params, testResults, testRun.getTest(), testRun.getTestReportingCallback(), testTargets, lastReportedTestSequenceNumber, totalNumberOfTests));
    }
    ListenableFuture<List<TestResults>> parallelTestStepsFuture = Futures.allAsList(results);
    final List<TestResults> completedResults = Lists.newArrayList();
    final ListeningExecutorService directExecutorService = MoreExecutors.newDirectExecutorService();
    ListenableFuture<Void> uberFuture = MoreFutures.addListenableCallback(parallelTestStepsFuture, new FutureCallback<List<TestResults>>() {

        @Override
        public void onSuccess(List<TestResults> parallelTestResults) {
            LOG.debug("Parallel tests completed, running separate tests...");
            completedResults.addAll(parallelTestResults);
            List<ListenableFuture<TestResults>> separateResultsList = Lists.newArrayList();
            for (TestRun testRun : separateTestRuns) {
                separateResultsList.add(transformTestResults(params, runStepsAndYieldResult(stepRunner, executionContext, testRun.getSteps(), testRun.getTestResultsCallable(), testRun.getTest().getBuildTarget(), params.getBuckEventBus(), directExecutorService), testRun.getTest(), testRun.getTestReportingCallback(), testTargets, lastReportedTestSequenceNumber, totalNumberOfTests));
            }
            ListenableFuture<List<TestResults>> serialResults = Futures.allAsList(separateResultsList);
            try {
                completedResults.addAll(serialResults.get());
            } catch (ExecutionException e) {
                LOG.error(e, "Error fetching serial test results");
                throw new HumanReadableException(e, "Error fetching serial test results");
            } catch (InterruptedException e) {
                LOG.error(e, "Interrupted fetching serial test results");
                try {
                    serialResults.cancel(true);
                } catch (CancellationException ignored) {
                // Rethrow original InterruptedException instead.
                }
                Thread.currentThread().interrupt();
                throw new HumanReadableException(e, "Test cancelled");
            }
            LOG.debug("Done running serial tests.");
        }

        @Override
        public void onFailure(Throwable e) {
            LOG.error(e, "Parallel tests failed, not running serial tests");
            throw new HumanReadableException(e, "Parallel tests failed");
        }
    }, directExecutorService);
    try {
        // Block until all the tests have finished running.
        uberFuture.get();
    } catch (ExecutionException e) {
        e.printStackTrace(params.getConsole().getStdErr());
        return 1;
    } catch (InterruptedException e) {
        try {
            uberFuture.cancel(true);
        } catch (CancellationException ignored) {
        // Rethrow original InterruptedException instead.
        }
        Thread.currentThread().interrupt();
        throw e;
    }
    params.getBuckEventBus().post(TestRunEvent.finished(testTargets, completedResults));
    // Write out the results as XML, if requested.
    Optional<String> path = options.getPathToXmlTestOutput();
    if (path.isPresent()) {
        try (Writer writer = Files.newWriter(new File(path.get()), Charsets.UTF_8)) {
            writeXmlOutput(completedResults, writer);
        }
    }
    // Generate the code coverage report.
    if (options.isCodeCoverageEnabled() && !rulesUnderTestForCoverage.isEmpty()) {
        try {
            JavaBuckConfig javaBuckConfig = params.getBuckConfig().getView(JavaBuckConfig.class);
            DefaultJavaPackageFinder defaultJavaPackageFinder = javaBuckConfig.createDefaultJavaPackageFinder();
            stepRunner.runStepForBuildTarget(executionContext, getReportCommand(rulesUnderTestForCoverage, defaultJavaPackageFinder, javaBuckConfig.getDefaultJavaOptions().getJavaRuntimeLauncher(), params.getCell().getFilesystem(), sourcePathResolver, ruleFinder, JacocoConstants.getJacocoOutputDir(params.getCell().getFilesystem()), options.getCoverageReportFormat(), options.getCoverageReportTitle(), javaBuckConfig.getDefaultJavacOptions().getSpoolMode() == JavacOptions.SpoolMode.INTERMEDIATE_TO_DISK, options.getCoverageIncludes(), options.getCoverageExcludes()), Optional.empty());
        } catch (StepFailedException e) {
            params.getBuckEventBus().post(ConsoleEvent.severe(Throwables.getRootCause(e).getLocalizedMessage()));
            return 1;
        }
    }
    boolean failures = Iterables.any(completedResults, results1 -> {
        LOG.debug("Checking result %s for failure", results1);
        return !results1.isSuccess();
    });
    return failures ? TEST_FAILURES_EXIT_CODE : 0;
}
Also used : HashMap(java.util.HashMap) TestResults(com.facebook.buck.test.TestResults) JavaBuckConfig(com.facebook.buck.jvm.java.JavaBuckConfig) DefaultJavaPackageFinder(com.facebook.buck.jvm.java.DefaultJavaPackageFinder) StepFailedException(com.facebook.buck.step.StepFailedException) BuildRule(com.facebook.buck.rules.BuildRule) List(java.util.List) ImmutableList(com.google.common.collect.ImmutableList) UUID(java.util.UUID) TestResultSummary(com.facebook.buck.test.TestResultSummary) TestRule(com.facebook.buck.rules.TestRule) TestStatusMessageEvent(com.facebook.buck.rules.TestStatusMessageEvent) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) CancellationException(java.util.concurrent.CancellationException) MakeCleanDirectoryStep(com.facebook.buck.step.fs.MakeCleanDirectoryStep) ListeningExecutorService(com.google.common.util.concurrent.ListeningExecutorService) File(java.io.File) ImmutableList(com.google.common.collect.ImmutableList) Step(com.facebook.buck.step.Step) GenerateCodeCoverageReportStep(com.facebook.buck.jvm.java.GenerateCodeCoverageReportStep) MakeCleanDirectoryStep(com.facebook.buck.step.fs.MakeCleanDirectoryStep) ExecutionException(java.util.concurrent.ExecutionException) AtomicReference(java.util.concurrent.atomic.AtomicReference) TestStatusMessage(com.facebook.buck.test.TestStatusMessage) JavaLibrary(com.facebook.buck.jvm.java.JavaLibrary) DefaultJavaLibrary(com.facebook.buck.jvm.java.DefaultJavaLibrary) HumanReadableException(com.facebook.buck.util.HumanReadableException) ListenableFuture(com.google.common.util.concurrent.ListenableFuture) PrintWriter(java.io.PrintWriter) Writer(java.io.Writer) StringWriter(java.io.StringWriter)

Example 2 with JavaBuckConfig

use of com.facebook.buck.jvm.java.JavaBuckConfig in project buck by facebook.

the class JavaDepsFinder method createJavaDepsFinder.

public static JavaDepsFinder createJavaDepsFinder(BuckConfig buckConfig, final CellPathResolver cellNames, ObjectMapper objectMapper, BuildEngineBuildContext buildContext, ExecutionContext executionContext, BuildEngine buildEngine) {
    Optional<String> javaPackageMappingOption = buckConfig.getValue(BUCK_CONFIG_SECTION, "java-package-mappings");
    ImmutableSortedMap<String, BuildTarget> javaPackageMapping;
    if (javaPackageMappingOption.isPresent()) {
        Stream<Map.Entry<String, BuildTarget>> entries = Splitter.on(',').omitEmptyStrings().withKeyValueSeparator("=>").split(javaPackageMappingOption.get()).entrySet().stream().map(entry -> {
            String originalKey = entry.getKey().trim();
            boolean appearsToBeJavaPackage = !originalKey.endsWith(".") && CharMatcher.javaUpperCase().matchesNoneOf(originalKey);
            String key = appearsToBeJavaPackage ? originalKey + "." : originalKey;
            BuildTarget buildTarget = BuildTargetParser.INSTANCE.parse(entry.getValue().trim(), BuildTargetPatternParser.fullyQualified(), cellNames);
            return Maps.immutableEntry(key, buildTarget);
        });
        javaPackageMapping = ImmutableSortedMap.copyOf((Iterable<Map.Entry<String, BuildTarget>>) entries::iterator, Comparator.reverseOrder());
    } else {
        javaPackageMapping = ImmutableSortedMap.of();
    }
    JavaBuckConfig javaBuckConfig = buckConfig.getView(JavaBuckConfig.class);
    JavacOptions javacOptions = javaBuckConfig.getDefaultJavacOptions();
    JavaFileParser javaFileParser = JavaFileParser.createJavaFileParser(javacOptions);
    return new JavaDepsFinder(javaPackageMapping, javaFileParser, objectMapper, buildContext, executionContext, buildEngine);
}
Also used : JavacOptions(com.facebook.buck.jvm.java.JavacOptions) JavaBuckConfig(com.facebook.buck.jvm.java.JavaBuckConfig) JavaFileParser(com.facebook.buck.jvm.java.JavaFileParser) BuildTarget(com.facebook.buck.model.BuildTarget) Map(java.util.Map) ImmutableSortedMap(com.google.common.collect.ImmutableSortedMap)

Example 3 with JavaBuckConfig

use of com.facebook.buck.jvm.java.JavaBuckConfig in project buck by facebook.

the class Main method addEventListeners.

@SuppressWarnings("PMD.PrematureDeclaration")
private ImmutableList<BuckEventListener> addEventListeners(BuckEventBus buckEventBus, ProjectFilesystem projectFilesystem, InvocationInfo invocationInfo, BuckConfig buckConfig, Optional<WebServer> webServer, Clock clock, AbstractConsoleEventBusListener consoleEventBusListener, Supplier<BuckEventListener> missingSymbolsListenerSupplier, CounterRegistry counterRegistry, Iterable<BuckEventListener> commandSpecificEventListeners) {
    ImmutableList.Builder<BuckEventListener> eventListenersBuilder = ImmutableList.<BuckEventListener>builder().add(new JavaUtilsLoggingBuildListener()).add(consoleEventBusListener).add(new LoggingBuildListener());
    if (buckConfig.isChromeTraceCreationEnabled()) {
        try {
            eventListenersBuilder.add(new ChromeTraceBuildListener(projectFilesystem, invocationInfo, clock, objectMapper, buckConfig.getMaxTraces(), buckConfig.getCompressTraces()));
        } catch (IOException e) {
            LOG.error("Unable to create ChromeTrace listener!");
        }
    } else {
        LOG.warn("::: ChromeTrace listener disabled");
    }
    if (webServer.isPresent()) {
        eventListenersBuilder.add(webServer.get().createListener());
    }
    loadListenersFromBuckConfig(eventListenersBuilder, projectFilesystem, buckConfig);
    if (buckConfig.isRuleKeyLoggerEnabled()) {
        eventListenersBuilder.add(new RuleKeyLoggerListener(projectFilesystem, invocationInfo, MostExecutors.newSingleThreadExecutor(new CommandThreadFactory(getClass().getName()))));
    }
    if (buckConfig.isMachineReadableLoggerEnabled()) {
        try {
            eventListenersBuilder.add(new MachineReadableLoggerListener(invocationInfo, projectFilesystem, MostExecutors.newSingleThreadExecutor(new CommandThreadFactory(getClass().getName()))));
        } catch (FileNotFoundException e) {
            LOG.warn("Unable to open stream for machine readable log file.");
        }
    }
    JavaBuckConfig javaBuckConfig = buckConfig.getView(JavaBuckConfig.class);
    if (!javaBuckConfig.getSkipCheckingMissingDeps()) {
        eventListenersBuilder.add(missingSymbolsListenerSupplier.get());
    }
    eventListenersBuilder.add(new LoadBalancerEventsListener(counterRegistry));
    eventListenersBuilder.add(new CacheRateStatsListener(buckEventBus));
    eventListenersBuilder.add(new WatchmanDiagnosticEventListener(buckEventBus));
    eventListenersBuilder.addAll(commandSpecificEventListeners);
    ImmutableList<BuckEventListener> eventListeners = eventListenersBuilder.build();
    eventListeners.forEach(buckEventBus::register);
    return eventListeners;
}
Also used : LoggingBuildListener(com.facebook.buck.event.listener.LoggingBuildListener) JavaUtilsLoggingBuildListener(com.facebook.buck.event.listener.JavaUtilsLoggingBuildListener) ImmutableList(com.google.common.collect.ImmutableList) CommandThreadFactory(com.facebook.buck.log.CommandThreadFactory) FileNotFoundException(java.io.FileNotFoundException) JavaUtilsLoggingBuildListener(com.facebook.buck.event.listener.JavaUtilsLoggingBuildListener) MachineReadableLoggerListener(com.facebook.buck.event.listener.MachineReadableLoggerListener) JavaBuckConfig(com.facebook.buck.jvm.java.JavaBuckConfig) BuckEventListener(com.facebook.buck.event.BuckEventListener) IOException(java.io.IOException) WatchmanDiagnosticEventListener(com.facebook.buck.io.WatchmanDiagnosticEventListener) ChromeTraceBuildListener(com.facebook.buck.event.listener.ChromeTraceBuildListener) CacheRateStatsListener(com.facebook.buck.event.listener.CacheRateStatsListener) RuleKeyLoggerListener(com.facebook.buck.event.listener.RuleKeyLoggerListener) LoadBalancerEventsListener(com.facebook.buck.event.listener.LoadBalancerEventsListener)

Example 4 with JavaBuckConfig

use of com.facebook.buck.jvm.java.JavaBuckConfig in project buck by facebook.

the class KnownBuildRuleTypes method createBuilder.

@VisibleForTesting
static Builder createBuilder(BuckConfig config, ProjectFilesystem filesystem, ProcessExecutor processExecutor, AndroidDirectoryResolver androidDirectoryResolver) throws InterruptedException, IOException {
    Platform platform = Platform.detect();
    AndroidBuckConfig androidConfig = new AndroidBuckConfig(config, platform);
    Optional<String> ndkVersion = androidConfig.getNdkVersion();
    // out which one we will end up using.
    if (!ndkVersion.isPresent()) {
        ndkVersion = androidDirectoryResolver.getNdkVersion();
    }
    AppleConfig appleConfig = new AppleConfig(config);
    SwiftBuckConfig swiftBuckConfig = new SwiftBuckConfig(config);
    final ImmutableList<AppleCxxPlatform> appleCxxPlatforms = buildAppleCxxPlatforms(filesystem, appleConfig.getAppleDeveloperDirectorySupplier(processExecutor), appleConfig.getExtraToolchainPaths(), appleConfig.getExtraPlatformPaths(), config, appleConfig, swiftBuckConfig, processExecutor);
    final FlavorDomain<AppleCxxPlatform> platformFlavorsToAppleCxxPlatforms = FlavorDomain.from("Apple C++ Platform", appleCxxPlatforms);
    ImmutableMap.Builder<Flavor, SwiftPlatform> swiftPlatforms = ImmutableMap.builder();
    for (Flavor flavor : platformFlavorsToAppleCxxPlatforms.getFlavors()) {
        Optional<SwiftPlatform> swiftPlatformOptional = platformFlavorsToAppleCxxPlatforms.getValue(flavor).getSwiftPlatform();
        if (swiftPlatformOptional.isPresent()) {
            swiftPlatforms.put(flavor, swiftPlatformOptional.get());
        }
    }
    CxxBuckConfig cxxBuckConfig = new CxxBuckConfig(config);
    // Setup the NDK C/C++ platforms.
    Optional<Path> ndkRoot = androidDirectoryResolver.getNdkOrAbsent();
    ImmutableMap.Builder<NdkCxxPlatforms.TargetCpuType, NdkCxxPlatform> ndkCxxPlatformsBuilder = ImmutableMap.builder();
    if (ndkRoot.isPresent()) {
        NdkCxxPlatformCompiler.Type compilerType = androidConfig.getNdkCompiler().orElse(NdkCxxPlatforms.DEFAULT_COMPILER_TYPE);
        String gccVersion = androidConfig.getNdkGccVersion().orElse(NdkCxxPlatforms.getDefaultGccVersionForNdk(ndkVersion));
        String clangVersion = androidConfig.getNdkClangVersion().orElse(NdkCxxPlatforms.getDefaultClangVersionForNdk(ndkVersion));
        String compilerVersion = compilerType == NdkCxxPlatformCompiler.Type.GCC ? gccVersion : clangVersion;
        NdkCxxPlatformCompiler compiler = NdkCxxPlatformCompiler.builder().setType(compilerType).setVersion(compilerVersion).setGccVersion(gccVersion).build();
        ndkCxxPlatformsBuilder.putAll(NdkCxxPlatforms.getPlatforms(cxxBuckConfig, filesystem, ndkRoot.get(), compiler, androidConfig.getNdkCxxRuntime().orElse(NdkCxxPlatforms.DEFAULT_CXX_RUNTIME), androidConfig.getNdkAppPlatform().orElse(NdkCxxPlatforms.DEFAULT_TARGET_APP_PLATFORM), androidConfig.getNdkCpuAbis().orElse(NdkCxxPlatforms.DEFAULT_CPU_ABIS), platform));
    }
    ImmutableMap<NdkCxxPlatforms.TargetCpuType, NdkCxxPlatform> ndkCxxPlatforms = ndkCxxPlatformsBuilder.build();
    // Create a map of system platforms.
    ImmutableMap.Builder<Flavor, CxxPlatform> cxxSystemPlatformsBuilder = ImmutableMap.builder();
    // testing our Android NDK support for right now.
    for (NdkCxxPlatform ndkCxxPlatform : ndkCxxPlatforms.values()) {
        cxxSystemPlatformsBuilder.put(ndkCxxPlatform.getCxxPlatform().getFlavor(), ndkCxxPlatform.getCxxPlatform());
    }
    for (AppleCxxPlatform appleCxxPlatform : platformFlavorsToAppleCxxPlatforms.getValues()) {
        cxxSystemPlatformsBuilder.put(appleCxxPlatform.getCxxPlatform().getFlavor(), appleCxxPlatform.getCxxPlatform());
    }
    CxxPlatform defaultHostCxxPlatform = DefaultCxxPlatforms.build(platform, filesystem, cxxBuckConfig);
    cxxSystemPlatformsBuilder.put(defaultHostCxxPlatform.getFlavor(), defaultHostCxxPlatform);
    ImmutableMap<Flavor, CxxPlatform> cxxSystemPlatformsMap = cxxSystemPlatformsBuilder.build();
    // Add the host platform if needed (for example, when building on Linux).
    Flavor hostFlavor = CxxPlatforms.getHostFlavor();
    if (!cxxSystemPlatformsMap.containsKey(hostFlavor)) {
        cxxSystemPlatformsBuilder.put(hostFlavor, CxxPlatform.builder().from(defaultHostCxxPlatform).setFlavor(hostFlavor).build());
        cxxSystemPlatformsMap = cxxSystemPlatformsBuilder.build();
    }
    // Add platforms for each cxx flavor obtained from the buck config files
    // from sections of the form cxx#{flavor name}.
    // These platforms are overrides for existing system platforms.
    ImmutableSet<Flavor> possibleHostFlavors = CxxPlatforms.getAllPossibleHostFlavors();
    HashMap<Flavor, CxxPlatform> cxxOverridePlatformsMap = new HashMap<Flavor, CxxPlatform>(cxxSystemPlatformsMap);
    ImmutableSet<Flavor> cxxFlavors = CxxBuckConfig.getCxxFlavors(config);
    for (Flavor flavor : cxxFlavors) {
        CxxPlatform baseCxxPlatform = cxxSystemPlatformsMap.get(flavor);
        if (baseCxxPlatform == null) {
            if (possibleHostFlavors.contains(flavor)) {
                // If a flavor is for an alternate host, it's safe to skip.
                continue;
            }
            LOG.info("Applying \"%s\" overrides to default host platform", flavor);
            baseCxxPlatform = defaultHostCxxPlatform;
        }
        cxxOverridePlatformsMap.put(flavor, CxxPlatforms.copyPlatformWithFlavorAndConfig(baseCxxPlatform, platform, new CxxBuckConfig(config, flavor), flavor));
    }
    // Finalize our "default" host.
    // TODO(Ktwu) The host flavor should default to a concrete flavor
    // like "linux-x86_64", not "default".
    hostFlavor = DefaultCxxPlatforms.FLAVOR;
    Optional<String> hostCxxPlatformOverride = cxxBuckConfig.getHostPlatform();
    if (hostCxxPlatformOverride.isPresent()) {
        Flavor overrideFlavor = InternalFlavor.of(hostCxxPlatformOverride.get());
        if (cxxOverridePlatformsMap.containsKey(overrideFlavor)) {
            hostFlavor = overrideFlavor;
        }
    }
    CxxPlatform hostCxxPlatform = CxxPlatform.builder().from(cxxOverridePlatformsMap.get(hostFlavor)).setFlavor(DefaultCxxPlatforms.FLAVOR).build();
    cxxOverridePlatformsMap.put(DefaultCxxPlatforms.FLAVOR, hostCxxPlatform);
    ImmutableMap<Flavor, CxxPlatform> cxxPlatformsMap = ImmutableMap.<Flavor, CxxPlatform>builder().putAll(cxxOverridePlatformsMap).build();
    ExecutableFinder executableFinder = new ExecutableFinder();
    // Build up the final list of C/C++ platforms.
    FlavorDomain<CxxPlatform> cxxPlatforms = new FlavorDomain<>("C/C++ platform", cxxPlatformsMap);
    // Get the default target platform from config.
    CxxPlatform defaultCxxPlatform = CxxPlatforms.getConfigDefaultCxxPlatform(cxxBuckConfig, cxxPlatformsMap, hostCxxPlatform);
    DBuckConfig dBuckConfig = new DBuckConfig(config);
    ReactNativeBuckConfig reactNativeBuckConfig = new ReactNativeBuckConfig(config);
    RustBuckConfig rustBuckConfig = new RustBuckConfig(config);
    GoBuckConfig goBuckConfig = new GoBuckConfig(config, processExecutor, cxxPlatforms);
    HalideBuckConfig halideBuckConfig = new HalideBuckConfig(config);
    ProGuardConfig proGuardConfig = new ProGuardConfig(config);
    DxConfig dxConfig = new DxConfig(config);
    PythonBuckConfig pyConfig = new PythonBuckConfig(config, executableFinder);
    ImmutableList<PythonPlatform> pythonPlatformsList = pyConfig.getPythonPlatforms(processExecutor);
    FlavorDomain<PythonPlatform> pythonPlatforms = FlavorDomain.from("Python Platform", pythonPlatformsList);
    PythonBinaryDescription pythonBinaryDescription = new PythonBinaryDescription(pyConfig, pythonPlatforms, cxxBuckConfig, defaultCxxPlatform, cxxPlatforms);
    // Look up the timeout to apply to entire test rules.
    Optional<Long> defaultTestRuleTimeoutMs = config.getLong("test", "rule_timeout");
    // Prepare the downloader if we're allowing mid-build downloads
    Downloader downloader;
    DownloadConfig downloadConfig = new DownloadConfig(config);
    if (downloadConfig.isDownloadAtRuntimeOk()) {
        downloader = StackedDownloader.createFromConfig(config, androidDirectoryResolver.getSdkOrAbsent());
    } else {
        // Or just set one that blows up
        downloader = new ExplodingDownloader();
    }
    Builder builder = builder();
    JavaBuckConfig javaConfig = config.getView(JavaBuckConfig.class);
    JavacOptions defaultJavacOptions = javaConfig.getDefaultJavacOptions();
    JavaOptions defaultJavaOptions = javaConfig.getDefaultJavaOptions();
    JavaOptions defaultJavaOptionsForTests = javaConfig.getDefaultJavaOptionsForTests();
    KotlinBuckConfig kotlinBuckConfig = new KotlinBuckConfig(config);
    ScalaBuckConfig scalaConfig = new ScalaBuckConfig(config);
    InferBuckConfig inferBuckConfig = new InferBuckConfig(config);
    LuaConfig luaConfig = new LuaBuckConfig(config, executableFinder);
    CxxBinaryDescription cxxBinaryDescription = new CxxBinaryDescription(cxxBuckConfig, inferBuckConfig, defaultCxxPlatform, cxxPlatforms);
    CxxLibraryDescription cxxLibraryDescription = new CxxLibraryDescription(cxxBuckConfig, defaultCxxPlatform, inferBuckConfig, cxxPlatforms);
    FlavorDomain<SwiftPlatform> platformFlavorsToSwiftPlatforms = new FlavorDomain<>("Swift Platform", swiftPlatforms.build());
    SwiftLibraryDescription swiftLibraryDescription = new SwiftLibraryDescription(cxxBuckConfig, swiftBuckConfig, cxxPlatforms, platformFlavorsToSwiftPlatforms);
    builder.register(swiftLibraryDescription);
    CodeSignIdentityStore codeSignIdentityStore = CodeSignIdentityStore.fromSystem(processExecutor, appleConfig.getCodeSignIdentitiesCommand());
    ProvisioningProfileStore provisioningProfileStore = ProvisioningProfileStore.fromSearchPath(processExecutor, appleConfig.getProvisioningProfileReadCommand(), appleConfig.getProvisioningProfileSearchPath());
    AppleLibraryDescription appleLibraryDescription = new AppleLibraryDescription(cxxLibraryDescription, swiftLibraryDescription, platformFlavorsToAppleCxxPlatforms, defaultCxxPlatform, codeSignIdentityStore, provisioningProfileStore, appleConfig);
    builder.register(appleLibraryDescription);
    PrebuiltAppleFrameworkDescription appleFrameworkDescription = new PrebuiltAppleFrameworkDescription();
    builder.register(appleFrameworkDescription);
    AppleBinaryDescription appleBinaryDescription = new AppleBinaryDescription(cxxBinaryDescription, swiftLibraryDescription, platformFlavorsToAppleCxxPlatforms, codeSignIdentityStore, provisioningProfileStore, appleConfig);
    builder.register(appleBinaryDescription);
    HaskellBuckConfig haskellBuckConfig = new HaskellBuckConfig(config, executableFinder);
    builder.register(new HaskellLibraryDescription(haskellBuckConfig, cxxBuckConfig, cxxPlatforms));
    builder.register(new HaskellBinaryDescription(haskellBuckConfig, cxxPlatforms, defaultCxxPlatform));
    builder.register(new HaskellPrebuiltLibraryDescription());
    if (javaConfig.getDxThreadCount().isPresent()) {
        LOG.warn("java.dx_threads has been deprecated. Use dx.max_threads instead");
    }
    // Create an executor service exclusively for the smart dexing step.
    ListeningExecutorService dxExecutorService = MoreExecutors.listeningDecorator(Executors.newFixedThreadPool(dxConfig.getDxMaxThreadCount().orElse(javaConfig.getDxThreadCount().orElse(SmartDexingStep.determineOptimalThreadCount())), new CommandThreadFactory("SmartDexing")));
    builder.register(new AndroidAarDescription(new AndroidManifestDescription(), cxxBuckConfig, defaultJavacOptions, ndkCxxPlatforms));
    builder.register(new AndroidBinaryDescription(defaultJavaOptions, defaultJavacOptions, proGuardConfig, ndkCxxPlatforms, dxExecutorService, config, cxxBuckConfig, dxConfig));
    builder.register(new AndroidBuildConfigDescription(defaultJavacOptions));
    builder.register(new AndroidInstrumentationApkDescription(proGuardConfig, defaultJavacOptions, ndkCxxPlatforms, dxExecutorService, cxxBuckConfig, dxConfig));
    builder.register(new AndroidInstrumentationTestDescription(defaultJavaOptions, defaultTestRuleTimeoutMs));
    builder.register(new AndroidLibraryDescription(defaultJavacOptions, new DefaultAndroidLibraryCompilerFactory(scalaConfig, kotlinBuckConfig)));
    builder.register(new AndroidManifestDescription());
    builder.register(new AndroidPrebuiltAarDescription(defaultJavacOptions));
    builder.register(new AndroidReactNativeLibraryDescription(reactNativeBuckConfig));
    builder.register(new AndroidResourceDescription(config.isGrayscaleImageProcessingEnabled()));
    builder.register(new ApkGenruleDescription());
    builder.register(new AppleAssetCatalogDescription());
    builder.register(new ApplePackageDescription(appleConfig, defaultCxxPlatform, platformFlavorsToAppleCxxPlatforms));
    AppleBundleDescription appleBundleDescription = new AppleBundleDescription(appleBinaryDescription, appleLibraryDescription, cxxPlatforms, platformFlavorsToAppleCxxPlatforms, defaultCxxPlatform, codeSignIdentityStore, provisioningProfileStore, appleConfig);
    builder.register(appleBundleDescription);
    builder.register(new AppleResourceDescription());
    builder.register(new AppleTestDescription(appleConfig, appleLibraryDescription, cxxPlatforms, platformFlavorsToAppleCxxPlatforms, defaultCxxPlatform, codeSignIdentityStore, provisioningProfileStore, appleConfig.getAppleDeveloperDirectorySupplierForTests(processExecutor), defaultTestRuleTimeoutMs));
    builder.register(new CoreDataModelDescription());
    builder.register(new CsharpLibraryDescription());
    builder.register(cxxBinaryDescription);
    builder.register(cxxLibraryDescription);
    builder.register(new CxxGenruleDescription(cxxPlatforms));
    builder.register(new CxxLuaExtensionDescription(luaConfig, cxxBuckConfig, cxxPlatforms));
    builder.register(new CxxPythonExtensionDescription(pythonPlatforms, cxxBuckConfig, cxxPlatforms));
    builder.register(new CxxTestDescription(cxxBuckConfig, defaultCxxPlatform, cxxPlatforms, defaultTestRuleTimeoutMs));
    builder.register(new DBinaryDescription(dBuckConfig, cxxBuckConfig, defaultCxxPlatform));
    builder.register(new DLibraryDescription(dBuckConfig, cxxBuckConfig, defaultCxxPlatform));
    builder.register(new DTestDescription(dBuckConfig, cxxBuckConfig, defaultCxxPlatform, defaultTestRuleTimeoutMs));
    builder.register(new ExportFileDescription());
    builder.register(new GenruleDescription());
    builder.register(new GenAidlDescription());
    builder.register(new GoBinaryDescription(goBuckConfig));
    builder.register(new GoLibraryDescription(goBuckConfig));
    builder.register(new GoTestDescription(goBuckConfig, defaultTestRuleTimeoutMs));
    builder.register(new GraphqlLibraryDescription());
    GroovyBuckConfig groovyBuckConfig = new GroovyBuckConfig(config);
    builder.register(new GroovyLibraryDescription(groovyBuckConfig, defaultJavacOptions));
    builder.register(new GroovyTestDescription(groovyBuckConfig, defaultJavaOptionsForTests, defaultJavacOptions, defaultTestRuleTimeoutMs));
    builder.register(new GwtBinaryDescription(defaultJavaOptions));
    builder.register(new HalideLibraryDescription(cxxBuckConfig, defaultCxxPlatform, cxxPlatforms, halideBuckConfig));
    builder.register(new IosReactNativeLibraryDescription(reactNativeBuckConfig));
    builder.register(new JavaBinaryDescription(defaultJavaOptions, defaultJavacOptions, defaultCxxPlatform, javaConfig));
    builder.register(new JavaAnnotationProcessorDescription());
    builder.register(new JavaLibraryDescription(defaultJavacOptions));
    builder.register(new JavaTestDescription(defaultJavaOptionsForTests, defaultJavacOptions, defaultTestRuleTimeoutMs, defaultCxxPlatform));
    builder.register(new JsBundleDescription());
    builder.register(new JsLibraryDescription());
    builder.register(new KeystoreDescription());
    builder.register(new KotlinLibraryDescription(kotlinBuckConfig, defaultJavacOptions));
    builder.register(new KotlinTestDescription(kotlinBuckConfig, defaultJavaOptionsForTests, defaultJavacOptions, defaultTestRuleTimeoutMs));
    builder.register(new LuaBinaryDescription(luaConfig, cxxBuckConfig, defaultCxxPlatform, cxxPlatforms, pythonPlatforms));
    builder.register(new LuaLibraryDescription());
    builder.register(new NdkLibraryDescription(ndkVersion, ndkCxxPlatforms));
    OcamlBuckConfig ocamlBuckConfig = new OcamlBuckConfig(config, defaultCxxPlatform);
    builder.register(new OcamlBinaryDescription(ocamlBuckConfig));
    builder.register(new OcamlLibraryDescription(ocamlBuckConfig));
    builder.register(new PrebuiltCxxLibraryDescription(cxxBuckConfig, cxxPlatforms));
    builder.register(PrebuiltCxxLibraryGroupDescription.of());
    builder.register(new CxxPrecompiledHeaderDescription());
    builder.register(new PrebuiltDotnetLibraryDescription());
    builder.register(new PrebuiltJarDescription());
    builder.register(new PrebuiltNativeLibraryDescription());
    builder.register(new PrebuiltOcamlLibraryDescription());
    builder.register(new PrebuiltPythonLibraryDescription());
    builder.register(new ProjectConfigDescription());
    builder.register(pythonBinaryDescription);
    PythonLibraryDescription pythonLibraryDescription = new PythonLibraryDescription(pythonPlatforms, cxxPlatforms);
    builder.register(pythonLibraryDescription);
    builder.register(new PythonTestDescription(pythonBinaryDescription, pyConfig, pythonPlatforms, cxxBuckConfig, defaultCxxPlatform, defaultTestRuleTimeoutMs, cxxPlatforms));
    builder.register(new RemoteFileDescription(downloader));
    builder.register(new RobolectricTestDescription(defaultJavaOptionsForTests, defaultJavacOptions, defaultTestRuleTimeoutMs, defaultCxxPlatform));
    builder.register(new RustBinaryDescription(rustBuckConfig, cxxPlatforms, defaultCxxPlatform));
    builder.register(new RustLibraryDescription(rustBuckConfig, cxxPlatforms, defaultCxxPlatform));
    builder.register(new RustTestDescription(rustBuckConfig, cxxPlatforms, defaultCxxPlatform));
    builder.register(new PrebuiltRustLibraryDescription());
    builder.register(new ScalaLibraryDescription(scalaConfig));
    builder.register(new ScalaTestDescription(scalaConfig, defaultJavaOptionsForTests, defaultTestRuleTimeoutMs, defaultCxxPlatform));
    builder.register(new SceneKitAssetsDescription());
    builder.register(new ShBinaryDescription());
    builder.register(new ShTestDescription(defaultTestRuleTimeoutMs));
    builder.register(new WorkerToolDescription(config));
    builder.register(new XcodePostbuildScriptDescription());
    builder.register(new XcodePrebuildScriptDescription());
    builder.register(new XcodeWorkspaceConfigDescription());
    builder.register(new ZipFileDescription());
    builder.register(new TargetGroupDescription());
    builder.setCxxPlatforms(cxxPlatforms);
    builder.setDefaultCxxPlatform(defaultCxxPlatform);
    builder.register(VersionedAliasDescription.of());
    return builder;
}
Also used : JavaAnnotationProcessorDescription(com.facebook.buck.jvm.java.JavaAnnotationProcessorDescription) PythonPlatform(com.facebook.buck.python.PythonPlatform) Platform(com.facebook.buck.util.environment.Platform) AppleCxxPlatform(com.facebook.buck.apple.AppleCxxPlatform) SwiftPlatform(com.facebook.buck.swift.SwiftPlatform) NdkCxxPlatform(com.facebook.buck.android.NdkCxxPlatform) CxxPlatform(com.facebook.buck.cxx.CxxPlatform) PrebuiltNativeLibraryDescription(com.facebook.buck.android.PrebuiltNativeLibraryDescription) GenruleDescription(com.facebook.buck.shell.GenruleDescription) ApkGenruleDescription(com.facebook.buck.android.ApkGenruleDescription) CxxGenruleDescription(com.facebook.buck.cxx.CxxGenruleDescription) ExplodingDownloader(com.facebook.buck.file.ExplodingDownloader) StackedDownloader(com.facebook.buck.file.StackedDownloader) Downloader(com.facebook.buck.file.Downloader) CxxGenruleDescription(com.facebook.buck.cxx.CxxGenruleDescription) ProGuardConfig(com.facebook.buck.android.ProGuardConfig) ScalaTestDescription(com.facebook.buck.jvm.scala.ScalaTestDescription) ScalaLibraryDescription(com.facebook.buck.jvm.scala.ScalaLibraryDescription) DownloadConfig(com.facebook.buck.cli.DownloadConfig) ShTestDescription(com.facebook.buck.shell.ShTestDescription) DTestDescription(com.facebook.buck.d.DTestDescription) AppleLibraryDescription(com.facebook.buck.apple.AppleLibraryDescription) LuaConfig(com.facebook.buck.lua.LuaConfig) JavaBinaryDescription(com.facebook.buck.jvm.java.JavaBinaryDescription) XcodePostbuildScriptDescription(com.facebook.buck.apple.XcodePostbuildScriptDescription) HaskellPrebuiltLibraryDescription(com.facebook.buck.haskell.HaskellPrebuiltLibraryDescription) ZipFileDescription(com.facebook.buck.zip.ZipFileDescription) KotlinTestDescription(com.facebook.buck.jvm.kotlin.KotlinTestDescription) ShBinaryDescription(com.facebook.buck.shell.ShBinaryDescription) PrebuiltAppleFrameworkDescription(com.facebook.buck.apple.PrebuiltAppleFrameworkDescription) GoLibraryDescription(com.facebook.buck.go.GoLibraryDescription) InternalFlavor(com.facebook.buck.model.InternalFlavor) Flavor(com.facebook.buck.model.Flavor) CodeSignIdentityStore(com.facebook.buck.apple.CodeSignIdentityStore) GoTestDescription(com.facebook.buck.go.GoTestDescription) GwtBinaryDescription(com.facebook.buck.gwt.GwtBinaryDescription) ListeningExecutorService(com.google.common.util.concurrent.ListeningExecutorService) ApkGenruleDescription(com.facebook.buck.android.ApkGenruleDescription) CsharpLibraryDescription(com.facebook.buck.dotnet.CsharpLibraryDescription) SwiftPlatform(com.facebook.buck.swift.SwiftPlatform) PythonBuckConfig(com.facebook.buck.python.PythonBuckConfig) RustLibraryDescription(com.facebook.buck.rust.RustLibraryDescription) PrebuiltRustLibraryDescription(com.facebook.buck.rust.PrebuiltRustLibraryDescription) ExecutableFinder(com.facebook.buck.io.ExecutableFinder) SceneKitAssetsDescription(com.facebook.buck.apple.SceneKitAssetsDescription) WorkerToolDescription(com.facebook.buck.shell.WorkerToolDescription) RustTestDescription(com.facebook.buck.rust.RustTestDescription) TargetGroupDescription(com.facebook.buck.groups.TargetGroupDescription) GenAidlDescription(com.facebook.buck.android.GenAidlDescription) CxxPrecompiledHeaderDescription(com.facebook.buck.cxx.CxxPrecompiledHeaderDescription) NdkCxxPlatformCompiler(com.facebook.buck.android.NdkCxxPlatformCompiler) LuaBinaryDescription(com.facebook.buck.lua.LuaBinaryDescription) NdkCxxPlatform(com.facebook.buck.android.NdkCxxPlatform) AppleTestDescription(com.facebook.buck.apple.AppleTestDescription) XcodeWorkspaceConfigDescription(com.facebook.buck.apple.XcodeWorkspaceConfigDescription) AndroidBinaryDescription(com.facebook.buck.android.AndroidBinaryDescription) LuaLibraryDescription(com.facebook.buck.lua.LuaLibraryDescription) ProvisioningProfileStore(com.facebook.buck.apple.ProvisioningProfileStore) PrebuiltJarDescription(com.facebook.buck.jvm.java.PrebuiltJarDescription) JsLibraryDescription(com.facebook.buck.js.JsLibraryDescription) Path(java.nio.file.Path) JavacOptions(com.facebook.buck.jvm.java.JavacOptions) PrebuiltPythonLibraryDescription(com.facebook.buck.python.PrebuiltPythonLibraryDescription) AppleResourceDescription(com.facebook.buck.apple.AppleResourceDescription) CxxLibraryDescription(com.facebook.buck.cxx.CxxLibraryDescription) PrebuiltCxxLibraryDescription(com.facebook.buck.cxx.PrebuiltCxxLibraryDescription) DLibraryDescription(com.facebook.buck.d.DLibraryDescription) JavaLibraryDescription(com.facebook.buck.jvm.java.JavaLibraryDescription) DBuckConfig(com.facebook.buck.d.DBuckConfig) AndroidReactNativeLibraryDescription(com.facebook.buck.js.AndroidReactNativeLibraryDescription) AndroidLibraryDescription(com.facebook.buck.android.AndroidLibraryDescription) AndroidPrebuiltAarDescription(com.facebook.buck.android.AndroidPrebuiltAarDescription) HaskellLibraryDescription(com.facebook.buck.haskell.HaskellLibraryDescription) KotlinLibraryDescription(com.facebook.buck.jvm.kotlin.KotlinLibraryDescription) ExplodingDownloader(com.facebook.buck.file.ExplodingDownloader) GoBinaryDescription(com.facebook.buck.go.GoBinaryDescription) PrebuiltRustLibraryDescription(com.facebook.buck.rust.PrebuiltRustLibraryDescription) KeystoreDescription(com.facebook.buck.jvm.java.KeystoreDescription) DxConfig(com.facebook.buck.android.DxConfig) JavaOptions(com.facebook.buck.jvm.java.JavaOptions) AppleBundleDescription(com.facebook.buck.apple.AppleBundleDescription) GroovyLibraryDescription(com.facebook.buck.jvm.groovy.GroovyLibraryDescription) AppleConfig(com.facebook.buck.apple.AppleConfig) CxxBinaryDescription(com.facebook.buck.cxx.CxxBinaryDescription) HashMap(java.util.HashMap) HaskellBuckConfig(com.facebook.buck.haskell.HaskellBuckConfig) RemoteFileDescription(com.facebook.buck.file.RemoteFileDescription) CoreDataModelDescription(com.facebook.buck.apple.CoreDataModelDescription) PrebuiltDotnetLibraryDescription(com.facebook.buck.dotnet.PrebuiltDotnetLibraryDescription) JavaBuckConfig(com.facebook.buck.jvm.java.JavaBuckConfig) IosReactNativeLibraryDescription(com.facebook.buck.js.IosReactNativeLibraryDescription) PrebuiltCxxLibraryDescription(com.facebook.buck.cxx.PrebuiltCxxLibraryDescription) AndroidResourceDescription(com.facebook.buck.android.AndroidResourceDescription) HalideBuckConfig(com.facebook.buck.halide.HalideBuckConfig) JsBundleDescription(com.facebook.buck.js.JsBundleDescription) XcodePrebuildScriptDescription(com.facebook.buck.apple.XcodePrebuildScriptDescription) CxxTestDescription(com.facebook.buck.cxx.CxxTestDescription) GroovyBuckConfig(com.facebook.buck.jvm.groovy.GroovyBuckConfig) HaskellBinaryDescription(com.facebook.buck.haskell.HaskellBinaryDescription) GroovyTestDescription(com.facebook.buck.jvm.groovy.GroovyTestDescription) HalideLibraryDescription(com.facebook.buck.halide.HalideLibraryDescription) PythonBinaryDescription(com.facebook.buck.python.PythonBinaryDescription) ImmutableMap(com.google.common.collect.ImmutableMap) AndroidManifestDescription(com.facebook.buck.android.AndroidManifestDescription) GraphqlLibraryDescription(com.facebook.buck.graphql.GraphqlLibraryDescription) ScalaBuckConfig(com.facebook.buck.jvm.scala.ScalaBuckConfig) AndroidInstrumentationApkDescription(com.facebook.buck.android.AndroidInstrumentationApkDescription) ApplePackageDescription(com.facebook.buck.apple.ApplePackageDescription) SwiftLibraryDescription(com.facebook.buck.swift.SwiftLibraryDescription) AndroidBuckConfig(com.facebook.buck.android.AndroidBuckConfig) AndroidAarDescription(com.facebook.buck.android.AndroidAarDescription) InferBuckConfig(com.facebook.buck.cxx.InferBuckConfig) PrebuiltOcamlLibraryDescription(com.facebook.buck.ocaml.PrebuiltOcamlLibraryDescription) RustBuckConfig(com.facebook.buck.rust.RustBuckConfig) DBinaryDescription(com.facebook.buck.d.DBinaryDescription) RobolectricTestDescription(com.facebook.buck.android.RobolectricTestDescription) FlavorDomain(com.facebook.buck.model.FlavorDomain) PythonLibraryDescription(com.facebook.buck.python.PythonLibraryDescription) PrebuiltPythonLibraryDescription(com.facebook.buck.python.PrebuiltPythonLibraryDescription) GoBuckConfig(com.facebook.buck.go.GoBuckConfig) CxxPythonExtensionDescription(com.facebook.buck.python.CxxPythonExtensionDescription) AppleAssetCatalogDescription(com.facebook.buck.apple.AppleAssetCatalogDescription) AppleBinaryDescription(com.facebook.buck.apple.AppleBinaryDescription) OcamlBuckConfig(com.facebook.buck.ocaml.OcamlBuckConfig) AppleCxxPlatform(com.facebook.buck.apple.AppleCxxPlatform) NdkCxxPlatform(com.facebook.buck.android.NdkCxxPlatform) CxxPlatform(com.facebook.buck.cxx.CxxPlatform) CommandThreadFactory(com.facebook.buck.log.CommandThreadFactory) AndroidBuildConfigDescription(com.facebook.buck.android.AndroidBuildConfigDescription) PrebuiltOcamlLibraryDescription(com.facebook.buck.ocaml.PrebuiltOcamlLibraryDescription) OcamlLibraryDescription(com.facebook.buck.ocaml.OcamlLibraryDescription) CxxBuckConfig(com.facebook.buck.cxx.CxxBuckConfig) KotlinBuckConfig(com.facebook.buck.jvm.kotlin.KotlinBuckConfig) RustBinaryDescription(com.facebook.buck.rust.RustBinaryDescription) CxxLuaExtensionDescription(com.facebook.buck.lua.CxxLuaExtensionDescription) ReactNativeBuckConfig(com.facebook.buck.js.ReactNativeBuckConfig) LuaBuckConfig(com.facebook.buck.lua.LuaBuckConfig) PythonPlatform(com.facebook.buck.python.PythonPlatform) AndroidInstrumentationTestDescription(com.facebook.buck.android.AndroidInstrumentationTestDescription) JavaTestDescription(com.facebook.buck.jvm.java.JavaTestDescription) OcamlBinaryDescription(com.facebook.buck.ocaml.OcamlBinaryDescription) SwiftBuckConfig(com.facebook.buck.swift.SwiftBuckConfig) AppleCxxPlatform(com.facebook.buck.apple.AppleCxxPlatform) DefaultAndroidLibraryCompilerFactory(com.facebook.buck.android.DefaultAndroidLibraryCompilerFactory) ExportFileDescription(com.facebook.buck.shell.ExportFileDescription) NdkLibraryDescription(com.facebook.buck.android.NdkLibraryDescription) PythonTestDescription(com.facebook.buck.python.PythonTestDescription) VisibleForTesting(com.google.common.annotations.VisibleForTesting)

Aggregations

JavaBuckConfig (com.facebook.buck.jvm.java.JavaBuckConfig)4 CommandThreadFactory (com.facebook.buck.log.CommandThreadFactory)2 AndroidAarDescription (com.facebook.buck.android.AndroidAarDescription)1 AndroidBinaryDescription (com.facebook.buck.android.AndroidBinaryDescription)1 AndroidBuckConfig (com.facebook.buck.android.AndroidBuckConfig)1 AndroidBuildConfigDescription (com.facebook.buck.android.AndroidBuildConfigDescription)1 AndroidInstrumentationApkDescription (com.facebook.buck.android.AndroidInstrumentationApkDescription)1 AndroidInstrumentationTestDescription (com.facebook.buck.android.AndroidInstrumentationTestDescription)1 AndroidLibraryDescription (com.facebook.buck.android.AndroidLibraryDescription)1 AndroidManifestDescription (com.facebook.buck.android.AndroidManifestDescription)1 AndroidPrebuiltAarDescription (com.facebook.buck.android.AndroidPrebuiltAarDescription)1 AndroidResourceDescription (com.facebook.buck.android.AndroidResourceDescription)1 ApkGenruleDescription (com.facebook.buck.android.ApkGenruleDescription)1 DefaultAndroidLibraryCompilerFactory (com.facebook.buck.android.DefaultAndroidLibraryCompilerFactory)1 DxConfig (com.facebook.buck.android.DxConfig)1 GenAidlDescription (com.facebook.buck.android.GenAidlDescription)1 NdkCxxPlatform (com.facebook.buck.android.NdkCxxPlatform)1 NdkCxxPlatformCompiler (com.facebook.buck.android.NdkCxxPlatformCompiler)1 NdkLibraryDescription (com.facebook.buck.android.NdkLibraryDescription)1 PrebuiltNativeLibraryDescription (com.facebook.buck.android.PrebuiltNativeLibraryDescription)1