diff options
author | 2017-06-12 22:40:44 +0200 | |
---|---|---|
committer | 2017-06-13 09:38:24 +0200 | |
commit | 5c2dc673a3ad2aa52f25c6f7d767671ba3e9b02c (patch) | |
tree | 5fc9fab81e7ed4f55c29185e013bbbfcd5664fbd /src/tools/android/java/com/google/devtools/build/android/GenerateRobolectricResourceSymbolsAction.java | |
parent | c9b3b7482983c2edad1a554f2eef4a323bad0c79 (diff) |
Automated g4 rollback of commit 1be84ee92a825694b0c0026ac77134f8a084bd9c.
*** Reason for rollback ***
Rolling forward with the generated resources directory being created for tests without resources.
*** Original change description ***
Automated g4 rollback of commit d028d7854d3e95d97143945a1ec32944e5e4594b.
*** Reason for rollback ***
Breaks 1000+ targets in the depot: []
*** Original change description ***
Generate pre-reconciled ids R classes for dependency libraries with resources
in the transitive closure of robolectric tests.
RELNOTES: None
PiperOrigin-RevId: 158756991
Diffstat (limited to 'src/tools/android/java/com/google/devtools/build/android/GenerateRobolectricResourceSymbolsAction.java')
-rw-r--r-- | src/tools/android/java/com/google/devtools/build/android/GenerateRobolectricResourceSymbolsAction.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/tools/android/java/com/google/devtools/build/android/GenerateRobolectricResourceSymbolsAction.java b/src/tools/android/java/com/google/devtools/build/android/GenerateRobolectricResourceSymbolsAction.java index e95b646d6d..0857fe37fd 100644 --- a/src/tools/android/java/com/google/devtools/build/android/GenerateRobolectricResourceSymbolsAction.java +++ b/src/tools/android/java/com/google/devtools/build/android/GenerateRobolectricResourceSymbolsAction.java @@ -30,6 +30,7 @@ import com.google.devtools.common.options.OptionsBase; 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; @@ -106,7 +107,7 @@ public class GenerateRobolectricResourceSymbolsAction { try (ScopedTemporaryDirectory scopedTmp = new ScopedTemporaryDirectory("robolectric_resources_tmp")) { Path tmp = scopedTmp.getPath(); - Path generatedSources = tmp.resolve("generated_resources"); + Path generatedSources = Files.createDirectories(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. |