Search in sources :

Example 6 with JavacOptions

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

the class AndroidLibraryDescriptionTest method bootClasspathAppenderAddsLibsFromAndroidPlatformTarget.

@Test
public void bootClasspathAppenderAddsLibsFromAndroidPlatformTarget() {
    BuildContext.Builder builder = BuildContext.builder();
    // Set to non-null values.
    builder.setActionGraph(createMock(ActionGraph.class));
    builder.setSourcePathResolver(createMock(SourcePathResolver.class));
    builder.setJavaPackageFinder(createMock(JavaPackageFinder.class));
    builder.setEventBus(BuckEventBusFactory.newInstance());
    AndroidPlatformTarget androidPlatformTarget = createMock(AndroidPlatformTarget.class);
    List<Path> entries = ImmutableList.of(Paths.get("add-ons/addon-google_apis-google-15/libs/effects.jar"), Paths.get("add-ons/addon-google_apis-google-15/libs/maps.jar"), Paths.get("add-ons/addon-google_apis-google-15/libs/usb.jar"));
    expect(androidPlatformTarget.getBootclasspathEntries()).andReturn(entries);
    replay(androidPlatformTarget);
    builder.setAndroidPlatformTargetSupplier(Suppliers.ofInstance(androidPlatformTarget));
    BootClasspathAppender appender = new BootClasspathAppender();
    JavacOptions options = JavacOptions.builder().setSourceLevel("1.7").setTargetLevel("1.7").build();
    JavacOptions updated = appender.amend(options, builder.build());
    assertEquals(Optional.of(("add-ons/addon-google_apis-google-15/libs/effects.jar" + File.pathSeparatorChar + "add-ons/addon-google_apis-google-15/libs/maps.jar" + File.pathSeparatorChar + "add-ons/addon-google_apis-google-15/libs/usb.jar").replace("/", File.separator)), updated.getBootclasspath());
    verify(androidPlatformTarget);
}
Also used : Path(java.nio.file.Path) JavacOptions(com.facebook.buck.jvm.java.JavacOptions) JavaPackageFinder(com.facebook.buck.jvm.core.JavaPackageFinder) BuildContext(com.facebook.buck.rules.BuildContext) ActionGraph(com.facebook.buck.rules.ActionGraph) SourcePathResolver(com.facebook.buck.rules.SourcePathResolver) Test(org.junit.Test)

Example 7 with JavacOptions

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

the class AndroidLibraryGraphEnhancerTest method testCreatedBuildableHasOverriddenJavacConfig.

@Test
public void testCreatedBuildableHasOverriddenJavacConfig() {
    BuildTarget buildTarget = BuildTargetFactory.newInstance("//java/com/example:library");
    BuildRuleResolver ruleResolver = new BuildRuleResolver(TargetGraph.EMPTY, new DefaultTargetNodeToBuildRuleTransformer());
    SourcePathRuleFinder ruleFinder = new SourcePathRuleFinder(ruleResolver);
    BuildRule resourceRule1 = ruleResolver.addToIndex(AndroidResourceRuleBuilder.newBuilder().setRuleFinder(ruleFinder).setBuildTarget(BuildTargetFactory.newInstance("//android_res/com/example:res1")).setRDotJavaPackage("com.facebook").setRes(new FakeSourcePath("android_res/com/example/res1")).build());
    BuildRule resourceRule2 = ruleResolver.addToIndex(AndroidResourceRuleBuilder.newBuilder().setRuleFinder(ruleFinder).setBuildTarget(BuildTargetFactory.newInstance("//android_res/com/example:res2")).setRDotJavaPackage("com.facebook").setRes(new FakeSourcePath("android_res/com/example/res2")).build());
    BuildRuleParams buildRuleParams = new FakeBuildRuleParamsBuilder(buildTarget).setDeclaredDeps(ImmutableSortedSet.of(resourceRule1, resourceRule2)).build();
    AndroidLibraryGraphEnhancer graphEnhancer = new AndroidLibraryGraphEnhancer(buildTarget, buildRuleParams, JavacOptions.builder(ANDROID_JAVAC_OPTIONS).setAnnotationProcessingParams(new AnnotationProcessingParams.Builder().setProcessOnly(true).build()).setSourceLevel("7").setTargetLevel("7").build(), DependencyMode.FIRST_ORDER, /* forceFinalResourceIds */
    false, /* unionPackage */
    Optional.empty(), /* rName */
    Optional.empty(), false);
    Optional<DummyRDotJava> dummyRDotJava = graphEnhancer.getBuildableForAndroidResources(ruleResolver, /* createBuildableIfEmptyDeps */
    false);
    assertTrue(dummyRDotJava.isPresent());
    JavacOptions javacOptions = dummyRDotJava.get().getJavacOptions();
    assertFalse(javacOptions.getAnnotationProcessingParams().getProcessOnly());
    assertEquals("7", javacOptions.getSourceLevel());
}
Also used : FakeSourcePath(com.facebook.buck.rules.FakeSourcePath) JavacOptions(com.facebook.buck.jvm.java.JavacOptions) FakeBuildRuleParamsBuilder(com.facebook.buck.rules.FakeBuildRuleParamsBuilder) SourcePathRuleFinder(com.facebook.buck.rules.SourcePathRuleFinder) BuildRuleResolver(com.facebook.buck.rules.BuildRuleResolver) BuildRuleParams(com.facebook.buck.rules.BuildRuleParams) BuildTarget(com.facebook.buck.model.BuildTarget) FakeBuildRule(com.facebook.buck.rules.FakeBuildRule) BuildRule(com.facebook.buck.rules.BuildRule) DefaultTargetNodeToBuildRuleTransformer(com.facebook.buck.rules.DefaultTargetNodeToBuildRuleTransformer) AnnotationProcessingParams(com.facebook.buck.jvm.java.AnnotationProcessingParams) Test(org.junit.Test)

Example 8 with JavacOptions

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

the class AndroidLibraryGraphEnhancerTest method testDummyRDotJavaRuleInheritsJavacOptionsDeps.

@Test
public void testDummyRDotJavaRuleInheritsJavacOptionsDeps() {
    BuildRuleResolver resolver = new BuildRuleResolver(TargetGraph.EMPTY, new DefaultTargetNodeToBuildRuleTransformer());
    SourcePathResolver pathResolver = new SourcePathResolver(new SourcePathRuleFinder(resolver));
    FakeBuildRule dep = new FakeBuildRule(BuildTargetFactory.newInstance("//:dep"), pathResolver);
    dep.setOutputFile("foo");
    resolver.addToIndex(dep);
    BuildTarget target = BuildTargetFactory.newInstance("//:rule");
    JavacOptions options = JavacOptions.builder().setSourceLevel("5").setTargetLevel("5").setJavacJarPath(dep.getSourcePathToOutput()).build();
    AndroidLibraryGraphEnhancer graphEnhancer = new AndroidLibraryGraphEnhancer(target, new FakeBuildRuleParamsBuilder(target).build(), options, DependencyMode.FIRST_ORDER, /* forceFinalResourceIds */
    false, /* unionPackage */
    Optional.empty(), /* rName */
    Optional.empty(), false);
    Optional<DummyRDotJava> result = graphEnhancer.getBuildableForAndroidResources(resolver, /* createdBuildableIfEmptyDeps */
    true);
    assertTrue(result.isPresent());
    assertThat(result.get().getDeps(), Matchers.<BuildRule>hasItem(dep));
}
Also used : JavacOptions(com.facebook.buck.jvm.java.JavacOptions) FakeBuildRule(com.facebook.buck.rules.FakeBuildRule) BuildTarget(com.facebook.buck.model.BuildTarget) FakeBuildRuleParamsBuilder(com.facebook.buck.rules.FakeBuildRuleParamsBuilder) DefaultTargetNodeToBuildRuleTransformer(com.facebook.buck.rules.DefaultTargetNodeToBuildRuleTransformer) SourcePathResolver(com.facebook.buck.rules.SourcePathResolver) SourcePathRuleFinder(com.facebook.buck.rules.SourcePathRuleFinder) BuildRuleResolver(com.facebook.buck.rules.BuildRuleResolver) Test(org.junit.Test)

Example 9 with JavacOptions

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

the class AndroidBinaryDescription method createBuildRule.

@Override
public <A extends Arg> BuildRule createBuildRule(TargetGraph targetGraph, BuildRuleParams params, BuildRuleResolver resolver, A args) throws NoSuchBuildTargetException {
    try (SimplePerfEvent.Scope ignored = SimplePerfEvent.scope(Optional.ofNullable(resolver.getEventBus()), PerfEventId.of("AndroidBinaryDescription"), "target", params.getBuildTarget().toString())) {
        ResourceCompressionMode compressionMode = getCompressionMode(args);
        BuildTarget target = params.getBuildTarget();
        boolean isFlavored = target.isFlavored();
        if (isFlavored) {
            if (target.getFlavors().contains(PACKAGE_STRING_ASSETS_FLAVOR) && !compressionMode.isStoreStringsAsAssets()) {
                throw new HumanReadableException("'package_string_assets' flavor does not exist for %s.", target.getUnflavoredBuildTarget());
            }
            params = params.withBuildTarget(BuildTarget.of(target.getUnflavoredBuildTarget()));
        }
        BuildRule keystore = resolver.getRule(args.keystore);
        if (!(keystore instanceof Keystore)) {
            throw new HumanReadableException("In %s, keystore='%s' must be a keystore() but was %s().", params.getBuildTarget(), keystore.getFullyQualifiedName(), keystore.getType());
        }
        APKModuleGraph apkModuleGraph = new APKModuleGraph(targetGraph, target, Optional.of(args.applicationModuleTargets));
        ProGuardObfuscateStep.SdkProguardType androidSdkProguardConfig = args.androidSdkProguardConfig.orElse(ProGuardObfuscateStep.SdkProguardType.DEFAULT);
        // was not specified, and allow the old form to override the default.
        if (args.useAndroidProguardConfigWithOptimizations.isPresent()) {
            Preconditions.checkArgument(!args.androidSdkProguardConfig.isPresent(), "The deprecated use_android_proguard_config_with_optimizations parameter" + " cannot be used with android_sdk_proguard_config.");
            LOG.error("Target %s specified use_android_proguard_config_with_optimizations, " + "which is deprecated. Use android_sdk_proguard_config.", params.getBuildTarget());
            androidSdkProguardConfig = args.useAndroidProguardConfigWithOptimizations.orElse(false) ? ProGuardObfuscateStep.SdkProguardType.OPTIMIZED : ProGuardObfuscateStep.SdkProguardType.DEFAULT;
        }
        EnumSet<ExopackageMode> exopackageModes = EnumSet.noneOf(ExopackageMode.class);
        if (!args.exopackageModes.isEmpty()) {
            exopackageModes = EnumSet.copyOf(args.exopackageModes);
        } else if (args.exopackage.orElse(false)) {
            LOG.error("Target %s specified exopackage=True, which is deprecated. Use exopackage_modes.", params.getBuildTarget());
            exopackageModes = EnumSet.of(ExopackageMode.SECONDARY_DEX);
        }
        DexSplitMode dexSplitMode = createDexSplitMode(args, exopackageModes);
        PackageType packageType = getPackageType(args);
        boolean shouldPreDex = !args.disablePreDex && PackageType.DEBUG.equals(packageType) && !args.preprocessJavaClassesBash.isPresent();
        ResourceFilter resourceFilter = new ResourceFilter(args.resourceFilter);
        AndroidBinaryGraphEnhancer graphEnhancer = new AndroidBinaryGraphEnhancer(params, resolver, compressionMode, resourceFilter, args.getBannedDuplicateResourceTypes(), args.resourceUnionPackage, addFallbackLocales(args.locales), args.manifest, packageType, ImmutableSet.copyOf(args.cpuFilters), args.buildStringSourceMap, shouldPreDex, AndroidBinary.getPrimaryDexPath(params.getBuildTarget(), params.getProjectFilesystem()), dexSplitMode, ImmutableSet.copyOf(args.noDx.orElse(ImmutableSet.of())), /* resourcesToExclude */
        ImmutableSet.of(), args.skipCrunchPngs, args.includesVectorDrawables, javacOptions, exopackageModes, args.buildConfigValues, args.buildConfigValuesFile, Optional.empty(), args.trimResourceIds, args.keepResourcePattern, nativePlatforms, Optional.of(args.nativeLibraryMergeMap), args.nativeLibraryMergeGlue, args.nativeLibraryMergeCodeGenerator, args.enableRelinker ? RelinkerMode.ENABLED : RelinkerMode.DISABLED, dxExecutorService, args.manifestEntries, cxxBuckConfig, apkModuleGraph, dxConfig);
        AndroidGraphEnhancementResult result = graphEnhancer.createAdditionalBuildables();
        if (target.getFlavors().contains(PACKAGE_STRING_ASSETS_FLAVOR)) {
            Optional<PackageStringAssets> packageStringAssets = result.getPackageStringAssets();
            Preconditions.checkState(packageStringAssets.isPresent());
            return packageStringAssets.get();
        }
        // Build rules added to "no_dx" are only hints, not hard dependencies. Therefore, although a
        // target may be mentioned in that parameter, it may not be present as a build rule.
        ImmutableSortedSet.Builder<BuildRule> builder = ImmutableSortedSet.naturalOrder();
        for (BuildTarget noDxTarget : args.noDx.orElse(ImmutableSet.of())) {
            Optional<BuildRule> ruleOptional = resolver.getRuleOptional(noDxTarget);
            if (ruleOptional.isPresent()) {
                builder.add(ruleOptional.get());
            } else {
                LOG.info("%s: no_dx target not a dependency: %s", target, noDxTarget);
            }
        }
        ImmutableSortedSet<BuildRule> buildRulesToExcludeFromDex = builder.build();
        ImmutableSortedSet<JavaLibrary> rulesToExcludeFromDex = RichStream.from(buildRulesToExcludeFromDex).filter(JavaLibrary.class).collect(MoreCollectors.toImmutableSortedSet(Ordering.natural()));
        SourcePathRuleFinder ruleFinder = new SourcePathRuleFinder(resolver);
        Optional<RedexOptions> redexOptions = getRedexOptions(params, resolver, args);
        ImmutableSortedSet<BuildRule> redexExtraDeps = redexOptions.map(a -> a.getRedexExtraArgs().stream().flatMap(arg -> arg.getDeps(ruleFinder).stream()).collect(MoreCollectors.toImmutableSortedSet(Ordering.natural()))).orElse(ImmutableSortedSet.of());
        return new AndroidBinary(params.copyReplacingExtraDeps(Suppliers.ofInstance(result.getFinalDeps())).copyAppendingExtraDeps(ruleFinder.filterBuildRuleInputs(result.getPackageableCollection().getProguardConfigs())).copyAppendingExtraDeps(rulesToExcludeFromDex).copyAppendingExtraDeps(redexExtraDeps), ruleFinder, proGuardConfig.getProguardJarOverride(), proGuardConfig.getProguardMaxHeapSize(), Optional.of(args.proguardJvmArgs), proGuardConfig.getProguardAgentPath(), (Keystore) keystore, packageType, dexSplitMode, args.noDx.orElse(ImmutableSet.of()), androidSdkProguardConfig, args.optimizationPasses, args.proguardConfig, args.skipProguard, redexOptions, compressionMode, args.cpuFilters, resourceFilter, exopackageModes, MACRO_HANDLER.getExpander(params.getBuildTarget(), params.getCellRoots(), resolver), args.preprocessJavaClassesBash, rulesToExcludeFromDex, result, args.reorderClassesIntraDex, args.dexReorderToolFile, args.dexReorderDataDumpFile, args.xzCompressionLevel, dxExecutorService, args.packageAssetLibraries, args.compressAssetLibraries, args.manifestEntries, javaOptions.getJavaRuntimeLauncher(), dxConfig.getDxMaxHeapSize());
    }
}
Also used : PerfEventId(com.facebook.buck.event.PerfEventId) SourcePathRuleFinder(com.facebook.buck.rules.SourcePathRuleFinder) RichStream(com.facebook.buck.util.RichStream) JavaLibrary(com.facebook.buck.jvm.java.JavaLibrary) HasTests(com.facebook.buck.model.HasTests) ExopackageMode(com.facebook.buck.android.AndroidBinary.ExopackageMode) BuckConfig(com.facebook.buck.cli.BuckConfig) Matcher(java.util.regex.Matcher) Locale(java.util.Locale) Map(java.util.Map) DexSplitStrategy(com.facebook.buck.dalvik.ZipSplitter.DexSplitStrategy) Keystore(com.facebook.buck.jvm.java.Keystore) BuildRuleParams(com.facebook.buck.rules.BuildRuleParams) EnumSet(java.util.EnumSet) ImmutableSet(com.google.common.collect.ImmutableSet) ImmutableMap(com.google.common.collect.ImmutableMap) TargetGraph(com.facebook.buck.rules.TargetGraph) Set(java.util.Set) MacroException(com.facebook.buck.model.MacroException) BuildTarget(com.facebook.buck.model.BuildTarget) SuppressFieldNotInitialized(com.facebook.infer.annotation.SuppressFieldNotInitialized) Collectors(java.util.stream.Collectors) ExecutableMacroExpander(com.facebook.buck.rules.macros.ExecutableMacroExpander) List(java.util.List) PackageType(com.facebook.buck.android.AndroidBinary.PackageType) RelinkerMode(com.facebook.buck.android.AndroidBinary.RelinkerMode) Hint(com.facebook.buck.rules.Hint) Optional(java.util.Optional) BuildRuleResolver(com.facebook.buck.rules.BuildRuleResolver) Pattern(java.util.regex.Pattern) Description(com.facebook.buck.rules.Description) ListeningExecutorService(com.google.common.util.concurrent.ListeningExecutorService) CxxBuckConfig(com.facebook.buck.cxx.CxxBuckConfig) CellPathResolver(com.facebook.buck.rules.CellPathResolver) ResourceCompressionMode(com.facebook.buck.android.ResourcesFilter.ResourceCompressionMode) SimplePerfEvent(com.facebook.buck.event.SimplePerfEvent) JavaOptions(com.facebook.buck.jvm.java.JavaOptions) SourcePath(com.facebook.buck.rules.SourcePath) Flavored(com.facebook.buck.model.Flavored) BuildRule(com.facebook.buck.rules.BuildRule) Tool(com.facebook.buck.rules.Tool) ImmutableList(com.google.common.collect.ImmutableList) NoSuchBuildTargetException(com.facebook.buck.parser.NoSuchBuildTargetException) ImplicitDepsInferringDescription(com.facebook.buck.rules.ImplicitDepsInferringDescription) BuildConfigFields(com.facebook.buck.rules.coercer.BuildConfigFields) Suppliers(com.google.common.base.Suppliers) RedexOptions(com.facebook.buck.android.redex.RedexOptions) MoreCollectors(com.facebook.buck.util.MoreCollectors) ImmutableSortedSet(com.google.common.collect.ImmutableSortedSet) Logger(com.facebook.buck.log.Logger) MacroArg(com.facebook.buck.rules.args.MacroArg) ManifestEntries(com.facebook.buck.rules.coercer.ManifestEntries) JavacOptions(com.facebook.buck.jvm.java.JavacOptions) HumanReadableException(com.facebook.buck.util.HumanReadableException) PACKAGE_STRING_ASSETS_FLAVOR(com.facebook.buck.android.AndroidBinaryGraphEnhancer.PACKAGE_STRING_ASSETS_FLAVOR) AbstractDescriptionArg(com.facebook.buck.rules.AbstractDescriptionArg) Ordering(com.google.common.collect.Ordering) TargetCpuType(com.facebook.buck.android.NdkCxxPlatforms.TargetCpuType) ResourceFilter(com.facebook.buck.android.FilterResourcesStep.ResourceFilter) LocationMacroExpander(com.facebook.buck.rules.macros.LocationMacroExpander) Preconditions(com.google.common.base.Preconditions) Flavor(com.facebook.buck.model.Flavor) MacroHandler(com.facebook.buck.rules.macros.MacroHandler) RType(com.facebook.buck.android.aapt.RDotTxtEntry.RType) RedexOptions(com.facebook.buck.android.redex.RedexOptions) Keystore(com.facebook.buck.jvm.java.Keystore) ResourceFilter(com.facebook.buck.android.FilterResourcesStep.ResourceFilter) BuildTarget(com.facebook.buck.model.BuildTarget) PackageType(com.facebook.buck.android.AndroidBinary.PackageType) ImmutableSortedSet(com.google.common.collect.ImmutableSortedSet) BuildRule(com.facebook.buck.rules.BuildRule) SimplePerfEvent(com.facebook.buck.event.SimplePerfEvent) SourcePathRuleFinder(com.facebook.buck.rules.SourcePathRuleFinder) ResourceCompressionMode(com.facebook.buck.android.ResourcesFilter.ResourceCompressionMode) ExopackageMode(com.facebook.buck.android.AndroidBinary.ExopackageMode) JavaLibrary(com.facebook.buck.jvm.java.JavaLibrary) HumanReadableException(com.facebook.buck.util.HumanReadableException)

Example 10 with JavacOptions

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

the class KotlinLibraryDescription method createBuildRule.

@Override
public <A extends Arg> BuildRule createBuildRule(TargetGraph targetGraph, BuildRuleParams params, BuildRuleResolver resolver, A args) throws NoSuchBuildTargetException {
    SourcePathRuleFinder ruleFinder = new SourcePathRuleFinder(resolver);
    BuildTarget target = params.getBuildTarget();
    // creating the action graph from the target graph.
    if (CalculateAbi.isAbiTarget(target)) {
        BuildTarget libraryTarget = CalculateAbi.getLibraryTarget(params.getBuildTarget());
        BuildRule libraryRule = resolver.requireRule(libraryTarget);
        return CalculateAbi.of(params.getBuildTarget(), ruleFinder, params, Preconditions.checkNotNull(libraryRule.getSourcePathToOutput()));
    }
    ImmutableSortedSet<Flavor> flavors = target.getFlavors();
    BuildRuleParams paramsWithMavenFlavor = null;
    if (flavors.contains(JavaLibrary.MAVEN_JAR)) {
        paramsWithMavenFlavor = params;
        // Maven rules will depend upon their vanilla versions, so the latter have to be constructed
        // without the maven flavor to prevent output-path conflict
        params = params.withoutFlavor(JavaLibrary.MAVEN_JAR);
    }
    if (flavors.contains(JavaLibrary.SRC_JAR)) {
        args.mavenCoords = args.mavenCoords.map(input -> AetherUtil.addClassifier(input, AetherUtil.CLASSIFIER_SOURCES));
        if (!flavors.contains(JavaLibrary.MAVEN_JAR)) {
            return new JavaSourceJar(params, args.srcs, args.mavenCoords);
        } else {
            return MavenUberJar.SourceJar.create(Preconditions.checkNotNull(paramsWithMavenFlavor), args.srcs, args.mavenCoords, args.mavenPomTemplate);
        }
    }
    JavacOptions javacOptions = JavacOptionsFactory.create(defaultOptions, params, resolver, ruleFinder, args);
    SourcePathResolver pathResolver = new SourcePathResolver(ruleFinder);
    ImmutableSortedSet<BuildRule> exportedDeps = resolver.getAllRules(args.exportedDeps);
    BuildRuleParams javaLibraryParams = params.copyAppendingExtraDeps(Iterables.concat(BuildRules.getExportedRules(Iterables.concat(params.getDeclaredDeps().get(), exportedDeps, resolver.getAllRules(args.providedDeps))), ruleFinder.filterBuildRuleInputs(javacOptions.getInputs(ruleFinder))));
    DefaultKotlinLibrary defaultKotlinLibrary = new DefaultKotlinLibrary(javaLibraryParams, pathResolver, ruleFinder, args.srcs, validateResources(pathResolver, params.getProjectFilesystem(), args.resources), Optional.empty(), Optional.empty(), ImmutableList.of(), exportedDeps, resolver.getAllRules(args.providedDeps), JavaLibraryRules.getAbiInputs(resolver, javaLibraryParams.getDeps()), false, ImmutableSet.of(), new KotlincToJarStepFactory(kotlinBuckConfig.getKotlinCompiler().get(), args.extraKotlincArguments), args.resourcesRoot, args.manifestFile, args.mavenCoords, args.tests, args.removeClasses);
    if (!flavors.contains(JavaLibrary.MAVEN_JAR)) {
        return defaultKotlinLibrary;
    } else {
        return MavenUberJar.create(defaultKotlinLibrary, Preconditions.checkNotNull(paramsWithMavenFlavor), args.mavenCoords, args.mavenPomTemplate);
    }
}
Also used : Iterables(com.google.common.collect.Iterables) CalculateAbi(com.facebook.buck.jvm.java.CalculateAbi) JavaLibraryRules(com.facebook.buck.jvm.java.JavaLibraryRules) SourcePathRuleFinder(com.facebook.buck.rules.SourcePathRuleFinder) JavaLibrary(com.facebook.buck.jvm.java.JavaLibrary) JavacOptionsFactory(com.facebook.buck.jvm.java.JavacOptionsFactory) Flavored(com.facebook.buck.model.Flavored) BuildRule(com.facebook.buck.rules.BuildRule) JavaSourceJar(com.facebook.buck.jvm.java.JavaSourceJar) ImmutableList(com.google.common.collect.ImmutableList) NoSuchBuildTargetException(com.facebook.buck.parser.NoSuchBuildTargetException) SourcePathResolver(com.facebook.buck.rules.SourcePathResolver) ResourceValidator.validateResources(com.facebook.buck.jvm.common.ResourceValidator.validateResources) JavaLibraryDescription(com.facebook.buck.jvm.java.JavaLibraryDescription) BuildRuleParams(com.facebook.buck.rules.BuildRuleParams) BuildRules(com.facebook.buck.rules.BuildRules) ImmutableSortedSet(com.google.common.collect.ImmutableSortedSet) ImmutableSet(com.google.common.collect.ImmutableSet) AetherUtil(com.facebook.buck.maven.AetherUtil) TargetGraph(com.facebook.buck.rules.TargetGraph) MavenUberJar(com.facebook.buck.jvm.java.MavenUberJar) JavacOptions(com.facebook.buck.jvm.java.JavacOptions) BuildTarget(com.facebook.buck.model.BuildTarget) SuppressFieldNotInitialized(com.facebook.infer.annotation.SuppressFieldNotInitialized) Optional(java.util.Optional) Preconditions(com.google.common.base.Preconditions) Flavor(com.facebook.buck.model.Flavor) BuildRuleResolver(com.facebook.buck.rules.BuildRuleResolver) VisibleForTesting(com.google.common.annotations.VisibleForTesting) Description(com.facebook.buck.rules.Description) JavacOptions(com.facebook.buck.jvm.java.JavacOptions) SourcePathRuleFinder(com.facebook.buck.rules.SourcePathRuleFinder) Flavor(com.facebook.buck.model.Flavor) SourcePathResolver(com.facebook.buck.rules.SourcePathResolver) BuildRuleParams(com.facebook.buck.rules.BuildRuleParams) BuildTarget(com.facebook.buck.model.BuildTarget) BuildRule(com.facebook.buck.rules.BuildRule) JavaSourceJar(com.facebook.buck.jvm.java.JavaSourceJar)

Aggregations

JavacOptions (com.facebook.buck.jvm.java.JavacOptions)14 BuildTarget (com.facebook.buck.model.BuildTarget)10 SourcePathRuleFinder (com.facebook.buck.rules.SourcePathRuleFinder)10 SourcePathResolver (com.facebook.buck.rules.SourcePathResolver)9 BuildRule (com.facebook.buck.rules.BuildRule)8 BuildRuleParams (com.facebook.buck.rules.BuildRuleParams)8 JavaLibrary (com.facebook.buck.jvm.java.JavaLibrary)5 BuildRuleResolver (com.facebook.buck.rules.BuildRuleResolver)5 Optional (java.util.Optional)5 CxxBuckConfig (com.facebook.buck.cxx.CxxBuckConfig)3 DefaultJavaLibrary (com.facebook.buck.jvm.java.DefaultJavaLibrary)3 JavaLibraryDescription (com.facebook.buck.jvm.java.JavaLibraryDescription)3 Flavor (com.facebook.buck.model.Flavor)3 ImmutableSet (com.google.common.collect.ImmutableSet)3 ImmutableSortedSet (com.google.common.collect.ImmutableSortedSet)3 Path (java.nio.file.Path)3 Test (org.junit.Test)3 JavaBuckConfig (com.facebook.buck.jvm.java.JavaBuckConfig)2 JavaOptions (com.facebook.buck.jvm.java.JavaOptions)2 Either (com.facebook.buck.model.Either)2