aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/tools/android/java/com/google/devtools/build
diff options
context:
space:
mode:
authorGravatar Googler <noreply@google.com>2016-07-07 19:11:40 +0000
committerGravatar Klaus Aehlig <aehlig@google.com>2016-07-08 08:43:32 +0000
commit3348513de992b5a3ab7d22dea9ad265d288c93b6 (patch)
treeee2ba837007aaba8d92999f722df6a9c241ba022 /src/tools/android/java/com/google/devtools/build
parentdda672424e15fd775b980ae22493b8c863bbfde3 (diff)
More pieces of RClassGeneratorAction
Add the rclass_generator.sh, and fill in the boiler-plate for mock tools, etc. Mostly cargo- culting references to resources_processor.sh. Rename earlier pieces to use RClassGenerator prefix instead of AndroidResourceCompilation. -- MOS_MIGRATED_REVID=126831848
Diffstat (limited to 'src/tools/android/java/com/google/devtools/build')
-rw-r--r--src/tools/android/java/com/google/devtools/build/android/AndroidResourceProcessor.java10
-rw-r--r--src/tools/android/java/com/google/devtools/build/android/BUILD12
-rw-r--r--src/tools/android/java/com/google/devtools/build/android/BUILD.tools12
-rw-r--r--src/tools/android/java/com/google/devtools/build/android/RClassGeneratorAction.java (renamed from src/tools/android/java/com/google/devtools/build/android/AndroidResourceCompilationAction.java)7
-rw-r--r--src/tools/android/java/com/google/devtools/build/android/resources/RClassGenerator.java (renamed from src/tools/android/java/com/google/devtools/build/android/resources/RClassWriter.java)5
5 files changed, 23 insertions, 23 deletions
diff --git a/src/tools/android/java/com/google/devtools/build/android/AndroidResourceProcessor.java b/src/tools/android/java/com/google/devtools/build/android/AndroidResourceProcessor.java
index c0f53d6821..dd7ba64f89 100644
--- a/src/tools/android/java/com/google/devtools/build/android/AndroidResourceProcessor.java
+++ b/src/tools/android/java/com/google/devtools/build/android/AndroidResourceProcessor.java
@@ -30,7 +30,7 @@ import com.google.common.util.concurrent.ListeningExecutorService;
import com.google.common.util.concurrent.MoreExecutors;
import com.google.devtools.build.android.Converters.ExistingPathConverter;
import com.google.devtools.build.android.Converters.FullRevisionConverter;
-import com.google.devtools.build.android.resources.RClassWriter;
+import com.google.devtools.build.android.resources.RClassGenerator;
import com.google.devtools.common.options.Converters.ColonSeparatedOptionListConverter;
import com.google.devtools.common.options.Converters.CommaSeparatedOptionListConverter;
import com.google.devtools.common.options.Option;
@@ -621,8 +621,8 @@ public class AndroidResourceProcessor {
boolean finalFields) throws IOException {
for (String packageName : libMap.keySet()) {
Collection<SymbolLoader> symbols = libMap.get(packageName);
- RClassWriter classWriter =
- new RClassWriter(classesOut.toFile(), packageName, fullSymbolValues, finalFields);
+ RClassGenerator classWriter =
+ new RClassGenerator(classesOut.toFile(), packageName, fullSymbolValues, finalFields);
for (SymbolLoader symbolLoader : symbols) {
classWriter.addSymbolsToWrite(symbolLoader);
}
@@ -630,8 +630,8 @@ public class AndroidResourceProcessor {
}
// Unlike the R.java generation, we also write the app's R.class file so that the class
// jar file can be complete (aapt doesn't generate it for us).
- RClassWriter classWriter =
- new RClassWriter(classesOut.toFile(), appPackageName, fullSymbolValues, finalFields);
+ RClassGenerator classWriter =
+ new RClassGenerator(classesOut.toFile(), appPackageName, fullSymbolValues, finalFields);
classWriter.addSymbolsToWrite(fullSymbolValues);
classWriter.write();
}
diff --git a/src/tools/android/java/com/google/devtools/build/android/BUILD b/src/tools/android/java/com/google/devtools/build/android/BUILD
index fe6b36d0b6..d6a5d0d574 100644
--- a/src/tools/android/java/com/google/devtools/build/android/BUILD
+++ b/src/tools/android/java/com/google/devtools/build/android/BUILD
@@ -26,24 +26,24 @@ java_binary(
)
java_binary(
- name = "AndroidResourceCompilingAction",
- main_class = "com.google.devtools.build.android.AndroidResourceCompilationAction",
+ name = "AndroidResourceProcessingAction",
+ main_class = "com.google.devtools.build.android.AndroidResourceProcessingAction",
runtime_deps = [
":android_builder_lib",
],
)
java_binary(
- name = "AndroidResourceProcessingAction",
- main_class = "com.google.devtools.build.android.AndroidResourceProcessingAction",
+ name = "ManifestMergerAction",
+ main_class = "com.google.devtools.build.android.ManifestMergerAction",
runtime_deps = [
":android_builder_lib",
],
)
java_binary(
- name = "ManifestMergerAction",
- main_class = "com.google.devtools.build.android.ManifestMergerAction",
+ name = "RClassGeneratorAction",
+ main_class = "com.google.devtools.build.android.RClassGeneratorAction",
runtime_deps = [
":android_builder_lib",
],
diff --git a/src/tools/android/java/com/google/devtools/build/android/BUILD.tools b/src/tools/android/java/com/google/devtools/build/android/BUILD.tools
index d844ff9553..abbe55f3fc 100644
--- a/src/tools/android/java/com/google/devtools/build/android/BUILD.tools
+++ b/src/tools/android/java/com/google/devtools/build/android/BUILD.tools
@@ -14,24 +14,24 @@ java_binary(
)
java_binary(
- name = "AndroidResourceCompilationAction",
- main_class = "com.google.devtools.build.android.AndroidResourceCompilationAction",
+ name = "AndroidResourceProcessingAction",
+ main_class = "com.google.devtools.build.android.AndroidResourceProcessingAction",
runtime_deps = [
":classes",
],
)
java_binary(
- name = "AndroidResourceProcessingAction",
- main_class = "com.google.devtools.build.android.AndroidResourceProcessingAction",
+ name = "ManifestMergerAction",
+ main_class = "com.google.devtools.build.android.ManifestMergerAction",
runtime_deps = [
":classes",
],
)
java_binary(
- name = "ManifestMergerAction",
- main_class = "com.google.devtools.build.android.ManifestMergerAction",
+ name = "RClassGeneratorAction",
+ main_class = "com.google.devtools.build.android.RClassGeneratorAction",
runtime_deps = [
":classes",
],
diff --git a/src/tools/android/java/com/google/devtools/build/android/AndroidResourceCompilationAction.java b/src/tools/android/java/com/google/devtools/build/android/RClassGeneratorAction.java
index dfb18ada50..15c1feaae6 100644
--- a/src/tools/android/java/com/google/devtools/build/android/AndroidResourceCompilationAction.java
+++ b/src/tools/android/java/com/google/devtools/build/android/RClassGeneratorAction.java
@@ -46,7 +46,7 @@ import java.util.logging.Logger;
*
* <pre>
* Example Usage:
- * java/com/google/build/android/AndroidResourceCompilationAction\
+ * java/com/google/build/android/RClassGeneratorAction\
* --primaryRTxt path/to/R.txt\
* --primaryManifest path/to/AndroidManifest.xml\
* --libraries p/t/1/AndroidManifest.txt:p/t/1/R.txt,\
@@ -54,13 +54,12 @@ import java.util.logging.Logger;
* --classJarOutput path/to/write/archive_resources.jar
* </pre>
*/
-public class AndroidResourceCompilationAction {
+public class RClassGeneratorAction {
private static final StdLogger STD_LOGGER =
new StdLogger(StdLogger.Level.WARNING);
- private static final Logger LOGGER =
- Logger.getLogger(AndroidResourceCompilationAction.class.getName());
+ private static final Logger LOGGER = Logger.getLogger(RClassGeneratorAction.class.getName());
/**
* Flag specifications for this action.
diff --git a/src/tools/android/java/com/google/devtools/build/android/resources/RClassWriter.java b/src/tools/android/java/com/google/devtools/build/android/resources/RClassGenerator.java
index 53bb945dc1..be25c0f6fa 100644
--- a/src/tools/android/java/com/google/devtools/build/android/resources/RClassWriter.java
+++ b/src/tools/android/java/com/google/devtools/build/android/resources/RClassGenerator.java
@@ -45,7 +45,7 @@ import java.util.Set;
* ErrorProne). A difference is that this doesn't generate line number tables and other debugging
* information. Also, the order of the constant pool tends to be different.
*/
-public class RClassWriter {
+public class RClassGenerator {
private static final int JAVA_VERSION = Opcodes.V1_7;
private static final String SUPER_CLASS = "java/lang/Object";
@@ -55,7 +55,8 @@ public class RClassWriter {
private final SymbolLoader symbolValues;
private final boolean finalFields;
- public RClassWriter(File outFolder,
+ public RClassGenerator(
+ File outFolder,
String packageName,
SymbolLoader values,
boolean finalFields) {