Search in sources :

Example 1 with SingletonArtifactCacheFactory

use of com.facebook.buck.artifact_cache.SingletonArtifactCacheFactory in project buck by facebook.

the class CleanCommandTest method createCommandRunnerParams.

private CommandRunnerParams createCommandRunnerParams() throws InterruptedException, IOException {
    projectFilesystem = new FakeProjectFilesystem();
    Cell cell = new TestCellBuilder().setFilesystem(projectFilesystem).build();
    Supplier<AndroidPlatformTarget> androidPlatformTargetSupplier = AndroidPlatformTarget.EXPLODING_ANDROID_PLATFORM_TARGET_SUPPLIER;
    return CommandRunnerParams.builder().setConsole(new TestConsole()).setStdIn(new ByteArrayInputStream("".getBytes("UTF-8"))).setCell(cell).setAndroidPlatformTargetSupplier(androidPlatformTargetSupplier).setArtifactCacheFactory(new SingletonArtifactCacheFactory(new NoopArtifactCache())).setBuckEventBus(BuckEventBusFactory.newInstance()).setParser(createMock(Parser.class)).setPlatform(Platform.detect()).setEnvironment(ImmutableMap.copyOf(System.getenv())).setJavaPackageFinder(new FakeJavaPackageFinder()).setObjectMapper(ObjectMappers.newDefaultInstance()).setClock(new DefaultClock()).setProcessManager(Optional.empty()).setWebServer(Optional.empty()).setBuckConfig(FakeBuckConfig.builder().build()).setFileHashCache(new StackedFileHashCache(ImmutableList.of())).setExecutors(ImmutableMap.of()).setBuildEnvironmentDescription(CommandRunnerParamsForTesting.BUILD_ENVIRONMENT_DESCRIPTION).setVersionedTargetGraphCache(new VersionedTargetGraphCache()).setActionGraphCache(new ActionGraphCache(new BroadcastEventListener())).setKnownBuildRuleTypesFactory(new KnownBuildRuleTypesFactory(new FakeProcessExecutor(), new FakeAndroidDirectoryResolver())).build();
}
Also used : FakeProjectFilesystem(com.facebook.buck.testutil.FakeProjectFilesystem) KnownBuildRuleTypesFactory(com.facebook.buck.rules.KnownBuildRuleTypesFactory) BroadcastEventListener(com.facebook.buck.event.listener.BroadcastEventListener) VersionedTargetGraphCache(com.facebook.buck.versions.VersionedTargetGraphCache) SingletonArtifactCacheFactory(com.facebook.buck.artifact_cache.SingletonArtifactCacheFactory) TestCellBuilder(com.facebook.buck.rules.TestCellBuilder) AndroidPlatformTarget(com.facebook.buck.android.AndroidPlatformTarget) ActionGraphCache(com.facebook.buck.rules.ActionGraphCache) FakeAndroidDirectoryResolver(com.facebook.buck.android.FakeAndroidDirectoryResolver) FakeJavaPackageFinder(com.facebook.buck.jvm.java.FakeJavaPackageFinder) ByteArrayInputStream(java.io.ByteArrayInputStream) NoopArtifactCache(com.facebook.buck.artifact_cache.NoopArtifactCache) FakeProcessExecutor(com.facebook.buck.util.FakeProcessExecutor) DefaultClock(com.facebook.buck.timing.DefaultClock) StackedFileHashCache(com.facebook.buck.util.cache.StackedFileHashCache) TestConsole(com.facebook.buck.testutil.TestConsole) Cell(com.facebook.buck.rules.Cell)

Aggregations

AndroidPlatformTarget (com.facebook.buck.android.AndroidPlatformTarget)1 FakeAndroidDirectoryResolver (com.facebook.buck.android.FakeAndroidDirectoryResolver)1 NoopArtifactCache (com.facebook.buck.artifact_cache.NoopArtifactCache)1 SingletonArtifactCacheFactory (com.facebook.buck.artifact_cache.SingletonArtifactCacheFactory)1 BroadcastEventListener (com.facebook.buck.event.listener.BroadcastEventListener)1 FakeJavaPackageFinder (com.facebook.buck.jvm.java.FakeJavaPackageFinder)1 ActionGraphCache (com.facebook.buck.rules.ActionGraphCache)1 Cell (com.facebook.buck.rules.Cell)1 KnownBuildRuleTypesFactory (com.facebook.buck.rules.KnownBuildRuleTypesFactory)1 TestCellBuilder (com.facebook.buck.rules.TestCellBuilder)1 FakeProjectFilesystem (com.facebook.buck.testutil.FakeProjectFilesystem)1 TestConsole (com.facebook.buck.testutil.TestConsole)1 DefaultClock (com.facebook.buck.timing.DefaultClock)1 FakeProcessExecutor (com.facebook.buck.util.FakeProcessExecutor)1 StackedFileHashCache (com.facebook.buck.util.cache.StackedFileHashCache)1 VersionedTargetGraphCache (com.facebook.buck.versions.VersionedTargetGraphCache)1 ByteArrayInputStream (java.io.ByteArrayInputStream)1