Skip to content

Commit

Permalink
Automated g4 rollback of commit 5c2dc67.
Browse files Browse the repository at this point in the history
*** Reason for rollback ***

Appears that the generated R classes are not correct, causing test failures.

*** Original change description ***

Automated g4 rollback of commit 1be84ee.

*** Reason for rollback ***

Rolling forward with the generated resources directory being created for tests without resources.

*** Original change description ***

Automated g4 rollback of commit d028d78.

*** Reason for rollback ***

Breaks 1000+ targets in the depot: []

*** Original change description ***

Generate pre-reconciled ids R classes for dependen...

***

RELNOTES: None
PiperOrigin-RevId: 159032530
  • Loading branch information
corbinrsmith-work authored and meteorcloudy committed Jun 16, 2017
1 parent 51dcd28 commit 951e4bb
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 128 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,18 +82,6 @@ public ConfiguredTarget create(RuleContext ruleContext)
// since they run on a JVM, not an android device.
JavaTargetAttributes.Builder attributesBuilder = javaCommon.initCommon();

// Add reconciled R classes for all dependencies with resources to the classpath before the
// dependency jars. Must use a NestedSet to have it appear in the correct place on the
// classpath.
attributesBuilder.addRuntimeClassPathEntries(
RobolectricResourceSymbolsActionBuilder.create(
ResourceDependencies.fromRuleDeps(ruleContext, false))
.setSdk(AndroidSdkProvider.fromRuleContext(ruleContext))
.setJarOut(
ruleContext.getImplicitOutputArtifact(
AndroidRuleClasses.ANDROID_RESOURCES_CLASS_JAR))
.buildAsClassPathEntry(ruleContext));

String testClass =
getAndCheckTestClass(ruleContext, ImmutableList.copyOf(attributesBuilder.getSourceFiles()));
getAndCheckTestSupport(ruleContext);
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
import com.google.devtools.common.options.OptionsParser;
import java.io.Closeable;
import java.nio.file.FileSystems;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.ArrayList;
import java.util.List;
Expand Down Expand Up @@ -107,7 +106,7 @@ public static void main(String[] args) throws Exception {
try (ScopedTemporaryDirectory scopedTmp =
new ScopedTemporaryDirectory("robolectric_resources_tmp")) {
Path tmp = scopedTmp.getPath();
Path generatedSources = Files.createDirectories(tmp.resolve("generated_resources"));
Path generatedSources = tmp.resolve("generated_resources");
// The reported availableProcessors may be higher than the actual resources
// (on a shared system). On the other hand, a lot of the work is I/O, so it's not completely
// CPU bound. As a compromise, divide by 2 the reported availableProcessors.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
import java.util.concurrent.TimeUnit;
import java.util.logging.Logger;


/**
* Provides an entry point for the compiling resource classes using a custom compiler (simply parse
* R.txt and make a jar, which is simpler than parsing R.java and running errorprone, etc.).
Expand Down

0 comments on commit 951e4bb

Please sign in to comment.